mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 06:15:04 +00:00
(svn r23383) -Update: bring Squirrel to 2.2.5; besides some nice bug fixes, it mostly solves the sort() issues
This commit is contained in:
parent
71c1ef5d26
commit
0c2bbdde5c
2
src/3rdparty/squirrel/COPYRIGHT
vendored
2
src/3rdparty/squirrel/COPYRIGHT
vendored
@ -1,4 +1,4 @@
|
||||
Copyright (c) 2003-2009 Alberto Demichelis
|
||||
Copyright (c) 2003-2011 Alberto Demichelis
|
||||
|
||||
This software is provided 'as-is', without any
|
||||
express or implied warranty. In no event will the
|
||||
|
12
src/3rdparty/squirrel/HISTORY
vendored
12
src/3rdparty/squirrel/HISTORY
vendored
@ -1,3 +1,15 @@
|
||||
***version 2.2.5 stable***
|
||||
-sq_getsize() now returns userdatasize for classes and instances
|
||||
-added parameter 'isstatic' to _newmember metamethod(thx G.Meyer)
|
||||
-now array.sort() is implemented with heapsort
|
||||
-added SQUIRREL_VERSION_NUMBER preprocessor definition
|
||||
-now floats in scientific notation also accept numbers with no '.' (eg. 1e+6 or 1e6)
|
||||
-fixed some compiler warning
|
||||
-fixed a minor compiler bug
|
||||
-fixed some bugs when SQUSEDOUBLE is used in 32bits systems
|
||||
-fixed bug in GC
|
||||
|
||||
***2009-11-15 ***
|
||||
***version 2.2.4 stable***
|
||||
-fixed bug in functions with default parameters
|
||||
|
||||
|
2
src/3rdparty/squirrel/README
vendored
2
src/3rdparty/squirrel/README
vendored
@ -1,4 +1,4 @@
|
||||
The programming language SQUIRREL 2.2.4 stable
|
||||
The programming language SQUIRREL 2.2.5 stable
|
||||
|
||||
--------------------------------------------------
|
||||
The project has been compiled and run on Windows(Windows XP/2000 on Intel x86 Windows XP Pro on AMD x64) and
|
||||
|
BIN
src/3rdparty/squirrel/doc/sqstdlib2.chm
vendored
BIN
src/3rdparty/squirrel/doc/sqstdlib2.chm
vendored
Binary file not shown.
380
src/3rdparty/squirrel/doc/sqstdlib2.pdf
vendored
380
src/3rdparty/squirrel/doc/sqstdlib2.pdf
vendored
@ -8,7 +8,7 @@ endobj
|
||||
<< /Length 246 /Filter [ /ASCII85Decode /FlateDecode ]
|
||||
>>
|
||||
stream
|
||||
Gaqd[\IQJ1&-UA:?a4/j=Osr[Jq*pMi=8^1`.4Za_?id24lM2b[+uF7AnR]0Q4ej;k9Tg),:)c*7W;lXW&kJok9tubis9_(_4P/*D/T*8;Q*)>(=mXhjT`"b>?n0P<Pro!b>b;#0GGp)YQMZ:%Nr.,]Ee)267S5JJPh(qWc.2JUaBD$]k#7;O+_6b2/Q4AiQp[&KcBNMUK-,KPb[[BBjHJC?@,=d"kc#.j8KbXf_i75B.qGe8(@~>
|
||||
Gaqd[\IQJ1&-UA:?a4/j=Osr[Jq*pMi=8^1`.4Za_?id24lM2b[+uF7AnR]0Q4ej;k9Tg),:)c*7W;lXW&kJok9tubis9_(_4P/*D/T*8;Q*)>(=mXhjT`"b>?n0P<Pro!b>b;#0GGp)YQMZ:%Nr.,]Ee)267S5JJPh(qWc.2JUaBD$]k#7;O+_fr2/Q4AiQp[&KcBNMUK-,KPb[[BBjHJC?@,=d"kc#.j8KbXf_i75B.qI)8(I~>
|
||||
endstream
|
||||
endobj
|
||||
6 0 obj
|
||||
@ -20,10 +20,10 @@ endobj
|
||||
>>
|
||||
endobj
|
||||
7 0 obj
|
||||
<< /Length 1048 /Filter [ /ASCII85Decode /FlateDecode ]
|
||||
<< /Length 1047 /Filter [ /ASCII85Decode /FlateDecode ]
|
||||
>>
|
||||
stream
|
||||
Gasao966RV&AJ$CE(_tHW'$"nl)EoW-Cl43$+I>J!Q(cIL^7FUIpZW@C?=A3PF7AQ=m^\8qW.Nip#]36"WOi=Z>/KJqc2SMl7_XYcptg:pcB1EJX87NpZol_JI4]qNHZ<g#tfEr^q5&[\1Os6*T\*+$S4b;(S^EE;&kDU.<!Old)OK*''G5/GX&n.ZN;(m_1YI4Fb+GZ(o<&iqMsZ*83Zj+ViTFO84/<(0\RI9B:!f]Hhfhn7R?dV[+Be\EF>WipS1sc0=@h[#FpnE(4gB;'M""?S^l0mQ$nOa,Z`%Y8fk5[;!2#(JfeYt8uTA=r@RE?ekgRdZK?dm.bp%\,elE,HH/#^:>i!Ze;^9.$/EZ8601HAV3X2/%]#@B0#jP8CF<7I.+lB;Prf2M`XX1^ose*uj^rLuFbuUBjdCpK.%0sapS>:C`Idfjh-3;oG[i%`Jej(^#eYai'Y'YPNL$hc!gLu4^(Si?IbpSOS??X/qRiF]U>)IYH7nknA^=Sdr67Ja+):!QcCrgVWrD[+Kl.GBn&ZK@CC<%bVIE_/n>7A'TU5a5SXQ_`99iYpL<_I6_B].)W4[(>OHT;RRN+aEQjYDJbm+R/73ub)+`(D9NXbe;;?.*7rltdKS2#J7#"C25MH66F]j!rACf*#6$hSmBr1PNj=FhusU+MHWH_*<t-&5&eRV(c[Q!+ZN*1G8]OGOjr1f\J]LQN+NE`Okf)[Hhp$Vl_69*-\PA?*\hbm;h]Tt918N&E62;U'VT`NW`^**PT.p8Ah<*"!!A"%0ucWT?W>b'dcen"hgQ>)YPD.![O@G>F-*eOMf:k0mcL>c:((7.$:K!Fmh!k^[tQZf])ohKVpNo2(tRQ4lUgh`nN+0Nud-;#j/LXTr:tM0TEB;ZkLS&X[%t"J'$nS3p.8V(XKUE:S\Pg^.<tP7qSYSW;CN>UnD:;"q_-52O;FN$;*SX?PqdKr&YUpkg=#C%q^@Vto(XHJUj[5r8/Igf_UuRQ+;okI`ujX(VB@;ZDPPcWBIM:1mq)"S&MB\(,nMDReMqk`XaD9V\*4~>
|
||||
Gasao966RV&AJ$CE(_tHW'$$Ddo4`99KG>D'5hXt!eaDq&<VWOs8*-r<%A3_).0boCA6K7-f=*F2kQ6U>+nrXf8D?8/YXB;^F4ot&;<CcDGV<C6/Dh'Y90AA.Kj0=_/5]RBY.D;_=aS??%k`/.DO4r?ubg\0oGE^`L[?,H$=.Z;GSMP/f;,*IKoU\%5nZi&XN^f"'ohD[*:/KGH;oRn^1,nI_>YF>$<h;;/%&A?/D[<jnHDP$G(#;]Da$M,:CH=R,#\i"B>C33$R8(!afRg9emADDoN/Gq^kFG<%$"-FhiSoSSum`^8D^FT^E01>:QhB:j8S4iIc_3g`<(ZIeSFbcT)eJi3m:JO/0#ego2NMb(gI!*VY0P8Z-r@N'UT(?F"h&Y_<=^n-jDu4[b6tEH.H$cf-MA$FdM91QcQO2Y@7BLign\JkFbaS>$e3FcoJ8#_N6]YFu[7/uM16Gq?!%D'plAM.ilY2J3tif8V;%hMiO1D))GSQfbBUk8fujAtdoh%J0tictI5qs*AfS5DYn(Z39C&Oq!\YQr0-]D2BYiB#%'CkGuNnB-rtlq5%>`+ohaG([_Q,;0ekW8V3\9YY*8O:nV)n_%m^$N_@a(U%h&K?iem:)hFG6`XgqAkXEtJb#><ao>mX`8g\)2frpN&1dqs'E(s<="*3eS;[8<C1!*#9%T5<dj$5#c)3of4bWs1IHL!a7q=#kH-,[*DYct^sj<1rVd.0W&AmG7m5]%S-$_Ha!_nsXJ49SUl$YIGQ!u0[RRXqN5<+%O:1b>7[IUJu*[?gVp3qK5f\oWadQc"(BZkuPdi.GH%,8S(K?6hi/DHRaZ"p9eoW5gf3)U.`2-e1<iV;'@:@Z97BVcOI"PC*ofJ7RP`&9aM0Qgf>b0HE4V;_4N5Et!nH-l]A^eYNg`ShQa#iU^IbipEr$0fPPB-//Fbr\r#uldV%o!ih_KBDnR/Zn4JU,"Y((^5(AZrjJ5d\'KQN/A9AR<cb;b:>ObUYE/M=g&.6pIj4RWPm4;<3RfEBJpQs(EM&jBY#d$^AG6<C\=;%~>
|
||||
endstream
|
||||
endobj
|
||||
8 0 obj
|
||||
@ -1513,196 +1513,196 @@ endobj
|
||||
xref
|
||||
0 191
|
||||
0000000000 65535 f
|
||||
0000053911 00000 n
|
||||
0000054177 00000 n
|
||||
0000054270 00000 n
|
||||
0000053910 00000 n
|
||||
0000054176 00000 n
|
||||
0000054269 00000 n
|
||||
0000000015 00000 n
|
||||
0000000071 00000 n
|
||||
0000000408 00000 n
|
||||
0000000514 00000 n
|
||||
0000001654 00000 n
|
||||
0000001760 00000 n
|
||||
0000001921 00000 n
|
||||
0000002028 00000 n
|
||||
0000003396 00000 n
|
||||
0000003519 00000 n
|
||||
0000003805 00000 n
|
||||
0000054436 00000 n
|
||||
0000003941 00000 n
|
||||
0000054501 00000 n
|
||||
0000004077 00000 n
|
||||
0000054566 00000 n
|
||||
0000004213 00000 n
|
||||
0000054633 00000 n
|
||||
0000004349 00000 n
|
||||
0000054700 00000 n
|
||||
0000004484 00000 n
|
||||
0000054767 00000 n
|
||||
0000004620 00000 n
|
||||
0000054833 00000 n
|
||||
0000004756 00000 n
|
||||
0000054898 00000 n
|
||||
0000004891 00000 n
|
||||
0000054965 00000 n
|
||||
0000005027 00000 n
|
||||
0000055030 00000 n
|
||||
0000005163 00000 n
|
||||
0000055096 00000 n
|
||||
0000005299 00000 n
|
||||
0000055164 00000 n
|
||||
0000005435 00000 n
|
||||
0000055232 00000 n
|
||||
0000005571 00000 n
|
||||
0000055300 00000 n
|
||||
0000005707 00000 n
|
||||
0000055367 00000 n
|
||||
0000005843 00000 n
|
||||
0000055435 00000 n
|
||||
0000005979 00000 n
|
||||
0000055502 00000 n
|
||||
0000006115 00000 n
|
||||
0000055568 00000 n
|
||||
0000006251 00000 n
|
||||
0000055636 00000 n
|
||||
0000006387 00000 n
|
||||
0000055704 00000 n
|
||||
0000006523 00000 n
|
||||
0000055770 00000 n
|
||||
0000006659 00000 n
|
||||
0000055838 00000 n
|
||||
0000006795 00000 n
|
||||
0000055904 00000 n
|
||||
0000006931 00000 n
|
||||
0000055972 00000 n
|
||||
0000007067 00000 n
|
||||
0000056040 00000 n
|
||||
0000007203 00000 n
|
||||
0000056108 00000 n
|
||||
0000007339 00000 n
|
||||
0000056174 00000 n
|
||||
0000007475 00000 n
|
||||
0000056240 00000 n
|
||||
0000007611 00000 n
|
||||
0000056308 00000 n
|
||||
0000007747 00000 n
|
||||
0000056376 00000 n
|
||||
0000007883 00000 n
|
||||
0000056443 00000 n
|
||||
0000008019 00000 n
|
||||
0000056510 00000 n
|
||||
0000008155 00000 n
|
||||
0000056578 00000 n
|
||||
0000008291 00000 n
|
||||
0000056644 00000 n
|
||||
0000008427 00000 n
|
||||
0000056712 00000 n
|
||||
0000008563 00000 n
|
||||
0000056778 00000 n
|
||||
0000008699 00000 n
|
||||
0000056846 00000 n
|
||||
0000008834 00000 n
|
||||
0000056914 00000 n
|
||||
0000008970 00000 n
|
||||
0000010033 00000 n
|
||||
0000010141 00000 n
|
||||
0000012317 00000 n
|
||||
0000012425 00000 n
|
||||
0000014218 00000 n
|
||||
0000014326 00000 n
|
||||
0000015774 00000 n
|
||||
0000015882 00000 n
|
||||
0000018038 00000 n
|
||||
0000018146 00000 n
|
||||
0000018966 00000 n
|
||||
0000019076 00000 n
|
||||
0000020615 00000 n
|
||||
0000020725 00000 n
|
||||
0000022571 00000 n
|
||||
0000022681 00000 n
|
||||
0000023998 00000 n
|
||||
0000024108 00000 n
|
||||
0000024653 00000 n
|
||||
0000024763 00000 n
|
||||
0000026007 00000 n
|
||||
0000026117 00000 n
|
||||
0000027454 00000 n
|
||||
0000027564 00000 n
|
||||
0000029289 00000 n
|
||||
0000029399 00000 n
|
||||
0000030078 00000 n
|
||||
0000030188 00000 n
|
||||
0000031878 00000 n
|
||||
0000031988 00000 n
|
||||
0000033924 00000 n
|
||||
0000034034 00000 n
|
||||
0000035809 00000 n
|
||||
0000035919 00000 n
|
||||
0000037776 00000 n
|
||||
0000037886 00000 n
|
||||
0000039310 00000 n
|
||||
0000039420 00000 n
|
||||
0000041126 00000 n
|
||||
0000041236 00000 n
|
||||
0000041592 00000 n
|
||||
0000041702 00000 n
|
||||
0000042702 00000 n
|
||||
0000042812 00000 n
|
||||
0000044314 00000 n
|
||||
0000044440 00000 n
|
||||
0000044461 00000 n
|
||||
0000045104 00000 n
|
||||
0000045230 00000 n
|
||||
0000056979 00000 n
|
||||
0000057033 00000 n
|
||||
0000045251 00000 n
|
||||
0000057099 00000 n
|
||||
0000045505 00000 n
|
||||
0000045706 00000 n
|
||||
0000045942 00000 n
|
||||
0000046289 00000 n
|
||||
0000046487 00000 n
|
||||
0000046655 00000 n
|
||||
0000046799 00000 n
|
||||
0000046955 00000 n
|
||||
0000047124 00000 n
|
||||
0000047289 00000 n
|
||||
0000047563 00000 n
|
||||
0000047863 00000 n
|
||||
0000048061 00000 n
|
||||
0000048229 00000 n
|
||||
0000048396 00000 n
|
||||
0000048552 00000 n
|
||||
0000048721 00000 n
|
||||
0000048871 00000 n
|
||||
0000049171 00000 n
|
||||
0000049369 00000 n
|
||||
0000049522 00000 n
|
||||
0000049678 00000 n
|
||||
0000049832 00000 n
|
||||
0000050144 00000 n
|
||||
0000050342 00000 n
|
||||
0000050495 00000 n
|
||||
0000050651 00000 n
|
||||
0000050805 00000 n
|
||||
0000051117 00000 n
|
||||
0000051315 00000 n
|
||||
0000051483 00000 n
|
||||
0000051639 00000 n
|
||||
0000051795 00000 n
|
||||
0000051964 00000 n
|
||||
0000052124 00000 n
|
||||
0000052316 00000 n
|
||||
0000052610 00000 n
|
||||
0000052751 00000 n
|
||||
0000052904 00000 n
|
||||
0000053019 00000 n
|
||||
0000053132 00000 n
|
||||
0000053241 00000 n
|
||||
0000053357 00000 n
|
||||
0000053468 00000 n
|
||||
0000053582 00000 n
|
||||
0000053689 00000 n
|
||||
0000053801 00000 n
|
||||
0000001653 00000 n
|
||||
0000001759 00000 n
|
||||
0000001920 00000 n
|
||||
0000002027 00000 n
|
||||
0000003395 00000 n
|
||||
0000003518 00000 n
|
||||
0000003804 00000 n
|
||||
0000054435 00000 n
|
||||
0000003940 00000 n
|
||||
0000054500 00000 n
|
||||
0000004076 00000 n
|
||||
0000054565 00000 n
|
||||
0000004212 00000 n
|
||||
0000054632 00000 n
|
||||
0000004348 00000 n
|
||||
0000054699 00000 n
|
||||
0000004483 00000 n
|
||||
0000054766 00000 n
|
||||
0000004619 00000 n
|
||||
0000054832 00000 n
|
||||
0000004755 00000 n
|
||||
0000054897 00000 n
|
||||
0000004890 00000 n
|
||||
0000054964 00000 n
|
||||
0000005026 00000 n
|
||||
0000055029 00000 n
|
||||
0000005162 00000 n
|
||||
0000055095 00000 n
|
||||
0000005298 00000 n
|
||||
0000055163 00000 n
|
||||
0000005434 00000 n
|
||||
0000055231 00000 n
|
||||
0000005570 00000 n
|
||||
0000055299 00000 n
|
||||
0000005706 00000 n
|
||||
0000055366 00000 n
|
||||
0000005842 00000 n
|
||||
0000055434 00000 n
|
||||
0000005978 00000 n
|
||||
0000055501 00000 n
|
||||
0000006114 00000 n
|
||||
0000055567 00000 n
|
||||
0000006250 00000 n
|
||||
0000055635 00000 n
|
||||
0000006386 00000 n
|
||||
0000055703 00000 n
|
||||
0000006522 00000 n
|
||||
0000055769 00000 n
|
||||
0000006658 00000 n
|
||||
0000055837 00000 n
|
||||
0000006794 00000 n
|
||||
0000055903 00000 n
|
||||
0000006930 00000 n
|
||||
0000055971 00000 n
|
||||
0000007066 00000 n
|
||||
0000056039 00000 n
|
||||
0000007202 00000 n
|
||||
0000056107 00000 n
|
||||
0000007338 00000 n
|
||||
0000056173 00000 n
|
||||
0000007474 00000 n
|
||||
0000056239 00000 n
|
||||
0000007610 00000 n
|
||||
0000056307 00000 n
|
||||
0000007746 00000 n
|
||||
0000056375 00000 n
|
||||
0000007882 00000 n
|
||||
0000056442 00000 n
|
||||
0000008018 00000 n
|
||||
0000056509 00000 n
|
||||
0000008154 00000 n
|
||||
0000056577 00000 n
|
||||
0000008290 00000 n
|
||||
0000056643 00000 n
|
||||
0000008426 00000 n
|
||||
0000056711 00000 n
|
||||
0000008562 00000 n
|
||||
0000056777 00000 n
|
||||
0000008698 00000 n
|
||||
0000056845 00000 n
|
||||
0000008833 00000 n
|
||||
0000056913 00000 n
|
||||
0000008969 00000 n
|
||||
0000010032 00000 n
|
||||
0000010140 00000 n
|
||||
0000012316 00000 n
|
||||
0000012424 00000 n
|
||||
0000014217 00000 n
|
||||
0000014325 00000 n
|
||||
0000015773 00000 n
|
||||
0000015881 00000 n
|
||||
0000018037 00000 n
|
||||
0000018145 00000 n
|
||||
0000018965 00000 n
|
||||
0000019075 00000 n
|
||||
0000020614 00000 n
|
||||
0000020724 00000 n
|
||||
0000022570 00000 n
|
||||
0000022680 00000 n
|
||||
0000023997 00000 n
|
||||
0000024107 00000 n
|
||||
0000024652 00000 n
|
||||
0000024762 00000 n
|
||||
0000026006 00000 n
|
||||
0000026116 00000 n
|
||||
0000027453 00000 n
|
||||
0000027563 00000 n
|
||||
0000029288 00000 n
|
||||
0000029398 00000 n
|
||||
0000030077 00000 n
|
||||
0000030187 00000 n
|
||||
0000031877 00000 n
|
||||
0000031987 00000 n
|
||||
0000033923 00000 n
|
||||
0000034033 00000 n
|
||||
0000035808 00000 n
|
||||
0000035918 00000 n
|
||||
0000037775 00000 n
|
||||
0000037885 00000 n
|
||||
0000039309 00000 n
|
||||
0000039419 00000 n
|
||||
0000041125 00000 n
|
||||
0000041235 00000 n
|
||||
0000041591 00000 n
|
||||
0000041701 00000 n
|
||||
0000042701 00000 n
|
||||
0000042811 00000 n
|
||||
0000044313 00000 n
|
||||
0000044439 00000 n
|
||||
0000044460 00000 n
|
||||
0000045103 00000 n
|
||||
0000045229 00000 n
|
||||
0000056978 00000 n
|
||||
0000057032 00000 n
|
||||
0000045250 00000 n
|
||||
0000057098 00000 n
|
||||
0000045504 00000 n
|
||||
0000045705 00000 n
|
||||
0000045941 00000 n
|
||||
0000046288 00000 n
|
||||
0000046486 00000 n
|
||||
0000046654 00000 n
|
||||
0000046798 00000 n
|
||||
0000046954 00000 n
|
||||
0000047123 00000 n
|
||||
0000047288 00000 n
|
||||
0000047562 00000 n
|
||||
0000047862 00000 n
|
||||
0000048060 00000 n
|
||||
0000048228 00000 n
|
||||
0000048395 00000 n
|
||||
0000048551 00000 n
|
||||
0000048720 00000 n
|
||||
0000048870 00000 n
|
||||
0000049170 00000 n
|
||||
0000049368 00000 n
|
||||
0000049521 00000 n
|
||||
0000049677 00000 n
|
||||
0000049831 00000 n
|
||||
0000050143 00000 n
|
||||
0000050341 00000 n
|
||||
0000050494 00000 n
|
||||
0000050650 00000 n
|
||||
0000050804 00000 n
|
||||
0000051116 00000 n
|
||||
0000051314 00000 n
|
||||
0000051482 00000 n
|
||||
0000051638 00000 n
|
||||
0000051794 00000 n
|
||||
0000051963 00000 n
|
||||
0000052123 00000 n
|
||||
0000052315 00000 n
|
||||
0000052609 00000 n
|
||||
0000052750 00000 n
|
||||
0000052903 00000 n
|
||||
0000053018 00000 n
|
||||
0000053131 00000 n
|
||||
0000053240 00000 n
|
||||
0000053356 00000 n
|
||||
0000053467 00000 n
|
||||
0000053581 00000 n
|
||||
0000053688 00000 n
|
||||
0000053800 00000 n
|
||||
trailer
|
||||
<<
|
||||
/Size 191
|
||||
@ -1710,5 +1710,5 @@ trailer
|
||||
/Info 4 0 R
|
||||
>>
|
||||
startxref
|
||||
57165
|
||||
57164
|
||||
%%EOF
|
||||
|
BIN
src/3rdparty/squirrel/doc/squirrel2.chm
vendored
BIN
src/3rdparty/squirrel/doc/squirrel2.chm
vendored
Binary file not shown.
3531
src/3rdparty/squirrel/doc/squirrel2.pdf
vendored
3531
src/3rdparty/squirrel/doc/squirrel2.pdf
vendored
File diff suppressed because it is too large
Load Diff
17
src/3rdparty/squirrel/include/squirrel.h
vendored
17
src/3rdparty/squirrel/include/squirrel.h
vendored
@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (c) 2003-2009 Alberto Demichelis
|
||||
Copyright (c) 2003-2011 Alberto Demichelis
|
||||
|
||||
This software is provided 'as-is', without any
|
||||
express or implied warranty. In no event will the
|
||||
@ -45,9 +45,11 @@ extern "C" {
|
||||
#define SQUIRREL_API extern
|
||||
#endif
|
||||
|
||||
#if (defined(_WIN64) || defined(_LP64)) && !defined(_SQ64)
|
||||
#if (defined(_WIN64) || defined(_LP64))
|
||||
#ifndef _SQ64
|
||||
#define _SQ64
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef _SQ64
|
||||
#ifdef _MSC_VER
|
||||
@ -78,13 +80,11 @@ typedef double SQFloat;
|
||||
typedef float SQFloat;
|
||||
#endif
|
||||
|
||||
#if defined(SQUSEDOUBLE) && !defined(_SQ64)
|
||||
#if defined(SQUSEDOUBLE) && !defined(_SQ64) || !defined(SQUSEDOUBLE) && defined(_SQ64)
|
||||
#ifdef _MSC_VER
|
||||
typedef __int64 SQRawObjectVal; //must be 64bits
|
||||
#elif defined(_WIN32)
|
||||
typedef long long SQRawObjectVal; //must be 64bits
|
||||
#else
|
||||
typedef long SQRawObjectVal; //must be 64bits
|
||||
typedef long long SQRawObjectVal; //must be 64bits
|
||||
#endif
|
||||
#define SQ_OBJECT_RAWINIT() { _unVal.raw = 0; }
|
||||
#else
|
||||
@ -182,9 +182,10 @@ typedef char SQChar;
|
||||
#define MAX_CHAR 0xFF
|
||||
#endif
|
||||
|
||||
#define SQUIRREL_VERSION _SC("Squirrel 2.2.4 stable - With custom OpenTTD modifications")
|
||||
#define SQUIRREL_COPYRIGHT _SC("Copyright (C) 2003-2009 Alberto Demichelis")
|
||||
#define SQUIRREL_VERSION _SC("Squirrel 2.2.5 stable - With custom OpenTTD modifications")
|
||||
#define SQUIRREL_COPYRIGHT _SC("Copyright (C) 2003-2010 Alberto Demichelis")
|
||||
#define SQUIRREL_AUTHOR _SC("Alberto Demichelis")
|
||||
#define SQUIRREL_VERSION_NUMBER 225
|
||||
|
||||
#define SQ_VMSTATE_IDLE 0
|
||||
#define SQ_VMSTATE_RUNNING 1
|
||||
|
2
src/3rdparty/squirrel/sqstdlib/sqstdrex.cpp
vendored
2
src/3rdparty/squirrel/sqstdlib/sqstdrex.cpp
vendored
@ -180,7 +180,7 @@ static SQInteger sqstd_rex_class(SQRex *exp)
|
||||
SQInteger r;
|
||||
if(*exp->_p++ == ']') sqstd_rex_error(exp,_SC("unfinished range"));
|
||||
r = sqstd_rex_newnode(exp,OP_RANGE);
|
||||
if((SQChar)first>*exp->_p) sqstd_rex_error(exp,_SC("invalid range"));
|
||||
if(exp->_nodes[first].type>*exp->_p) sqstd_rex_error(exp,_SC("invalid range"));
|
||||
if(exp->_nodes[first].type == OP_CCLASS) sqstd_rex_error(exp,_SC("cannot use character classes in ranges"));
|
||||
exp->_nodes[r].left = exp->_nodes[first].type;
|
||||
SQInteger t = sqstd_rex_escapechar(exp);
|
||||
|
2
src/3rdparty/squirrel/squirrel/sqapi.cpp
vendored
2
src/3rdparty/squirrel/squirrel/sqapi.cpp
vendored
@ -583,6 +583,8 @@ SQInteger sq_getsize(HSQUIRRELVM v, SQInteger idx)
|
||||
case OT_TABLE: return _table(o)->CountUsed();
|
||||
case OT_ARRAY: return _array(o)->Size();
|
||||
case OT_USERDATA: return _userdata(o)->_size;
|
||||
case OT_INSTANCE: return _instance(o)->_class->_udsize;
|
||||
case OT_CLASS: return _class(o)->_udsize;
|
||||
default:
|
||||
return sq_aux_invalidtype(v, type);
|
||||
}
|
||||
|
81
src/3rdparty/squirrel/squirrel/sqbaselib.cpp
vendored
81
src/3rdparty/squirrel/squirrel/sqbaselib.cpp
vendored
@ -486,8 +486,7 @@ static SQInteger array_resize(HSQUIRRELVM v)
|
||||
}
|
||||
|
||||
|
||||
//QSORT ala Sedgewick
|
||||
bool _qsort_compare(HSQUIRRELVM v,SQObjectPtr &arr,const SQObjectPtr &a,const SQObjectPtr &b,SQInteger func,SQInteger &ret)
|
||||
bool _sort_compare(HSQUIRRELVM v,SQObjectPtr &a,SQObjectPtr &b,SQInteger func,SQInteger &ret)
|
||||
{
|
||||
if(func < 0) {
|
||||
if(!v->ObjCmp(a,b,ret)) return false;
|
||||
@ -503,32 +502,66 @@ bool _qsort_compare(HSQUIRRELVM v,SQObjectPtr &arr,const SQObjectPtr &a,const SQ
|
||||
v->Raise_Error(_SC("compare func failed"));
|
||||
return false;
|
||||
}
|
||||
sq_getinteger(v, -1, &ret);
|
||||
if(SQ_FAILED(sq_getinteger(v, -1, &ret))) {
|
||||
v->Raise_Error(_SC("numeric value expected as return value of the compare function"));
|
||||
return false;
|
||||
}
|
||||
sq_settop(v, top);
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
struct qsort_cmp
|
||||
{
|
||||
HSQUIRRELVM v;
|
||||
SQInteger func;
|
||||
bool operator() (const SQObjectPtr &a, const SQObjectPtr &b) const
|
||||
{
|
||||
SQInteger res;
|
||||
SQObjectPtr dummy;
|
||||
if (!_qsort_compare(v, dummy, a, b, func, res)) return false;
|
||||
return res < 0;
|
||||
}
|
||||
};
|
||||
|
||||
bool _qsort(HSQUIRRELVM v,SQObjectPtr &arr, SQInteger func)
|
||||
bool _hsort_sift_down(HSQUIRRELVM v,SQArray *arr, SQInteger root, SQInteger bottom, SQInteger func)
|
||||
{
|
||||
SQArray *a=_array(arr);
|
||||
qsort_cmp cur_cmp;
|
||||
cur_cmp.v = v;
|
||||
cur_cmp.func = func;
|
||||
std::sort(a->_values._vals, a->_values._vals + a->Size(), cur_cmp);
|
||||
SQInteger maxChild;
|
||||
SQInteger done = 0;
|
||||
SQInteger ret;
|
||||
SQInteger root2;
|
||||
while (((root2 = root * 2) <= bottom) && (!done))
|
||||
{
|
||||
if (root2 == bottom) {
|
||||
maxChild = root2;
|
||||
}
|
||||
else {
|
||||
if(!_sort_compare(v,arr->_values[root2],arr->_values[root2 + 1],func,ret))
|
||||
return false;
|
||||
if (ret > 0) {
|
||||
maxChild = root2;
|
||||
}
|
||||
else {
|
||||
maxChild = root2 + 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(!_sort_compare(v,arr->_values[root],arr->_values[maxChild],func,ret))
|
||||
return false;
|
||||
if (ret < 0) {
|
||||
_Swap(arr->_values[root],arr->_values[maxChild]);
|
||||
root = maxChild;
|
||||
}
|
||||
else {
|
||||
done = 1;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool _hsort(HSQUIRRELVM v,SQObjectPtr &arr, SQInteger l, SQInteger r,SQInteger func)
|
||||
{
|
||||
SQArray *a = _array(arr);
|
||||
SQInteger i;
|
||||
SQInteger array_size = a->Size();
|
||||
for (i = (array_size / 2); i >= 0; i--) {
|
||||
if(!_hsort_sift_down(v,a, i, array_size - 1,func)) return false;
|
||||
}
|
||||
|
||||
for (i = array_size-1; i >= 1; i--)
|
||||
{
|
||||
_Swap(a->_values[0],a->_values[i]);
|
||||
if(!_hsort_sift_down(v,a, 0, i-1,func)) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -536,15 +569,15 @@ static SQInteger array_sort(HSQUIRRELVM v)
|
||||
{
|
||||
SQInteger func = -1;
|
||||
SQObjectPtr &o = stack_get(v,1);
|
||||
SQObject &funcobj = stack_get(v,2);
|
||||
if(_array(o)->Size() > 1) {
|
||||
if(type(funcobj) == OT_CLOSURE || type(funcobj) == OT_NATIVECLOSURE) func = 2;
|
||||
if(!_qsort(v, o, func))
|
||||
if(sq_gettop(v) == 2) func = 2;
|
||||
if(!_hsort(v, o, 0, _array(o)->Size()-1, func))
|
||||
return SQ_ERROR;
|
||||
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static SQInteger array_slice(HSQUIRRELVM v)
|
||||
{
|
||||
SQInteger sidx,eidx;
|
||||
|
@ -528,6 +528,7 @@ public:
|
||||
void PrefixedExpr()
|
||||
{
|
||||
SQInteger pos = Factor();
|
||||
|
||||
for(;;) {
|
||||
switch(_token) {
|
||||
case _SC('.'): {
|
||||
|
2
src/3rdparty/squirrel/squirrel/sqlexer.cpp
vendored
2
src/3rdparty/squirrel/squirrel/sqlexer.cpp
vendored
@ -423,7 +423,7 @@ SQInteger SQLexer::ReadNumber()
|
||||
else {
|
||||
APPEND_CHAR((int)firstchar);
|
||||
while (CUR_CHAR == _SC('.') || scisdigit(CUR_CHAR) || isexponent(CUR_CHAR)) {
|
||||
if(CUR_CHAR == _SC('.')) type = TFLOAT;
|
||||
if(CUR_CHAR == _SC('.') || isexponent(CUR_CHAR)) type = TFLOAT;
|
||||
if(isexponent(CUR_CHAR)) {
|
||||
if(type != TFLOAT) Error(_SC("invalid numeric format"));
|
||||
type = TSCIENTIFIC;
|
||||
|
15
src/3rdparty/squirrel/squirrel/sqobject.h
vendored
15
src/3rdparty/squirrel/squirrel/sqobject.h
vendored
@ -123,7 +123,8 @@ struct SQObjectPtr;
|
||||
#define _userdataval(obj) (obj)._unVal.pUserData->_val
|
||||
|
||||
#define tofloat(num) ((type(num)==OT_INTEGER)?(SQFloat)_integer(num):_float(num))
|
||||
#define tointeger(num) ((type(num)==OT_FLOAT)?(SQInteger)_float(num):_integer(num))
|
||||
#define tointeger(num) ( (type(num)==OT_FLOAT)?(SQInteger)_float(num):_integer(num))
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////////////////////
|
||||
struct SQObjectPtr : public SQObject
|
||||
@ -285,6 +286,7 @@ struct SQObjectPtr : public SQObject
|
||||
inline SQObjectPtr& operator=(SQInteger i)
|
||||
{
|
||||
__Release(_type,_unVal);
|
||||
SQ_OBJECT_RAWINIT()
|
||||
_unVal.nInteger = i;
|
||||
_type = OT_INTEGER;
|
||||
return *this;
|
||||
@ -292,6 +294,7 @@ struct SQObjectPtr : public SQObject
|
||||
inline SQObjectPtr& operator=(SQFloat f)
|
||||
{
|
||||
__Release(_type,_unVal);
|
||||
SQ_OBJECT_RAWINIT()
|
||||
_unVal.fFloat = f;
|
||||
_type = OT_FLOAT;
|
||||
return *this;
|
||||
@ -323,6 +326,16 @@ struct SQObjectPtr : public SQObject
|
||||
private:
|
||||
SQObjectPtr(const SQChar *){} //safety
|
||||
};
|
||||
|
||||
inline void _Swap(SQObject &a,SQObject &b)
|
||||
{
|
||||
SQObjectType tOldType = a._type;
|
||||
SQObjectValue unOldVal = a._unVal;
|
||||
a._type = b._type;
|
||||
a._unVal = b._unVal;
|
||||
b._type = tOldType;
|
||||
b._unVal = unOldVal;
|
||||
}
|
||||
/////////////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef NO_GARBAGE_COLLECTOR
|
||||
#define MARK_FLAG 0x80000000
|
||||
|
55
src/3rdparty/squirrel/squirrel/sqstate.cpp
vendored
55
src/3rdparty/squirrel/squirrel/sqstate.cpp
vendored
@ -101,7 +101,7 @@ void SQSharedState::Init()
|
||||
#ifndef NO_GARBAGE_COLLECTOR
|
||||
_gc_chain=NULL;
|
||||
#endif
|
||||
sq_new(_stringtable,StringTable);
|
||||
sq_new(_stringtable,SQStringTable);
|
||||
sq_new(_metamethods,SQObjectPtrVec);
|
||||
sq_new(_systemstrings,SQObjectPtrVec);
|
||||
sq_new(_types,SQObjectPtrVec);
|
||||
@ -188,18 +188,16 @@ SQSharedState::~SQSharedState()
|
||||
#ifndef NO_GARBAGE_COLLECTOR
|
||||
SQCollectable *t = _gc_chain;
|
||||
SQCollectable *nx = NULL;
|
||||
while(t) {
|
||||
if(t) {
|
||||
t->_uiRef++;
|
||||
t = t->_next;
|
||||
}
|
||||
t = _gc_chain;
|
||||
while(t) {
|
||||
t->UnMark();
|
||||
t->Finalize();
|
||||
nx = t->_next;
|
||||
if(--t->_uiRef == 0)
|
||||
t->Release();
|
||||
t=nx;
|
||||
while(t) {
|
||||
t->Finalize();
|
||||
nx = t->_next;
|
||||
if(nx) nx->_uiRef++;
|
||||
if(--t->_uiRef == 0)
|
||||
t->Release();
|
||||
t = nx;
|
||||
}
|
||||
}
|
||||
// assert(_gc_chain==NULL); //just to proove a theory
|
||||
while(_gc_chain){
|
||||
@ -211,7 +209,7 @@ SQSharedState::~SQSharedState()
|
||||
sq_delete(_types,SQObjectPtrVec);
|
||||
sq_delete(_systemstrings,SQObjectPtrVec);
|
||||
sq_delete(_metamethods,SQObjectPtrVec);
|
||||
sq_delete(_stringtable,StringTable);
|
||||
sq_delete(_stringtable,SQStringTable);
|
||||
if(_scratchpad)SQ_FREE(_scratchpad,_scratchpadsize);
|
||||
}
|
||||
|
||||
@ -271,14 +269,17 @@ SQInteger SQSharedState::CollectGarbage(SQVM *vm)
|
||||
|
||||
SQCollectable *t = _gc_chain;
|
||||
SQCollectable *nx = NULL;
|
||||
while(t) {
|
||||
if(t) {
|
||||
t->_uiRef++;
|
||||
t->Finalize();
|
||||
nx = t->_next;
|
||||
if(--t->_uiRef == 0)
|
||||
t->Release();
|
||||
t = nx;
|
||||
n++;
|
||||
while(t) {
|
||||
t->Finalize();
|
||||
nx = t->_next;
|
||||
if(nx) nx->_uiRef++;
|
||||
if(--t->_uiRef == 0)
|
||||
t->Release();
|
||||
t = nx;
|
||||
n++;
|
||||
}
|
||||
}
|
||||
|
||||
t = tchain;
|
||||
@ -483,33 +484,33 @@ void RefTable::AllocNodes(SQUnsignedInteger size)
|
||||
_numofslots = size;
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//StringTable
|
||||
//SQStringTable
|
||||
/*
|
||||
* The following code is based on Lua 4.0 (Copyright 1994-2002 Tecgraf, PUC-Rio.)
|
||||
* http://www.lua.org/copyright.html#4
|
||||
* http://www.lua.org/source/4.0.1/src_lstring.c.html
|
||||
*/
|
||||
|
||||
StringTable::StringTable()
|
||||
SQStringTable::SQStringTable()
|
||||
{
|
||||
AllocNodes(4);
|
||||
_slotused = 0;
|
||||
}
|
||||
|
||||
StringTable::~StringTable()
|
||||
SQStringTable::~SQStringTable()
|
||||
{
|
||||
SQ_FREE(_strings,sizeof(SQString*)*_numofslots);
|
||||
_strings = NULL;
|
||||
}
|
||||
|
||||
void StringTable::AllocNodes(SQInteger size)
|
||||
void SQStringTable::AllocNodes(SQInteger size)
|
||||
{
|
||||
_numofslots = size;
|
||||
_strings = (SQString**)SQ_MALLOC(sizeof(SQString*)*_numofslots);
|
||||
memset(_strings,0,sizeof(SQString*)*_numofslots);
|
||||
}
|
||||
|
||||
SQString *StringTable::Add(const SQChar *news,SQInteger len)
|
||||
SQString *SQStringTable::Add(const SQChar *news,SQInteger len)
|
||||
{
|
||||
if(len<0)
|
||||
len = (SQInteger)scstrlen(news);
|
||||
@ -534,7 +535,7 @@ SQString *StringTable::Add(const SQChar *news,SQInteger len)
|
||||
return t;
|
||||
}
|
||||
|
||||
void StringTable::Resize(SQInteger size)
|
||||
void SQStringTable::Resize(SQInteger size)
|
||||
{
|
||||
SQInteger oldsize=_numofslots;
|
||||
SQString **oldtable=_strings;
|
||||
@ -552,7 +553,7 @@ void StringTable::Resize(SQInteger size)
|
||||
SQ_FREE(oldtable,oldsize*sizeof(SQString*));
|
||||
}
|
||||
|
||||
void StringTable::Remove(SQString *bs)
|
||||
void SQStringTable::Remove(SQString *bs)
|
||||
{
|
||||
SQString *s;
|
||||
SQString *prev=NULL;
|
||||
|
8
src/3rdparty/squirrel/squirrel/sqstate.h
vendored
8
src/3rdparty/squirrel/squirrel/sqstate.h
vendored
@ -9,10 +9,10 @@ struct SQTable;
|
||||
//max number of character for a printed number
|
||||
#define NUMBER_MAX_CHAR 50
|
||||
|
||||
struct StringTable
|
||||
struct SQStringTable
|
||||
{
|
||||
StringTable();
|
||||
~StringTable();
|
||||
SQStringTable();
|
||||
~SQStringTable();
|
||||
SQString *Add(const SQChar *,SQInteger len);
|
||||
void Remove(SQString *);
|
||||
private:
|
||||
@ -70,7 +70,7 @@ public:
|
||||
SQObjectPtr _metamethodsmap;
|
||||
SQObjectPtrVec *_systemstrings;
|
||||
SQObjectPtrVec *_types;
|
||||
StringTable *_stringtable;
|
||||
SQStringTable *_stringtable;
|
||||
RefTable _refs_table;
|
||||
SQObjectPtr _registry;
|
||||
SQObjectPtr _consts;
|
||||
|
7
src/3rdparty/squirrel/squirrel/sqvm.cpp
vendored
7
src/3rdparty/squirrel/squirrel/sqvm.cpp
vendored
@ -180,7 +180,7 @@ bool SQVM::NEG_OP(SQObjectPtr &trg,const SQObjectPtr &o)
|
||||
bool SQVM::ObjCmp(const SQObjectPtr &o1,const SQObjectPtr &o2,SQInteger &result)
|
||||
{
|
||||
if(type(o1)==type(o2)){
|
||||
if(_userpointer(o1)==_userpointer(o2))_RET_SUCCEED(0);
|
||||
if(_rawval(o1)==_rawval(o2))_RET_SUCCEED(0);
|
||||
SQObjectPtr res;
|
||||
switch(type(o1)){
|
||||
case OT_STRING:
|
||||
@ -638,7 +638,7 @@ bool SQVM::CLASS_OP(SQObjectPtr &target,SQInteger baseclass,SQInteger attributes
|
||||
bool SQVM::IsEqual(SQObjectPtr &o1,SQObjectPtr &o2,bool &res)
|
||||
{
|
||||
if(type(o1) == type(o2)) {
|
||||
res = ((_userpointer(o1) == _userpointer(o2)?true:false));
|
||||
res = ((_rawval(o1) == _rawval(o2)?true:false));
|
||||
}
|
||||
else {
|
||||
if(sq_isnumeric(o1) && sq_isnumeric(o2)) {
|
||||
@ -1017,7 +1017,8 @@ common_call:
|
||||
if(type(_class(STK(arg1))->_metamethods[MT_NEWMEMBER]) != OT_NULL ) {
|
||||
Push(STK(arg1)); Push(STK(arg2)); Push(STK(arg3));
|
||||
Push((arg0&NEW_SLOT_ATTRIBUTES_FLAG) ? STK(arg2-1) : _null_);
|
||||
int nparams = 4;
|
||||
Push(bstatic);
|
||||
int nparams = 5;
|
||||
if(Call(_class(STK(arg1))->_metamethods[MT_NEWMEMBER], nparams, _top - nparams, temp_reg,SQFalse,SQFalse)) {
|
||||
Pop(nparams);
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user