msort-8.53/0000777000175100017510000000000011322476611007627 500000000000000msort-8.53/Doc/0000777000175100017510000000000011322476610010333 500000000000000msort-8.53/Doc/msort.pdf0000644000175100017510000063653011322475415012125 00000000000000%PDF-1.3 %쏢 5 0 obj <> stream xYY6~ʏ𣝪!$+$ bw_/%#5G1i[Ͱx7_,+ ғrueQxKۑyJ"r#$l+ 1?m( p:]Z5Uy guiOHfފlFU>I^.b xDrb  `Rم xĨ2vW h]_þ70YDSV ߯N'Ys+ye묖@+h(`RYYv~Vŭ㏓ w{=. ,זjcBG 5r'hi*$~>vAq/Y֣*3%Km,=qUJܢT/u ivL+A&%HgFj p2(GPl$W1OX%rUzκ ¡4{C'2np%^j͜Jn[bRǞ%J{ʺ 31[kjXiPar:p.p)0j+!6R4vq3fyYixSlͲJ[@%ۖ2Fs2jL6K-rW{Ai:ˊھ+S:d CŖ]I#l}u|fl߃jLɫXYaŸnKΝWv*s0]7G#Ӛu.RSD[;n(PߎZa) +-97*2u#>ZW[)נЭ%2?(x+2lLn7ݳ6h8)SgwLpmIqI.%<> 5:l$IWK#uT##x2/rendstream endobj 6 0 obj 1961 endobj 19 0 obj <> stream x\Y$G ~~üMEo`cLkxGʣRRpx]RǧOZ-Z?/~ᄐRÿwW_uϋ_?O~6Y-\Gl_d_3W'%%c+]'T^t<9m_Ǔ?]xgGG7Z{Z,9(XN9b 1>#^c1.h_[ZPaZG<ɐ{o1gkroa]dd] ĤUf;ZNj~ :9:Uzj!YKx>%gn** cAh2ާ63S鄆svϞ룉wr!Vᐨq%ARHIƢv5`pa-[P0TpZS-[/P:"?}:)X+TrOap^O87#IY'ޝq fhS'W zbk*dT3X,5urwAlʉ{~ 0{s6P!.&9zZ|SCIC<8bӨgQ-x?7Բg>%n]T"c]Tia'Cy A#G<VGf9PBG(M;ymD=mPv|V5N 4~.oE6T թ,q\+]^L8%wd!3up-p|+aNŏ:p{xF`QI%<|6h?{DPc%~{I]$QGP?̎&ڹ X0`p7d sLÙ!,ʆml|g=p͟t\DInY*X-{@p-G@_Q+zİ9xq~]Y$jE7L9@TdzdI/|@ӊ`+9f:Cd& Y\va|3i=H=1̀$@q̎ʧX?yyWx US>Ćps0`c$ F>jQKG$U{"0K>|Y#oNdbj^RU<T I88]+lYBOAyWOq<GƘ pa% zudrUL8\e9P;6VغY,ۈB{%H{_G tA/:E%dldL ɏn"Ig<_ ¡ O;9?`\ʃPBc қ" DbгZx5=v{4ay)51ʥ:}>*[J4ԑ/Ŭ R"x$.8' 8=-L* ȮN"PA uՍX8%%E+ݫbJkOVHZнb_&%Ĺ0V6:}expXm#"CMXs[|6ձ oJ[ohrQj $?,:(ȯd׌6uoZb2 |ԇ8x+Gk'̱SDP$URϵZueTkN{ )he"BK 1)5l#ȉQ;k0gyl,b@(.c+[Mo5]7O s`b XBvk|f]s`Ф?"dw^;"_^ֈ9#kԩBJ x9@SA)#\% []qoTޯo%t]3"'z?)y/܅qWΈz#G|\vRQ9~Or aI"U>VSNI"גl\$ &rD ,]żN$9d[kʙ];gk;dư[AhV^p؞T'>>BdR&$N. i`,AS\:ր 㽤Rgk=ͱ"'Ut+mx3ZM2EhT!񰒟#eNڅ%$tc\/⻀%svvCf.`fň1sdKWNZbě)Z Ԁ\\1uT<!V)59V wN_J(,paӤҎ溾Mź$Jczs&"8,OPTΫ ; Zx\ m]H)_k)\Sݹ:c n@f9XN𫕱|Nhe $x\lE5(?VM\T.`"v^ d\:fѱ0P;+c J2+ۉI>ؙZEǜdR^[ۻ" 2qNlFb0n nUn S1`*7-۶aeM[|R@hT=wѦ+L`vR݆{C4hUjs.}xr[<#iu;,$Αl .v3kޅSsNYpYpW}-Udȥ{Mfp ]{Że|Tl! +_Y(\!XFWƥB^vK(DٛKpYf0-ōsNq҅ޥFBŏ$ {7_9K3)Di+vhUVUvK7~PF4Ur]YqZ NF ^@1p@D,`UcPY2ZRi3 U ^ ։cQ&Ξ>6=uQ!v/QRS%W |.wUվɘ+nhr uw-Dž?HEDϻL bI`\9C_q?3UXoCM«+[A$JFR~ v ^wcz z%CB#@;`O~(;҅(f`3帮[c6]kjre#Q;]-&o:(6Y3oon1B 7= d'yPFTf /3-a2~endstream endobj 20 0 obj 5158 endobj 25 0 obj <> stream x\Y~_ 8x:);86^%:}ȶ?",=3{L7XR,RӗB.' IW\ YtTQ,V]z㗨.^^|y.^}vq-"\^B0 reBEݛ.Ƙhoh}-zvޫ{wշk{Vn+vܷ飗F`_=u]l i`u]^rSa~IM, PIdO\Ar1E&R{6G&JzIZc0H G5ֶ-W@ e9:{״8.MXpmKM"pPUiʋNGswR$:0dbʤZ3Ɩ)S|`Mɚ ~jWy/aQI!F?P݄` ÷€apA(9=b\'IXroipfDFSt`\ z#J.]d%RK s|ؾ:DIƛ=LiYR%[F-#K܀.Rxx?,3 X̛7 ?gY`nIVi%NA^w|!/퀀 gˣF[ 2B-wV`ؐ7 fbcmj1)7:%Ҷ $kRIÌLUw*50,oY\`}R6mʢZ#+hUG[Y ʓ ^[1}Oi. b P7$y*g'oXv톒ʗY[ju+2Ÿ$1EQ:AE3FAMRBwnO7# !;/AeR镀æbQ*gžbyC#R OLy܄켘R)X$ϣJ fJxQg2Z'5]z度 !- h>,m,zb5\gR~p4-zrl6%"ͻ6ٺȬ>6w)<)>lU4B3O_zrq&!&첏{e[ ׭YN7"YCSX!U}@bJֻ8Wl~GYhh6eesΡtf%n5ˏYZ ^ԭ4lHuơ'Kv-)*,wdވX ~Ͷ9co枕cSjxG Xòp1gTDCƢ=u @@3Z r* ț^B|'v M/+ve y.mЃ9A&r>2XTLs0'3K%)2Dnt !muxq~m6apwp AiG"emrT!a_+@h(`idž!Td['i9ۙ;$ed$ooSTWU)}2LW𖮖[?`TFPc/0as/YѤUGYh$J?b6VM.R#$Іp,- aO5/ jf(Gap*0 Da%V̠p iM2>EU3٘i2Glb|2 fO*cAH0%3h|QC Q`uI1<s,k{;=`a?lԘKgM٤9N#țdя&&ێ| M. _:-]WG<;)JLǏQG&&2c{mvVݦ֦OķGމŊ5~דjs=m&tSș5P qmZӨBKdfڤ9?UZ^8ڢYUU&6y5u̽jMד҃nvԬ$/lL5׵68;6iL@Y G(dMu ,Swb@bTl{˞?e &Ix54>1 xv"῵ օ*uyM -.!$IibƚIACANz ߰mԤYBbuГZ0(!DUiվMf,kܚ1:$UBmvsl?Mm"͙+xy]Ep 2ژO>(|p5@_=O[y%???ROWXPOh)}XK:nD33IMSPж[f(lkdkduܽ+ 8yML{>hU/-]4 &6 ]$h{4y?WxLj:9IܪWwwe =S%c3MO36k][ NpԜ^ަ.Y>N Ykc MJũ pW7lJ`U},]<+R hgM6욶#EWW7;ծ$[0"SR<2=k?s%\L;t 7^LY/22T3LobNu3{aSqJ9."M\i'wK0bS,Ifڒ}c{OӀp$Vo?{A)zGj)жIճ"8C)BFl$!?ԛ,rзS#G@-Hh($_Pendstream endobj 26 0 obj 4982 endobj 31 0 obj <> stream x]Y$q~_ =u;~˰dC25%=djigdVdU̬@쩮3/Ln]݊zP/ֻ_ ߸yWPd kw߾H?w2wN%Ȼ/x|Q,n> #^۹/T+54ci9xoEy'A^3QR pEPᴵA{6_N=o{} 7I; yn]yq:6)xsO8b.Vy38>Ww+ 0W+|{w/ᏧntcNZA> )i8|Q Ɛ\t- .j ʞ>-9UUL;E7޵oOZo,i&N* ^> =*Xǯp_u k'|04^jA.#AzΫ,B*^E^8@MZO-@U?[gk@ߴalP!:}N.ed!`WXltU=VIU|Y)Dc! MR՞^&%Nĕ! BG[k5=s08ܨ>:mo+$zZg5}BܢesS;$?$ɋXf ^KP'@+-`<>'l{ք1lj,k2ʫWSB1 5\uRZe A#D5na|U?1vtw>6=> (0E촋EOk攄2K&hqlYz }`2펮e @U6lJmn>.sGy.saWƕp'RGVoy@|n(":">#"aWTR<47+qH2#e:pWē"(̥(~;K)>{#@2,es8NiX'PNVVqHD܍ "K2*`T;"^$y:QMf„8@{l90iMFPJ?2:fg巸+Zfozɯ%kǃ_"> _%æAC ]:h8b¼%fѯxY6uRVSnő~'E3s"RS8 jU1+S*NxŧaX.C*)]_|qm`(XiݳL d]E:(<"P+r!Xc<LhV - yCgƅVE'"g.1V*  2^}E5,J*dt>}ùogL<F* `h4  Wg6a,q4l$;B#W#w kmYn!-FƠ +OM?S΃`G 'C #N$9E1=I~D"2Gk)HWwc/CF|Dddc \h4s0g찞٠R/@3a7 H5-ɝ $`ILt\cW%˕#ȐR:!QU djlk-AK W b ȭZ[th},B LmJĮ"# 0JG#[c 6B֫'#5Ѡɳb?%yS#h {.u%3ʃJgcGU~H6TpzA$>M4 '%krcHђ4c |Td) $&[u#_ o Zi=e֎ oMh ZFGذxTD͸e%,8sLJCtۉx{RR+'4PIȚ]+ e -fT$|" 4BT;{;Wd` uPA,hk/]Sv.njc0Qɼ'J&7*IXHCj!wHKԷ})Zl!³VR#?`mR`C$n;"NN0&Ko8]]lcWNaTUx o=&՞?S^J0#^)?[ttZt*Tį}hg6\a$gϹ]}WZ oZ䛌LbCb2bK)*M ԊD[ ,%"&]z?U{H`[g_O3ٟuu`\Av껊ːqN7m[%&z/;}& c5^ 4Amq~dSHtϜ7eP:v S;6gj/-oAc_czE`kS.[IP[ u)^\҈_`Z~:tϴsGMG:TXsƑsT~|yI~m@F hYR*Yy|vsH 䥘0_Q`mrCAy>}%/ vF0fA2浑]ٝlz"9ZJrE&,KLAPYff7Cyɽ۸i/܍tSNViNTD=HT>]SXs{ wCVPV>4|,.X,*%=l 3EY]!%S=!!J+Gx(QǵӋiF,P>G0:9>Y2v|Ti+t~Ӆ]=zH.11nMo%ђeAEuM%qW4)'fNef^lEKtb15LfG{呑\UY^c,5ujqkOTCrCEJsJyp>?&}(GoXK! ]ƶ9I+ Y&:?n֟#nL:6Ճ=>ۓYD;.ClnI V1bb$=̣=YO)`DK z%)|@˩dkv؞bd )b++ըj)]m&72zѶrhoWB&ZBsͫ Uf2a*2!fgȅIx ;}n]B);C9/D["}A9zouy}di#zJM 㹷dġ__#fendstream endobj 32 0 obj 5980 endobj 37 0 obj <> stream x]m7r @v.޾;/F%9$'lg]9>VS"Y왕VaxM)=  ଼CkyY}& o/~6jAѻ4ȃwm2}k6s޶4/)_ݝی®}46yϾN_{ܦ|8 |#=vqi; .ÿ1DɊ;|o N!%7)` 7ur VI[2 e[Y-]Ȳ:`e XSݕO_@kqT) Eta/m6^*~)6d7p&8F-D 䆟N7&r*r"He\ښ0 1pC³jR@o\vy\Tϫ6 w8 t$ųꝉ DME~{`MDh5w1;Yۆdn{]NìB+ǰ^" ^J/{C~oҰt&e}-n}pnyd1{K(F,P&S8) Qt:<>;g)z.+7"52(ЙjR`a!aP }%U"7O׶u'R FP5#R(QM@V:*ak@ӥ;noPN QӇm@۫i"YN4n4yd*Hg8;8AYZ^~T:0c&uaoFCcv;;$.+wüzVIvkk=cx 0>%>@ E)Asz}6n'UT kPY$jϕ[APl#O@)*|InL/t)Jѳ1iBlTwS"H lTYwt/&T`1Yz؉Q؍f ay-|8 Pr* f@]'qPɟS]8ZW$e7ݙ e Һ 0ci3PI0JDhN& +C?Gw2ùiFbE l~C(2g'JA*}]HN}Uo%j>J8؜)<:LgNȂo&+U5)cI@簤T(_ ڂ@> HnjJo>vmH&; )6#wtQ)9LX4Z"7-uXiŹqIn=E]EZ8r(C)aw[^%:"nCTRX63 YKDqV%vӾX>&21mf!y[x,??/v#1|Id4\2X'ef\?%$IKi6jBΌ~Ae'?"$ȄBj,v­鞏-r%:-.N(s%k-9g=sv!xybmMy%6s<FG8l&y9qFfiǦ.AfG{ߨTґ]pٟK؁x8#rc}},C1` CY!> m!eY8>mRcZ =LI\%*Qd[jB`Q=/PkHO֨@YXPa,n.gA=@P9͇ 9g2 |ǘ@wkᇽoa3y:"$+}rAv˞]P/y!!#}_OkoT%fL# =;3"Ɩ[Φ{MLj) f4X&א@xXkX~cWQot?/B7\dX,i80!l%(Y7+ y!`ypa1S/F~2.QpL"T3æzXX ӤonYW Q \[Z;~5zc`KѐE;0.n.\GZСߙ:\܅t b4!(.DwLc4ǥ}ĔAB6Px cLSd/BBS٦O/&ɧo!G;C^uOhG/Ÿ+&WWGPCSǾISL $sH{p8E݌QR=>FQ]`Á1nRDrb" 9밴6tL!kSE]>*mXYnԔD7#|U IF&+oFGX>Yc1 z)J6J!rr, c*\y=y+7QVCuھF>":f W6ce 嶱iY %g`I8+"yEҹE6O:Tlޡ8BAg[Ui͒CfĒ˺cs,ZjxXie‣)>mE*6q}_$dxg[MWTEai;s'sOݶHޤh_ ?e>tr6e)\(yL _\*GVmFhց"VQ.e*,)YNFSUݸ\~\yA16H<Á| BD"Ft* 9F,2Պ[hsFOEK卺ټJa$C]TSx)H7ȔNg7Sї`P'd VunlI&+\1J|OXj0,|}"J8f᜶թg9_}.IU|ܮ0bҩرzlpȑy/W*N?nD>:)d+)#pu߫_Z!:,RX7(z\B` c+ R>YI7b{kK2H9]!Rʃ( ju+{Aq1sVl3$a-H2BݭtX!8> YfHsvjeəpH{PCA1eԦJpE9)PW\԰bYe.B<|/ȗfC:?r H̅.*% rʂٷڑg?F4OEF 1&{R"hJI*G縇#`?jt? ?zMKКtҰ\vΊuΧReцath7E|l@Pښ( 5ҵsqG{^dg=&vXsoh]GCݼvCCSggs\8JҭrMV¤kzF!L>;`c^Gl P |f;K-Y%^s]r 袉i`mb<$LO/g`2|q #ں*i[#0-zƐ˽'p.CqmA\U%RٚC_nو^pZ!&>aΖT,5åFFXq\_ ӨǓ'\Hyܛe\d3Hf*J nxA:[6ڸKqlr! pdPMe4t5z?}~dasI>Z1R_hcňZT]vdZ@*+&>@>KE&X, 6(x}lzƚs'/L̗ Py}7;۹\wmJK"C"e &E k#0ufc1U\='Du|рNxQkEq움 ̾5)f%o-Lm? $Ɩ$Ă3 vj)6*[rO'?AF:1rٔTb.t攴\ԝ})0zBA]G0^ ݖ}B:}a͎1R`^з$|`2\X[|x>>e1o'%*3s.C=Juy(D*)NʞaLv#msS~(YR.4CAJ? 巙cCP,kl3Fb+Ƿʾs=.:8ۓjљNjE$8*BHkl,_Ƒ)NP1U ȃ-^Pi7ЖIܹqΫR'JJIKeMt\%'Lv xv7gUXLG`܌'|>xbVL!1u=JsBr^"sͪ5wU; ,m:N:ּ_P֭!yXEWM/U} Ā&2:O {<:Ql4@Xpr-\@UGafG4So!<Dk041sV 2Y~e'3/͋ws9k@ܛ)U =`ܺ{ ow٘;36{P<żp>_R̻Jw}  ]ιhgfP NכSmڋΈc"X8W?{(ў)mR]ՠAenr3Og ${zm` 3 HqLɠwΗKUNhU3]UQXCO.F삵K~zWωӕRw]Ŷf6csa*1FM A@qMrEoڕpZekbQAbə0%`f@SZs>X"籍/ŕ:U9vgF:{!/qRߘ=ja}|yHI!ƃܲC'_Jhu)X/p:i唢0`WGfqt Ԉćc^9g WL19׎k\!?a0MFd? qlHnLpCp4/԰wlY+U1RȫK۬B>Ekա'y9~)}ij{; R2j&lU=Ow]n:(rZ*X&Z/T b%wME\Yߔò?1\lԵ$#D?O:pviϦU@9ޫIsyKZ9ˢߠepl> stream x]K\q3^~?vlQdeAJ!tgu33$E ;sN?ѭ?>M>_ݗ?x'͋?鉇o~|WE{_*ͪoë_ݢ'?~8zpQz A@[7g#:=|f?|֧?[{ooѫwJ÷N06,iȷxH'܌}3_i DUZVڔ9'l<2YIgNxr?ؔ>&\ekS6њS"ZVجtus<}oaVn>\N<&v%x 6` Fv;;HW1M5$Qg\0wƩ}P4j MkV/d%V]Xc]*" 7|'&636Y4a\tU/ Ν~Ac%6GCݘR ܤ>2x`*=شsjL끢b5(i ;~[&QA]ײz4N[]S>[Ίbl_ww26Bv]7D=uܶ&9PJ*3{V3bȘ z>̕Ϙkz ٪Vyy}(Xh;F>o>s]c+ qMg?[tĈDoNoӵ`f* .;>jE[V +Mj#a^}|"vKhݚsnG.b()W>B[@_hF$﨣^vy#R9譍}ի^2;p[g eg{}hN}M[)'* "hN}RoGfٸgƯEs&XWxq9\g0ʰCA\fሿA7:1ɜOTv0(8Re̾³[3 nZϜxIM~fD<& S$ATW5֕\[}a9#\aۛ4uB{yG'ߺO-7E4k0?oP#)\}ܔ= ⠷69zrgj8I~)"-Lf2Nzs&1y&cgP'ch-)pH!7sw2"Ϳ;#NenRQvA\r&ciꞽNd]&Z|eN\|&FذpJ~FGqRwos88>!sNdIE=/eF4#HjRSQo"ز9G7ʼL&SIԆX-(']"`PϾӂ:\)$ͱ5&1fr{XZ>z*bUzYN\;VGU-iEw}WaOUJ YEs91*Wb;%)P`l(c)|zYf9j5;sטN{)ZM*G>K0zEoVιf}d!$ 캞:1'ͱ|U ZF)jykgAͣg Tua Cc,7ba\l'wn`{YvfDZ8,X(݌'q;RQתc,vj1 ]-rJ6IMc#KM}p_?$TS 0j Ȋ1:q-b/yRꩺHͺlR&뇬I5sR7M4b?eIZžE:<<Ǟ;ئ;^#n?wk.*1%e?PQ7$= d:eL;K*o\յ7)?D]GՍ61zJIu㩍rg8I1~l#`$3{U UZW՘ 0ݭXE'C/= a0Eg՚$0ꂙ҈΢:}(U;o /lNNIRXTsV1g2d>aF,X{/8riCH;:entbLo62τ;R0|xTv`/d)ߧFN_q5pj*_/}lPx{K^?#-Aor3n7_pԛlg#wϒs|ao :OehWgp pᲯyً:|;]S:k1CҵK apPF JPHY $yYM݋§S%S<S R*cv_V.Nn[mW*$}qU<-Ta.!yQNTP!W=c=6@CqKi_|Pxd/'+:Բ`N̯%0}iP|uxp%wȝlG.v7,yQ]˓A19vгGKP`ÃLJ&Ii5YU3POjY hwk~Hs+̾Zi;IhCt|N2U-n*Y&St^WLendstream endobj 46 0 obj 5356 endobj 51 0 obj <> stream x\Yq~_Gl3NCa;vHeْ ~X`AaaA`ޙufUe.h:3p+6y+_w7?շ^|n~٢UQlVz㷨nIkE_xytfsc0FRoQǓܬ'i9 p1y6>9f m:9lWGyu@3BåūwG-6xB^F8j K䲊)hjaݬtoDr#(*eN8,mCqf5GG7a6nJGMqn +C_W;f Ziշ;:M9@6=yF@´8xYakP=j ڵ.nkK:M  i蛔V⻣ ?״< [ c4qӴdZ(uƐ_tTKo^@H[?p f/˲#զL5Qz[++*mi0^[W2g‚’Z1+gJQ Uȧǡ}jн_HႽ e#7xŦ<{U6|lƼi+WĮhIIKG|هa;>gv^'7mvg Ma1 vK76FђRQ" _?ϫ̮x+kG,n` 9w1Z` a NH #;o95#-!xTVX.+q1So3{.Lmq='`Ғ3p/gG]mF;g|%uԾV wy,`']zC&QgFUY.}UfNOITT:do[:A Vo(F#pON:JObSJ9-]$9| }*Kx&;[ rAoΊ8@J.Jm!"/C 5}' b3lϑ5x@,>FAHӕUll@&r2$]dғш<'9ܹlz/:#|h`"/%P؃ 7."*\cln32g+R}E^n2xJ.^02m ]wߔ)2R;!{3\,ރmڄX߁iNo1`&F~H)#d/$Gq-i%`C8*Q-PTq8p#?a^U6lyNߌGn'a:~]j.\. hjۏ`hSFXpPq#j<3#X*X et aP۠F%5j</F+ (XWZ$Dii/d전!\V }M}gE`X:M~%'ֆf}.hgC}yVf+* Gl_g69$4(NedS_b$92&2ݩG4D'ZL#<[p@E[W2)&a;j|fF f@#SMFQ A2i$(J@nPwM_ud#hoqf3]^|8|hHERB5<$*9(*_\\(u]2oj&OZI5,)ƨ*=w",],b71v6.N#en#xbI=vVZ70oTm@BoO104>P`"ޤIFd9)iĆƆ& ,^MrU#We^9䙫M"|$V1uWñʈ&Z4hh/>Ū݈6,S'!Pa\ AȔ̶[(q6g$QO7x"2@f$BaD%IEibFwpLY'&Q箥&%ށ:O%!]XJs8u2ٱԡ\j (LR4`8z\qgPAKsGA#|_jhy%gbt AנvvH45p!u@5$:j| j#c l:!Xn tI^X$Te P@aܙLK")ڢP[LsCstG  h<> lX5Q1Z0$0iOԧogsҮg=P$dWa;#(rrѿ#| +8*qsll$+`cY`&oXj&dv*3} Jϸ-N?Tv,Oæ?IwE3 \0Sq=AnɅ\76rdDM\jpڄ\7-hy-Z ҵs s:akWe4N0%&1We^:$.9GA~~38ܿ{etPfE15BъBR_UJU+eV73wƿWΞǯaI 6'q' K%yKg7#5gRl:>ir D&!ק̯QZ{4n/nk{1љOd]oFxb;b'j@7K)! ƁԯQ"_1EQFaq&M )vFf+^`3&S0 MnժvX?9'YCd+|Cbum .xR4U4&Hv1+5/F^/Gg#)]gRkbB){9df]EKeLNge?)dB9:4a&bʰ/ڵ7k]nYKǃH>lȒ|dA1[PW3RKc%W^æP'ch+>5KUZjזSNֵfzd ӯTM)ʤcg P]XTaH^ڀ[%5"Ɔ\ثz5r)g;Ap.exgng|ZkWyޔel9H*E+V9ZC2H΀\Z2_,wc62Jt 5uYX Xo82eÍ 5 Y|nD4rشH"0z0.tF)͜RN`U*Gž,Vg%C;WNuK:U Ɇ]$k+ "sO30Hv0v'n̍}?,F9;U> stream x\k> 7 m7ߤynck Ax43";SgEN?|:U,e /g_Zqyb <s<%\7uq)2y鴛zsᨔqo?>pq^ Gf(唚^fZ3pF(fcLCvAN. )j%-~}sNM/Z9Ve۹.7=jԺUVTz9HѯV쬥w5,>ѕ5^i]hvVBOO@+gUйRUU73dT?R~< ҌıMho9iX BA?˩ѱ7”k9eV{QyxкV|r'4b#K#BB-2 K4AI3ſӛ4q"`A0T: 7{Yx)}ҰX S& Z*l7VVac$jZy4ȇضmc<% Mқs`\ym JQU>! ]6]CYG,S5>iQoZϠ/Jof<>W/:Ljk  Ka4e?Mjtk~~QK p *iyŠ6?Dsmȱ=iE'7K|#d "T4ᎪQ$M&)8ݹk-8 U So V@@$  B?[ _CMy_~ dR>RĞ҇,\!\`Z1B4ѼjDuFH{;X.@oYZX~: ),!w2c5y2a6;Mk zr@xyzX>94}iT7KFX="nkpy ZXXuܨC>@d]\qr抬 :VA;9E"\),MEejsU4 e>R/su6>8 4yir$F赴gh%Ea} y_vǃ \"\b@&6%w%]ӈ!Co(ڏ6ͶBcOSf&/Bc c#yd&CW":0rW2j5\ FɄl_gE!/2dA+ʢXI]i* -cK$Px4 X"2XSm9c;م '!860ښ~b€=T5# `f$)޾ק1lMde G؃z,r8(1|_Zj{Vs|qRFf9s&3lS9Ǟ ܩ 8 [f1@kT_6٥#ܞg*9A%\Ac+3:oBZZΞaT^bcmnxUI/^pujhd0'~dGIrLUgr^#ֽD Cc%"V/ 'ӵЈd(F4GQ!|Q}Ʉ=]~UXců_Ջvz3|v}2 'GGv?m"6Z}FAo'ľW|tVGK(/vg=M1ԹH_qn@NJjˉtD\1DcUehq7hPRAP=C0Tbوݪz J>ŐMTڜ0.] -"XJ{L/kgX̴42A_q?=Ҭp} kg;X~! u` GE4)(^'\Q34t)5zȤצGOI,y[7^we")4?Whqh0Ti.,?[`M6RȧF+h dQai? 0PN,B_\j  FY)㢬0վ`.ZlԮ`$1IƎ,C07;@MA)n+p|RqIއʗ35/= 3Jsn}qh1GaՓ7)/9{~uKso|L>?෤5$1 pzfO ?N:c\^źӔToh˗Đ:NJhAz:X'w54i%`NŪrrUNC!D*Prc@Yz j0T ] @ȫĦנ4U;K0b*@ \&2WY7W=DVKW=18Šm``,H'Niu?l˭n?h1P5&\rGh(T\M\)~t*f|:f1M 1:iXJ:!hTfc:ecbfy.5}et i2! #pMV~J@:.(kh%`>EQKQ5 7C[[J[uʭz`U+(NX\]Jgbg+%z-&bNZo7CEiYpq)™֙0*nyxJS>RKi+1BF[1t sbbdMrN]"w₋psStS_.VzlIܰ0wS{w;09F6eOw5zT(ԨLIkH` ͼ,P>9:{Ly^FNӁm"0* ֖ $DH'6=ѻd2&)͝`$K][Wy}5Ok iL[x,euRw.a[)UC9ߦ;NCn.Z2EA9Ō*]wv:ra%9 YM6%zwL(8q˛ն5 iwp>A63 rs% ֢dbgjdF'zDV j85a/g CLJ /79ɣr)33S9D ,-k1s{.⽖?J\ ޓ/:g'`NJ|桁h׀yVmK@U} /)fu&xBCܠv0`B J|GvTj栢.ﰊR=Px |ײVfG0Uc>Hu9Cv:Hk!|ُܶ4 ~_(GMgKEbv(%'ch>'07 ^BmTV WIشlv_$d]kp%Q_~lė_[Z{>-9n'N5?۽WƑ ú{X1T͓x=wqG0l.pi?wy u]H0 9 >KPh4Xt =H?g7ws%w))犼#[[l(Fg`zѠpeEE 񿿻[^dl\Gl9?ɛ] ix|SGNP z?\YݒնӥJ> stream x\ْ\G}Mk_x&A4"cϓYkVݬy F֒uZխ?o>ۻonW72=q[yWO)-(o~~_*ͪ[o78pQڢ0o|xQM+%~{ټև/N8G:Nx20̻u3Bo"*nJu _ԛ$7kS{xkf -tm]ˀ`t :ix+FggCzWm"J1|$F&ϟE8]|OΣi_wTt0Z\|Dy9ZK r(Z6+]RP)EkOdGꔈ8>?@ &h`42li1/ LRzzw.8./K\`lQrw@wc#|s(_Tr2FF-G$_$ dz8.RcA< " FɇGXG1>l::,bzU| bTqpYHsޝ8ۜ&j#cR"'s)0 3 ρt!Nڟ)CT̬;SSo8DNuQ +r094N`~ t"^:B;jAHCҸ¸yYGQFdM1O6*3GĴ?}5׊:iI%hE3bHNvXhn4M+XRtؒUX.O~w80;_Y? K5nˠC`<`52P>?u7HuP;: w=7;Li6br-]r, ,|!hΕAkKy@(paK !)/1 e,h^]&),HIdYP.MJ^l3/\z-HOPq+-A"eI۬ *[X骙IJRXv8g\Wr8Lma]EPb3m@cPagAޛW;q>y, 2z19Gc>K}]:HP,G +_ԯ_ e0] hKWL LJ 902V>~S6)i+9'A&K{W^*muV2FaMJ*n~ J}"0[:T-~*gxIMX}Vق^P72/-k8wSk2$K+D͘-R,*IL+ 1')D'9ZS"NE_ aEOs64rء!P{nЉ‘OMQ4m 7yd}XZ)"];tjXK,4J y>%D;xEIKk>"4kƟK8NGD,]NVS!55ntF+竮 Gu?4Vr5i3&rL?3Ɩ=rE?.kvOpw*%($wGkе cs3%A75vu0rkƻ[ձA \hC-PzC;BO ;RD;1F>5@8S8-a:xM$*:,va"/,}%M ǀdW]r {Q&\BHTJ5p7*ij2rMrLFG2FE%w 7*WQh$'&'<`M{j^Lª,g6L=/hg>,~ FT4&RHU:ζC?sVdmpHoĂ`Vikz KFZsEC-N xwdMܠkɖՋXF3BcZCCHdGs^RKYΥ( +c2m=GJ1JB{Wg:r5UmO]~K >4V#֋>7]ƺ'DB_N&wdlz٘xoˇbDXdBkIJ}9:a\~}-SĨp!ImwU~*Vr zc9-3`LJcCyG 1TXTY,Nq =' ]\||r*JhL\7bqUn8'ovzY%c+9;~W\W] 6gBP[I"}Lb%yf,օNfEc_rHEo%n~ТV̗TI|07/rC']mFr}XZ`/1A:T)?73VKҶ%.qaԫ.2W`esNm8[C)K'=;䟦Xd~*1|:n ҕ%<~+掻~D,$ ql~jRcq[ub#G:*[{Md2 hWto8XW_msj鬞2- ä^sy~ߴv|6.&nݲW@R1tQS LwW  e,ѴSOJb߱kFHhWJ֒`4.FX G39B\oש-=;v[Ɣ~آbb͘㢑1򭿞Lט jݰ{Q\ h5|Qpkwl{Zn6]$eVzKYKE59bb}dioj@sobM.{.Q .BCMrg.բ3sMJ&k5](S|F^1889Z񰢵$Wx/L54 _.T \N#͘ZeOayP[ˇ`W71XOޑKuohK*-EF掉s>*!J; |q%fpf xq.i@>Y[Gt4\5H4vw &I%Xednihj:"Czv:ڣsu"!]d^,[Yjz8ҊVOC)v֘O]z/D75K`OJeI1ld:4p"IzO0.L - >JoN~!h͎ZN~-Qyz՗Dendstream endobj 68 0 obj 4584 endobj 73 0 obj <> stream x\Yo~g#d'N>f;>J +)S%Q>hGOU,FNOuWU_OO=q/>~<__~pY=x;?ή֜ZeW/N^|uKW/zꟿ._gZ熯Ν|w|*Q,]-zIa1OXWʤ1X D k5nÇY)qQXnaL.jU iw/kK)\!7 J7 Vq!xp˞BHM}&ׇW*/Eǰy5nVxA~Rz+IhAepe~HR;/~)xwP_x*w~hAi5\wyrAVcm>pNUqc2ƪS _)_,R8ȋ1NkARr{b(Zh=O3JB&!nh?w_')Ur_A'HP]=!}֮\x$"\ԕ/ .P8q3fZTٞLQJDPLXFtD *uGhFI8y @:],h#|[sf2DdۺTĭdfZgVWz5/H5!@YrB 7Ғlqbװ\d I֗- \9}0 d79V: +'Sn%3y:rG [vJA_#(a%ܧ{$+`cOa]\9dRE&jW#kˉ׽Ȋ Y5nέ!o8 sЀXuѣ-uLt\&Kb8 @Qz]PFr,]n C; 8U7f##%|w\R!-x wx IGb it`ەஉ ]<ηpCnIQ 78*;֯LUJC3H+(Xúl3 jGv;EhD׸]1I1XG6\8.)0J%H.ujKi_Y3KbՐÃAH-˩$8<,ONJz$͔tKEt,"_Bq*&njV994\"YҘTU_< oO ڈ{#'Iff;b[=_3&LQ6kc_Es0]ć)ޖmcpSˤ+oaZ0 \Bi<}rЌ!HyT",޿'є%qBZO;0kilWb)T!* DDp.X˽ߠVƬL)sׂfʜGc^ݙO|^ʜL0U ZS2dYC׫ovBΪ@2`A}qxL{$J=G BbD$R'M$Tevlp6^셉.PH;TbHr<2fcEa|IRK^-%!~Ct>fԹ"S}P_ʮ&lO73.J>^ifBya *tt`LBΨ!9{$yYl -T+lE˴-j ` M\GjŎU5jh8kfx=&Tb&跓brBbwtL^4B3I#~E]{/ժ8ik `1P`rR ˺q sj8[>O7D 5ACfK(,a) Қ&p@!LitlWXRO@%%\nuؿ!(\-#nj}leSZLDvP(R7tWd~uU=B?7VTR,RUgӱ=zx` | 5[Zၡ@uAODQ6 *95ϒ.u%'T#Q g3Iu3 LhR^}5H1.F/uԘ-z7,g-pJa=3aΤՐ-1űq.< mf`zs@܄RfkW!,>!f@i݌p;*FCCQg!YhFm5GlƜ7}g46SorqE :P;^G-^_^W性Y"UfR0̢,:)ѱ;U3ȅݚzɥl7~g)>\Jx麟ّI= @OqM+70c;7Y;@"xvB5{ĭ8KB68!2{?kq,3a 6͛ R:IArrsKCP~-DYMqP{upK׉ELʹm)]vGY43W(0G.Q15] >xj?:C3 a0O~%0u6ۥ'WwN{3\wҝUs]jon&iִK|CaV r2lJ.GAH#!` O1bpġW.o D3Gd-/"?DTP-{5;YS1pP@X]-:Ei-dqh埼Gj9px/DGu)D[ Ot%"Ow'Z硧pE&mt[F?U̍_1Ij:Tsȸt}q$\G :=^0ec&ArV h8LfZ(?"ίW3H/VƸ#Tz͏ߏLP[O-= 7?KhY&O1vO~+:X7ڑ%b K+:vZ>3ɸG0aZ:ўiQ.JƎT5471Nͳs먡 GHXˍKW/cf.s,\jKz޶NDZA[>5}Tssݼseh挌tJ2^|4aӏuƛN唹TLna޽/ ÃtWK <!QQ#˹΂+ Y3~ Uټ6+sт.45 H?2,aU_b+3vN9XNz2rsZHoEXJ%?:;+_~endstream endobj 74 0 obj 4268 endobj 79 0 obj <> stream x\[GFmɏ33DBbRv!׉8?n9jmhA.~گOΎ5?=aYqp^,Gc=\.Oz?éZ ȧgᯋ:CL[~i @n"@}4:1Ym279Hn.zΜWqdώ9PAηm1pBx\xOۯ"OB%GYtVѣIbDxjYKVƲR$\ An j.(=׌Y S1m|#*x懨rqbҙ9;YVNTJL9=q:3GPc#$9&bM[^}\Y꽒'y$єà 6w,P]ht{uU2Dc镃)~Sر &tgX8E0smbڬsXǥ@\ӘNs"S1_S"50ΊA}<>)|/jaDTJ7[4ND#Rp5ו}-T&T6BDq-WWY^o!nP{YF9\q][؜[7珠%(~OB41M !ąCTELmV|EQUsyg.H%i`9.!E 6ep#Ր}6>m$[OX -G凊T[֓e#np+owa-BtCz & :7H#r}v  na6}/@ܜJf#0@qnI^o8 XsG)n|S/ b!d6 Ƶ>aDK]2S)ۉn>ݯ@1|fwמVhs+b(LwРmd25k+(2Kb#j*4P'SAF?ֲ~ai&CO\He*7cQ?<y%p#:Qɒ#â2c%olLkGH-g`tRYc Hn|ed˻*kS&Ι% m+2]ĻgVT̠WƁ"+pӮ4‚moPEyrhDUpɥ'&é}by}I1 E!yE8:f'w 4h-qNpJAF-pnSnQ#|zI hH ׻гZȽsf %KY+^'ߖ3I Pgݪp(e*q c̸ٚf?vD[y>˙~ ~à w֝hb!cD6dYkF聆gp!m+:YBOIX=~n]5~E24{s"Ȫht}@ܸAhg-sf) \4,a~An_ldy(*-&``H=.!'=~ BZQ=fgy0y.lSxȨIll@悱f,b/:z4YcCI0cEG0)KdOu,@noP/"ϿдY;Gbp &'u|.#pptŜ,耘ZDl r40LۆHji :[ppi1VvY t̜v|`-ć<5N+qujEr7'n}7:Pki+E J(q4-6GXI{WޖL`=[j[‡"M|˖xxX9kQAIn2UɟiWgŻaXk{G(\J EO\oeӓXeaFB'ʪlMSW\ ݼ,5=``,pZ:`v}gT%M W| m4W{aOtܒ 6zFz碃rS ܖ]tGhhb{ƙv"/zj1іcn_PBtniv-&v4CZ64Jy\y˖)f ZI '44X;6ɕzq ?!E-nzMrZζV*?!朣tS/ dvueO@`̔ғfp tSJT^uQz^є17i[dB@+W5y#P!93o6/qd?Tf{_2F"oӄJ$$m9Drt7.z5d(I0M> stream x\[s\G~WGq~፤"@QKA;qkϜ>gW\ݙ93=_}9Z,Zś_+q+F\/\zO(*O*Żko͛/OZ%ZG{P_7_8`ZxRQhcR[X tq1ѤϿ;̢*}cb8 >hWbՋQi?Oz[xuO{LÑ>-1a 0S( \HJDzI6 W{]VUྦྷ1^53 % !Zs}wB_+/# }F2 /$}d>풂Ųz+-P.7t-@^Ź\"4 t.;&Ѡ +Ev;`"i8y4V 3;PuqQ]D2/L C'0C 2'DB3Q.'P3`\ W9}*@D@wZ9/ 'q=Qܴ?"FC6㵁+/P E#;WÁgppa“<ުm=ah Q(fOP!oP蒔YP$"+pRȢY:0Z `Ķ%=jS^_` 9clJH+2QO@\*+zU((8Px|?`1}dVB<)0uYq@p& TE fmO_UVFi]ٱ(ٵHC0zX1WxVWt8#p]&]sg$BcTL/7\k(j܏ڌ&B.n8dAH`t(*Dȝ@Hk*G` QQɧ>'ęTP DA1n `Ter1:1" CiЗbT2J=",@C@>GO?i,6a2ƶ"z6Մ[,GV_jZ<󫽣A,th1XZqOy"sx hxBa0l6Գ秸]r%xM?c)fDw93)+b/Ԁ94"^j`|Z3,Fx;{l$%~Eza D]U|cwŕLK"hǔvĽ6gafspz ^D08E?mƼ"aRmw\ \F( =au;%ĵnc 6 W>ҧ.AL`ʖGWU0iʗAL n@Sѡ$%BB-qτM4&ԥRHY+!q=lƼ4{TXKW(m V݃ bkT[ v ȠW̶1LwpT[wWJt ̶~xGHhL@D]X`\oa)ur* Q/41KIjJFK?lx>*S9If`oPٜiTVbQoDZ0^d5끆R-&& R>O;wH&5r BQVT=jAX& 䖬jփp1cqTJgT ³Crj=F l8ʈk!V,8>c| |ևJ$5DzJ`EL8u'{q!Ĥ}|^D!10*q>! %2ztBZmYgmR-CBSg|h]&"wFZ3ETtX5+ <,+d2CgCۘjC҈V4.V&PCձmeGmNjQJ9Gv‰kAe0 #&8ʲ"p'WYiwYL:Dbo1lD#Z3\|%g^_C_ *)1$J+C!Nnrn˖Y*y:>TUAUIz1.؀W_qs.am\֊[-LA q 锍?P6v yY3@IPA*Tl*9iJ9~pp {~B2Y<Yv"JeRIȎmvl7c%bT@Ь䂢 ۟?휱6.vO@9 x8d/5 >3E-[̽%]!XJu*L;gVZJ" K1LhJǔ%kꑂ3!s%z'X;,Rё~HvnK};CC " # je6M|2jzCʼnM->Ѵ)&W8lb,Jhim/l%U1AM%O(=Hamѳ8㲜Jy.t^NҧW0%C u,fwZy!Н!+5 neQP5멭epk7.(|6M>$Dl6`&ѐ1ؿ/xkۇ4nP^)͇_u;]<)*/եdq C#prc3\|3M#R}fDν0_'o}LP}4{3-3cȚ !V{:'ioyd+K3ah0| Q/ѯhD/k_ڢ,3CY?Qi@BtVʂOpXS3 h_;%X443$xF?a2+aBB8\J h?]"Ƭ9e$\ ̳Rendstream endobj 86 0 obj 3867 endobj 91 0 obj <> stream x\[%q~ s6)pذGY}w%kP͋3؂)ج5xV_iJg\hmX(= 6h$w08CWx9}uvs`0RZ÷.{y 7Yt?p ֞^WuTWk4[g5~0`b88^~3-c=_bf5Y[0 Y2Lf;>Gfk3U.p}MDC>zNIiAmczXn/ڀTxIL2ٴХ8^w4'FL%3^ןD1Ǻ *n& x+߷gإ1+O{؉^tvS zQ(M_lҢ:ӓ7u14m}| AZ+tSq(i [2QW\zE+MrK&pJ: ݯf`zed+ ׭sY+Rί;̢A]@@5keDf+llѭ ]=>ڨftJk@t"*oa[\c ]j,m]r^ǡ&D1iX ԰8565[Cr}L$jkM ;VLvM2l<۷\}b_)A n6~Q;>_ɴwt L"x,DgX-Bد!W˙EY: B2n1YA硲=瘼]w(X@]6r= ]`.wX_3a>P&{~}Tpm둞usX*& WÛhie$A:G9>f <.~z2]bѠ6[xXT'ͯ} ku6ș ^uyΪJl"R2&"Ѱnt Ʃ^>Dz!0ڄ8&LPC%<]LL /szKI%Ա|Gs4>"!䀟BYu4^./ư|ڧg6%Hں :,@U &8L55omh1qk ai9iem"Dvo=r'#u-gH]߉e L3#g^kJ\)V߃첣*lڍ0*4R0,f q|OID FUz^3h.juqd̀ k+$/GDej'ea~=BRHh49'PǾqj'h7njrZ߄#pIxs$ oY9E|#u,v{_$? %wMX"I xua2+Ejj")dCՃ<<8+#+ɮ-{٦fiKU[D;CR9I]r=%Z{C,ƟO `.SCޅgZv+se?n Ii^lB};,'U[5P@ :qb;YB_IaF) F8)J_K6DrX4aak?3V ؐ/E. I'`M f>@1"ǻ"xOmU!xڅ nQ߱-H)lR,>f=@o1+%_O8X[-_ cupG$À?mĄ@1:DA|22TZZ'I|CM<jcQPxPqUՍ$nJ;+z2zQ.9֌d/(N!qk WQ)8UKM\\+(jɿۡ~%%RVyjJ|5#Xk,$N$z7+5LHoq+UA\S)́“<;R@^٩n{Uj)b;x'UWpŗpSՎ/ {as8;q`ǨDvXCS+g=R>a2as7_i# U\G..J(wISrIK"Ыmsp%_T<fkINk{K"#}7gs{-R:;[8O36mxA=i(Iu ȳjȳ=;y1 w{whpe.c S%[k8nd=QZ*[(dopĠ7׎stݽLɼj|aLS/,j=*NEM+(̸sR&rrbǝ[U F*)&Q[Iur}pyaԍgMBSU]U,2ۚ<1Mސhzkܨ^U:K ^sU%A*’y"kVb)R> h6It*PA]YƁ,F1g\Aö5C_gzOS!pNNt$3q*leӿ(~HiJi"Z8X NM* Hh?2?iz48)`Xg3Q __ lDM`Y>1!Wdt>pXajHWOֈ4M41X4a\Y܆yRsX3ĕ*I[{TdGk*LbvU륕P*vdJ<‰ ##OLESL5$ΌM5$YsA˥,b228:Agv^YC2%jlsZw6vqTgy!n@AezLO_@Z_+$B9Io754eܹi%ߔK9!ˬ0ﺾk>CHrJE?"?;WMx j#s dgs.C)HG}ۋ_v\K(ld%4#4j 3I0նdg~Ph'9(g%M)SgߊTEPn'O}OXRsh١w3-ECWPM kMOG*є 8`xޭGBly=BLd` =9J2+O)1uhe]> k*%2,|n(q+\Qx|敖hP;LQjJZT=έ-tP?0\Ez?{:\ΠXgN>Y؎)8*qR rc,)ft90+LkzMW_h#pW^ .ҟs+kO,(=74XN|tt+;xzٙ &Ng͔|k~qavendstream endobj 92 0 obj 4958 endobj 97 0 obj <> stream x\YI~GxBڼ@hx;cgk32+zEkkٷ8xFꗨ-(= lѠJ,Bz*uiC]@8 h涄}>{Kx{ϧG8eEhg2|%,B|sV/{x~5C+=O"%D>+VL ČP<M|.,ǩ1^0Z0D闆q6vp6r0͊f/Z{8r@e"nܳf%eT65JgMR{5ylF= Lz^n=R;iƺQ$h'h ZR,'N3#9%m$#GR.3Όk`ZwWS}p@@nzqFrK(X׳ }@|_h$W{ MBEZɟ~H&+Tě]fv"cx n>Vb[ɄZպwMt_ѐ)]}(]= ; !9_4}l3;B-0CeI~t Pޒ2O-BE5_. O௄]Rkva.JaJ~)M5/hմEeL#jA_F|/e VϒA4U2T2 97m5_^!zi@# PP,H挲 VČ C}uK¶MrkYba:?-LR&I2}8$@'=dl[RP@3%גp a/pg. 0*EEł|SUWi49ࠢ6v۪"dW!:鴯'DCÝ]ذ_\ ̻&O \ؒ}6uz?b3!,8.v<%Xv~lD9EQ^mRX:¿nI&I;y##3a+l TΉ1{>QaX<+z6pM܇6}!W~j5LGOp '"&:I?UeQF&uTw3ҥ9 ɞD(&Eʰx7t^9(}PKA]L !DiD[UXG\LPmzMt2O#7S`UvH;`շ30S I58];Ou;J8Y#Cɝ /sCVH#Q .N&-2 e~)My ;;e/YS;R$y|"iDό|2 /Bԑ'v1CiIr7AlD*8*|HuĈiݻɇ B+ːBAdG~«]pd{ /)! l?&踲eJ:`%w8HCny_h|O+nwZ&a2FΊCMˌ_i)QumnFҸtrtZrj/cjwX=}9m VhiBt6*&Y 0G gc#k#V\XyWx+:4"&E4zN` 0g1(*+xsd,e`71l#aCqp(%#kRK!gk#]RVUe {t1<h%?ph@p_~7ɐ9ñ SJ-($oGml0_K+ BcÏZ#L'i7(/a z~IcbWܱZ`):9oo:ͭ7 &ԯE|=LāUW?چ5wal)k'?`P^C0ɟdpR'e5"5qh<g͐k+M$JIsAwr v PKN)^yBևZU4:vT#z osX 3+5BBq~~,<)aQp<|E8O>)LxًaG}~5wKQa %ŚFçI*˓.O t=&Z׵* 1) 0čtX8 ֤nhܮ1o-ÈVdc-)H&Qaf޿vÆsynX&Z?B٬K-KRJYN<9JA"O':#t ͭ:XK[d~܏I.㲹Ìt UW(܀azا͑a&A6"ٲNg]:s *veP181FQ(y%C_C9M_Atz1-BvZqV3 J̅3/p;aHÂ#a+Gxszut(0;O'!V ^r,tv< \^RvJ+Վ;,%8z)`ؽc,P|( 7eSpxOdeC9Yo5Ut/#]YUXe|B$(u.]40cAQx3Zʥ%̮NvuA%8xe#ԭ쟼'VH:/ QM"'].@"#RkV;db x*[KB`ے"L8ŖKg )]`;@T *<PY}*],r{pKǤcͬ. r(26ܫo¤$! ;MKh"f87[Knp%_MF|4W+* :VeDGb-Lҵ) ǷSjxq(!`M*d^ft $eɛcNZp2{48jIWJ-z0K9"σpsMjai4^BBX(O43}hqI/$2X V݈oBL3лV=ʩVs>"ٟAendstream endobj 98 0 obj 4041 endobj 103 0 obj <> stream x][ő1 4uO6]ֱ¬ 4Ff ?Y>3 j鮮˗_^R,R.>D {w I\濞5>E_^ ~DuyOǓvlOG?\I%k7Ǔ]1z4p%:>bmQ-{}x޶?=bK^k*\,x',Zڏ^-54kgGjO[+G WAI X?Mef4[/Ў 6EGЫm ۣqbXtI 0ppB <j^Q!ι \zq1NZ+wGr!7_ Jvs)+\B0ēX>:BrI%:H@.VizUWD`X/*C=uã6"5U`k0H#tTh%y^P/>)DC޴Ңܢ`K 3/2ziIBy+;~$&O"Vf=kS/d!y֫"ŀ?a*"La񒪀UU>aN XeesYkɔD7Ci-ݨ3Bd^ 8 2?JoXϟ ˓Fd 7T" #]hvQ{W΃fQ:y.\~Va?D ,DZZ"li\ Ȅv*v7GrF#i;boGIn1LV3A+'<6.߭af3,pp8b^`^_q1j/.DXN6&d:Id\Ht+^ヒx˃#q^+7|^U0u;!0֑ԕ/ Zܱh%3'3tY$??v>6 JVHگMf gW0t珰W.MUUQΉ8Jtm'C]d~%:[g` E_TN C;R]jJt4# /oQ$t$KG$|3A QeXe8ozns\ӻ)ԟiߎ |ds_z@6}$Ә!gs?| 8l\?v/zC(3 ~"ET+s}X.W3rDX=^ӛ$h>zvx,-:k$"i~72 [R@*p-gtj-}gHfJMC#cqNTHZ!*yݺf/$Y8 *c &ƌЯь0] \ zo2P1b@q't}ȋ*[Ham *"9n^~gz!S/ )YE?.۲.Ĕy3(QVL<7洪`x U_MQ /W@-F2SV0vL AK{q8ksgF 2I'&\bTm7( v1UT2EF@oRt*ߐЂdF˨: X$Rؕ ZYV̀ i*N D^ T+E0 .?dC-eW_4&Ѡ)F>5Ҕ^Jm=k=oǖa%giRko OdZ1і<$ dݞt^KP R\{7{^:(6`)r)2J+%B.H X@$oTQL̔$Ȩ7AdD >xb")#rùp>wPqa 2-d#y((.L!1;^D.7txe?oWgrHAͲ> |  e$6-0] HzVla\;?#1n18S)ۗleJ0< _*4Ro+m,3~5+'dixh+K}}VbYzy,t0P0&FGc̛uieȹ aM'2 LdZ r$= pA=N]g`ᐌ&0$tWIz\E[/T ܽwIŖK~wYܼ:=/#Ӽ P5}KRdg<0NxZ#lXveV:UsDi&<I:LHn;7Z`%0*U)Hyq/ԟ8E&.jO::OUU׍OiAP##. xp@ob1xC)w1[0b-¸hi=LaeNTvE9eE:AeRCӰFW&nbЭDͪk_@=/8[yrPTP2S1~IOuCfK ,2ɛTt.Vea&\%h!jۣ+74g}W, ֆy* P>žXB>_b?o`!;#aqF#`^´,pC̷HB#DA"qn]3>k+d:>ᑏDYHWs|ڐGiO CI@30̱݂O]KoUy kJ+iS@fa^Hk1`:^Swג1[…NY<\p_IЎ<5ߍ%]]7"ub%mIA}G,n !%}&Wb*tG5cޱ0 l)9R MLZkT $'k>pĈd&g~VMù= 3QȋScAJN7%Nќ ՜V~]ۡj YN ?l_U75 ~m1A*}+«.}H&V} n3YnL7 :nj(&ۯ Q 4ZO2Y`zƛ$#NNȘ%1_{ײ!!9nS|mG?Nr `쌍T(sZvlڠ8)Ri|,W/{?w-1y7Of0I,#;(wbA~[Ltf0@qns5h?/%FiA Ju|YV35_&4A9`Ť#ɡObY>.Fg))[N)q7odXWoVbiR{jp2)R^L38rVJI%36W}]RBeYʎljfHWlm[u-G2߷>Tו뮢3m_X)i%eX_;A& l*{Z[F)F>Cĝ;!(G܊_rl璵tgƽN9A{.50Eɛ>ÃdLݝ7 "G ?C9;D;ײkbW1nmO @83LH5.眱}]ѮIAd08Y8*A4m8=EI_Ta\ajE00a}R~]tq{BV DNO]ej!I-[OWqO Sz#ֱ LN2 9- {e *LEc\Y^^o> V2u-_=Z' Glw2:VcM-ƙR+dzRA-{ x-9.kWo1,Oܜ尦O-i8c5}RfOQwx20eS&e/=ёg&yC }> ˂C욁r "ƳPKǍrO#;y mY|bYF9 b%5hfU W)$1 `Jbt fQ "O+;l*Y-% "~}?endstream endobj 104 0 obj 5745 endobj 109 0 obj <> stream x\IsǑ3#p<|evXؠ ,Y~2kͬ~ P8 5uWWU~gWbW+}gR^x%~ _}JGn]pg"ʫ뿽+ݕ7~ݫ/w?Z%Z{s/׿Mf) }AJ/!ZzbCprg=cl۩&>"]bcM;b˧^Qr1^^[_o~(< %wwB^&ݟw¤.W\Ry{y>,p%`l͐=W*-~q]PeѸv#-y Id#|H諃tΘI*. e٨t}*l#;u j,E1_A+cE,v `jQҘ:6CVKQӘmA V^(. ^k [`cbT"<}-@1X}'dBi~6@(hOq{%jmqCdu@;K@w<:g(2]wHf3tt:]x6`#gcUG,28 (5@B =]0̕6u{58rAʫ"VzyQ4!qv!Vþ@<ßN8!)/Ʉ=2- B2ŒaXd Ԍ @D+ 8 q3P#vnP-;p3}@P(awbS 1,S.at}NF ltDRpmq|pИp- #Rp쮌|v+͐6F- Wjbv:9ű#܋DЍ)Lo6bEöыR ui:Il %5~?I%cڔ?臧hMȊd/]Mh]3el;|R%J]GO-q32ʺ'C Eh6)߆ XʆOD~eCY ;e "oAn"I6`$i)h0`b] Ř7!&ٺۊam+Feo:C|D 6PT~0݄*זŧ RXΰ ژ|kT_`+a o]Mg m`#Vu* NUT_.ªd2a*9(&UD .;BVp.#,RX@^2B8aА;$_R֤W4&gGa $L3LnZ|\jt8ff9 cq"I""e!A$|;5Eb`d3ow A`7q~P`3T)͢!܃)>:8"c< bIbx$C-%E3! >#LT)*a1Ӣ%{{7]Vo ő`AxQ#coCu=e| ( -'${]UeaV4.*UnQR{c4_r oʚkEFӑyQ LoFZW6i̤e-wJC;Fnt[jl~0uo;<TàWtr]oG ERV&![ yoWёZDWfr$%L=A6/$)Xd}7h3AlpD (qNJi\ڋJxBsvR#bA0 }gMUF%<h傖̹IEWkޖnWm|)W"+N% ;E"-԰BMOՔ .sCXxh{oA #3f[>sv"YU\9K5Or`+QM"<&02y*=J910Q״Y[[yՋEmq ,2T(\V!qGӄu,\'yfeVRZVjQɑs$Vka :0lBD0 "l ^9^{DyMTA4AV%sSG[n8;K[Tk%Qi#C¤(Ѻ:Yۦy21 A"qḟ̸MJ`9ËX+E\olrd"Q aexHJl9YcyJDNda@%.u+EИ0e/x`0ӏ)ϮsQLZ.,· RnNNΥ\tm2 3DqX:[irfƁo6!γ)K .U/|0e=1WʹGOJjJATہ5ة')eJ4Sq6 B路jNѨ+ 656A[*bo"CWzUA Kfy{HkPTDVh[yx ;NQ =ef=QM\i? eM1@ i\dv˜8dGDDWoǪ.340;NYU e1%,ܭ.W➴Kj*sqaKt4Z48>##'?Rs0s7ڑׄˬ&í'nu0=_#}FkNeFy+=5Μce^!p2⩍i6XK1&Դn_ kl2Tw1\* #^J]߰sThjAsهv$]NitV~Uҥf({N}agGR wqyt>NE^axgUG; (!TӤzP昢sibH;69\W|5i䔀C**E3?ȰC#WWJ,Ev*BezkD%:Kc x2Ԥ钯D=T>1x*pu|ZgSs(HcΚg*mY_$α^= ^x֩ݗMa/hkMݩ@:SNs0D& kbr, k ! 5"N;9=l'%4/Uv8Gc[ZB ٗuNhGd-6&<,bv(&w%i3v3.I8Noq )s:ԋV Pn+3v43nꑼr;9n8S`JRY}lc `I6U3Xeӝ5j ] WX>b;VqU8Ք:5)59q a49tQO/yw6=#snR0Fy3bD9w&ra2:E FSy~y1\s ɏ>99SI2~25,KW4q99LNJ#䥐 -'A-(ߦXDs,p FV~endstream endobj 110 0 obj 5805 endobj 115 0 obj <> stream xZKo$E[>V!: E X==c,Wg?8dxRW/O4 V0̈ʪ/,'|[g4a.}`OY&=EGhUZ? 㢹,b_vKQa#{/V:&_UPs{!Y\- TgSYoz`KaZ9i_O,;\m-NigeTTmN;MEQ-@J$E1 gю.C5!k~L;0ll^J唨\(#'8grV kKPZ dlz,8cE郼zHokDe>\Qj#OYтn;6{}L8殨\MoTEG"OR0iWd!YѱH  "raHikP]ʘKxE3z^었nmrPY[lZO6Y;bQMFJ2ǔt8U 皜l?BM))VyKB[_FCvX dreRR钍YKM ZJU)%Zb$,h-ܨZm_TKa-Rfm!nYB=LI֊]1IScOD)fz^;͸o ȸDEKUބq_bS \8)7q|Ht19,boT(*1kbLU+5+TrԠ%U3NmEp@6upOFV6AuCn|ּ(S˓@ /!z?'ʯY>a=S֬" t>cL1}A)Q!Y$\66MVEۈMS8xw+& cj06gDIm eT: ./Z2)hsJhBW pn6:-!T67M<=ftqT!xSEVe]qIrߍ`QV˻ 1}WeJ/W&Ʊ2)QUcUo0##ZoSD| "0+xVbњ.t xcJ,duetǸV6S&:A@{Er(%8N&t3n r,0H:Sƀo|l>Z}{P om\| `ڎq| A(BGmEm*ϛp?*m%{ IX&Y˔ -!jC/fVVD3!I>ixƈ,{H 9 ONÛi1;.q=EVfVцx7t,u"+Ԧ Mm>C–t+tF]ZcyvQɽ7hD=YЋd=>nDoEq9/ SW_u" B5g8![%d\%cendstream endobj 116 0 obj 2397 endobj 121 0 obj <> stream x\YG~_#qж>x AڵViK6a[,EO8Pkl=<$rU,Jk%]6S  Vi; yٸ>GAtk&WFQxFqG'2:]Adz><`֎H&l˅w@=A58Py >YHA. z[ϻ2uH4ƫ`9rr>adWm6Y| D umI˜7[?O;< Ɂ];P C>m(o&  ѯ2W>/Jaq#LeFeP9Jym. mpLVٟ.JZc.T2T(|CR*)v-/oWFz}j2S uX=hg͸!nH.9]Z$ ;=ABۧ n6)ZOq Ji+! TREl28TzK?) "2|ɢ!3h<6i1U@AlD~7q"Qe;s5nt/  X`vnUH@l6Gaꘈs1lL#ƊpuBeB_xs-ZAQF^"[]q9dDMN@x>uzy Y׊ð'Zu Wx eyB ,%S4"6#mvLIRpL{ #[h8c?y%L@JF#)%.ɑfs߁OI_Z Z_⓼d+m0:VFFk8 f> N0)P'Ͻ!(X-z e:OG9%p l\`앧O k2bq7)u02ԾdE7)U^A]#*JM4ٝ?3/t݃0X*8z<s1MVc'!QML3sJNOm̦5 #_09D&Ǩƻ}ܪe3޼BG_V- QxX¯F{apϖ 4>X~vv$WsQ33QSe{ok,f%jaf&(4;O`-i$Clb~X":T[|eēw!`|Ԩ a?fW3p,9̜sp1z>k&}{bn΃.x-#y4")֜ T 98Ix,H꙲@EzoyE0zy[-À8<-dt-S9[˪1[z'ebY pk$k) \R#q ]#17uJI"vDlW`u!#*MۘU>fH"Q$xդ#(Nf{Z*cm* >; 'Y?IP Tp K^Dෘ=)6%SyV"B8,81S_Ԫ[R~E$ b%% v=jtS*"]Xxעj2\S[3r˟J*j mؖ5I9턘z}C:) \/ŝ~I"mG.UhE F7"xD $/xpBOιghGeUXTY=Ԝ؟`h(æo N4 aPsVmBI4@_M/Dh1h #Vm@ҼŹ_0CSzDZ ]E$=z\n>J$J)[mƖL ܻD<$ j* wprC$u*O\t~DqsOav"8$wYߗZTh,dAr'hsl(YHkfK=k}s"RŹβ,h,n.8r:Hva|q,𸵓i]5naC n#t}NNt<1iM̭rmD @B,*XUu3p6 /[*]%Nm^;9 yT9-c]wk KI_0xg\Fteatf$y=e>T&{QZt(ҭ xњLkb_ yG Ugp۪ O۵r$kQvU!Y5z iE98 d ;6=CUjO:Fc0>oʧ“Fw*h3*j EBr*M@J&( "U *c#5TOΉ,t<ƎI=Uj6F0)JH.ɺwq,uEO>֫gpfKVx -6%!V8+h )>|MBݯACmHv6U!9,Tw, 0>owPJ&lXU#rK)[,\\B5\Uin3ͤ.y8K"T/;75 jNe}$h@ӷ' 0niq2mz{{&+/7ӝj va[Si hA ikm`jE>VIJ^\|gY)KȩW#^270׉o,E -A7B|ym> lD9a˞-!UVrV)kT(MfܚIm"drئ>Z!6eஉgCN5J|Ek})ltΐ%$ 3l׭a׺B9xDMwP06a|M.ڥ7$ipCf)+ D)ޫ18FA0[1wѮOۑֲSW)]$SLn3rI6w[G4lAP4!xkLU1/ǎ(x*So= eL=eeA˲"OW̔9"!dt. vXKFۼ3u# O$v]r3@NpK;;P}LUd+j!0Jb쉀ˎ)6DAw56k_FPlrӘ=Y  w[wwcCU_.v^] Av$ٕcdIK/ s;Jf9$32TO0HD1u}D|֐uduOZKKVbMˬBu7 d,|iI2K]ɝ)sr 5Kaz謣Wo&jӲŦ倩X1w'd7]Fo+ST_w{C@i"g_NjMKAZ!IcԤVE(5DU0-g>=h iy |T:IΎ!}`Âl׿K{N[H^/?dZ= zy_$3.`H!Zv, > Anr3ɡ> stream x][w$Gg-?k~  ?px%|<# F52+fXꬼ~q͈6 7ooa7?d~ܿ|~$<<|sכ>g'k6Vɋ?mK'_͞>9 ?r'٩I).o4LýQ^o$~a_V1q 4|Qx5i{$Lk{D2a;87u`Rϴ{';'$ TW]PxބxA悟j!0$[Ho6B,"@L{W&1˷RgAKcF6g3F S0'v "'nҬr;ot D)U:-CaqQ!$SiYaW\ !6%Z"N#l[Ά0c raA&v^>D YA P,tsAmP4 w[ EA&HQ q}BŠKoǼ9wPQh8E=OhN.lEC85  t1O;Pa$.=ōm$*^s\8 xۏ?0kׂF~ D{ U>J7Qp-(^yFt7~xͿ|vړĉ=#.:WA.19::U-6Z+/*w/xIR%K_4AgrБh y.<ب'Swt8x w2BE8sF>qOL<0C~|h.wDpl JU}aZF{&W̵W ӯw|)Pnέ:s~_ȳƴEV+oxh <@J\Y<\}=A{Qvq{(|R^S90{9]$>zzGQ `+ t2+O0vѕ%7PCl%Pɕ ^u5_A~z` /%Bt4&yeJ~H]%?Iޣ@\$_y=HWZ!y2I>_$+/pHyj#HR($NGCW H3::Bk }?ܯ=L\M/IN$ٗ:=ЇI $O0lH|ke,2ɟјv^Gʟi$o[3PgWI)O¶sսd#u/]+(dEn8x^iDGHI9 *~Qe1N${1b8e9gVH~>l5"HE- _y!oI?Tҿ< ј֓]G0@lޢ9JC2O؆/h.Rmsn53YYmԛ\[/lYGDNv/=Hi iԏ3Q.Ì&ܿOa'l XS)VcOh'Kï@T=B>(ֻpc.O{EFa 3}̡HNb':汽,0~"̖-dMɏu3_+.̚CLi1SA1,ܦvCݎfqvFR93fCᚮ<'3udϥwޏBT iO/MjJg=7m#f/4WUOٕcM~[K='Qr*29 {H;^wi]?/5z)eRqE3Ks29gI$y$12x̸ԘzVS11@`z͹ЏY.Ho!tܙ8*ci5<آm0!NQ5J`hk_k2y^SHFf.+s±Ƿ!F֎ J_JnB'1Rur l07vO$S|̛:7W^ŠNBu%(Zd(|jX ?n*7 !R pzhADIpAb rU^:/̔$~d3Ng=zѫv2=ĩ}D!szIX8).װ"rZ)OkGq>YS_t miAv3cPu<&;qi)z>iťuFI ݆$)k16Yij1jV19&3ݦWڜ^۝s#g c n{`)tB'Lhro6TΓ7- $V+Z)69Y]e V 4j0G|; ^R5崐kR/ӦZ~H1lG{!mh~( rX7%u+o a5DtYaiZt[Ki͜P/"y)TBRT|ؒI j$(3C:jDZse]vڢY3s+jyXE \<05ȝf vuV9e?^|em0 %zÕX4Q[-H˷TlJ]ZhmOiekC`#łk1Nv8¹v7:^ں%` Ɂ@u99rPM{+TT3*u6/M2@[hO+]J C۔ >`ij@)ZGGo"ZFFQsQ2Bc3d^-䵷%RQ@J(L,T$,|T]6 !61zB1U+`2$P;9T3RJ0=ҡŀ~hOJ[-28\O8QF#1G_0Zsqm gr\t|7t7?i.tJO-B|gx~(ߢWM.I"Ϫ aD -1Đu>̠ v5ȫ! QӮ\cH&%;Ì} gN;SES21\Aj X(Ђo.ˢ +:'ĤjCbJ:=xF1`R XWw!z&k6Rra^ҙŰRT`#ych'$vu{FACY^cދo;_CFMTdz NPN -%Պ3R pjb[@f{̕ಊV$ ہ1fdMPw5ahN8eznChmNHM ’"ZH@xh#. UcsѾHE#Vn"Z.s9^gC*ۍDtu=6TEfH,+xܧ?^}=?i$OK0k:pRuwc j&GO( o2!M > 4HbitU?<{{F^Jِ0X6')a1$oBHԒjݕb_b0QJ$) %6<8OC֕Qv ?n%endstream endobj 128 0 obj 5425 endobj 133 0 obj <> stream x\Is3$|88ˮ\`@-S[ҟO7gȧHRz;_fqg| 9l9^}w&#/?9,A_~sһs勳oRfdK3бŠTמ0OG3+e oK!X;|?EÏ;1MDc>gsb:Jx;b7I%!%}]|9I7+|EvJGـl;8b8o`A`f!x``qT}/I{)~ROG`A1B#T {@了g/^]L:7|~]0m=k?3j^3[?-ӼüP llya0uP hakTg-k|A'lV($$P^}\-mH,~1o*fӚu,S^&_6i[6L:or˼8GgwGU~{ N3ɓMNn{%^elKssˤvpf4,"+ґYJZ+gA^(b MeR` +MƯ#$`˲%DM.lo< D?MPGk =owzUI1bR,֌μbm "c1N1T;Rъ;.ዸAEP̰5^#vtwxZ\0#!d]ˀQaw]t #fJ  ;T7ϡaÀv^zC(܂ IV&'лf;(b\tmnxZlN1g"t]1|!d<@'i6ZnOd0amo+l-C6fټ3fmC< Ԧg`/!>Ve~t,G$ ? / E7!^Җv*и\; $|x.͠(RB0ߜ?k#\,A3> V ,eDaP>P8P{`F32[1#ҲzUgJe)\,TjKL0CkaInגll~6vS4{ ֘Z , Yxp6Y䤃^N^NkI'K޷HT] |ΦIi@ma|o`:"G|M0b=$낢)WY(\]ڏaQI!aؠ: S :;=k;k7fuKD l0YAe+Vh{Ws`*?J4-@iC.b9!6q4}{U!QÇC85Pj&*k^s[׬ IO^fd \e4nԸDIYT)p">,nc =25EbDZoɂAudi:ю+-61&R93r5yS\ZSM]X$+yj9KWme RVH͋Y!L{𙐱CUDB_5[2&իd^,yvC2=!I#W,S8U(m+9&{wi뵴m |$ˆ줫1%$*\T&Ԥd[V8RՋgeC2N;¾1DPZdbZTaԢƪ{$'aR׷ڔ|9&fZ"TܦD8y_*tLG|F7MUCOP #{zqi k!Cb===P`]Ee 5ۋ[5Ƅ`7m,:ة7L2SqR˶4]f,[t=1iS $: \(Bfs(/s2N7b3ln,1}c0%7/N$UJ-y $/=0@m_Fx|j~T;T^ED ǴFr/I3:uZb#Z0]m' /՛ 2t}8^`Cs#p"Hv Yd vcB:C`㊩ߒR"A:JeLn$L.ykE|1*tJn>M)uu .129|#P1t?v9)HC@lu<Z%i+ڹ{ @l{ƛSdvJq!5`֊;cHE] Jt+szQpDޑvtsSCG~`r(wܢvVƒ2?2iQNz/zLV7#3΀=í{Seǂ# ^Z|@_v2~hg pׇw\&\xXcڞu3; %;}TL*&yƬJ &-?aPIJ}Z~TidU?vD[;U--cEr [R6k0 k?bbCn\M)c e[In1'6ȸYv>CTrXy.&*J8e#w0( ڬ]nVYuǶȨ&}9_llvv-7,3IξCg*ЭX}sW+^uvdkz5'̺0T73hW>m]ʨ×M\(0fEHʛE-38]1u3|\U0zL_3dqvyO?Vendstream endobj 134 0 obj 4373 endobj 139 0 obj <> stream x\ێ$q}y6yрdX!X\  = w]3#QK;"YQ=# =UYq9q"t}O7oot%wn-^f%o~{S׷&%’O7sd5q=_椽^b= (nxZ\Zwp}+_n ғʔ{~{4'k ǣYB0z<9m/G|^aO| r\b O/Z+~THP )a5Oc}xLف<>ѤΏ~*4 {Wshwr ՘Ńp,7Y'xWaVȗA K3铱D0+֊WZW'|D\t\ӟcߑ!qnJ}nM0B m暠ژ 0Ed[P`C>R&+.!>'"6븀 q 3tVe U#.g%y|l'Y8& RIpu9׶]84cWhm'9,3\KQ?P`;4 hhU]VQ(&b3Qz}"f㸯(l1*lVpÃU)l,8$i/@m1<8lMnm _eš{8/-ǥ~zZbtVɬzҚBWB: OWBιᰋNf}wmӟk\<*>Knj ! [{Ex9x^xJNZ8عv/* X:,{9`]*ub`0A]#K$N[*S\+Хn]6ݑh8)y@A֮(ʶ:8 j`>EHdH؜g P!t;4? hm+5stR-ؐ0'ƭ ;Ù.ȵl=ACpw Yq!&L*WQt`fg+]Y@ }& +/3]gC.,/"I=qBZ, i :⨆Ee LHE4=M)C!\dGkjLo5m 0";qc0JMDajA B,&gCn׾mhv{Frp"dYi a9J@P1'Z0VmNH"!I1ta+ZhDnt܅# s{fP%;np.[)_ PKd -?uL|%dmJ7[Dl+:60_8@]hTmA9>  Qy/N Ρ'Em%׉.=d|M3Nm@A+Btɱ0|l3/N{q@!|vnƮH@}glv68/DT046-RFmL1GF{FoND|)5yr0Z> 6JE DM{hzt>>7uȽ֛T߆fBS/D(Q\jA$ʪ|r,PsI:uElmh[h"[CeGbx,{ 32r&O$/,zσpVB b\-ft}>SqimOXǬ)'*14>X>I:MhPwy#̦+`\RFN:8F51Car!V˴ܚnY2 N*",tbNnW[*%H4ARjBQb@{-\U'!d@KUN%鋮9}A5d5hz >hI>HM@ƚ Ե||ySuK6LD.qr qR嵺4dk|ٲJ8F_Fmny>hޘXJWwU,֋  uh6cB ;8#`6uxe8T ڤg,0. ղ' dCW[LSe1qBx =25KvG^*$Y/s- Iz2y0vh'lxGNb"!ްmڶm>j$kh],-Y$d|ۄf#yT4L4q2C&3qB_I֨2DeW}Ihm } թ3+xe,vrV&"rbA ױn}" X-5 K s' fDZ#TKb"}=P+/ST˓^ ^z;;*:In];#r2gX_s-)EY;i T[a#{ȤϢ-lꚮZZͱS[O6ة;uQ :)ww.J;KU)`5TDzUG9T&}yn`%]詝 zIGD }ԘU ! nivġrCuHR8LBnë'o*b|%KBφJڅ[4h{%qd6EO[ùDUYԚl8QM7)V,Wtέv )թ쇵446o2O*~~e4J {;ӪDbWc8H?5| 7[T< (szF/+2w\;rj>,S6p /ok6\v䥤qGWc wk6OWwtY`89"$+f-u+X(SNt%pQ"=I֗|FY3[FJh*1骆OtpA\ld olwT#D8#'_g{7$r\Su°]I P?HԚPw};iBVJ}Qmh[IkID?*G*-v%͚a H%lh{ԤPB%YhS"[-hLy''rim8tw*s{ZyT5oy!ݦRjkBٱ5=v`(O6L[P1̊JeE0`5U3X=!a|QŜcaD[kimd=ء"(C[M>tt . ¶9p4Y\5w^qXh(28D,|yf~c`|]feq\Z[JrUN>17н ՑRpmVqnE@ec+Wrv&> skw^.rEP:+l7Zuxz8뿛dzq~S;^"B/q ȫVzB!/$<:5MkƯ_ Fe8䀌N IE|.gϼ`My[ؑ$of"w/3a$L͑u!^ʴT pƇ×SHQY/ڧVŊn={u>7\8 nbN#mjNu_N^pݏB?p_zKz9w|HQM@%xr&쉋,6{I V"u k?,LH? RP.h 7!6UYg0:_؞5q܎fKDE=> stream x\ےm}#&ݎR=S/aKfaȡmͥ%J?o @9C+D~Yu7O~Ós'*_rS{e>YҚ?)MaI';x2-Ʌ>:鯟WK7'mƻ[BT9On֯xRsËևuZǵシG.?9^BA…)r2M<,NÛI/o ɴ~‹첆x?: ml[E}?Ǔ]Inp*~B.Ϗ&,L+jp0lIGO>c ɓۻp?}8R&|arm0"@y]'`U/'rԭ*|;.猁<4~YӪPYCuJI~eۭkYV-cUYơG6ԑ>]%8}ht':x7oqpKf5~|@▊&=(ª-[\-Ǧ¯&.YKC*%xլi]7Hbۄ~7L ey+ $Ր0Y1b?2~dj {QݳچF"R Լp&1.cX =*>9e1^mbuYgbxm6yM{ m+`m& ANt u \quF׻`6x"2xCA`@ a=!>lIϰ)tތ&iEL78 ,H#~ׅQBϥܾʚe:y60_qxY|fto 0 cn*֐ݐ=`>ni_>q/lג$E)$ Asit` -p&;OBpt&)r@qd]d=-Z2e` I><7ӳ !>j"9% `4Qvbid Z̲͘ZM2Dy˕5^dD3g4f6g/oI> H癁*[ |D,}SyZ W %AxUC/J%EwO8}kgARs>숴u}ñF|0Ɵ'F &VACl[C]4< @ X2YK+z a+D#Y'm= 04n[x=ĩ'aIZD*DH*DԞFYe5nLDXҡ. J*1˼Hw$K4Ln,FAj8';@֖eFӐ*ʳKt&ςl*{HZ!.(EN !TEbyfε*t̪^CrOg֝[V] -fؠAf'6mH|FRuBNRm~9H[8>KWYL<Gbx0~E4J R-as(L$gmнB/;@/V[=_y+IEN]?YR4ܴ{0$RRwW]a:a8eI_͑z &G{rP#KBU6tssi^i®KVa]շyi I֢0/&I:𹃐Pjm7:wdds-!h,;:IeXdŖ}H3 StkYvXl9A"CDGbb:3ˤ=#JLv}[V| 'c  ^) Hm_zsV}O2M^H6 #մϹ`I =~m}C?+v1EM25n?;4c)au,* ƀN ,c-a6rRe2=[IPB˭o=1gpˑ[KQpC쬟OR'`5o)_`BG,xWF-xV.3~jL!{?x?egbc% ˽x7~}عĤ/uzk";KNXZVh肋&.4-Iy#^%Ψ?ӡE]yC\9>HAΏ2X0BWF0~(6Ȇ U59TFEiqE|$ Ի+I{.ք{Rbt>+)IXtn :S kgZno_crq{:n5Qx.T>-Z;ضm2T=}y?4j6(G,Pɯ`4h?V2݆{l[HrXR&g&Z'.yS-?(cLF0^AM9R8Ju!''*5Ii]xx B PS) MG/fMfmQu`Ā(r}--}en"۰U=,z )S F;sƋxz%$Oiڳ)z$>0-]}DsqEca'gڮ˥Z'k*YovZe{;^uW2yLaGAw?f[E&_ w&7rE2FOkǟH{/m0BDo6ږ/"7y påo$Mo:MZY >GQjŚH=4}Uj1\]<Ɯހ Sz]Zf&Dړ >^"> stream x\ْW}4>'c^u9Z ԅP0y؋`pv( @W[T\ N媈.eh2A{n@ % #Աp.2 6dX4܀ǓGܢ$8ڬ>_/b=EyS-\@l `M;_Ԯh':++c\ڨYJjwy89;fu | 7ۗŖH"WA\_m6-,ret/] Z Bɭx}t%[;$ʝݲD]gPRI (F/wF z6D{Adf1[cm/Dܯat><&a)D~* 245-΍8h񦹅qAt說4=MHh)6оQИGOTX26@8-2;Gv}  TںX4-uK|oX+8],NK$GM2OU+ EsCdd[e=:}oUz1w[U07PNrKM+u潉Ve\`\U3i0"0> ǯ=Ց0O8 /;VU(glqD6D8N\I@x+ \R_|;G5~:G$^E`A1Hb_=J{W&N?<ן$pkiơdNQˁգMR(!AUbW1(6,;v]}Nz[]¨Dxَ 1zGdo{b@uOpHG}sIGe5$IRIWq* !Jz6 SD@+0(q q`Ox>H M̍RA6F*X)Lsh 2wiT`@1LH쎐!L74띡pgQ)~Dw3-ZWy="qIA 1s3 >HA wԝKxN# ryF 9fqigCN.DX|4[G[LrIwF-AچŸuk&@:-'q#&IǾA'JWk>urMH`:9+f뗉 6^g0o՝ȅӑn |J$fvڐA퐒 NsX}U_m62\] &$(< "fnBOb# ˌ܊"^2sg fxx cD^R9:.,/Dc2pEx2QO"*Be.R2&jH8LMӴ;Em "T&1wr] &`u)jVƊS:}=02֖b»n[]9+ ԐؙrlD'Q([Q%L5fQ18~WyHEei剎@ lơ|^ԯ,]E=-n27ɉQa)mB?,8ے‘fYL5%!lHu@׼nx8 8M"rT# Vl"ކyL wnvSIWNFq^lH}nb^!]CN] HB 1oGm֬v՜@ h-M\b]TegMu&,u]փW:瘷)ɂ(8-tLhmS@Y Tr(K.<<||A =[}h:>pb@\MKxzՅp}X:3񌭓7 !."Z;%|N#Gd:H/hJNTnak7u|Ј 0AiIܵkƽjNpbe+pe>izZE>D115+$7 3f[ȞgjN2ZO'- @Q-`:?BM) '\-&o辟UhO$]*ަbItp\t0rHjk);aWHTOxdt{w*F"#qScBkȎ6JQ#C7A^ߥk}\tkdvEyF0EB!9vx!?> stream x\Ys]~W*?ݛD'/R$΃,aBF6?Y{stQ)ޙ9=_=ccϟ+gGc#Οp$|x飣8 gkǧO?R/^۝띪m{ 7|qDHz0-q&wO'zQ0n",[4s3XZT^?o0p1s|ȅ]]ze ͔a{Aa'=Eau _Fn(/ڝb{qk2Rie 8Is J(|?Y__W/M-7pZ+XD/qb8+-BH&M[-ueHD>\"Fjh)#-b񆉸a+^ [>G(⇣^0~Qņw1Ld"0~zIN^R{{:!=} jq |-NeYƑk<$!+0<ÅpfK,tV(y8׵Ge_%Y8H^W*C‘.;𭽋4V1]PETE`>lU0tUb N&q.-R#52,yvL.y Zv1Ea̎ÐLX0z`_3w>pM94b!}P }TKF[@ѕ6yNCtVê<3P0=tx>bSb?7*,-eܖYʢ#W=K چ5 -oÊF_.b MjK CW^֒ &F2r q+LH-xU8`-s/|pF-5h|_,PV|qaБu')3o՘D{WV}xApyAT QJ*s AA$xE5\b-F_uE#b@|?p4/# I q@UHKHͩyAu>C :Sn D[n$"4U؂F 2ZP|h hX|%Lkf޹5,q} \ƶ~Ѷe~dXl{(EםC|(@(@-f=`'jt̸S&罴h%*,',pQŃnCͺ} nۢtw#{0.? "Ȭ5|JG2+4)%Né ZKyl`˪O%WEFYCrl%GYF_g:7uudKJNZv,GgO0`L$f.`;9Y`zqwXLoH*8ч=MM+Z0>A3q18֣JQa@LkOA֛S7LI8Tap2c{29ɧټ ?%U`bdǧ[_PvY1} 玁'B|yGv.=< nˌ/ƼU7&1 #ⵚ僽 6$ IUuJuwVLLc  ;$yHާA^Ye tJN踎[dڐ|0ѲgLuC^$K:u,/ڒT p514Kvggw>.NrZ}$dV~GZzс堫xHԴT8B^LqǼ72Jnm'x6lb&+B7)'T+4(IA#F 2Fo@ k$\\Mc ?GkSAV-D[RsYK'X{+\(G=(gʩ}b/"s*~&1uHEʕ'ܮu:R5".97kĔYXxgBh^#%Γl_Fh54U&/"ɭ>y ul7x !N|e]Y2fCEHQlojnL?XQhTv2ฦnlװz8FsTM#uJ,~TUdbfXU8j(wSpHrn{2/ { U&=ک `_v86eHb;\oo<3( v~UQO|GcMJKwް^_bbT$Y:dVDaALVc"PI^PoȕW_/ ,2K7;iI1WmO2aW|!vv|A0cP(CZ:Sq5e|>3½6* PTtE7 L|B-޸F`ūՈ>9Lj %YmDIXQ'bڅ0?a*3D,zq@ugK!_-x޷ +%BU 5 D Ny&}, VA\@9ԡ6*Z(?V܆j dsM V6yʕB9傫:='wQ(.#M/fOI)?LEpg3 z 9nޖ4o:ئUM9<4M;BEʩٲt`rg!xJϼR暊0TW5ꅐ}yčnLz"T>r35kӸV{If4R$$ U^ !ִ@^;JVoM2MNDʓt6?Gj6EPƁN4HwZ}5NfgqIJ̶L:b7 J}sU0YU-8` Im|vV^")`օ rotIKkjwEc$!K<4g, -@hfO&V'WűħWV:K~6"؍ž >8>E5_X:$jЉ;R\ +\)yCRnM.hg]"pÞڔ_8#C|G^>؞zGwl$Wo;VMSZxd]jD>ɉ 'a4b[\ ~|#i M|Hr$΂8{`,'Ƅ'6~2^ ЭFcLC%Q2jc=,b^d M hÏ8HnMX-XC&2^% PPq vt\BR.mCT:jpG;Swj^8KX=O#ۙ~$#te..~ _1܀;g}15bM,Fz7 =@RY<0lQ~$14m/*UH#iZ`H^(Zi"Od;xx):)W0;,$?G>[c[ľqL)9>#w P3Ko"N-%! -_C.} IcANq!fjӗ(j*:?bg UW"Rgs7RK"1&b|>16JWwт!lh9tA*r"Qk50Qj(#0[U;G>pI ~w;nL}p-ogAdN*³"qd﷮;h!WŚ_E޳9HӼ݆])ȡM:^ 6|/7¤g<ܕ?d*V#ς\,&7Aъ3Gh㒡ӣwȀjendstream endobj 158 0 obj 4940 endobj 163 0 obj <> stream x]K6r?n$7lɱar{A;#(8zƲb3DtTuL$| Og3س6󻿟߻O'Iz5yf3N=it8z=}}0ǻXywO8tqHCy:[!M; }՗?oOtW~|o:321Yf[7af)̠ {G`4Z+l3}7gfȅ7'BfBJ8C< ~UK^i^mԩbZ#{l=^}m~NwoCb?_HlAm/z 8dY)i lO`c1X_TM$͹\ס&`PK)֡/5o ("IaPD"~N'͹]֊IŸE-^'*'vI֫m֫X!UWayew1Bk^1^iQ81Χ 6==ο Ъ`JT9u՗? pm!\jsF\#. V3\ʿ8 h"ՊIo1" zͥL]JagzyFEEk G96[zfTTWayewi@k^n|l:!l)BN?.q?o EB*'<eSS N49 5m53AJ [MdaH2܆A9ZQ0I{,܋0w~&Ha愹-7k5 GC)vZzUS++_oN4^MXl{0PXN@~SpcPq :crլ15s%*!*\Fuq8|T VjIHp#5" ~N+͹\łFZ` s[nu ޞ}G^i|p5zRzsmA Ey3fޣ;Q\>w~Y=`2S%j#_mUw`8m=IM- i0i۽Ͻ[7ikG^D&UiyFJyL˵/bZRQ Szy ,L($95g"ad$gPԙTi] oFz oNrV>ܬOw^m:CKzYsG&#e&'FDФ7+0F$#zP~Rc1/Z/t3 |(>/%)B;iU+n!0Ƽ#Fo!LOLҘ99yn1yskyLȸqǪM'U(x`  \7'% >st )r\A5%U ^7o7ii!Wۈ@@z 9qbHX jޢєq!V8n܉qnKkB[x05?fw-lV}95Tg:]VڴK^kyzWB4nz-ϵkr_[ c ˪ݨX 1 МB:Gw{ HѼ-3}e\IA c~t׋j6įwrM[-׭Tbl/t6Q t4r9/r6䡬{Go9)maF7c+7IY*3Ѳ*ќxj-D0 UxbepRZ0.SBjFI"V}P/` M:9rlk ;' l" <\I+sU6F8tr4i(5vIhJYF"qrCfJ JAd# 8tr49&5L|OlD!>I,O2IB.>)O流pȲu:M s{67Up;친z]/pz`./beu#cN#F&Dls, SLޙt`R5Yɔ1=4 m QU=RCOφ;:Y ~4SPZ0.Ԛx2!*(BpN)O$q&>I' &>IġYH0};z94u=0\1Q1>X72\4XsGbOe{}/}T]o>j*7_'|MӄULC@w$Tq^*ڀpr^,pr0s*׫B(C'Qe5߾`|Ɨ )sRCȄ!>D6A9trܺl7퓝Nn0.0zz׭4$7ae 59L$ NO5SQ).|D&BA9pP$95L 95sTVÄ)7qh›&5L !lL.,֚L8rCdL!C'ǭv>t7tǾd4+.˪Fu,/b=]v/Э4bbC^oЍq La_ ~ܻn.nMnAoO_Ξp0AsSF=MmQUOrFަFwbm20Z+g;8fb:߽ǃ&vϯ?/ 99J%eq-W7vR(_># k!lO6K)a+F̞?$i\W4όJ*d`iMQ$SoIEX/U 3' wpGjcUpEc;A {z-2ȈT0-z DJhuqXbyj+J&ف-\ +c=߂XHmZ~o{y -?td9z_=d?rhܡ S2\# @mҋ Umw#Ҿn T7aXCҎ.!ݜkI8#<ԶJYx*'Ԩδƨ>XULӫ;jGP-ȟ{iL,|ʙYLnc-yG=&q|QH@|ADtxcArO#m 98J(vMM #M+>w_&yXb*34gmvb3okhڮ<':9JYNp"c>^vNRmc^ >k8-yk5"$?XD3}ێHd˳|E.B0c`є`J_uc81a%"~bS?[:R I~1sU$+8?Zendstream endobj 164 0 obj 5110 endobj 169 0 obj <> stream x\Y]G~7#Aޗ)DXD6&Dcd^wbGJg[UW}UJJg/o_'_?鑫ϳW?4\Y'}y_ƯQ]]xÛ娵]؃Y߯m+iVm¶Glo*Շu9ZoWgQGg7ΪóECkR?3ob8|5+͆$}'ߎo/jv"l?wĪ?)6.sdOvq j:jYj"N j38CY)=t#6п¡{:θh hQ*U{KW/8F֘ÿ#,6Qo/sׇeS[hzEyu UL|Xe yIE^,.,v8U, TFXoa T)$mmMץ闕9'-7_^.:ctA0{;kIe]9 m%!Bw C^F"Woe*JnG}DWG`h"jhl`{Bdp{ݶDP3U #Z5ހxZTe+5*vzG@#>f`.t{;6ҟ( E^ak+L>/Bᠬ2+ZW^ag)uyQAzv/)`Y X7IG#V8lje4dwd+Ҏ[y?ğ]F-,9A+Ӳzh=gs4 Tfn3eOX0pɂ]w7hYi̙pǃwOF2k-@1|w Q0nW&)^uM,ۃ份>{i;07CG@z0eZ&:-ЭUy9(=q1OQ 0 md6˥΁yjP ]YID{EqZLj * 6jtiG ٥Cǧ}{˂f{p*S ƒd([_hp?ޤ|Vkn 1M{p7@lҮ 9v!6'Zvɽ{#O3 1M[* =Ծ@1V!d eQÁ3j!&1XV^AbvJ㱪n¿mEL[/!-eeiϕ?A$P9!j;9BB+:].SaJCb n f/ɋ>NADA}P8H Ϸn:gk\:wOz =l>&U9ק##D7Fm#֓kϰ3l^tD5ALbߑPsC r+Q'l Վ>tɣ2_m{XU0\wΣ!&~jӘfz~.F25I}k@1$N8 -:DO{ǻ ~Z*3PVᖷ_ndrb qJgb]4~;թ8]uu8 PJ wR'q8Ut]'ڶ>Hq ri[e^8_pdLHO\ >?Cܷ:١{DxlcDL2*|:6Q wYF08ag'6 8SSs9eȎj {7MAD!A'^T63ҙSVރ=L,.s,^"7ML-}kH)q! v3aL\A:&HyL\NW:E$d21p`D71| crڦSIUb,D=Sk̯j" RRxB[ek[(\ Sp$qsZOH4Dxk= Bd# {#K bZdll1I]  - $^lƙՙFkSV3dXK}">&/˵`B:gL )RA#XpjaNzPţֽ.6Qaw):>nb^ z5J]C9vEE[tT N_rP35)0[\'s+RșEl2Bi*m-Jfqߕ\#as`4ZV4ⵌBRX|ԧkF0E2L?qjK+rQ?.Ew_Z5L*٤D|H F]olߥz@"8y&`OQF: =Cw8~%b`&ƽh0hTߐ8̿ڐ5s+|hw#(SpRjm97剽@0J0 HX]Ěő~9"Mj9{~9^Ղ8fƋ1B$M@g7r_u*(NQ_KqH*bMp9uʿl\!q^ŸWʼnhI[ &Ų_` Pn&n7c?ZG]-AI(ZWaJD־DK< R; dst 5=F Ao ݏF@HR6ECؑ1VwLWt"[egs)r؊vs&uyRS2R}gc!NB VL h9 @eg kKƥr?CO۰V.θﶨ $ki] B >I T?.:j+0X..rTR@1&Ŗ")K% CsdbZ7yz z=9q8kH7Os;>MR[ /| i v%ytI}^*,m?S{<&{l,x&nrZsL5$ ~eMΪ}=1C></@cc5'I`Bn#1>i'qIh/ew*˕2+pQ#CDE=$[ N"/]yst: =+*9T}YujY@q1.78aƇ@ JA #c(r.e11~2)L%}o#"t{Md}>{> k1lN f&E@ueFokxf̈́V79}9)6x 0Ts Ϸ̆?!C$P38C1*>NTe{ Qx1P g }9xCœ=5+xmoO4) `Ϛ듩봸~ވr> stream x[K/#8xvN6`$1v(:vZlK T,vwvE0cg(_}UN 9grW3ʟWL/"ʨv/rw;o;9{m:hmE~>=제!.ۓ ^Skd0ZuBvAߜQ+1jPHث~/i2!/%$|9Ά&X=`&:ɠ =vF(頄  /OՖڢä֠aKx8o'pu ZC ae-FQ/[)[7HkFL~m21u~B~7̒6<-B:%o 16hD!F# R,-}Ϧ>N範r1mիhnj6h~7<[$2&E#Đr3缣N`D .ǵ 1:N l_dn,R/n9;vb PLYF0a`7` >:D+;b4vK\M r|^Q˘fRhWRS#]r]µ2\kFZdq=ˆVtЫjDDכ Y%W{g^Pq!)<_s)Vk g`_6F %hؽɻc,tqfv֯&jKthdsL;nmȏjsio!&ߚ;-ϏXb餘qCpljCRw˞UdExHkV2&[Ľfۛ;1i;o9UߤE`ue%Mۧ9NQW;g)v>x< S@tt'm#EEs(9~I4qB qԛAՆb]tiꞯ%jIL/`*j8c*;Ut&'L:P/$&<]L,dbw쑴ZH_m(2JlQ3}:B2q>1WDPLUe .,6- 98 #`sljh2 r1A" P+wpfpDG5e1] ‘b"\"vSFB՚|qb9Sl19I{5/QmF%*> stream xZYE~o# `/syfe{fzgdut!˚ꪬ8"~\s&gV<^/_Kq%usj-Spz|ksvcAVOoR&9ɷog׫yH8wôL'3>tJM`x6,sNMg[ByR:fVqnD` +%"$ ߬?7I)s,3V-WN)S920) 弽`#\RFqDIk&mTeM8+kFIx~R*mVfs^T-6}? ?}DReyZ¼&@̀KI=]*^8.|h׫ t'.і#LW;^:%qV:J؉fN fBX |C$0t ?=efwch.!"i430Hac%~AӂH02&AT [U0%;xG` C{]biلԬ>kPuiN;iҔ󢯱!&BaV@ UO2 :v I :.64cD {bCH1G')itiBA9ъocNL" 8Y#9R̈́ҽ.iEBgBR!̆0=/lu}|^cbQ}ԢHP {B)@Pyi!e-y|r\ #bS{`<~bL<RsW {KDqsFBxQF֯P. ]ԩ Nkԝм!hRw9=H `ۓLOG:C x"hF(id&SL]n)vbf iJX8ҋHdahOޥs8BMy]fK Q㓍q6*Y`)k[QsX :^8P_bӽ¡|ě7 >w%akp<9#@=iArGC^9Hq2-?a@0m:q))^"5eyNћX?s! s)NZlHMx ]hdZ, \W _\-(:G6ٰv b3J7nl,#غhT0yi(ȱ7LN fB./L#l6-y͍nz%iEnήe!d[1~D=; j1EY=BBgHo$~a.êӸn9a}[]M_Lܮ;Iphܱ Ci:\ 6#/XNb;C S(D 7w"\CܓY$Z{Agt<9,FSe{MTCaRՐQ(B9-:rXuh!K@"GeԒ O 脫=r_R'cOBO, vvW$үQ;dP/C/iK=MH-h *Jd裏)O2빉 DEsC73W`E߱g!riO1;=[| v0o}cKM n,002~2jvfqendstream endobj 182 0 obj 2756 endobj 187 0 obj <> stream x\YG~~aQW7߿ |5ϞՍa &ذ$}sɟo'cܒ\8;ϷG۟XVѱNʫ%ƛ6 =an1)y||kmrAz1Q-|>x16$Ӈ•Kj5t#NJ/ɯ1bgG}IiYC yˣ^B)>',nMϏuZ/^9ݗ~/ lj@ޒuZjqݖg}J7åm٨.m]XPHVطxs<q2jq.xS4'ĻF5xTeml~%LweKӚn/Oܱx!w>YIPx(?&(?Ȯ?q?k0yCkM8ZE%g /(vUʪ&:(rS"=m^|n~;,$kN6^4}",s WGWST2w20 =E5} @H 23 ;ڀD%7V+v̷)9֌tjI)t./ Ŷd` SG{󟩥}-߰bmqQiX5٪7daA0B2 ~?.]͋Z5ŻpS+LI0N {wDafQ^겚(ՄBP}qYWP}4 v߇i=̒o(,S^͘x 7VCݨC~̬0㍐\Th"!ΦOֈ~FHXv (Ö́p[vT:<"ߑ_(h(PK) cϠ~ 7e~ ]щژ6Ejkx!׻lfcòƶrnr#twN ]La:MO1*W7;qH@Ж 8nB{`U+wgkyyEg?!eMr< . _'[/|,p(-{(yN=!"jc(e]3y9p0`ADۯHJGX5n<߻yd€a9wuV"&gZX08 )."&65`GWLrt(1?ή: ts_.^0D3Xu9ۡXY&lPܚx0hH$@7>ͻ> JyL3-j ~)o>yvyFW ʥ $T+0GF[@4:̒F"`/L͎'` mY59(0Eikp >]c [59blTezcIDZ2tmk ux7x|hG1ejBw`9a, 91!euKM9W%y~\V3, ^v"Qd".Pw3I8?y_le& R+zq^Nht} H*|KT9bL-lYc߈\\KPwt}";jp V+.2 NJF׊T9f—|Ҧ0&ON+fl6f%Ȏ]/ǦsO֫S! @ܜXCBl^;| ę7 7<#($|sM BzxH] 7~tL deYǫ@cf7Ø+oԩ֏dօY"ltāv7! >)C#Rs+ G1sS3Z(oxZbs_cٮ,~)4d1f4aZ6IGTЁV`X`0bs#Dci!6acz(s<ҏV#`z kr[Dp$߿l2f^DJl9zҒYUhy_6 乖łwq MgO`Je/a K UAd'<7X5uUf=# Y1ƚFuk=RJgwz3A7rR{H T8M4E!m}2J9'xH&&-p/>psG3e 70 Sn'vڄSb 8Js,YwhgT_E3 8>zdT5omF~400p}a/iן)|}yy 0X|jU,$\9Qpwx b`csxxT`졘nMC=eM!.;n}U}"Ϫ_Et^ښ: * ̧'mR`W𤜅'Is¡N{ fN8M셶,rҝ'TNb^S0\ OM]<ŷ{ sS} ;bFzhƭҕX_~k^mr2lkWMO"bϹa)Z] /iETclz (z6A뿎AƧZrej-Jm ;Ec T>bR?Q'|J%~;,f9y;PVq^lFǬ2<99pW:]O*-ϏE%b|L٘cQD8\N#rաl=GǦoX1DC@=[+즊MX4_tLeZ[JO!|D5;)x^xŋrLGam9,t`^z vT3'/ɉRIȘ·jpxؖ`8DX=D?ZF0wTFJCâuI{- {6ݢBj+hS;Pn"g F;n4n$T+@Sf2ʲW_ף[kV|D])j/ѳLt۔7J$*(פ#4?<ؐ[j̗jۖFrW+]!0_ 21n*bw_ %P7jt:!7b-n uC(h׌9Q~/|<{2HgkAޒl% N`j98].ʩėtgW4sD(dsi@S[~{DXVQ$qΝ4DTzzB[GKo<;St`vt*hkM1D.QeuNUc:pJ؄NW/FX;.#]W1Gp0|t~ q~la ~ h(EZsV_*ck;GoM8PuUPᜩb1.h4$v^>c&}i\9*-EYlBvK&.cL <|i|2Zh&BѨM%en\5~ga1_-ۦ:DQ۹xj^{\ib#T`oƫJ^dmZo$'zP*{.'0> stream x\ێq}y1mpylCCZzavg5$Hp/ڟwD^#" *+/'#Ήn&oWͻg/~/yᙸog2]rSͻxif"ʛ~7*ͻowx|ݢ'}'lؖf)lV* {hFo&1o 6NOʇ~CYn6'Og ?MAל]Vi7)Wdzڔ4ƕ6r3&Z&eA z6fp&֧of3F*|aj׻MTo''}}ш~36=>P{x-*m%oŦ M90O#>߬O}`do-蒉_-vZNc}k6޶t328(\A+pkpQ&,r1f:\hظIzX;=W^2xbG,EF8];۳jq O֏xj2B-|[&@[ )y)6GXW>8xV^~lW}9x}8dBp1tXl$ N~ 6]~]_3󈷽mN Ϥ<\nU-YmqC!1 ^ L1;]VW38p >rt{8ț1Ǚwm8QߣII5?F+Y[hbp|~ĎkXTGW57XXRA#-}8$pjߣcVr`Y%,薵?ьvU8j4 Ӥb6,`Wo5z utyd1Fƴ uk`7]5|42vsxWvq ْ}pRzv'DSGg7qM"qFg댘euȍgڐbwP6r*ڄf#YmuZiBwK04#Ww(2idŽu062GcW<̆jB~ws -!,Ҍ1nz;]D48/ QGR*;m2`SqGPN,dӀfclV-A_ fLXY͞?-gtl6"}g<`S(^Q3Bg00Pd&JPq95~8mXm`X vSnG(=vu_`qGjrmĨKfuGrmn@;41i{yW <;r(kWrjc$07g0Α,;EŦ К Z"_yfթj[ "tIEČf2 SHRCSc 6HPx;1r :6Otr,5vhD[2w#5(Г^OӘeY=zx^JfcaNaN Ӭ ́^Tn8ツ"D0W)6*!Џn$e IvSxSP1v谑C8RC| 9ŧ(QI"XZlHi6,hHki]ٍ681:lFFu]Wsj(X|L( 26Il7B$I BYS/{k3DVq{쯌ed;ڇM3Ś)!)vbٱˊȿT1fÅ#yie0)k* /k9j]4Lp(Y>?Ŷ/kqMО(' wa:wS4/>3<CۢX}H.ƞ`~2,)}{ Fx7Wü*La_6M8;VC3t#W :JTyĎr4ICv\( F\-Vv*c;AARu6<=~=ץL1 |Rω(ꫲ f*/cMNI3M0ٲ6_[A`>Eh sW^XTf5ң"$690ꗹdĔ#ZH]$] SStA>9AWZ]F i~hYZ~k>Rs (^2xd?$R*5p]VU|5$Q;Y16e 4,˄!zsLz Զ8{p&آWCjDX Ӓ$`<^@FGgOjɰƞuQ^,ZoR)uϧb>5تJSF`E%Xڄ!Hg+sN4TVkE\Ӻao ̃?3BƇr :Zw)Ғצ;Ha5K饡?-~o1~vCɡҿ.HePGbjᱶZ1F\!Dq&.$IqD _%@Ztpww^Kad}ށaM@\ gٛ0E灃^u4Œ %ӌG_K[l?C 񂰬h%iR8dϘlx̰6 s{d8Sesiv/`jbvasd6's|phuTC}XRvCl)Sb _e75*ֆ}\\.3,;0^7.W|6Сf⮮1($E ;\_RWB):%45D~\+]uV:䳦p˜Wh;: މ KZyMR_Sk9ޜSdm+h[ ?Lih CuT%^r}8 NcƗvaЂKWAkhʅL K4ZҾ|(Sյ?|3.P?_c l|1o@>h0ӵ)َL1r;u}V9_HYİ]+_r_F ʦ ab@tԪ5O@7:IͨwCi URg2lƂv7ODμpTz% bÂ4aS'@21UbWk;?I)˙9LB`&@CU)̫ˆh^Ž[h6AQ4ٖ~N/6_b4J 0P(& rUK93{KR􌞜ݻ5-9 s Vn suۜ=kZyO KיtF9:z [ U̸yJuL/\`&a iS F kfKd뺼*6UO,[%9DAu/Xׂ!yq<1EWRƋ2Lڳ&6OA=W*r}&aI\,O{nU'Co؎㵋k:<2ad_qybbS LJfAVi,5:ԒNo$<*Ssp- M~ Qr5U%2zZ FWw?spW ^Ѩ+o5ۅ2Qrꌪg/d0G֘ߥɪ^i Tui5XqZԧYAg[ X޿+@T>z>z\3mC/a;GǦa"67 VpSVXt| pO yQK!ά ysr uLOvUjʖ&SY|;2;endstream endobj 194 0 obj 5518 endobj 199 0 obj <> stream x\IsSs_>,1#F$ yG=#UŒ|w)Vy)L yyBO.__sI QDyy"*ջKo/,G?d/GG#:*_=a/GZ:Z-Gc* GG>7ի> 4⪄QhVMTu4NTG+cV<|_XXaϗZδI`%M7خQ^8~5OQ|f%lH+_G%㉁ .N%7Ϯ6XW}c pW\\dyڌ.D^L JH`c30E@ŤK+(sP!` yb`'>VD)8~E\O@Nz epJf6{[ˋ_( ˦yB$R@gu 4T,#g}:A e"J1=Geܩt;^@r tDށc| tlj հr0()1IkXyg *F|Q\T=ld]O׀or5;6R?6) 0fq}ZTˬZbhRSf.5wYz&M u Tv9)r$`ԈlLT%2Ђo[4'X06uȩNxGv#7ـ@> +m=0!ytUWkx|dA212X:B\; C hLYFd!nw5=)@ؔ!'Fv3emlRJz8Os5*KcVV.zŠd2K9 u;Y_e1VcBS& #XכNpn'JD6f%G悜0wT u8R5`z q 8{mANc  z˜!XWs/7paf͇ݣ8O˝0┞*<{ZjBF^4 :w1Ј^~B9d ` yXL&I4).={$7Չ^/ #>8aܰTxuLs667o&cLq?9jӀ&3JDdٰ6qlyxέI.b7bZf*♙eƭҚ\t)=d;PT7Uه&S!|y""@$/,1F/ϯjV$md j.I䶟ܔP$8^eT&ADP 2t<m@O!Z%?^zbiXE>m5ݻhsNMK2E-(]L m~V;-B<> kug^4BV ޹c6!ƌOY H廧#>RLaN< ͩ9$ 犲7 MY)Tyoݴ9ZG =ɲK tVr<A'+i -۔$I]MS`EXNDR { ";EXGb*S+Z<(=,s9\h,ހI:Y$VUŸoPipZ䉷bs,i޸== fbGԿm vb $UF3*~Qߩ@,%q.<ru(o,V6It)4e.3o;U hS@X}ah-&dtq!sw`㑶m9NyN= U@>ojDV XA3lU703|ceI[~!Ei,N]fs(uFÛ\u&7]:sG-z.fkgN[ca;k2"v ੄JMIp-HodfDrq'ְ) $,kh6\v4J.Kzn&Wj7EwK;H=*¥"e8i!:gu(}p@ u2{! bc*y^i8ݦY4wpc ~AUN2t`7m#8քr Fje`ض޾}l զmJ4-B@ìۡ.o` /ߤQ^H}*wԪ4XpNpQR;&&R`4^z4Emҕ3t6߻}ZL<ׁ+Gu^lgK:v6, ?M{0(3FlG j2n'R7` q+QUii>&RM{v`g#ɶ;6bH,Ll>fX;%'d.*S^uڕu$L:uc)A#/ZgYȐsr睽w0 YL4dAMC$dVԜl<"7ԂQՆY M7nCZu{OXjNYǝ[*y5KHĸwSƦ*KMBm]ZЈj)y ;x%iI-A]МM㤅w05գlYv1ec0 6o޹ 54w[̔Ŕ$c8Cmt.]F:QJQ(iB9-}N;v 8Ac%tzo.aF {{)£xc靣W.`x+zjYw Q.E6d*s=xo;jǻ_1Iw몁vRګ^{i:L$ R&M^sKIg?)}"(~5y`3M$gZO[o /D5T/eix%z J$:Z뽦3Ldhƍ&rU%(Cȯ0n ĕv y}wLZ0W1TδFcRz#$I9 C@&e9%{w7f/ Ck 8EMj=!LR} s)uQj*檖fȃHGvGendstream endobj 200 0 obj 4554 endobj 205 0 obj <> stream x\ێ$}#FH-g-|0 a؁] ?FfFu̬d !8qR庈}O.X/ >BK.\&|5˫/Rz8{[zqA)vjov/{󟫏.BE˃T+w}?E)'[*_bWI*w?":\s ;H[\yXpXGnA);pzG\?< u ǒRZK>wܽOa n@}ڌ۷װ=oN| %zF2KYyR"'m-0_^7>SϮMuR}X묎_?ʅ2.R뢴y${Ij艻oYjI;u Aнǭ4yH!ZI4 ܫOqq>n,!Ӆ]`"ֈ92T0Ŗ'e+EYN @ɇN#LPv^GN> &؀oM 2-XP-BU9ڜ@kzyKBTļ@MvHA,pbhdվetG/q`^/a{8d3areK1HŹč6>T1zYWYV`2^,!xvB#s?V'3;H*^FƵѬ2Duw|9*,Ъ;ͫpKUŁVZJ2F8b͛ b,78eg6ʋ= @"΁(P]iDw7tlS7˖Nt:͉E:PfyZp,ppe0" # !;wP/ATLUAs;:*HH\o`+wX49#G*&G nPdtzg?%v6 ڪ5cqsʦ%YIA,Zu0} fS&ci`Mf܌-.UmD&=k`v_V:$ɞ岁ѩdbHPl0Y3wv<ҷe,!aP.ja/o~z9S@\|8War(0+*H n mtzZTRƈz6Yh& h6X>)g-vr7a$j`%8pȲcnm΃CJ26| '5fO 1:Y┌Nɉh4=]럅ˇ"N8c[oaBs TC䳲8~*CvP {{ӫCYAϷ$;1 cBJĖ- ~)}_|G!˪(\+p _p1& X3$Eit&嗌(x+~R,1$wc /d%eU Ru]>#^ w=ͩ2(HbL󗨩W 0AIi znQiKQB&A&֜ s}Frp_uJx/`x6rQ1%HT Dh*G j2#]+ĔDc'턩+d.As> 5'-V+[ hO[7WSZFraO0ٝ{u]7cJ"5*>n.$Duw*[LJTuʺEz 3tCΠPIqA$kJ6 z:8Ϩ;Nv)S[OoFV$SD1S _⣯UDQ/nF6Prra-.":[H\Rgf(B}eJS"tyZh͔j;Ԋd(KUDGeƈRj ^ A\C ߧ669r'Ф5.:˴"ϖń~3)F my>zJOaq8 LiZȬp4fJ.. y>CyTװXeALe"=QHty0)JueOm^_|,d60MƂ(Әٞ Oڼ|ܖXʎbل՞P\hn+FJO `.d_ ygijәHrHvV oq$n@B&jݰ$i BJmhb92KqIݷޏ"3.x!c^Vߐ%]iW.qҮZ, \v .hKVG[:rȱz|_9N9SiNN=. v_[ʺ&v.h眑<;_f8Wy2ܘg(5}½¢JtOPh =&?;;evh^(Bl0߷eco"TgL4t]'ȞhVƙ5f,[mGqϰ3.=J:Kl9LY n?ʻt) f ^]ܗ:.QhƇ̀1 c > j OɭZ)* @$+ۘ|7Vû{;WՒ3CVݻ䫦 kv]=GnAv|n|R8Ф;}bmDzF*%8#VNzZҤLNW[4uK$Vߜ4vq}~Ԙ&}DAjd7T)ש22s]iUGK|u=JoN֙7kl@NT+KTak} s#A5APb4 N $ c6+Tդ$A|lɍ3.o\m61ٿi'N„fJZ4ElhaKR$$t$Ph3ءW 甆h<킬ڨ ~l}3kN8Ž 3|5x],*e mI;tJnt U$4r/,B ahiww̉|53%SMl>_\RVd7uk#C %~$p2iQb_\ D&V#q7-g~1pd'H&=c iT׬R|(z8YUXb"V68@,hI'W+TL[ٲnсY LET{զuab|<]J(޺Kŋ >S$0Ű ^.z".F&Bɋ(@ޥ0b>!MA8Pc1g{ka07ZC? +j"&+nJE9X/1!7)0[%{2<'#tnVAXS$O-: Eqp_ 7lI$0̋=f AQ:2E [.plսl3#Yk`rց:W{h0l^LY)L22:u%>l趙̛<$WxƄǽ/6rȚ]j*@W|/Ք.v"TrL˰0/f"8>H4%'iѹoWewL&u>w+էiVCRm\Ly[/"KǷ

^+ḙzFڱiv]}r5x֔.f]1&m?Osx&Qŀ@o |#פ({njG/sxq:MY%5mʶPĖ(z@eui,IrԣZJ_@(Y!Uއy'Zo*j_7+>HBmY)V*$dV絶#[P#򶅑{Rͱ4dT^]|endstream endobj 206 0 obj 4524 endobj 211 0 obj <> stream x\[~Gcw~[lNdIba19Ւ\TQKG[lcggl>{v%˛G Vq6xYx5;uR^N_q/jkϭMB1 ^ \kٹI) ^;p3{,>r~Ō*cWѱIo`>Š ̪x{Ⱥ-`/pݣyeO }J잦_'% )ܛǥl`rwǟ{5(Ņ>f/q /G Z+?LH.oHߡqq-w@N_m[KyﬔL kT JzT-ƨ{o(J5A/PjEzvn"RI'D}F+c",z/.~كl= ֛UX9t9x aymP,2j{S5G>SR UK~̊XýEpu᪸@IʕfSŸ|T2"|ml6idפH+ꋹ  \.Bh#…ϑpIf3Gfl(FX`7@l`o֌KR0 d|2s#y|z?1G*Nɂ% 0g*Zqbiq~i/[B^?M5m\@c%)$⏖dZ$58zpēkH 1nS,LшNmN]xĶ(yMf9ð +!5k-y.*vwt˖6/#ܬ eL05 aɲ>^p{MHp8@v%QxuVB /tHm6Lm-ɬ"\Ԏ/U-btR~V o!M;m:Vr;7ѣ/eo$%zյҪ'F4\Y %78)f3^jB%ct}3WF2MAd=&r$ngI,CjWaHEEtJ97 pBT/p؞ *m,aP*]Wpٻ$hױ܈aR YR,B7#Z>\S\Y`:muü7^E8E:1]3lR75aS˝pΙz'BΒERĚJqRp?j4ZVi ::Z8Z qXR ] dOYO3)> w"}pnxLQ{,AG=Ei-I JAI hx#9=;&6V)|f'R^ YP]yb&KXYy1#'!ҒnIJzLae+ֈ"~~9(I@>yg{s뙞/O4q"$Pe'p (2^x? ;_OmIiMW\S{"}ŢC$58 w:>8E:W"n7DQaT̴irTckQUC!UV3C_n3UElMTsrV-[ЏQo8KO;\œ! {D:@vMl&о] #l$y#. ZIoU9jv;C3b2e*ֺB;r&c 2z ONz盇6DC3$&T.ꤶIP@n+_ .rEG44RLPXh=qD*&?MW.1?p|$,sXkкƜ Ndo3*OZ*bEF 4h ZI*'PuǓ"m-̝~q6?k+Q'jUC9>QcPP݁ ~yfq'{ ǫ*Do^TrXV7R /$P@MQ>F疎YQnjtUK!cn#wl~Y)EXI~ߵ>a cF8g G}{@g$\)Ftt q"3{- n{MSYCjdZ(C ,-iYG}!^vl3+\G"X Ԑ!\~/7oc)l,VWyo^$_'*w #wVP̹קlƙ:sh}NfGQҟB+#rSm)_i82ekohG=s2qqPm0ݧR?܄*|*Ϣ T"TB҄)+e85IPTq47VMf*XBPr1᭫g2"S~F@؏IE!V3cIm Ed[[t^n.UgݓP\ъD1:VcŧU Ȕ<N|Kgi kmKqHSg1n?ZrEIhKRRx?j(5AnhYI u,ixe  ;| 2~|E V [yKIr˷H>s/zxˑջBlѷdz@Q~iRmA:I|CMU,BY٨}.mO$XJ/7ڣ5څT?;YwGN})<y\LW?;v5IkFU3؜1QޖM΋rz'$l(|U)1=吕_8p`y8x69T:\dr0oOwFt@cN y3a,c,%ЩSM&5  8tmLx'y6iU^x3Teվyʸ5D-<豶?ؕqS(cizjf>bl8 ǽ\/z4F_1w|sW֝1ŋaӤ"T$<z쾛MxCp17+P5zvp3H`f/~n_ B xƫsT޲;+J[ALr6Q <$Y&Su*rj4EGCQ'J)Rp BKN]'"HZr:s8bh.pz(DΟ- -V0βy3)̽e{q h`gm-"ZV=;۹st?/K@rhk} C@P,縜s9YF2h1vq4l9ݟϾ?endstream endobj 212 0 obj 3825 endobj 219 0 obj <> stream x\Yo~'#q&>$-;Ie*AeJ(QgbϧꙞN rgίjf&a/}! | ?'oNxe{rn<|sI|o5ոRO^AzP׫Qۓ-7|rn|Rzg_IatTR\'R;7|?n5|.[7)Nn|R>=d*!*n=|>ᓼ0QYU4imޏزR۟óܣynN«zL7jÃHNyS໖"p =-7i;#^318w&e g2Ƃ_F> 3T'F) g]2liI+R-+̵,knEj+6U^V@YV6[羡,]0hF%]E ,3?AiUJ쀬T;"׭*!B 11D߉kd(Me]MR(rJcIVIj/u W?I]:mHRKB: X1IArJ~F 7_'#dN蜌L^.Ōz3qK.xPģ}HT.+wWR̼ڃv3uDI~uڂɪa;*EoQNVVF}/TʒCQ?[WD /Te4Z7%E.&=jk}1x =6eRR81sTͭߪF%bdj$yJ-SW8So+3 M΅ 3|2w2 893=z/߭hN׽ӵwE`\\"9BVH rh9 X9mEn@0'9=?K+gpN¸TT9"Kj^ƌ"Z\d`OKL؅Dϊ@}.gTIl pժ ͈C sM*ʊ֍Fܻ$[:V7^Av+o}hG5%b1$Vv'Q]gra@a+:H']C7Mc"ߞb T" &nJTʢFSJjf`K$px\*!{)z?e!plTmq:p#~:.Ϥ,VjT@'ʽ}%zJ^j.M7^A9޴CAiB58}EN=a5wW_NU3"qj&ݭq4C`_ḫRlRXGW$V]vL kpױYy:^'%~.)eіʪUscJ"ZxY ]xE_y}r#.U]ZNxMT4D`N nInD|L{IG@vT:@7㛭RQ9nµ P6v߆ V`:]FGA03 ; .=΋=^; e‚Wjw֧?FNB6B9ek@i |~ |,Ae@O>Gx&m+C/;ykx:`{H |3.nQ |׍R OF;!jzO"!i~6d j#!^D{l˪Pزj S$}@24b])IrHo{#z"HS(0I,PPRq2Th@a{A3q]LևHv4;r#:ӤW~R7%@#w!!C|56mKh~Us=OEiFӂ *n4-'A.D)JTe؊}ӵ3tU$6F]l-ޝe{yLA*5PM};rn=4w7}yKϛUJ%Wx'wYȺNh;3=UlZWPf! PƮdQ _X7RȘKLߚک& ٝ_VƆL#gN>Oɥj̘^"^ߎl$3^W$͍4 x yµܡ" `-F]s}h$;jP-Լs=<ŃdQE޾KݾeE#F8܍0as7R˘zJVӨz#[1`$箊m{0bɡ 8!U#i""#}ϐ*PVzta~4sq_pYpٷ$w6db7R7Nw{xsnV{r>REs[kTmP/iIE<* N)wǴ߫D^X_?4mN&rXOs -(ũkMmo!ۍ6RLVא-}HN ?`.CXkFԬ MhFm);b>1g6߶ p7J|.- C)I-쥵dv6@{Clvbo,1cq33fcƗ xN]Ȼ'nX32 yDvY܇ Fn{TX@g4> :7+/"NcdkR@bӳ8)q zL?j7n 'p?|KԖNuŬ)^{;+n0MĘZZw(9˚)3du v~ifRVm獄B>u_Ȉ(5 dCR@rpaD^躯.Ep %hPwC!o.ILw( v cx5yY1*!+*C")y|;nT[~x;&zzvM-]2hfš磦uNwکߒFg\k<>zvm"6a\Ĥv zRӿB^cҜqAA3 xjSZPߣߡfx6yQ ;~uz/g endstream endobj 220 0 obj 3935 endobj 4 0 obj <> /Contents 5 0 R >> endobj 18 0 obj <> /Contents 19 0 R >> endobj 24 0 obj <> /Contents 25 0 R >> endobj 30 0 obj <> /Contents 31 0 R >> endobj 36 0 obj <> /Contents 37 0 R >> endobj 44 0 obj <> /Contents 45 0 R >> endobj 50 0 obj <> /Contents 51 0 R >> endobj 58 0 obj <> /Contents 59 0 R >> endobj 66 0 obj <> /Contents 67 0 R >> endobj 72 0 obj <> /Contents 73 0 R >> endobj 78 0 obj <> /Contents 79 0 R >> endobj 84 0 obj <> /Contents 85 0 R >> endobj 90 0 obj <> /Contents 91 0 R >> endobj 96 0 obj <> /Contents 97 0 R >> endobj 102 0 obj <> /Contents 103 0 R >> endobj 108 0 obj <> /Contents 109 0 R >> endobj 114 0 obj <> /Contents 115 0 R >> endobj 120 0 obj <> /Contents 121 0 R >> endobj 126 0 obj <> /Contents 127 0 R >> endobj 132 0 obj <> /Contents 133 0 R >> endobj 138 0 obj <> /Contents 139 0 R >> endobj 144 0 obj <> /Contents 145 0 R >> endobj 150 0 obj <> /Contents 151 0 R >> endobj 156 0 obj <> /Contents 157 0 R >> endobj 162 0 obj <> /Contents 163 0 R >> endobj 168 0 obj <> /Contents 169 0 R >> endobj 174 0 obj <> /Contents 175 0 R >> endobj 180 0 obj <> /Contents 181 0 R >> endobj 186 0 obj <> /Contents 187 0 R >> endobj 192 0 obj <> /Contents 193 0 R >> endobj 198 0 obj <> /Contents 199 0 R >> endobj 204 0 obj <> /Contents 205 0 R >> endobj 210 0 obj <> /Contents 211 0 R >> endobj 218 0 obj <> /Contents 219 0 R >> endobj 3 0 obj << /Type /Pages /Kids [ 4 0 R 18 0 R 24 0 R 30 0 R 36 0 R 44 0 R 50 0 R 58 0 R 66 0 R 72 0 R 78 0 R 84 0 R 90 0 R 96 0 R 102 0 R 108 0 R 114 0 R 120 0 R 126 0 R 132 0 R 138 0 R 144 0 R 150 0 R 156 0 R 162 0 R 168 0 R 174 0 R 180 0 R 186 0 R 192 0 R 198 0 R 204 0 R 210 0 R 218 0 R ] /Count 34 >> endobj 1 0 obj <> endobj 7 0 obj <>endobj 16 0 obj <> endobj 17 0 obj <> endobj 21 0 obj <>endobj 22 0 obj <> endobj 23 0 obj <> endobj 27 0 obj <>endobj 28 0 obj <> endobj 29 0 obj <> endobj 33 0 obj <>endobj 34 0 obj <> endobj 35 0 obj <> endobj 39 0 obj <>endobj 42 0 obj <> endobj 43 0 obj <> endobj 47 0 obj <>endobj 48 0 obj <> endobj 49 0 obj <> endobj 53 0 obj <>endobj 56 0 obj <> endobj 57 0 obj <> endobj 61 0 obj <>endobj 64 0 obj <> endobj 65 0 obj <> endobj 69 0 obj <>endobj 70 0 obj <> endobj 71 0 obj <> endobj 75 0 obj <>endobj 76 0 obj <> endobj 77 0 obj <> endobj 81 0 obj <>endobj 82 0 obj <> endobj 83 0 obj <> endobj 87 0 obj <>endobj 88 0 obj <> endobj 89 0 obj <> endobj 93 0 obj <>endobj 94 0 obj <> endobj 95 0 obj <> endobj 99 0 obj <>endobj 100 0 obj <> endobj 101 0 obj <> endobj 105 0 obj <>endobj 106 0 obj <> endobj 107 0 obj <> endobj 111 0 obj <>endobj 112 0 obj <> endobj 113 0 obj <> endobj 117 0 obj <>endobj 118 0 obj <> endobj 119 0 obj <> endobj 123 0 obj <>endobj 124 0 obj <> endobj 125 0 obj <> endobj 129 0 obj <>endobj 130 0 obj <> endobj 131 0 obj <> endobj 135 0 obj <>endobj 136 0 obj <> endobj 137 0 obj <> endobj 141 0 obj <>endobj 142 0 obj <> endobj 143 0 obj <> endobj 147 0 obj <>endobj 148 0 obj <> endobj 149 0 obj <> endobj 153 0 obj <>endobj 154 0 obj <> endobj 155 0 obj <> endobj 159 0 obj <>endobj 160 0 obj <> endobj 161 0 obj <> endobj 165 0 obj <>endobj 166 0 obj <> endobj 167 0 obj <> endobj 171 0 obj <>endobj 172 0 obj <> endobj 173 0 obj <> endobj 177 0 obj <>endobj 178 0 obj <> endobj 179 0 obj <> endobj 183 0 obj <>endobj 184 0 obj <> endobj 185 0 obj <> endobj 189 0 obj <>endobj 190 0 obj <> endobj 191 0 obj <> endobj 195 0 obj <>endobj 196 0 obj <> endobj 197 0 obj <> endobj 201 0 obj <>endobj 202 0 obj <> endobj 203 0 obj <> endobj 207 0 obj <>endobj 208 0 obj <> endobj 209 0 obj <> endobj 213 0 obj <>endobj 216 0 obj <> endobj 217 0 obj <> endobj 221 0 obj <>endobj 222 0 obj <> endobj 223 0 obj <> endobj 224 0 obj <>stream xcd`ab`dddu 1T~H3a!ܭsҏ<<,w }7]K+9(3=DAYS\17(391O7$#57QOL-SpQ(VJ-N-*KM뜟[PZZZ1I?Uv~?=NEb{ѢZ߻fٽV߻kKKJvϔv.ZԽp_ق ~/=*iksq\>l^j, endstream endobj 225 0 obj 290 endobj 226 0 obj <>stream xU PSg!Xz{jjڅjťR@ G@B$<%!@ C^j}[jQYgTmݭs썱ŝ};;9JAI$ydL|IaDxC mS3K ^<}`\J*{Ȝ4&hQSA~RӷdŤh UF4r+4˂"6nmT)ؑ9;5 uPLv:(XuZ&N詧/왐'^O [eT,^j%IyR(/JJ͡RM=G=ORD*@̒QWu]RNZ,[ ;;F }Mʷf%3W,t?"t8萜q)flD5Z=j(&֩AO%|RB;n|ZykYo.mִ) lo -'ڟrxD>CjqV)eDUC{R! X^-ٲEěYqkH YF\Źs&F, I]7N4:" [oG"rhh]\i],d>bHKE %鯏۴)ybq >wR']T_l6S L߮?K/ηCU9htWi A>u.q Q4jf1ԭ<(I5ztะqiE/4⥫GnڠKa/L15<'z]esvSc̫ɱl1oRklN-mwwu{G(>+f&o{z/jwVݵ.RUr[G,o?E]ͦo4]C>9\UOA-n.x'4W[o>^;vбC{E)8]R-+T[Kprl .a]SySE#"*vB5e1&33lLI _O->]<J -d\ a"4+.'1`ε;RβқK~.Oj#I} N7bp%zK_՗Pger1 %%Rͩ9lSG-@3cujwtU~oPP^dnjok~Lq'X"[HI47'nwX]t~{B(xqe:'pOHF'QSެyw]4g(Ws 5j0ti9R͛Sc#"?%nZV_~eώb+oQ`cN]v{;z6fSmM*g vHP-&D3 Yoqд[2LO-{éYzhs-L0>ydFeX^dj6C1sk#]@쿋6S_]Q*`+kIay sf:^)ꟽ endstream endobj 227 0 obj 2283 endobj 228 0 obj <>stream xcd`ab`dddw441UH3a!;׏ <<,+ }n]_'9(3=DAYS\17(391O7$#57QOL-SpQ(VJ-N-*KMX휟[PZZZbmec t(;CC!aF |E3]+wυ{DmJ*//_f)Sz{zz9zzj3;;8Z&OvwN9A_~er@tE⼼⼼+V,^8Cʂk36'M1iJCGgwKܟ}g65uKvOn( 1cڔ)ӦL(gVLWN0yB&}D$C9&lw miknl4{ 9҅?^6m ߉Wq]b1ùd"A̪ endstream endobj 229 0 obj 480 endobj 230 0 obj <>stream xUKqǿmX6~@Hb`Q2$Gas^n9ym:v-[m6Y> yL!Par <\;szޠ^ A֒`!v߆CmEFuotrv ͱIotu=}4<=xiwD_Hc"sOaz 3SfF N0lg_xJx݁qb"~qvlFQ !GD"Lz5d@eNbl="v_ULֺ])C:hbAjJˮT vh1{N BA~ YDi7%Y9pɤRy]t-Uv(8k&b xf>XsЇb R\[VeJ +XsqE^fVL)ɂ#<͂Iz5Ep\"/.$ o'q%Q3+9jhJ-( 6ӊY/O fIО/B2f9Yx))HNmp\LiA'p->;yTb;u;p;ͥ*CxBR. riݨ0jyS[biX5> endstream endobj 231 0 obj 654 endobj 232 0 obj <>stream xZtTպ>Ð B@D@@@Q!r&4C(!dgzI/ IAR]ĝoO,rW֬C(@0wƕsx~ʏ`|oȡ O/ӣQ#hΣP 󚭾I);&N>q… &.H I6$-*">$#nİ舴M\:q}DjDJFD}"R&M HI(j% a.I 7)bkɑ);ץF_aEƕ2BVgŇL>c̙;W{~ E(j5BQQ VʟZF=CMQQs'rj.ZAͣ6R+gi&j5zzAPkfj-IRS p!j05zzMǨKeR/Q(eJB%RS T495  q ?+K4O|@gfxC֑OO.|bקdM5L*M3DF4$u^[p?%6Q*d ڦl(ÀV@тN}hb9Hrev(cWE.8KU ]$TR21(VYX/6-n~ETBy_ Ddz}i-Wk2B=m3bt*@*n`7kki%r2S2)YY;nm+Ж"(V@nVc{EzޘKJFa_Q? >3P8?J KO֋#%;ޚa8ʱnsQչlijC@W>ou̿ g1(q*J3 k2|P]w}VwUK>0scs7|uhS*Og%/ {ܵ 9y ('*N Q]jpM%\z!(c<"?-Bqh١e4")i:3%uz[-[u ͍- e0C2r AG,sK@C,We_t*-ZieF2긶%@C.B~98Pd\gnMCPpj(xS+?E}MYThzY2k&M)Ok P>8}o8+$Մ2)KFbt?&J-Ȳݾ3>:RA%4-/}yy=ZA3gCd4 _;'kb8jBZO <,QP %;t",!ݩBԋŧN vdJKULu.dܑU/-˩zIBV̬TUPpw9ɡrs xφ[ VSRݰ\`Uef|}u r kʹKMV[u]c#O œE__|~:NygQ$&-J| [6P)~lA[n.sŜ`mWZ^e)z$2F JV[zf.s'5d Cx&:gٕu-mud>NW1D %V(ԲbE6Mq fN+^SJi q&6q60.F l,DV3=eB:ҷ2=A0gYB:!cd?]b}it% q0Wz}ݽ4abYD6N Bf͒zBq,NR?  9萃Z$nƋ/h:4:^⋞~%cAz ȕh7h@m;/ ?F^ ӅefF_$`qX2v7jͩ = hC~[wF'ғAE) WȞJZ\{!IxDjVl3mF فʔBEC(W +9={VOOLՃ*{{: %ދ^&)z^1 jt  vs60Do!e^ trR6d8Si6GXnGI*)BO2T\@>TdrPғ`"x))"u{_iMx aX_ND6ґ{oxΆhDO x b}e?;9*,*^@X^}_<@/CP4Y||mVZtZ矀?nYZ"Z[@a fA+H۶Ct749|I׬d!li3.v)-Ũ`&!<7Q|%Hf~1XJ>0V^;&SUsIWքNOcLsx6K3}åk塪 " `'!(+m6Bv䦤dFhׅ"w[=J_wԣwH~*DE1zFƠZN '_xGm7TQ~#t$yuflTx`odRB 9Q~$fh(6t=]*g̟w2c1Clm<*D/](5ح 㼿Cg,2%a  Uj( +ڳo}wݫ L`:,)4WMIPl/|^G3wfa{U&Ce^y>뛯-ʶi!^r:[۬:KA^-29cD6kƼDT BRYPrP@bKb'Th c0ЊxD6Q1ZA:Eb<,>18|4 EHIH3$Nz$4{ڛX{k`~_o%n[ETBTL@rEv4TB) p|Qx];M.KwAHA`$+#eԕXKnA8fq< h IO)]jq4WoFEΊտ ie+%( b! =.4xuĔ*EIUce`9qAoZ'!k\&9G pq2h]R͡|y6my3ߙ;9꫻՘NY&,$Jj FYKX]eXacE-Mg4 hL+MqK3qv!4˗$땚tFk;:F 7 A1A=ױ 7Fq9 5V;g9]zB;b3ukk:tĄ@o[ZkM{U $;BQ?38ʁW?Ȃj #ӌs&",LO2}Q&hA폗SyأM&0Фj$UTRWS¨BG{km/*As!/GۤҢdj~%n&5hfܨaq]y` >F ql,˶q4%$V&3>Ž2x{C'@2$A->%qZHidg)xk͆cpasBbCmjn$iaeaQ?Q?>z݂/G:$oBK\ca09Dggxd]QƘ-Yr&-ڄǥ23p‹Mia-,Tm]ȏT)i렔ϰdĄw\T?$#٤CL*:ZkkeݥglJ6y}{ܓۛC`(n:$؜Lp?ݨtHiyZWmYb@eG?װP?XV GCp4=i FDgF3ھQ┘+mMHZkPZ wI&AƟ-;hrp&;8hҴd&1+[oU/Ud\ՇrK9JoWTZd= { GIg`9q-A:J&WsY?&'\AS R0mWU9Hl`Yy66Vx+dcMmh)~R#gɦ'?!xe߾"nu%@[L& ۙoc@1*|'p4OV9{|m>,LFVȭ$uR$~Zh +4JyX!ʠP")l&̠Iw7MQ\oq`oS5z{BB!R*{9p0)ZZAcRbkUeN3>N ĕDy ~Ձ@Rgy\6|3U D)]Չ119]{! {3#\2}~%MXj!5mYt?+ŝj4}m"?f` 8,z/Г瘮hܠ>86꣛WlVvǯ^ ɦo pBD7T ^}L*^'e^LU{x si*=di; b($L{a/zmr.ݨĶi闬9ua3BO'D3?~34b`?llI,2FX6h̬˩v eD懆Xn5T߂u4})O\. [qa| FQI݋م)AͺjIE+me/?wX1ߡ_icҷWZGL~}Z#]iU9F+3] HgRzT'U^*-I;0~l2ȥ5d6T@Ɋյr"OxT(W;*5Mm`I24r6[c4ǿwzb:I|Y7F'GHSJekȧZUVש٠ E8pGBʨ1hȼ:V ~G+a'Y'@#!#9zE/=te!I RYԞI$(etYnqoьIcwy6juMӅhA Ѝc9z71feybYBʠTb_bV&CMﱷ7ٍOG=ڋ= j h5L^fȰPT۪4ϷEnca,G{Y+|O8?l5ZLNpΏ3V=Ou_vģ:ׇy|t;x]{Ԕv$: /5GKaKfUO|*.~ʻn2T&* #K",zv3w=Ov`0僄| KoAGw-LtJ<)odžk G[ XKNFOҙ޺q T>x,d<-Ey`Uf40[{=m r'@ߏD$} &*1:.6.,>f.3z8{I@V%RԖ "Ǡ0r8}yr$E':: endstream endobj 233 0 obj 8201 endobj 234 0 obj <>stream xY xSe־!4,xa}GdYJYKt{ڦYN;iiRv  (疯m :8a}w鱭b0_0KﰨQ}g].wwwvo[  8;d0k͈z@5 ^dvo,|ny[W cȀM 6|Qyu㧽6}Buwuo>n 3Ϭe0(fYʼͼf2˘9̛Uf93 b\y8f0όg05f(YL`1Epf5LdF0kwY$әyte1ݙ`%1/1}ǼD0SLlcb@ӛxF`:^`41,ܑEvp-.?q^RCl1pݝt* ]G/NK:WW)z)D3T1a.[tkv;zZD.>wr! q d>V%dwA7B] /c>2G~KݚeYM ؿyψiRg7NQ=c] ?[jo;8;&l6TiԚ4up 7a?249{2Ե<:$\enܒ._qX.am07Sn(aЧ$ "'"G6[  P"`|}41DO8%ZdN)q[5+,b{j °Fc>]&U 73`mK};CXYw5̣;36*dyj8EOO]8\ qUtpqE[-`&m \)̒~j䵪n fX{\&/G"oi .pڞHф!/.;@j¶Q 6r~h tww&_%\bOz VRQf<BP.dUb/U>+L%A@(dC"ǒ*kA7E!DH:o@8ΊnN].;oE?K0"4;aC@6XdفC{XQkp F-QtFGʁ=Y`gN8b!hIC O AŅjUhHN>h0>h= ukwω➓oݖK_i_f j_adZըdb%Hr6 x< */FʑbCTfYL˭Hʐ0-]O8J\1-jEX R\KɟbMK1R5∖NY FCpQp1]a~+l&_is-H2< 7N=vʛG6O CBBfdž3YB&d#X|'~*!#^ Uw2Y 8>!,*S+UҎ#lscHKXx{|u&஼?8oOm,܊i1RwȣrT *Ë蹜٠j}ݻMP Mm1kS)s]V$^f){!$;ɔ$UX;EV>*lKڪgvFxCwj BhYAyNy;o$$9GU=(q-ID9,D Y&yR xǍd8M2$MG18p|'|A޼f,RL^8ZZ0 E#y]4GNAR\NzX2ME^[_nGsp)iY!%>k#/Ԫ sh$ H_|'s,{p{aUo&\ae >ڷڦ2?Ow,O>o|mc<_iaNjq8GtBNՑ#\ $h! +.5l]+ l{MU^J НVKwx5x#SyEEL<:'`P[amQoP0cV\ܷoQa3t :c>{]U! jaXLVU4^#rE!Qq@ wh9|}HbQ?[O.>Sy_qaw?0$  Zcm55g'(a~}럇SԑM̭RRǪWqպ=`N_GƚrUfni^ _l*)!,!}\t!!TU>Xw05$py %E 5^4<Zs8pykͻ|*>6j+rfG,ܬW`7SUʪeu!藺5 E9M'n8`Va5CUm&+_*6e x$ 2x|K| p8Owd<.ץgU #G?tnʆu!j#`#AȮ YŻZH+ab $sjo~RVoiԫpt6%OK#:PAvIDz zƳPVi·gPp_q|Z# N@9qLoerB"PPRKkKÎ` }멼^iYj_ϩ}N) ;(qb!9'h,)L&08hRf;rU[k2=295yygzU컍cb i%X^!!^iw$juU <pUMp8ycjdAKzLHL Kb|8j)[2ÄhN85T 0=OxevlS5X9o!Gòu[E / \}څ Y1d۲ۇyxoTZ` qE%U.Rm`'pQ09P-%fI ._N`gxo_>VƟmVꓷm~o𤯄4T/mϲ]cܝ-qf\^r+]Q3i"vqRv_>ߠ6{3bS4:M!QK;CAAx|} l7cďh8{;-u˖d7VP}hԗI` 7'Aتk+SgM:/2$116H42h#ǰmQj)3\iZ׹dq>fm[m(\Ē=GqؕǏAFcf~aNVиφQC'ݢbTfR&ԘSԻep˼+6&ج_}VWinYg塘,F⧡(qO#(*I81XҢ%Q kD^ t*c;@E+q涂xitiBm'jA&jِqUHM݌n-ND\֬1v.Q.V DN55t}8%o/.=՜c |#yƮ+a vm4ZF(wCN@LLfc|AiR>D{BvE9⨆ǴpXdr,<.df@s &YBh!QSA|v|:!~GLy^\r9FNM*JRaD5?2QLE@!#0'7/;M8s%M32iS͌l'Y^xiW7T͊x.!ènޔ?6.ՐiHj{qSv܉#In?u7ݛ<d唿RK .ZH_k57}8 阮:连%Ӱ8z׮x~GҽB{۳})A*d7F)~Ʌfo7'e* S+G$|j=MͥG| G}> =3O Wʡ.F viVꅱ#C&ؐfsߐ{*g=IV%$V ژ QEED<E+ST ;ŽT^ÉTt"/_jruK|[,qp?oerotrBʣ9e& y?77Wn"1 r=G"P1} QT}^Wvyy~<-*~J;XU_:6A96M#WHOCX;Nqw a[KZp#0py4O;'<:hhU$1i&1T&!8² 9Z~mjZ?VU/Zm:+o1=^T/<,kI:Qoj~>=署JK Su]4,m9 )wйDKN.].Yte:o endstream endobj 235 0 obj 8861 endobj 236 0 obj <>stream xy X׶u-UQT:%X#N9E TPAPgAw72 2  "8o4oILԫ"SI7膮k>J]zxWyJ&RYgؾzW; >8/Vx? ~QMj?g_Ay?گؾq_xksnwUf۵ۂ#Bo bf˜b.t^ȦeΡ\o^vw"W-(zk'L4y{M}cZ<82CRf3`18fόg3f3Y80+wIHf̌bܘ)hƝqa^g0Ō3Y,a2o0LchWgm c `LUc1m*'ձnnGգIw"eحmn*WW=ʐWr{9z{bݖoX'ϑ}`5jWW^m>D6clۦ 8noUo{ p^xPdSǒd{8Pb7 ~'2)_,S9p$/,Q5TA퓅D;eW 1v&5^2 HOxT. Q{ {[`){KMw͑@YReAY0,_TeȩtUuamPH#ə!Ѱ{%1 [- }&: K;{Dx.;@oLI(/Zh؁ۃ}WK>>pApW6BZ, !%SE!/G?UwZ߯)%9 iU7!3d82;“ZrY iP!bo>XU]z3s.ybX| _?|Vc'!.ѫ'Z@wP[k->\yV.!7@vɕII$T v]NOLJ*H{9g"@1n0B/KF+:eGm ݗ21vkNۄ H$$H iMDٌESk2?+Tw0Idۈ|(~\o&[BlZS05tJ f1H㞐É-{_?>"K\dnE5cK[iǕnOL5odY)鲇AZ+?Ż^+?R̝Ӵ֯q22 &6ߍőr9:܁+_[{W+.h{;u2fp={z'U䏢f'[5BWɚM݂d4 dɓE]=JC"չvU[z(Sw.6D̮q1ܸlu6/8ҧ'Ѣsv6B5`őr& ~2 -jO% ǏÑ}5$dkͦQdt2>EN~bO+} ѼWmt3FƛX#f{Thb5@Yfo#vƠc,6cF~EvLya(ђS4@80k;GO$ij6A5dJ,NJBқحjJy/S[QwU̞CW)D{ִO#3VE!&xÇKή:qKiF Lx)T:3}p݌V;:߱{UWݻ$-)WPkuM =_=RXj5ɐʇTV(] yΡrOOuv{@ I9E X6=kGRF\qh)Xi YIur2e/U`"I--އ)q+9*$Di.t"'pZUpBz dS i S}ʼnr'y`UqH_XQ6e-|o#i=9Ew!W 6Bi$$VP^sϜz3aـ bpȍD1 vZ!y K75MQ3g/*JUK;MO2i[/B4}OU_ؼ[$C%2cU0Gۣ㷧5qh_žN1X Ӵ8&R@C %Y&vfH(#VqS^'x^|"nZM~H63(b,i)츶ʫPyVHZOKW{JV!k[5 UB/}Z\& j*6Ht @SՖp^rXkéώ=b tan;-28q{)Ӫ3SZJTO)=%5n g!#p'kpX;r9q7ijaۗÕr p-Oz*e78)_]+pNŜI|U8_Ut\sY俚{=l!' dx5mӡˏ?ؕa \ag~4cmښ] 5F"WP9=BEƖѰDN~dLY{ŖOm[v-㋵%{0~ChmzQEQ[DG>_H|M<2j o_(jIB}sl` sxܘq 7֞@'JS;9F&PR{WtٶHb7|I? 9.݉l]K.rm>TЧƤDA fh:87J?3NU&_R?@=/BMݐFƴ]ɂMg߽{(,$6@J-tu%bMbYMg(G+D41k!oV3jhc);-kMxu嚲}=]8lu!bq~0\qT^jcq<\/,5M){[Wv̎ߓNk´6ړۨ=Vj|%3۹"׽RJvտYd4UJPp!@Ԫp8XaCrI !5&v.U;G3 IvA>UA|T 8^;o M^/HSmmH$YLhD?0TI5H0w0H҈$Êg_{ݻswctM0 }k.;h7LLN0_Qj rB+Y:5|g [mƋ|Gzr'ҟNu28NRa8E\uE%/ڱ+)u6ѦɁ45E+#72v\x4Zi0'ǎw,<}ycv}߷rL,w/+3ʵ8dQwF8h0lLqq vjiίVmw%eTlp 78$P>F< Wh{8]#q48Pq.Ba$dB”[@KXu_FX8Rx*m'x^jkuqکӬY' 7> ц;O<;&hiMҺFz,p+NN7u8-i#*7e[.LzK H0=E Y}aK^:ɏAN5SI[$l5? [ڔtkti1\@ee 65K> F}YG #V,oO}S 90OOPSlVFzb 9J?>ŷ%Oc ȼT@ |t<[wKX1;\xfҍ%|IaMt~'JLGecof &aώ C>dH9gr3oC 6&":2&b > 2w~2 =-L?%e_-Xw!ߦ8YunPxaB\"})kC6oO U'f1 jMݴujJɷb7dJkd6F nz"X$xS\GulSmIWBbV3>SΞR>stream xe}Pǟ=vWzA ]R6 h8 )/Rm^Hwp xDm܁A &DӼL6$1b410{&<>~|aĸecQayhsD; JZTfXKCڵk L֢\!#׶Ӵ+צ,E&[峆be2a*xP9ɲn3Y Le0eɺ5\B2,I&+I "d;'$D O,:SȌjVi5,hjkoEDGdl#Q5O{ 6A *xU7^!eio9}Fj3d#)ya.;%!&=[-F> {`ܾ>>s*^\3q.UsVM8?aBz0~%5S/bQP^z^t**!ιspX!U2dpyZB*R:o ,&v pPnޑm9%[ CyMlzM?,A㡦[v<}#y?S'1C_U&&@= 5VA}[Ս齸.t3Shֽ,wN ŭV/WT 8W+E+Mqq%/0 j gVR&b*.yh5zE ٧JG?nuw~{}##p3#]NDX/JӷgAXJ\Ē5q*W|rFڵw7 Ut:s(鹥ybT!YW ԡ=g'o"Q,nCn/1!JRe;r^m_4d %΀5S-]=P5pE Won*v|p|Cd@:7ۻ![}oLVֻ$}}NFp{vX: TlӽݟqlHt; *>\BtoAKe$mbIIA#[T|n\M9_f}eo>g?2 @#d jmzW@Ynk;;Gs>q "|qXYI}HA˯ƢC~8' >Iir4mm@a.xA٤{h6>i禴t4/2q>7.+$ә0~Le `CsBkt6"ȵ \¹Ob#7Ϋ{V-Oys -RHX Ɵۙ~WGͩ3pκO>̩1:}‘uwFh;aZ؏Ho<9XGvKht6nγG .<Vf>8#L_H$'#gɑQp*P endstream endobj 239 0 obj 1552 endobj 215 0 obj <> endobj 63 0 obj <> endobj 55 0 obj <> endobj 240 0 obj <> endobj 241 0 obj <>stream x]= wN BO%]2^1!Co_Lڪ,} i.0sI5 gY+qT+> endobj 243 0 obj <> endobj 15 0 obj <> endobj 244 0 obj <> endobj 13 0 obj <> endobj 245 0 obj <> endobj 11 0 obj <> endobj 246 0 obj <> endobj 9 0 obj <> endobj 214 0 obj <> endobj 62 0 obj <> endobj 54 0 obj <> endobj 40 0 obj <> endobj 14 0 obj <> endobj 12 0 obj <> endobj 10 0 obj <> endobj 8 0 obj <> endobj 2 0 obj <>endobj xref 0 247 0000000000 65535 f 0000166500 00000 n 0000207055 00000 n 0000166189 00000 n 0000160585 00000 n 0000000015 00000 n 0000002046 00000 n 0000166548 00000 n 0000206822 00000 n 0000204027 00000 n 0000206441 00000 n 0000203436 00000 n 0000205863 00000 n 0000202711 00000 n 0000205367 00000 n 0000202122 00000 n 0000166589 00000 n 0000166619 00000 n 0000160745 00000 n 0000002066 00000 n 0000007296 00000 n 0000166682 00000 n 0000166724 00000 n 0000166756 00000 n 0000160907 00000 n 0000007317 00000 n 0000012371 00000 n 0000166810 00000 n 0000166852 00000 n 0000166884 00000 n 0000161069 00000 n 0000012392 00000 n 0000018444 00000 n 0000166938 00000 n 0000166980 00000 n 0000167012 00000 n 0000161231 00000 n 0000018465 00000 n 0000024983 00000 n 0000167066 00000 n 0000205110 00000 n 0000201572 00000 n 0000167108 00000 n 0000167140 00000 n 0000161393 00000 n 0000025004 00000 n 0000030432 00000 n 0000167194 00000 n 0000167236 00000 n 0000167268 00000 n 0000161555 00000 n 0000030453 00000 n 0000035554 00000 n 0000167322 00000 n 0000204873 00000 n 0000201045 00000 n 0000167364 00000 n 0000167396 00000 n 0000161717 00000 n 0000035575 00000 n 0000041272 00000 n 0000167461 00000 n 0000204499 00000 n 0000200663 00000 n 0000167503 00000 n 0000167535 00000 n 0000161879 00000 n 0000041293 00000 n 0000045949 00000 n 0000167600 00000 n 0000167642 00000 n 0000167674 00000 n 0000162041 00000 n 0000045970 00000 n 0000050310 00000 n 0000167728 00000 n 0000167770 00000 n 0000167802 00000 n 0000162203 00000 n 0000050331 00000 n 0000054586 00000 n 0000167845 00000 n 0000167887 00000 n 0000167919 00000 n 0000162365 00000 n 0000054607 00000 n 0000058546 00000 n 0000167995 00000 n 0000168037 00000 n 0000168069 00000 n 0000162527 00000 n 0000058567 00000 n 0000063597 00000 n 0000168112 00000 n 0000168154 00000 n 0000168186 00000 n 0000162689 00000 n 0000063618 00000 n 0000067731 00000 n 0000168229 00000 n 0000168271 00000 n 0000168304 00000 n 0000162853 00000 n 0000067752 00000 n 0000073571 00000 n 0000168370 00000 n 0000168413 00000 n 0000168448 00000 n 0000163019 00000 n 0000073593 00000 n 0000079472 00000 n 0000168514 00000 n 0000168557 00000 n 0000168592 00000 n 0000163185 00000 n 0000079494 00000 n 0000081965 00000 n 0000168647 00000 n 0000168690 00000 n 0000168725 00000 n 0000163351 00000 n 0000081987 00000 n 0000087024 00000 n 0000168780 00000 n 0000168823 00000 n 0000168858 00000 n 0000163517 00000 n 0000087046 00000 n 0000092545 00000 n 0000168913 00000 n 0000168956 00000 n 0000168991 00000 n 0000163691 00000 n 0000092567 00000 n 0000097014 00000 n 0000169046 00000 n 0000169089 00000 n 0000169124 00000 n 0000163857 00000 n 0000097036 00000 n 0000102030 00000 n 0000169190 00000 n 0000169233 00000 n 0000169268 00000 n 0000164023 00000 n 0000102052 00000 n 0000106959 00000 n 0000169323 00000 n 0000169366 00000 n 0000169401 00000 n 0000164189 00000 n 0000106981 00000 n 0000111523 00000 n 0000169456 00000 n 0000169499 00000 n 0000169534 00000 n 0000164355 00000 n 0000111545 00000 n 0000116559 00000 n 0000169589 00000 n 0000169632 00000 n 0000169667 00000 n 0000164521 00000 n 0000116581 00000 n 0000121765 00000 n 0000169722 00000 n 0000169765 00000 n 0000169800 00000 n 0000164695 00000 n 0000121787 00000 n 0000126621 00000 n 0000169833 00000 n 0000169876 00000 n 0000169911 00000 n 0000164861 00000 n 0000126643 00000 n 0000129606 00000 n 0000169977 00000 n 0000170020 00000 n 0000170055 00000 n 0000165027 00000 n 0000129628 00000 n 0000132458 00000 n 0000170110 00000 n 0000170153 00000 n 0000170188 00000 n 0000165193 00000 n 0000132480 00000 n 0000137727 00000 n 0000170254 00000 n 0000170297 00000 n 0000170332 00000 n 0000165359 00000 n 0000137749 00000 n 0000143341 00000 n 0000170398 00000 n 0000170441 00000 n 0000170476 00000 n 0000165525 00000 n 0000143363 00000 n 0000147991 00000 n 0000170531 00000 n 0000170574 00000 n 0000170609 00000 n 0000165691 00000 n 0000148013 00000 n 0000152611 00000 n 0000170664 00000 n 0000170707 00000 n 0000170742 00000 n 0000165857 00000 n 0000152633 00000 n 0000156532 00000 n 0000170797 00000 n 0000204284 00000 n 0000200508 00000 n 0000170840 00000 n 0000170875 00000 n 0000166023 00000 n 0000156554 00000 n 0000160563 00000 n 0000170943 00000 n 0000170986 00000 n 0000171021 00000 n 0000171098 00000 n 0000171476 00000 n 0000171497 00000 n 0000173868 00000 n 0000173890 00000 n 0000174458 00000 n 0000174479 00000 n 0000175221 00000 n 0000175242 00000 n 0000183531 00000 n 0000183553 00000 n 0000192502 00000 n 0000192524 00000 n 0000198824 00000 n 0000198846 00000 n 0000200486 00000 n 0000201206 00000 n 0000201301 00000 n 0000201551 00000 n 0000201967 00000 n 0000202588 00000 n 0000203262 00000 n 0000203931 00000 n trailer << /Size 247 /Root 1 0 R /Info 2 0 R /ID [(b>^f;]j)(b>^f;]j)] >> startxref 207247 %%EOF msort-8.53/Doc/InitializationFiles0000644000175100017510000001132611236173741014152 00000000000000On startup, msg attempts to read an initialization file called .msgrc. It looks first in the current working directory, then in the user's home directory. An initialization file consists of a Tcl program. In addition to the primitives of the Tcl language, commands specific to the configuration of Msg are available. For most purposes you do not need to know anything about programming in general or Tcl in particular - you can just treat the initialization file as a sequence of parameter settings - but you can make use of the Tcl interpreter if you wish to. The initialization file is read by a safe interpreter. This means that some commands and other facilities of the language are made unavailable for security reasons. A simple initialization file consists of a series of parameter setting commands. Some commands take Boolean arguments, that is, they say yes or no. All such commands have names ending in "P". For example, the command BalloonHelpShowP is used to enable or disable balloon help. If you want to disable balloon help, give the command: BalloonHelpShowP off You can use on and off as in this example, or a variety of alternatives, including yes and no, t and f, and 1 and 0. Other commands take non-Boolean arguments. Examples are: MenubarBackgroundColor \#C36176 BalloonHelpFontFamily helvetica BalloonHelpFontSize 12 BalloonHelpFontSlant roman BalloonHelpFontWeight bold BalloonHelpFontUnderline underline The first line is a typical color setting. The command name consists of the name of the object followed by the aspect of the object whose color is to be set. The single argument of the command is the color. You can use color names like salmon or you can indicate the color you want by specifying its mixture of red, green, and blue. The second line exemplifies this. A numerical color specification begins with a crosshatch. Since a crosshatch has a special meaning to Tcl, it is preceded by a backslash to give it its ordinary meaning. The main part consists of three groups of two characters. The first group specifies the amount of red, the second the amount of green, and the third the amount of blue. Each pair of characters represents two hexadecimal (base 16) digits. The hexadecimal digits are: 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E, and F. The proportion of each primary color is therefore specified as a number ranging from 00 (0*16 + 0*1 = 0) to FF (15*16 + 15*1 = 240 + 15 = 255). The next five lines exemplify font settings. The command name indicates what aspect of the program the font is used for and which of the five properties is set. Such commands take a single argument. The choices for slant are roman and italic, for weight normal and bold, and for underlinging normal and underline. Font size is given in points. The font family should be the name of a font family available on your system. The command Initialization File Commands on the Help menu provides a complete list of the commands that you can use in your initialization file. You can write the list out to a file or pop it up on the screen. This list contains only the commands specific to Msg. The commands that are built in to Tcl are described in a variety of books and web sites. There are just a few things you need to know about Tcl. One is that a crosshatch begins a comment. Any line beginning with a crosshatch will be ignored. If you want to put a comment on the same line as a command, you must end the command with a semi-colon. A second is that certain other characters have a special meaning to Tcl. If you include such characters you may unintentionally be telling Tcl to do something that you did not intend. In Tcl square-brackets enclose a command whose value replaces whatever was between the square brackets. For example, the command: puts "The current time is [clock format [clock seconds]]." says to print the string The current time is followed by the current time and date. The command [clock seconds] returns the number of seconds since midnight, January 1, 1970. The command [clock format] takes this value and converts it into a string representing the time and date in a more conventional manner. This string becomes part of the overall string. The result looks like this: Sun Aug 14 21:06:47 EDT 2005 If you need to include special characters such as square-brackets in strings and want them to have their ordinary values, you can quote them with a backslash, e.g. \[.. If you want everything displayed at the outset, put the following in your init file: AlgorithmDisplayedP 1 InputFileDisplayedP 1 MiscOptionsDisplayedP 1 OutputFileDisplayedP 1 RecordParseDisplayedP 1 UnicodeDisplayedP 1 ExclusionsDisplayedP 1 KeyFieldIdentificationDisplayedP 1 MiscellaneousOptionsDisplayedP 1 SortOrderDisplayedP 1 SortTypeDisplayedP 1 SubstitutionsDisplayedP 1 msort-8.53/README0000644000175100017510000002374511236173741010440 00000000000000This package consists of two related programs. The first, msort, is the actual sort program. It has a command-line interface and is written in C. The code is quite standard and no exotic libraries are required, so it should compile and run on any POSIX-compliant system. The one non-standard library required is Ville Laurikari's TRE regular expression library, available at http://laurikari.net/tre/. The second program, msg, is a graphical front end to msort. It isn't of any real use without msort, but it doesn't literally depend on it. You can run it on a system lacking msort. When it starts up it will report that it cannot find msort, and therefore of course it will not actually sort anything, but if it amuses you, you can still play with it. msg is written in Tcl and uses the Tk toolkit. It is meant to be run under wish, the Tcl/Tk windowing shell. So long as you have Tcl/Tk/wish available, there is nothing much to be done to install msg. Since Tcl is interpreted, no compilation is necessary. If you do not have Tcl/Tk, don't worry, it is easy to obtain and install. For most platforms, the easiest approach is to obtain the ActiveTcl distribution from: http://www.activestate.com/Products/ActiveTcl Further information is available at: http://billposer.org/Software/msort.html FURTHER DETAILS ON MSORT Msort has been developed and tested primarily under GNU/Linux. I also have access to a machine running FreeBSD and am able to test it there. According to reports from others, it compiles and runs under Solaris and Mac OS X. The man page only gives basic information. The real reference manual is Doc/msort.pdf. DEPENDENCIES Msort makes use of several libraries that are not routinely installed. The first is Ville Laurikari's regular expression library, wihch may be obtained from: http://laurikari.net/tre/. This library is reported to work on pretty much all varieties of Unix, including Mac OS X, as well as MS Windows XP. Second, msort requires support for Unicode normalization. It can be compiled to use either libicu (International Components for Unicode), which may be obtained from http://www.icu-project.org/, or libutf8proc, which may be obtained from http://www.flexiguided.de/publications.utf8proc.en.html. ICU is fairly widely used, so you already have it on your system. To use it, give the option --disable-utf8proc to configure. msort defaults to using utf8proc because utf8proc is smaller and easier to install. Third, msort optionally uses libuninum to handle numbers in systems other than the usual Indo-Arabic system. Libuninum is my own library and may be obtained from http://billposer.org/Software/libuninum.html. Packages for a variey of systems are available. If you do not need support for exotic number systems, you may build msort without libuninum. To do this, give the option --disable-uninum to configure. Libuninum in turn uses the GNU MP library for arbitrary precision arithmetic. It is available from http://www.swox.com/gmp/. libgmp is required if libuninum is linked. To summarize, if you want to build msort with the minimum of trouble, you will need libtre and either libutf8proc or libicu. If the latter is not already installed, you will probably find it easier to go with the libutf8, which is the default. If you do not need to handle exotic number systems, you can forgo libuninum and libgmp. To build this minimal configuration, call configure as follows: configure --disable-uninum On some systems, the autoconfiguration system will not detect the need to link to libintl. If this happens to you, give the flag: LIBS="-lintl" to configure, e.g.: ./configure LIBS="-lintl" INSTALLATION If you have the GNU autoconf system available, follow the generic installation instructions in INSTALL. In short, these are: ./configure make make test (su) make install-strip The last command arranges for the symbol table to be removed from the executable file when it is installed, which results in a substantial reduction in size. If you want to be able to use a debugger on msort you will want to preserve the symbol table, in which case you should give the command: make install instead. "make test" is optional. It executes a set of regression tests. The tests run very quickly so don't hesitate to try it. The results will be written to the file RegressionTests/TestResults. There are a few additional tests that are not executed by "make test". These are tests that depend on the correct functioning of the locale system, including the ability to switch into certain particular locales. They are kept separate because they can fail even if msort itself is working perfectly. To execute these tests, give the command: make localetest The results will be written to the file RegressionTests/LocaleTestResults. There are several non-standard options to configure: --disable-allocaok By default, in certain situations msort uses the alloca routine to allocate storage on the stack, which is faster than allocating it on the heap. However, alloca is buggy on some systems. If you give configure the option --disable-allocaok, msort will not use alloca. If you know that alloca is funky on your system, or if msort seems to behave strangely, configuring msort with this flag is wise. --disable-uninum Build without reliance on libuninum. This eliminates the ability to handle exotic number systems. --disable-utf8proc Use libicu rather than the default of utf8proc for Unicode normalization. --disable-comparison-count Eliminates the comparison count. In theory this will speed things up slightly, but the speed-up is unlikely to be noticable. --enable-debugbuild This adds replaces the default compiler options "-g -O2" with "-ggdb -g3", causing the resulting executable to contain the maximum amount of useful information for gdb and disabling optimazation. This eliminates the need for manual editing of the Makefile. It also defines the MACRO DEBUGBUILD in the C files, allowing conditional compilation of code for debugging. For generic details on installation using the the autoconf system, see the file "INSTALLATION". The standard option you are most likely to be interested in is: --prefix=foo, which changes the directories in which msort is installed. For example, by default the executables will be installed in /usr/local/bin. If you prefer to install the executables in your personal bin, in my case, /home/poser/bin, you can configure msort using the command: ./configure --prefix=/home/poser This will result in the executables being put in /home/poser/bin, the manual page in /home/poser/man/man1, etc. If you do not have autoconf/automake, or if a problem arises, look in the Doc directory for the file OriginalMakefile and make a copy of it in this directory named Makefile. To compile, first see if there is anything in the Makefile that you want to change. You may wish to change the default installation directories BINDIR, where the executable goes, and MANDIR, where the manual page goes. The compiler is also set to gcc. If you don't have gcc, or want to use another compiler, change the value of CC. Then a simple "make" should suffice to compile msort. To install, su if necessary, then "make install". Msort uses the TRE regular expression library to match tags and to perform substitutions on keys. This library is available for a wide range of systems but in source form. It must be compiled and installed. Clear instructions for compiling and installing it are provided with the package. However, those not experienced with installing libraries may encounter difficulties. One problem that you may encounter is that, even after you install the library, the linker (part of the compilation process) says that it cannot find it. This is probably the result of the library having been installed in a directory that the linker does not know about. To remedy this, you need to run the ldconfig program. On Linux systems this should be located in /sbin, a directory that contains programs normally used only by the system administrator. You will need to be root to run ldconfig. Ldconfig indexes the standard directories /usr/lib and /lib, any directories listed in the file /etc/ld.so.conf, and directories listed on the command line. If you install the TRE library in a directory other than /lib or /usr/lib, such as the default /usr/local/lib, you will need to tell ldconfig to search that directory. You can do this either by adding the name of the directory to /etc/ld.so.conf or supplying the directory name on the command line, e.g.: /sbin/ldconfig /usr/local/lib Another approach is to give the compiler options that it will pass on to the linker to tell it where to look. There are two such options: -L and -rpath. On some systems -L is used for static libraries and -rpath for shared libraries, but there is some variation. It appears always to work if you just use both. This is especially useful if you do not have root privileges on the system. In the msort Makefile, the relevant portion looks like this: msort: ${OBJS} ${CC} -o msort ${OBJS} -ltre This says that "msort" depends on the files listed in the variable OBJS, namely msort.o, misc.o, etc., and that "msort" is created from these files by running the command that is the value of the variable CC. The value of CC will generally be "gcc". The flag -ltre indicates that the TRE library should be loaded. To tell the linker that the files for the TRE library are located in /usr/local/lib/, change the second line above to: ${CC} -o msort ${OBJS} -L /usr/local/lib -rpath /usr/local/lib -ltre Of course, if you don't have root privileges you probably can't install TRE in /usr/local/lib. If you install it in one of your own directories, give that directory as argument to -L and -rpath instead, e.g.: ${CC} -o msort ${OBJS} -L /home/wjposer/Src/lib -rpath /home/wjposer/Src/lib -ltre Some sample sort order definition files are provided in the SortOrders subdirectory. In addition to serving as examples, some of them may be useful, if, for example, you need to sort country names in United Nations order, sort by the Chinese Heavenly Stems, or handle traditional Armenian dates. msort-8.53/configure.ac0000644000175100017510000000723211322473504012033 00000000000000AC_PREREQ(2.59) AC_INIT(msort, 8.53, billposer@alum.mit.edu) AM_CONFIG_HEADER([config.h]) AM_INIT_AUTOMAKE AC_DEFUN([AC_C_LONG_LONG], [AC_CACHE_CHECK(for long long int, ac_cv_c_long_long, [if test "$GCC" = yes; then ac_cv_c_long_long=yes else AC_TRY_COMPILE(,[long long int i;], ac_cv_c_long_long=yes, ac_cv_c_long_long=no) fi]) if test $ac_cv_c_long_long = yes; then AC_DEFINE(HAVE_LONG_LONG, 1, [compiler understands long long]) fi ]) AC_DEFUN([AC_C_PRINTF_THSEP], [AC_TRY_COMPILE(,[printf("%'2d",101);],ac_cv_c_printf_thsep=yes,ac_cv_c_printf_thsep=no) if test $ac_cv_c_printf_thsep = yes; then AC_DEFINE(HAVE_PRINTF_THSEP, 1, [compiler understands printf flag for thousands separation in ints]) fi ]) AC_ARG_ENABLE(nocomparisoncount, [--disable-comparisoncount Do not count comparisons.], [case "${enableval}" in yes) nocomparisoncount=true ;; no) nocomparisoncount=false ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-comparisoncount) ;; esac],[nocomparisoncount=true]) AM_CONDITIONAL(NOCOMPARISONCNT,test "$nocomparisoncount" = false) AC_ARG_ENABLE(allocaok, [--disable-allocaok Do not use alloca - use heap instead.], [case "${enableval}" in yes) allocaok=true ;; no) allocaok=false ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-allocaok) ;; esac],[allocaok=true]) AM_CONDITIONAL(ALLOCAOK,test "$allocaok" = true) AC_ARG_ENABLE(uninum, [--disable-uninum. Do not link uninum library.], [case "${enableval}" in yes) uninum=true ;; no) uninum=false ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-uninum) ;; esac],[uninum=true]) AM_CONDITIONAL(UNINUMOK,test "$uninum" = true) AC_ARG_ENABLE(utf8proc, [--disable-utf8proc. Use the icu library instead of utf8proc.], [case "${enableval}" in yes) utf8proc=true ;; no) utf8proc=false ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-utf8proc) ;; esac],[utf8proc=true]) AM_CONDITIONAL(UTF8PROCOK,test "$utf8proc" = true) AC_ARG_ENABLE(debugbuild, [--enable-debugbuild. Compile for debugging.], [case "${enableval}" in yes) debugbuild=true ;; no) debugbuild=false ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-debugbuild) ;; esac],[debugbuild=false]) AM_CONDITIONAL(DEBUGBUILD,test "$debugbuild" = true) # Checks for programs. AC_PROG_CC if ${debugbuild}; then CFLAGS="-ggdb -g3" else CFLAGS="-g -O2" fi AC_PROG_INSTALL # Checks for libraries. AC_CHECK_LIB([tre], [tre_regwcomp],,[AC_MSG_ERROR([libtre not found. see http://laurikari.net/tre/])]) AC_CHECK_LIB([intl], [gettext],AC_DEFINE([HAVE_LIBINTL], [1],[Define to 1 if you have libintl.]),) #AM_GNU_GETTEXT # Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([alloca.h ctype.h errno.h gnu/libc-version.h langinfo.h libintl.h limits.h locale.h stdargs.h stddef.h stdint.h stdlib.h string.h sys/file.h sys/stat.h time.h tre/tre.h unicode/umachine.h unicode/unorm.h uninum/unicode.h uninum/nsdefs.h uninum/uninum.h unistd.h wchar.h wctype.h]) if ${utf8proc}; then AC_CHECK_HEADER([utf8proc.h],[AC_DEFINE([HAVE_UTF8PROC_H], [1],[Define to 1 if you have .])],[AC_MSG_ERROR([LIB UTF8PROC and its header is obligatory. See http://www.flexiguided.de/publications.utf8proc.en.html])]) fi if ${uninum}; then AC_CHECK_LIB([uninum],[uninum_version],,[AC_MSG_ERROR([libuninum not found])]) fi # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_C_INLINE AC_TYPE_SIZE_T AC_C_LONG_LONG AC_C_LONG_DOUBLE AC_C_PRINTF_THSEP # Checks for library functions. AC_CHECK_FUNCS([getopt_long malloc mbstowcs nl_langinfo realloc regwcomp regwexec setlocale strchr strrchr strtod strtol uninum_gmp_version wcschr wcscmp wcscasecmp wcsxfrm]) AC_CONFIG_FILES([Makefile]) AC_OUTPUT msort-8.53/aclocal.m40000644000175100017510000007546211322473516011422 00000000000000# generated automatically by aclocal 1.9.6 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. # Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.9.6])]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 7 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE]) AC_SUBST([$1_FALSE]) if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH]) ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 3 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 12 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.58])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl ]) ]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $1 | $1:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"$am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. # # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories # created by `make install' are always world readable, even if the # installer happens to have an overly restrictive umask (e.g. 077). # This was a mistake. There are at least two reasons why we must not # use `-m 0755': # - it causes special bits like SGID to be ignored, # - it may be too restrictive (some setups expect 775 directories). # # Do not use -m 0755 and let people choose whatever they expect by # setting umask. # # We cannot accept any implementation of `mkdir' that recognizes `-p'. # Some implementations (such as Solaris 8's) are not thread-safe: if a # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' # concurrently, both version can detect that a/ is missing, but only # one can create it and the other will error out. Consequently we # restrict ourselves to GNU make (using the --version option ensures # this.) AC_DEFUN([AM_PROG_MKDIR_P], [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi AC_SUBST([mkdir_p])]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR msort-8.53/msort.10000644000175100017510000002621211322474670010777 00000000000000\" This file was partially generated by help2man 1.33. .TH MSORT "1" "January 2010" "msort " "User Commands" .SH NAME msort \- sort records in complex ways .SH SYNOPSIS .B msort [] .SH DESCRIPTION .PP .I msort is a program for sorting text files in sophisticated ways. It was developed initially for alphabetizing dictionaries of languages in which the ordering may be quite different from English but has many other uses. .PP .I msort allows you to sort blocks of text delimited in a number of ways rather than just lines and to specify particular fields of a record as sort keys using either their position, counted from either end, or by matching regular expressions to their tags. .PP .I msort is capable of sorting on multiple keys, so that when two records tie on one key, the tie may be broken on another. Any or all keys may be optional. How absent optional keys are ordered with respect to present keys may be set separately for each key. .PP .I msort allows you to specify arbitrary sort orders and to define virtually unlimited numbers of multigraphs of effectively unlimited length. The sort order and multigraphs are defined separately for each key. If your system has locale support, you can also use locale collation rules instead of specify your own sort order. .PP .I msort provides twelve types of key comparison: lexicographic, numeric, numeric string, hybrid, by string length, by angle, by date, by domain name, by time, by ISO8601 date/time stamp, by month name, and random. .PP What month names are used is a bit complicated. If the .I -s flag is used on the same key and its argument is the name of a file, the month names are read from the file, which should be in the same format as a sort order definition file. If the .I -s flag is used and its argument is a locale name, the month names recognized will be the month names and abbreviations associated with the specified locale. If the .I -s flag is not used the month names recognized will be the month names and abbreviations associated with the current locale. If your system does not have locale support and you do not use the .I -s flag to read the month names from a file, the month names recognized will be the English month names and abbreviations. .PP .I msort can reverse the characters in a key, allowing it to be used to generate reverse dictionaries. .PP A choice of sorting algorithms is provided. .PP .I msort fully supports Unicode. The text to be sorted, and all specifications, should be in UTF-8 Unicode. (If you have plain ASCII text, this is not a problem as ASCII is a subset of Unicode.) Full Unicode case-folding is available, in Turkic and non-Turkic variants. Unicode normalization is performed before sorting. .PP For usage information, execute .I msort with no arguments. .PP Full information about .B msort is currently to be found in the reference manual, which is distributed as a PDF (Portable Document Format) file. If a copy is not available locally, you can download it from msort's home page: .br http://billposer.org/Software/msort.html .sp 1 .SH OPTIONS .SS "Informational options" .TP \fB\-h,--help\fR Print usage message .TP \fB\-v,--version\fR Print version message .TP \fB\-D,--defaults\fR List defaults .TP \fB\-F,--general-options\fR List general command line options .TP \fB\-G,--gnu-equivalences\fR List equivalents for GNU sort command line options. .TP \fB\-H,--informational-options\fR List informational command line options .TP \fB\-K,--key-specific-options\fR List key-specific command line options .TP \fB\-L,--limits\fR List limits .TP \fB\-N,--number-systems\fR List the supported number systems. .SS "General options" .TP \fB\-b,--block\fR A record is terminated by two or more newlines .TP \fB\-l,--line\fR A record consists of a single line .TP \fB\-r,--record-separator\fR A record is terminated by separator character .TP \fB\-O,--fixed-size-record\fR A record consists of the specified number of bytes. .TP \fB\-d,--field-separators\fR + Fields are delimited by the named character(s) .TP \fB\-w,--whole\fR Sort on the entire text of the record .TP \fB\-a,--algorithm\fR Use the specified sort algorithm. The choices are: I(nsertionSort), M(ergeSort), Q(uickSort), and S(hellSort). Note that InsertionSort and MergeSort are stable, while QuickSort and ShellSort are unstable. The default is QuickSort. .TP \fB\-M,-initial-maximum-records\fR Set initial maximum number of records .TP \fB\-m,--line-end-carriage-return\fR End-of-line in the input data is marked by Carriage Return (0x0D) as on the Macintosh rather than by Line Feed (0x0A) as on Unix systems. .TP \fB\-I,--invert-globally\fR Invert sense of comparisons globally .TP \fB\-B,--BMP\fR No characters fall outside the Basic Multingual Plane (that is, have values greater than 0xFFFF). .TP \fB\-Z,--skip-first-record\fR Copy the first record in the input to the output without sorting it. This is useful for sorting files with a header. .TP \fB\-p,--reserve-private-use-area\fR Do not make internal use of the Private Use areas. By default, multigraphs are assigned internally to codepoints in the Supplementary Private Use areas if full Unicode is in use or to codepoints in the Private Use area if input is restricted to the Basic Multilingual Plane by means of the \fI\-B\fR option. If your input makes use of the Private Use areas, this option prevents interference with your input. In this case, multigraphs will be assigned to the Low and High Surrogate areas (0xD800-0xDFFF). Note that this limits the number of multigraphs to 2,048. .TP \fB\-P,--random-seed\fR Set the seed for the random number generator. If not set here, it is set to a value determined by the time. The seed used is reported in the log. This option allows runs to be replicated. .TP \fB\-Q,--check-only\fR Check whether the input is already sorted. Do not generate any output. Exit status is 0 if input is already sorted, 11 if not sorted. .TP \fB\-1,--in\fR .TP \fB\-2,--out\fR If the output file is the same as the input file, the input file will be overwritten. The input file will not be overwritten if the run is unsuccessful. .TP \fB\-j,--suppress-log\fR Suppress output to the log. If this flag is given before there is any output to the log from a command line flag, nothing will be written to the log and the log file will not be created. If a command line flag generates a log message before this flag is processed, the log file will be created but no log messages will be written to it once this flag is processed. To guarantee that no attempt will be made to open a log file, give this flag first. .TP \fB\-q,--quiet\fR Be quiet - do not chat while working .TP \fB\-u,--unicode-normalization\fR Select Unicode normalization mode. The choices of mode are: \fIc\fR for normalization form C (NFC), \fId\fR for normalization form D (NFD), \fIC\fR for normalization form KC (NFKC), \fID\fR for normalization form KD (NFKD), and \fIn\fR for no normalization. The default is NFC. .SS "Key specific options" .TP \fB\-e,--character-range\fR Sort on characters m through n. Positive indices start from one. Negative indices indicate position with respect to the end of the record. For example, the range \fI3,-2\fR consists of the third character through the next-to-last character. .TP \fB\-n,--position\fR (,) Sort on the specified POS or contiguous range of POSs, where a POS is of the form (.). Both counts begin at one. Field numbers but not character numbers may be negative, in which case they are counted from the right. Thus, 1.2 is the second character of the first field; -2.1 is the first character of the next to last field. .TP \fB\-t,--tag\fR Sort on the field with the specified tag .TP \fB\-o,--optional\fR Optional: compare as (<,=,>) to present key if absent .TP \fB\-C,--fold-case\fR Fold case .TP \fB\-z,--fold-case-turkic\fR Fold case with additional Turkic conversions. .TP \fB\-c,--comparison-type\fR a(ngle),l(exicographic), i(so8601 date/time), t(ime), D(omain name/email address), d(ate), m(onth name), n(umeric), N(umeric string),s(ize), h(hybrid), r(andom) .TP \fB\-y,--number-system\fR Specifies the number system expected for this key. This affects only numeric and numeric string keys. There are two special values. If the number system is "all", records may contain any number system that msort can interpret. Different records may contain different number systems. If the number system is "any", records may contain any writing system that msort can interpret, but all records must make use of the same number system. .I msort sets the number system on the basis of the first record. .TP \fB\-f,--date-format\fR Permutation of ymd with separators, e.g. y-m-d for international date format, m/d/y for American date format, or a permutation of yd with separators, e.g. y-d, for day-of-year dates. All three components may be numbers in any available number system. The month field may also be a month name, determined by the same devices as independent month name fields. .TP \fB\-W,--sort-order-file-separators\fR Read the list of characters to be treated as separators in the sort order definition file. .TP \fB\-S,--substitutions\fR Read substitutions from named file .TP \fB\-s,--sort-order\fR ||"locale" If the argument is a file name, it is taken to be a sort order file and the sort order for the key is read from the file. If the argument is a locale name, the collation rules for that locale are used. If the argument is "locale", the collation rules for the current locale are used. .TP \fB\-T,--transformations\fR <(d)(e)(s)> Apply the specified transformations. .I d specifies that diacritics are to be stripped. Separately encoded combining diacritics are removed. Characters with diacritics represented by single codepoints are replaced with the corresponding ASCII character without the diacritics, if there is one. .I e specifies that enclosed characters, that is, characters within circles or parentheses, are to be replaced with the corresponding plain ASCII character if there is one. .I s specifies that characters in special styles are to be replaced with the corresponding plain ASCII character if there is one. Stylistic equivalents include: small capitals (e.g. U+1D04), script forms (e.g. U+212C), black letter forms (e.g. U+212D), Arabic presentation forms (e.g. U+FE81), Hebrew presentation forms (e.g. U+FB1D), fullwidth forms (e.g. U+FF01), halfwidth forms (e.g. U+FF7B), and the mathematical alphanumeric symbols (e.g. U+1D400). .TP \fB\-x,--exclusion-file\fR Read exclusions from named file .TP \fB\-X,--exclude-characters\fR Exclude specified characters .TP \fB\-i,--invert-locally\fR Invert sense of comparisons .TP \fB\-R,--reverse-key\fR Reverse characters of key .TP \fB\-A,--first-character-only\fR Ignore all but the first character of the field, after substitutions, exclusions, etc. .PP Note: long options may not be available on your system. .SH "SEE ALSO" sort(1), uninum(3) .sp 1 .SH AUTHOR Bill Poser (billposer@alum.mit.edu) .SH LICENSE GNU General Public License (http://www.gnu.org/licenses/gpl.html), version 3. msort-8.53/comparisons.h0000644000175100017510000000102011236173741012244 00000000000000/* Comparison information bits */ #define CINVERSE (unsigned short) 0x0001 #define CNUMERIC (unsigned short) 0x0002 #define CDATE (unsigned short) 0x0004 #define CTIME (unsigned short) 0x0008 #define CSIZE (unsigned short) 0x0010 #define CISO8601 (unsigned short) 0x0020 #define CHYBRID (unsigned short) 0x0040 #define CRANDOM (unsigned short) 0x0080 #define CANGLE (unsigned short) 0x0100 #define CNUMSTR (unsigned short) 0x0200 #define CMONTH (unsigned short) 0x0400 #define CDOMAIN (unsigned short) 0x0800 msort-8.53/compdefs.h0000644000175100017510000000072411236173741011521 00000000000000#if defined HAVE_LOCALE_H && defined HAVE_SETLOCALE && defined HAVE_LANGINFO_H && defined HAVE_MBSTOWCS #define LOCALE_MONTHNAMES #endif #if defined HAVE_LOCALE_H && defined HAVE_SETLOCALE && defined HAVE_WCSXFRM #define LOCALE_SORT_ORDER #endif #if defined HAVE_LOCALE_H && defined HAVE_SETLOCALE && defined HAVE_GETTEXT #define LOCALE_GETTEXT #endif #if defined USEUNINUMOK && defined HAVE_UNINUM_NSDEFS_H && defined HAVE_UNINUM_UNINUM_H #define USE_UNINUM #endif msort-8.53/dstr.h0000644000175100017510000000103211236173741010666 00000000000000/* Structure for dynamic wide strings */ struct dstr { wchar_t *s; /* The text itself */ size_t c; /* The number of characters for which storage is available */ size_t l; /* The number of characters in the current string */ }; #ifndef DSTR extern int FillDynamicString(struct dstr *, wchar_t *); extern void FreeDynamicString (struct dstr *); extern void InitializeDynamicString (struct dstr *); extern struct dstr *MakeDynamicString (wchar_t *); extern void AppendToDyanmicString (struct dstr *,const wchar_t *); #endif msort-8.53/ex_codes.h0000644000175100017510000000027411236173741011512 00000000000000/* Masks defining positions in which a character is excluded */ #define EX_INITIAL ((unsigned char) 0x1) #define EX_MEDIAL ((unsigned char) 0x2) #define EX_FINAL ((unsigned char) 0x4) msort-8.53/exitcode.h0000644000175100017510000000047511236173741011530 00000000000000 /* Exit statuses */ #define SUCCESS 0 #define OPENERROR 1 #define EIOERROR 2 #define INFO 3 #define LIMITEXCEEDED 4 #define BADOPTION 5 #define BADOPTIONARG 6 #define OUTOFMEMORY 7 #define BADRECORD 8 #define OTHERERROR 9 #define RANGEERROR 10 #define NOTSORTED 11 #define BADENCODING 12 #define RECORDEXCLUDED 13 msort-8.53/input.h0000644000175100017510000000017411236173741011057 00000000000000#define INPUT_BUFOVERFLOW (-1) #define INPUT_ENDOFINPUT (-2) #define INPUT_SHORTRECORD (-3) #define INPUT_BADENCODING (-4) msort-8.53/key.h0000644000175100017510000000440511236173741010511 00000000000000#ifndef UNORM_H #ifndef USEUTF8PROC #include #else #include "unorm.h" #endif #endif struct ymdinfo { short y; /* Indices of year, month, and day in date */ short m; short d; wchar_t sep1; wchar_t sep2; }; /* Entry in the map table, for mapping sequences to codes */ struct mapentry{ wchar_t *str; wchar_t code; size_t len; /* Length of str */ }; /* Entry in the substitution list */ struct subentry{ regex_t cregexp; /* Compiled regexp */ wchar_t *se; /* String to substitute */ size_t len; /* Length of se */ struct subentry *next; }; #define MONTHNAMES 24 /* * Each key is represented by one keyinfo structure. */ struct keyinfo{ int SelectType; /* How to select key field */ regex_t cregexp; /* Compiled tag regexp */ short Number; /* Which field to sort on if numbered */ short Last; /* The last field to sort on in a range */ wchar_t *RankTable; int ExclusionSpec; /* Have exclusions been specified on command line or in file? */ struct mapentry **MapTable; int MapTableEntries; struct subentry *SubList; /* The substitution list */ int SubListEntries; wchar_t NextCode; /* Next code available in rank table */ wchar_t MaxMGCode; /* The highest codepoint available for multigraphs */ long TotalCodes; int RangeFirst; /* First character in range */ int RangeLast; /* Last character in range */ int FirstOffset; int LastOffset; short OptionalP; /* Is this key optional? */ short MissingKeyComparison; /* How missing keys compare to keys that are present */ short ReverseP; /* Reverse field? */ short FoldCaseP; /* Fold case? */ short TurkicFoldCaseP; /* Also do Turkic case-folding? */ wchar_t *Tag; /* Tag of field to sort on if tagged */ wchar_t *WhiteSpace; /* The characters to treat as separators in the sort order file */ struct ymdinfo ymd; /* Date format */ unsigned short CompType; /* Type of comparison to use */ int ExclusionEntries; unsigned char *ExclusionTable; short StripDiacriticsP; short ConvertEnclosedP; short ConvertStylisticP; short FirstCharOnlyP; short LocaleP; /* Use glibc locale-based comparison? */ char *Locale; /* Locale for this key */ wchar_t * MonthNames[MONTHNAMES]; int NumberSystem; int NumberSystemAnyP; }; msort-8.53/limits.h0000644000175100017510000000172011236173741011217 00000000000000 /* * This first section contains constants which can be changed at will. */ /* Default initial maximum records to sort */ #define DEFMAXRECORDS 10240 /* Initial size of input text buffer */ #define INPUTTEXTSIZEINIT 8192 /* Initial maximum fields in a record */ #define DEFMAXFIELDS 32 /* Maximum length of numeric string */ #define MAXDOUBLELEN 256 /* The following can't be changed freely since they reflect the Unicode standard */ #define MAXUNICODE 0x1FFFFF #define MAXBMP 0x00FFFF #define NPU_FIRSTMULTIGRAPHCODE 0xD800 #define NPU_MAXMULTIGRAPHCODE 0xDFFF #define NPU_MAXMULTIGRAPHS (NPU_MAXMULTIGRAPHCODE - NPU_FIRSTMULTIGRAPHCODE + 1) #define BMP_FIRSTMULTIGRAPHCODE 0xE000 #define BMP_MAXMULTIGRAPHCODE 0xF8FF #define BMP_MAXMULTIGRAPHS (BMP_MAXMULTIGRAPHCODE - BMP_FIRSTMULTIGRAPHCODE + 1) #define FUL_FIRSTMULTIGRAPHCODE 0xF0000 #define FUL_MAXMULTIGRAPHCODE 0x10FFFD #define FUL_MAXMULTIGRAPHS (FUL_MAXMULTIGRAPHCODE - FUL_FIRSTMULTIGRAPHCODE + 1) msort-8.53/record.h0000644000175100017510000000152311236173741011175 00000000000000/* * The key associated with a record may be a sequence of codes, * a (pointer to a) floating point number, a numeric string struct, * or a hybrid structure. */ struct HybridList { unsigned char cnt; /* Number of subparts - high bit indicates first bit is numeric */ long int *ilist; /* Numeric portions */ wchar_t **tlist; /* Textual portions */ }; union key{ wchar_t *t; #ifdef HAVE_LONGDOUBLE long double *n; #else double *n; #endif struct { int cnt; char *txt; char sign; } N; struct HybridList *H; }; /* * A record contains the text, and a list of the keys extracted * from the record. */ struct record{ size_t length; /* Length of text in characters */ UTF8 *text; /* The text itself */ off_t fpos; /* File offset for semi-external sort */ union key *klistptr; /* List of keys */ }; msort-8.53/retcodes.h0000644000175100017510000000007311236173741011526 00000000000000 /* Return statuses */ #define SUCCESS 0 #define ERROR -1 msort-8.53/unicode.h0000644000175100017510000000140311236173741011342 00000000000000#ifdef OLDUDEFS typedef unsigned long UTF32; typedef unsigned short UTF16; typedef unsigned short UCS2; typedef unsigned char UTF8; #else typedef u_int8_t UTF8; /* at least 8 bits */ typedef u_int16_t UTF16; /* at least 16 bits */ typedef u_int16_t UCS2; /* at least 16 bits */ typedef u_int32_t UTF32; /* at least 32 bits */ #endif typedef unsigned char Boolean; /* 0 or 1 */ #define UNI_MAX_ASCII (UTF32)0x0000007F #define UNI_MAX_BMP (UTF32)0x0000FFFF #define UNI_MAX_UTF16 (UTF32)0x0010FFFF #define UNI_MAX_UTF32 (UTF32)0x7FFFFFFF #define UNI_SUR_HIGH_START (UTF32)0xD800 #define UNI_SUR_HIGH_END (UTF32)0xDBFF #define UNI_SUR_LOW_START (UTF32)0xDC00 #define UNI_SUR_LOW_END (UTF32)0xDFFF #define UNI_REPLACEMENT_CHAR (UTF32)0x0000FFFD #define _UNICODE_POSER msort-8.53/unorm.h0000644000175100017510000000027211236173744011062 00000000000000/* Definitions mimicking those of ICU unicode/unorm.h */ #ifndef UNORM_H #define UNORM_NONE 1 #define UNORM_NFC 4 #define UNORM_NFD 2 #define UNORM_NFKC 5 #define UNORM_NFKD 3 #endif msort-8.53/utf8error.h0000644000175100017510000000043011236173741011653 00000000000000/* * Codes for errors from UTF8in. * These values are all above the maximum valid UTF32 value. */ #define UTF8_ENDOFFILE 0xA0000000 #define UTF8_NOTENOUGHBYTES 0xA0000001 #define UTF8_BADINCODE 0xA0000002 #define UTF8_BADOUTCODE 0xA0000003 #define UTF8_IOERROR 0xA0000004 msort-8.53/Makefile.am0000644000175100017510000000215211236173741011601 00000000000000bin_PROGRAMS = msort bin_SCRIPTS = msg dist_man_MANS = msort.1 docs = Doc/msort.pdf Doc/InitializationFiles msort_SOURCES = conversions.c dstr.c info.c input.c misc.c msort.c sorts.c strs.c uniio.c ExplicateBadUTF8.c binfmt.c iso8601.c noinst_HEADERS = comparisons.h compdefs.h dstr.h ex_codes.h exitcode.h input.h key.h limits.h record.h retcodes.h unicode.h unorm.h utf8error.h LOCALEDIR=/usr/local/share/locale EXTRA_DIST = $(docs) msg.tcl CREDITS msort-${VERSION}.lsm RegressionTests SortOrders AUTOMAKE_OPTIONS = dist-zip dist-bzip2 if ALLOCAOK AM_CFLAGS = -DLOCALEDIR=\"${LOCALEDIR}\" -DALLOCAOK -std=gnu99 else AM_CFLAGS = -DLOCALEDIR=\"${LOCALEDIR}\" -std=gnu99 endif if DEBUGBUILD AM_CFLAGS += -DDEBUGBUILD endif if UTF8PROCOK LIBS+=-lutf8proc AM_CFLAGS += -DUSEUTF8PROC else LIBS+=-licutu endif msg: msg.tcl cp msg.tcl msg test: RegressionTests/RunTests.sh (cd RegressionTests;make;cat TestResults) localetest: RegressionTests/RunLocaleTests.sh (cd RegressionTests;make localetest;cat LocaleTestResults) if NOCOMPARISONCNT AM_CFLAGS += -DNOCOMPARISONCNT endif if UNINUMOK AM_CFLAGS += -DUSEUNINUMOK endif msort-8.53/Makefile.in0000644000175100017510000005435011322473525011620 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : bin_PROGRAMS = msort$(EXEEXT) @DEBUGBUILD_TRUE@am__append_1 = -DDEBUGBUILD @UTF8PROCOK_TRUE@am__append_2 = -lutf8proc @UTF8PROCOK_TRUE@am__append_3 = -DUSEUTF8PROC @UTF8PROCOK_FALSE@am__append_4 = -licutu @NOCOMPARISONCNT_TRUE@am__append_5 = -DNOCOMPARISONCNT @UNINUMOK_TRUE@am__append_6 = -DUSEUNINUMOK subdir = . DIST_COMMON = README $(am__configure_deps) $(dist_man_MANS) \ $(noinst_HEADERS) $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/config.h.in $(top_srcdir)/configure AUTHORS COPYING \ ChangeLog INSTALL NEWS TODO depcomp install-sh missing \ mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno configure.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(man1dir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am_msort_OBJECTS = conversions.$(OBJEXT) dstr.$(OBJEXT) info.$(OBJEXT) \ input.$(OBJEXT) misc.$(OBJEXT) msort.$(OBJEXT) sorts.$(OBJEXT) \ strs.$(OBJEXT) uniio.$(OBJEXT) ExplicateBadUTF8.$(OBJEXT) \ binfmt.$(OBJEXT) iso8601.$(OBJEXT) msort_OBJECTS = $(am_msort_OBJECTS) msort_LDADD = $(LDADD) binSCRIPT_INSTALL = $(INSTALL_SCRIPT) SCRIPTS = $(bin_SCRIPTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I. depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(msort_SOURCES) DIST_SOURCES = $(msort_SOURCES) man1dir = $(mandir)/man1 NROFF = nroff MANS = $(dist_man_MANS) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d $(distdir) \ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr $(distdir); }; } DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 $(distdir).zip GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ ALLOCAOK_FALSE = @ALLOCAOK_FALSE@ ALLOCAOK_TRUE = @ALLOCAOK_TRUE@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUGBUILD_FALSE = @DEBUGBUILD_FALSE@ DEBUGBUILD_TRUE = @DEBUGBUILD_TRUE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ $(am__append_2) $(am__append_4) LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ NOCOMPARISONCNT_FALSE = @NOCOMPARISONCNT_FALSE@ NOCOMPARISONCNT_TRUE = @NOCOMPARISONCNT_TRUE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ UNINUMOK_FALSE = @UNINUMOK_FALSE@ UNINUMOK_TRUE = @UNINUMOK_TRUE@ UTF8PROCOK_FALSE = @UTF8PROCOK_FALSE@ UTF8PROCOK_TRUE = @UTF8PROCOK_TRUE@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ bin_SCRIPTS = msg dist_man_MANS = msort.1 docs = Doc/msort.pdf Doc/InitializationFiles msort_SOURCES = conversions.c dstr.c info.c input.c misc.c msort.c sorts.c strs.c uniio.c ExplicateBadUTF8.c binfmt.c iso8601.c noinst_HEADERS = comparisons.h compdefs.h dstr.h ex_codes.h exitcode.h input.h key.h limits.h record.h retcodes.h unicode.h unorm.h utf8error.h LOCALEDIR = /usr/local/share/locale EXTRA_DIST = $(docs) msg.tcl CREDITS msort-${VERSION}.lsm RegressionTests SortOrders AUTOMAKE_OPTIONS = dist-zip dist-bzip2 @ALLOCAOK_FALSE@AM_CFLAGS = -DLOCALEDIR=\"${LOCALEDIR}\" -std=gnu99 \ @ALLOCAOK_FALSE@ $(am__append_1) $(am__append_3) \ @ALLOCAOK_FALSE@ $(am__append_5) $(am__append_6) @ALLOCAOK_TRUE@AM_CFLAGS = -DLOCALEDIR=\"${LOCALEDIR}\" -DALLOCAOK \ @ALLOCAOK_TRUE@ -std=gnu99 $(am__append_1) $(am__append_3) \ @ALLOCAOK_TRUE@ $(am__append_5) $(am__append_6) all: config.h $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .o .obj am--refresh: @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ cd $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: $(am__configure_deps) cd $(top_srcdir) && $(AUTOHEADER) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) msort$(EXEEXT): $(msort_OBJECTS) $(msort_DEPENDENCIES) @rm -f msort$(EXEEXT) $(LINK) $(msort_LDFLAGS) $(msort_OBJECTS) $(msort_LDADD) $(LIBS) install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @list='$(bin_SCRIPTS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f $$d$$p; then \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \ else :; fi; \ done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; for p in $$list; do \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ExplicateBadUTF8.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/binfmt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conversions.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dstr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/info.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/input.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iso8601.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msort.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sorts.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uniio.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` uninstall-info-am: install-man1: $(man1_MANS) $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)" @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ else file=$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ done uninstall-man1: @$(NORMAL_UNINSTALL) @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) $(mkdir_p) $(distdir)/Doc @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && cd $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' distuninstallcheck: @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(MANS) $(HEADERS) config.h installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-man install-exec-am: install-binPROGRAMS install-binSCRIPTS install-info: install-info-am install-man: install-man1 installcheck-am: maintainer-clean: maintainer-clean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \ uninstall-info-am uninstall-man uninstall-man: uninstall-man1 .PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ clean-binPROGRAMS clean-generic ctags dist dist-all dist-bzip2 \ dist-gzip dist-shar dist-tarZ dist-zip distcheck distclean \ distclean-compile distclean-generic distclean-hdr \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-binSCRIPTS install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-man1 install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-binPROGRAMS uninstall-binSCRIPTS \ uninstall-info-am uninstall-man uninstall-man1 msg: msg.tcl cp msg.tcl msg test: RegressionTests/RunTests.sh (cd RegressionTests;make;cat TestResults) localetest: RegressionTests/RunLocaleTests.sh (cd RegressionTests;make localetest;cat LocaleTestResults) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: msort-8.53/config.h.in0000644000175100017510000001225011322473556011573 00000000000000/* config.h.in. Generated from configure.ac by autoheader. */ /* Define to 1 if you have the header file. */ #undef HAVE_ALLOCA_H /* Define to 1 if you have the header file. */ #undef HAVE_CTYPE_H /* Define to 1 if you have the header file. */ #undef HAVE_ERRNO_H /* Define to 1 if you have the `getopt_long' function. */ #undef HAVE_GETOPT_LONG /* Define to 1 if you have the header file. */ #undef HAVE_GNU_LIBC_VERSION_H /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_LANGINFO_H /* Define to 1 if you have libintl. */ #undef HAVE_LIBINTL /* Define to 1 if you have the header file. */ #undef HAVE_LIBINTL_H /* Define to 1 if you have the `tre' library (-ltre). */ #undef HAVE_LIBTRE /* Define to 1 if you have the `uninum' library (-luninum). */ #undef HAVE_LIBUNINUM /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H /* Define to 1 if you have the header file. */ #undef HAVE_LOCALE_H /* Define to 1 if long double works and has more range or precision than double. */ #undef HAVE_LONG_DOUBLE /* compiler understands long long */ #undef HAVE_LONG_LONG /* Define to 1 if you have the `malloc' function. */ #undef HAVE_MALLOC /* Define to 1 if you have the `mbstowcs' function. */ #undef HAVE_MBSTOWCS /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `nl_langinfo' function. */ #undef HAVE_NL_LANGINFO /* compiler understands printf flag for thousands separation in ints */ #undef HAVE_PRINTF_THSEP /* Define to 1 if you have the `realloc' function. */ #undef HAVE_REALLOC /* Define to 1 if you have the `regwcomp' function. */ #undef HAVE_REGWCOMP /* Define to 1 if you have the `regwexec' function. */ #undef HAVE_REGWEXEC /* Define to 1 if you have the `setlocale' function. */ #undef HAVE_SETLOCALE /* Define to 1 if you have the header file. */ #undef HAVE_STDARGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STDDEF_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strchr' function. */ #undef HAVE_STRCHR /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strrchr' function. */ #undef HAVE_STRRCHR /* Define to 1 if you have the `strtod' function. */ #undef HAVE_STRTOD /* Define to 1 if you have the `strtol' function. */ #undef HAVE_STRTOL /* Define to 1 if you have the header file. */ #undef HAVE_SYS_FILE_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_TRE_TRE_H /* Define to 1 if you have the header file. */ #undef HAVE_UNICODE_UMACHINE_H /* Define to 1 if you have the header file. */ #undef HAVE_UNICODE_UNORM_H /* Define to 1 if you have the `uninum_gmp_version' function. */ #undef HAVE_UNINUM_GMP_VERSION /* Define to 1 if you have the header file. */ #undef HAVE_UNINUM_NSDEFS_H /* Define to 1 if you have the header file. */ #undef HAVE_UNINUM_UNICODE_H /* Define to 1 if you have the header file. */ #undef HAVE_UNINUM_UNINUM_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have . */ #undef HAVE_UTF8PROC_H /* Define to 1 if you have the header file. */ #undef HAVE_WCHAR_H /* Define to 1 if you have the `wcscasecmp' function. */ #undef HAVE_WCSCASECMP /* Define to 1 if you have the `wcschr' function. */ #undef HAVE_WCSCHR /* Define to 1 if you have the `wcscmp' function. */ #undef HAVE_WCSCMP /* Define to 1 if you have the `wcsxfrm' function. */ #undef HAVE_WCSXFRM /* Define to 1 if you have the header file. */ #undef HAVE_WCTYPE_H /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus #undef inline #endif /* Define to `unsigned' if does not define. */ #undef size_t msort-8.53/configure0000755000175100017510000054551211322473517011470 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59 for msort 8.53. # # Report bugs to . # # Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` exec 6>&1 # # Initializations. # ac_default_prefix=/usr/local ac_config_libobj_dir=. cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. # This variable seems obsolete. It should probably be removed, and # only ac_max_sed_lines should be used. : ${ac_max_here_lines=38} # Identity of this package. PACKAGE_NAME='msort' PACKAGE_TARNAME='msort' PACKAGE_VERSION='8.53' PACKAGE_STRING='msort 8.53' PACKAGE_BUGREPORT='billposer@alum.mit.edu' # Factoring default headers for most tests. ac_includes_default="\ #include #if HAVE_SYS_TYPES_H # include #endif #if HAVE_SYS_STAT_H # include #endif #if STDC_HEADERS # include # include #else # if HAVE_STDLIB_H # include # endif #endif #if HAVE_STRING_H # if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif #if HAVE_STRINGS_H # include #endif #if HAVE_INTTYPES_H # include #else # if HAVE_STDINT_H # include # endif #endif #if HAVE_UNISTD_H # include #endif" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar NOCOMPARISONCNT_TRUE NOCOMPARISONCNT_FALSE ALLOCAOK_TRUE ALLOCAOK_FALSE UNINUMOK_TRUE UNINUMOK_FALSE UTF8PROCOK_TRUE UTF8PROCOK_FALSE DEBUGBUILD_TRUE DEBUGBUILD_FALSE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' ac_prev= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" ac_prev= continue fi ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/-/_/g'` eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute paths. for ac_var in exec_prefix prefix do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* | NONE | '' ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # Be sure to have absolute paths. for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ localstatedir libdir includedir oldincludedir infodir mandir do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } else { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi fi (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 { (exit 1); exit 1; }; } srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` ac_env_build_alias_set=${build_alias+set} ac_env_build_alias_value=$build_alias ac_cv_env_build_alias_set=${build_alias+set} ac_cv_env_build_alias_value=$build_alias ac_env_host_alias_set=${host_alias+set} ac_env_host_alias_value=$host_alias ac_cv_env_host_alias_set=${host_alias+set} ac_cv_env_host_alias_value=$host_alias ac_env_target_alias_set=${target_alias+set} ac_env_target_alias_value=$target_alias ac_cv_env_target_alias_set=${target_alias+set} ac_cv_env_target_alias_value=$target_alias ac_env_CC_set=${CC+set} ac_env_CC_value=$CC ac_cv_env_CC_set=${CC+set} ac_cv_env_CC_value=$CC ac_env_CFLAGS_set=${CFLAGS+set} ac_env_CFLAGS_value=$CFLAGS ac_cv_env_CFLAGS_set=${CFLAGS+set} ac_cv_env_CFLAGS_value=$CFLAGS ac_env_LDFLAGS_set=${LDFLAGS+set} ac_env_LDFLAGS_value=$LDFLAGS ac_cv_env_LDFLAGS_set=${LDFLAGS+set} ac_cv_env_LDFLAGS_value=$LDFLAGS ac_env_CPPFLAGS_set=${CPPFLAGS+set} ac_env_CPPFLAGS_value=$CPPFLAGS ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} ac_cv_env_CPPFLAGS_value=$CPPFLAGS ac_env_CPP_set=${CPP+set} ac_env_CPP_value=$CPP ac_cv_env_CPP_set=${CPP+set} ac_cv_env_CPP_value=$CPP # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures msort 8.53 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] _ACEOF cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --infodir=DIR info documentation [PREFIX/info] --mandir=DIR man documentation [PREFIX/man] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of msort 8.53:";; esac cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-comparisoncount Do not count comparisons. --disable-allocaok Do not use alloca - use heap instead. --disable-uninum. Do not link uninum library. --disable-utf8proc. Use the icu library instead of utf8proc. --enable-debugbuild. Compile for debugging. --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d $ac_dir || continue ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac cd $ac_dir # Check for guested configure; otherwise get Cygnus style configure. if test -f $ac_srcdir/configure.gnu; then echo $SHELL $ac_srcdir/configure.gnu --help=recursive elif test -f $ac_srcdir/configure; then echo $SHELL $ac_srcdir/configure --help=recursive elif test -f $ac_srcdir/configure.ac || test -f $ac_srcdir/configure.in; then echo $ac_configure --help else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi cd "$ac_popdir" done fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF msort configure 8.53 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit 0 fi exec 5>config.log cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by msort $as_me 8.53, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ _ACEOF { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" # Get rid of the leading space. ac_sep=" " ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Be sure not to use single quotes in there, as some shells, # such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, { (set) 2>&1 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in *ac_space=\ *) sed -n \ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" ;; *) sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------- ## ## Output files. ## ## ------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core *.core && rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo >confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; *) . ./$cache_file;; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in `(set) 2>&1 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val="\$ac_cv_env_${ac_var}_value" eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_headers="$ac_config_headers config.h" am__api_version="1.9" ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f $ac_dir/shtool; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} { (exit 1); exit 1; }; } fi ac_config_guess="$SHELL $ac_aux_dir/config.guess" ac_config_sub="$SHELL $ac_aux_dir/config.sub" ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL=$ac_install_sh fi fi echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo "$as_me:$LINENO: checking whether build environment is sane" >&5 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 test "$program_prefix" != NONE && program_transform_name="s,^,$program_prefix,;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s,\$,$program_suffix,;$program_transform_name" # Double any \ or $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm conftest.sed # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$AWK" && break done echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF all: @echo 'ac_maketemp="$(MAKE)"' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi rm -f conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 SET_MAKE= else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='msort' VERSION='8.53' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} install_sh=${install_sh-"$am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi STRIP=$ac_ct_STRIP else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' # Check whether --enable-nocomparisoncount or --disable-nocomparisoncount was given. if test "${enable_nocomparisoncount+set}" = set; then enableval="$enable_nocomparisoncount" case "${enableval}" in yes) nocomparisoncount=true ;; no) nocomparisoncount=false ;; *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-comparisoncount" >&5 echo "$as_me: error: bad value ${enableval} for --enable-comparisoncount" >&2;} { (exit 1); exit 1; }; } ;; esac else nocomparisoncount=true fi; if test "$nocomparisoncount" = false; then NOCOMPARISONCNT_TRUE= NOCOMPARISONCNT_FALSE='#' else NOCOMPARISONCNT_TRUE='#' NOCOMPARISONCNT_FALSE= fi # Check whether --enable-allocaok or --disable-allocaok was given. if test "${enable_allocaok+set}" = set; then enableval="$enable_allocaok" case "${enableval}" in yes) allocaok=true ;; no) allocaok=false ;; *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-allocaok" >&5 echo "$as_me: error: bad value ${enableval} for --enable-allocaok" >&2;} { (exit 1); exit 1; }; } ;; esac else allocaok=true fi; if test "$allocaok" = true; then ALLOCAOK_TRUE= ALLOCAOK_FALSE='#' else ALLOCAOK_TRUE='#' ALLOCAOK_FALSE= fi # Check whether --enable-uninum or --disable-uninum was given. if test "${enable_uninum+set}" = set; then enableval="$enable_uninum" case "${enableval}" in yes) uninum=true ;; no) uninum=false ;; *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-uninum" >&5 echo "$as_me: error: bad value ${enableval} for --enable-uninum" >&2;} { (exit 1); exit 1; }; } ;; esac else uninum=true fi; if test "$uninum" = true; then UNINUMOK_TRUE= UNINUMOK_FALSE='#' else UNINUMOK_TRUE='#' UNINUMOK_FALSE= fi # Check whether --enable-utf8proc or --disable-utf8proc was given. if test "${enable_utf8proc+set}" = set; then enableval="$enable_utf8proc" case "${enableval}" in yes) utf8proc=true ;; no) utf8proc=false ;; *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-utf8proc" >&5 echo "$as_me: error: bad value ${enableval} for --enable-utf8proc" >&2;} { (exit 1); exit 1; }; } ;; esac else utf8proc=true fi; if test "$utf8proc" = true; then UTF8PROCOK_TRUE= UTF8PROCOK_FALSE='#' else UTF8PROCOK_TRUE='#' UTF8PROCOK_FALSE= fi # Check whether --enable-debugbuild or --disable-debugbuild was given. if test "${enable_debugbuild+set}" = set; then enableval="$enable_debugbuild" case "${enableval}" in yes) debugbuild=true ;; no) debugbuild=false ;; *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-debugbuild" >&5 echo "$as_me: error: bad value ${enableval} for --enable-debugbuild" >&2;} { (exit 1); exit 1; }; } ;; esac else debugbuild=false fi; if test "$debugbuild" = true; then DEBUGBUILD_TRUE= DEBUGBUILD_FALSE='#' else DEBUGBUILD_TRUE='#' DEBUGBUILD_FALSE= fi # Checks for programs. ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CC" && break done CC=$ac_ct_CC fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last # resort. # Be careful to initialize this variable, since it used to be cached. # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. ac_cv_exeext= # b.out is created by i960 compilers. for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; conftest.$ac_ext ) # This is the source file. ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` # FIXME: I believe we export ac_cv_exeext for Libtool, # but it would be cool to find out if it's true. Does anybody # maintain Libtool? --akim. export ac_cv_exeext break;; * ) break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` export ac_cv_exeext break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cc_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std1 is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std1. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. # AIX -qlanglvl=ansi # Ultrix and OSF/1 -std1 # HP-UX 10.20 and later -Ae # HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_stdc=$ac_arg break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext done rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi case "x$ac_cv_prog_cc_stdc" in x|xno) echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 CC="$CC $ac_cv_prog_cc_stdc" ;; esac # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler # for both compiling C and C++ we need to have the C++ compiler decide # the declaration of exit, since it's the most demanding environment. cat >conftest.$ac_ext <<_ACEOF #ifndef __cplusplus choke me #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration #include int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi echo "$as_me:$LINENO: result: $_am_result" >&5 echo "${ECHO_T}$_am_result" >&6 rm -f confinc confmf # Check whether --enable-dependency-tracking or --disable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then enableval="$enable_dependency_tracking" fi; if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi if ${debugbuild}; then CFLAGS="-ggdb -g3" else CFLAGS="-g -O2" fi # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL=$ac_install_sh fi fi echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # Checks for libraries. echo "$as_me:$LINENO: checking for tre_regwcomp in -ltre" >&5 echo $ECHO_N "checking for tre_regwcomp in -ltre... $ECHO_C" >&6 if test "${ac_cv_lib_tre_tre_regwcomp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ltre $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char tre_regwcomp (); int main () { tre_regwcomp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_tre_tre_regwcomp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_tre_tre_regwcomp=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_tre_tre_regwcomp" >&5 echo "${ECHO_T}$ac_cv_lib_tre_tre_regwcomp" >&6 if test $ac_cv_lib_tre_tre_regwcomp = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBTRE 1 _ACEOF LIBS="-ltre $LIBS" else { { echo "$as_me:$LINENO: error: libtre not found. see http://laurikari.net/tre/" >&5 echo "$as_me: error: libtre not found. see http://laurikari.net/tre/" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: checking for gettext in -lintl" >&5 echo $ECHO_N "checking for gettext in -lintl... $ECHO_C" >&6 if test "${ac_cv_lib_intl_gettext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gettext (); int main () { gettext (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_intl_gettext=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_intl_gettext=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_intl_gettext" >&5 echo "${ECHO_T}$ac_cv_lib_intl_gettext" >&6 if test $ac_cv_lib_intl_gettext = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_LIBINTL 1 _ACEOF fi #AM_GNU_GETTEXT # Checks for header files. ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6 if test "${ac_cv_prog_egrep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi fi echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 echo "${ECHO_T}$ac_cv_prog_egrep" >&6 EGREP=$ac_cv_prog_egrep echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in alloca.h ctype.h errno.h gnu/libc-version.h langinfo.h libintl.h limits.h locale.h stdargs.h stddef.h stdint.h stdlib.h string.h sys/file.h sys/stat.h time.h tre/tre.h unicode/umachine.h unicode/unorm.h uninum/unicode.h uninum/nsdefs.h uninum/uninum.h unistd.h wchar.h wctype.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------- ## ## Report this to billposer@alum.mit.edu ## ## ------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if ${utf8proc}; then if test "${ac_cv_header_utf8proc_h+set}" = set; then echo "$as_me:$LINENO: checking for utf8proc.h" >&5 echo $ECHO_N "checking for utf8proc.h... $ECHO_C" >&6 if test "${ac_cv_header_utf8proc_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: $ac_cv_header_utf8proc_h" >&5 echo "${ECHO_T}$ac_cv_header_utf8proc_h" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking utf8proc.h usability" >&5 echo $ECHO_N "checking utf8proc.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking utf8proc.h presence" >&5 echo $ECHO_N "checking utf8proc.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: utf8proc.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: utf8proc.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: utf8proc.h: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: utf8proc.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: utf8proc.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: utf8proc.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: utf8proc.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: utf8proc.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: utf8proc.h: see the Autoconf documentation" >&5 echo "$as_me: WARNING: utf8proc.h: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: utf8proc.h: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: utf8proc.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: utf8proc.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: utf8proc.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: utf8proc.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: utf8proc.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------- ## ## Report this to billposer@alum.mit.edu ## ## ------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for utf8proc.h" >&5 echo $ECHO_N "checking for utf8proc.h... $ECHO_C" >&6 if test "${ac_cv_header_utf8proc_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_utf8proc_h=$ac_header_preproc fi echo "$as_me:$LINENO: result: $ac_cv_header_utf8proc_h" >&5 echo "${ECHO_T}$ac_cv_header_utf8proc_h" >&6 fi if test $ac_cv_header_utf8proc_h = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_UTF8PROC_H 1 _ACEOF else { { echo "$as_me:$LINENO: error: LIB UTF8PROC and its header is obligatory. See http://www.flexiguided.de/publications.utf8proc.en.html" >&5 echo "$as_me: error: LIB UTF8PROC and its header is obligatory. See http://www.flexiguided.de/publications.utf8proc.en.html" >&2;} { (exit 1); exit 1; }; } fi fi if ${uninum}; then echo "$as_me:$LINENO: checking for uninum_version in -luninum" >&5 echo $ECHO_N "checking for uninum_version in -luninum... $ECHO_C" >&6 if test "${ac_cv_lib_uninum_uninum_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luninum $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char uninum_version (); int main () { uninum_version (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_uninum_uninum_version=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_uninum_uninum_version=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_uninum_uninum_version" >&5 echo "${ECHO_T}$ac_cv_lib_uninum_uninum_version" >&6 if test $ac_cv_lib_uninum_uninum_version = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBUNINUM 1 _ACEOF LIBS="-luninum $LIBS" else { { echo "$as_me:$LINENO: error: libuninum not found" >&5 echo "$as_me: error: libuninum not found" >&2;} { (exit 1); exit 1; }; } fi fi # Checks for typedefs, structures, and compiler characteristics. echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 if test "${ac_cv_c_const+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset x; /* SunOS 4.1.1 cc rejects this. */ char const *const *ccp; char **p; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; ccp = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++ccp; p = (char**) ccp; ccp = (char const *const *) p; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; } #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_const=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_const=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 echo "${ECHO_T}$ac_cv_c_const" >&6 if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF #define const _ACEOF fi echo "$as_me:$LINENO: checking for inline" >&5 echo $ECHO_N "checking for inline... $ECHO_C" >&6 if test "${ac_cv_c_inline+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_inline=$ac_kw; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done fi echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 echo "${ECHO_T}$ac_cv_c_inline" >&6 case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac echo "$as_me:$LINENO: checking for size_t" >&5 echo $ECHO_N "checking for size_t... $ECHO_C" >&6 if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((size_t *) 0) return 0; if (sizeof (size_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_size_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 echo "${ECHO_T}$ac_cv_type_size_t" >&6 if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned _ACEOF fi echo "$as_me:$LINENO: checking for long long int" >&5 echo $ECHO_N "checking for long long int... $ECHO_C" >&6 if test "${ac_cv_c_long_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$GCC" = yes; then ac_cv_c_long_long=yes else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { long long int i; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_long_long=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_long_long=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_c_long_long" >&5 echo "${ECHO_T}$ac_cv_c_long_long" >&6 if test $ac_cv_c_long_long = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_LONG_LONG 1 _ACEOF fi echo "$as_me:$LINENO: checking for working long double with more range or precision than double" >&5 echo $ECHO_N "checking for working long double with more range or precision than double... $ECHO_C" >&6 if test "${ac_cv_c_long_double+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include long double foo = 0.0; int main () { static int test_array [1 - 2 * !(/* Using '|' rather than '||' catches a GCC 2.95.2 x86 bug. */ (DBL_MAX < LDBL_MAX) | (LDBL_EPSILON < DBL_EPSILON) | (DBL_MAX_EXP < LDBL_MAX_EXP) | (DBL_MANT_DIG < LDBL_MANT_DIG))]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_long_double=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_long_double=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_c_long_double" >&5 echo "${ECHO_T}$ac_cv_c_long_double" >&6 if test $ac_cv_c_long_double = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_LONG_DOUBLE 1 _ACEOF fi cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { printf("%'2d",101); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_printf_thsep=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_printf_thsep=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_c_printf_thsep = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_PRINTF_THSEP 1 _ACEOF fi # Checks for library functions. for ac_func in getopt_long malloc mbstowcs nl_langinfo realloc regwcomp regwexec setlocale strchr strrchr strtod strtol uninum_gmp_version wcschr wcscmp wcscasecmp wcsxfrm do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done ac_config_files="$ac_config_files Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. { (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } | sed ' t clear : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ : end' >>confcache if diff $cache_file confcache >/dev/null 2>&1; then :; else if test -w $cache_file; then test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/; s/:*\${srcdir}:*/:/; s/:*@srcdir@:*/:/; s/^\([^=]*=[ ]*\):*/\1/; s/:*$//; s/^[^=]*=[ ]*$//; }' fi DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_i=`echo "$ac_i" | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` # 2. Add them. ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${NOCOMPARISONCNT_TRUE}" && test -z "${NOCOMPARISONCNT_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"NOCOMPARISONCNT\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"NOCOMPARISONCNT\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${ALLOCAOK_TRUE}" && test -z "${ALLOCAOK_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"ALLOCAOK\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"ALLOCAOK\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${UNINUMOK_TRUE}" && test -z "${UNINUMOK_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"UNINUMOK\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"UNINUMOK\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${UTF8PROCOK_TRUE}" && test -z "${UTF8PROCOK_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"UTF8PROCOK\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"UTF8PROCOK\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DEBUGBUILD_TRUE}" && test -z "${DEBUGBUILD_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DEBUGBUILD\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DEBUGBUILD\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH exec 6>&1 # Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. Logging --version etc. is OK. exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX } >&5 cat >&5 <<_CSEOF This file was extended by msort $as_me 8.53, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ _CSEOF echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 echo >&5 _ACEOF # Files that config.status was made for. if test -n "$ac_config_files"; then echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS fi if test -n "$ac_config_headers"; then echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS fi if test -n "$ac_config_links"; then echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS fi if test -n "$ac_config_commands"; then echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS fi cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ msort config.status 8.53 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir INSTALL="$INSTALL" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "x$1" : 'x\([^=]*\)='` ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ac_shift=: ;; -*) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; *) # This is not an option, so the user has probably given explicit # arguments. ac_option=$1 ac_need_defaults=false;; esac case $ac_option in # Handling of the options. _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header { { echo "$as_me:$LINENO: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS section. # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do case "$ac_config_target" in # Handling of arguments. "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Create a temporary directory, and hook for its removal unless debugging. $debug || { trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./confstat$$-$RANDOM (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "\$CONFIG_FILES"; then # Protect against being on the right side of a sed subst in config.status. sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF s,@SHELL@,$SHELL,;t t s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t s,@exec_prefix@,$exec_prefix,;t t s,@prefix@,$prefix,;t t s,@program_transform_name@,$program_transform_name,;t t s,@bindir@,$bindir,;t t s,@sbindir@,$sbindir,;t t s,@libexecdir@,$libexecdir,;t t s,@datadir@,$datadir,;t t s,@sysconfdir@,$sysconfdir,;t t s,@sharedstatedir@,$sharedstatedir,;t t s,@localstatedir@,$localstatedir,;t t s,@libdir@,$libdir,;t t s,@includedir@,$includedir,;t t s,@oldincludedir@,$oldincludedir,;t t s,@infodir@,$infodir,;t t s,@mandir@,$mandir,;t t s,@build_alias@,$build_alias,;t t s,@host_alias@,$host_alias,;t t s,@target_alias@,$target_alias,;t t s,@DEFS@,$DEFS,;t t s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t s,@LIBS@,$LIBS,;t t s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s,@INSTALL_DATA@,$INSTALL_DATA,;t t s,@CYGPATH_W@,$CYGPATH_W,;t t s,@PACKAGE@,$PACKAGE,;t t s,@VERSION@,$VERSION,;t t s,@ACLOCAL@,$ACLOCAL,;t t s,@AUTOCONF@,$AUTOCONF,;t t s,@AUTOMAKE@,$AUTOMAKE,;t t s,@AUTOHEADER@,$AUTOHEADER,;t t s,@MAKEINFO@,$MAKEINFO,;t t s,@install_sh@,$install_sh,;t t s,@STRIP@,$STRIP,;t t s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t s,@mkdir_p@,$mkdir_p,;t t s,@AWK@,$AWK,;t t s,@SET_MAKE@,$SET_MAKE,;t t s,@am__leading_dot@,$am__leading_dot,;t t s,@AMTAR@,$AMTAR,;t t s,@am__tar@,$am__tar,;t t s,@am__untar@,$am__untar,;t t s,@NOCOMPARISONCNT_TRUE@,$NOCOMPARISONCNT_TRUE,;t t s,@NOCOMPARISONCNT_FALSE@,$NOCOMPARISONCNT_FALSE,;t t s,@ALLOCAOK_TRUE@,$ALLOCAOK_TRUE,;t t s,@ALLOCAOK_FALSE@,$ALLOCAOK_FALSE,;t t s,@UNINUMOK_TRUE@,$UNINUMOK_TRUE,;t t s,@UNINUMOK_FALSE@,$UNINUMOK_FALSE,;t t s,@UTF8PROCOK_TRUE@,$UTF8PROCOK_TRUE,;t t s,@UTF8PROCOK_FALSE@,$UTF8PROCOK_FALSE,;t t s,@DEBUGBUILD_TRUE@,$DEBUGBUILD_TRUE,;t t s,@DEBUGBUILD_FALSE@,$DEBUGBUILD_FALSE,;t t s,@CC@,$CC,;t t s,@CFLAGS@,$CFLAGS,;t t s,@LDFLAGS@,$LDFLAGS,;t t s,@CPPFLAGS@,$CPPFLAGS,;t t s,@ac_ct_CC@,$ac_ct_CC,;t t s,@EXEEXT@,$EXEEXT,;t t s,@OBJEXT@,$OBJEXT,;t t s,@DEPDIR@,$DEPDIR,;t t s,@am__include@,$am__include,;t t s,@am__quote@,$am__quote,;t t s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t s,@CCDEPMODE@,$CCDEPMODE,;t t s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t s,@CPP@,$CPP,;t t s,@EGREP@,$EGREP,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_lines=48 ac_sed_frag=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_lines # Line after last line for current file. ac_more_lines=: ac_sed_cmds= while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag else sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag fi if test ! -s $tmp/subs.frag; then ac_more_lines=false else # The purpose of the label and of the branching condition is to # speed up the sed processing (if there are no `@' at all, there # is no need to browse any of the substitutions). # These are the two extra sed commands mentioned above. (echo ':t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" else ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" fi ac_sed_frag=`expr $ac_sed_frag + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_lines` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi fi # test -n "$CONFIG_FILES" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then configure_input= else configure_input="$ac_file. " fi configure_input=$configure_input"Generated from `echo $ac_file_in | sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } if test x"$ac_file" != x-; then { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s,@configure_input@,$configure_input,;t t s,@srcdir@,$ac_srcdir,;t t s,@abs_srcdir@,$ac_abs_srcdir,;t t s,@top_srcdir@,$ac_top_srcdir,;t t s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t s,@builddir@,$ac_builddir,;t t s,@abs_builddir@,$ac_abs_builddir,;t t s,@top_builddir@,$ac_top_builddir,;t t s,@abs_top_builddir@,$ac_abs_top_builddir,;t t s,@INSTALL@,$ac_INSTALL,;t t " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out rm -f $tmp/stdin if test x"$ac_file" != x-; then mv $tmp/out $ac_file else cat $tmp/out rm -f $tmp/out fi done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_HEADER section. # # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' ac_dB='[ ].*$,\1#\2' ac_dC=' ' ac_dD=',;t' # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='$,\1#\2define\3' ac_uC=' ' ac_uD=',;t' for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } # Do quote $f, to prevent DOS paths from being IFS'd. echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } # Remove the trailing spaces. sed 's/[ ]*$//' $ac_file_inputs >$tmp/in _ACEOF # Transform confdefs.h into two sed scripts, `conftest.defines' and # `conftest.undefs', that substitutes the proper values into # config.h.in to produce config.h. The first handles `#define' # templates, and the second `#undef' templates. # And first: Protect against being on the right side of a sed subst in # config.status. Protect against being in an unquoted here document # in config.status. rm -f conftest.defines conftest.undefs # Using a here document instead of a string reduces the quoting nightmare. # Putting comments in sed scripts is not portable. # # `end' is used to avoid that the second main sed command (meant for # 0-ary CPP macros) applies to n-ary macro definitions. # See the Autoconf documentation for `clear'. cat >confdef2sed.sed <<\_ACEOF s/[\\&,]/\\&/g s,[\\$`],\\&,g t clear : clear s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp t end s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp : end _ACEOF # If some macros were called several times there might be several times # the same #defines, which is useless. Nevertheless, we may not want to # sort them, since we want the *last* AC-DEFINE to be honored. uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs rm -f confdef2sed.sed # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. cat >>conftest.undefs <<\_ACEOF s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, _ACEOF # Break up conftest.defines because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS echo ' :' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.defines >/dev/null do # Write a limited-size here document to $tmp/defines.sed. echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#define' lines. echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/defines.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines echo ' fi # grep' >>$CONFIG_STATUS echo >>$CONFIG_STATUS # Break up conftest.undefs because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #undef templates' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.undefs >/dev/null do # Write a limited-size here document to $tmp/undefs.sed. echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#undef' echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/undefs.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail rm -f conftest.undefs mv conftest.tail conftest.undefs done rm -f conftest.undefs cat >>$CONFIG_STATUS <<\_ACEOF # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then echo "/* Generated by configure. */" >$tmp/config.h else echo "/* $ac_file. Generated by configure. */" >$tmp/config.h fi cat $tmp/in >>$tmp/config.h rm -f $tmp/in if test x"$ac_file" != x-; then if diff $ac_file $tmp/config.h >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } rm -f $ac_file mv $tmp/config.h $ac_file fi else cat $tmp/config.h rm -f $tmp/config.h fi # Compute $ac_file's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $ac_file | $ac_file:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null || $as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X$ac_file : 'X\(//\)[^/]' \| \ X$ac_file : 'X\(//\)$' \| \ X$ac_file : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X$ac_file | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'`/stamp-h$_am_stamp_count done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_COMMANDS section. # for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue ac_dest=`echo "$ac_file" | sed 's,:.*,,'` ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_dir=`(dirname "$ac_dest") 2>/dev/null || $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_dest" : 'X\(//\)[^/]' \| \ X"$ac_dest" : 'X\(//\)$' \| \ X"$ac_dest" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_dest" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 echo "$as_me: executing $ac_dest commands" >&6;} case $ac_dest in depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`(dirname "$mf") 2>/dev/null || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`(dirname "$file") 2>/dev/null || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p $dirpart/$fdir else as_dir=$dirpart/$fdir as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; esac done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi msort-8.53/AUTHORS0000644000175100017510000000004411236173741010613 00000000000000Bill Poser (billposer@alum.mit.edu) msort-8.53/COPYING0000644000175100017510000010451311236173741010604 00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . msort-8.53/ChangeLog0000644000175100017510000011554711322476223011331 000000000000002010-01-10 Bill Poser * msort.c: Now use new function names with prefix tre_ exported by libtre. 2009-08-23 Bill Poser * msort.c: Removed unnecessary conditioning of Hybrid mapping code on LOCALE_SORT_ORDER. 2009-05-30 Bill Poser * msort.c: Now reverse digits of Unix time before using as random number seed so as to make the seed change visibly from run to run. 2009-01-26 Bill Poser * msort.c: Changed type of ExclusionTables, fixing a bug in the reporting of exclusions and saving considerable memory when exclusions are used. 2009-01-13 Bill Poser * msg.tcl: Labelled algorithm choices as stable and unstable. * msort.c: Added -Z option for copying the first record to the output without sorting it. This is useful for files with a header. Added a regression test for this option. 2008-12-05 Bill Poser Release 8.52. * msort.c (GetKeys): Don't bother to extract and store field if comparison type for key is random since we aren't going to use it. This saves a little time and possibly a good bit of storage. * RegressionTests Separated the tests whose success depends on locales from the rest. The main set are run by "make test" as before. To run the locale-dependent tests, type "make localetest". The results appear in LocaleTestResults. 2008-11-02 Bill Poser * input.c (ReportReadError): Changed stray explicit calls of gettext to calls to macro _, which is properly conditioned. 2008-10-27 Bill Poser Added regression test for more complex substition. 2008-10-20 Bill Poser * msg.tcl (GetLogInfo): Modified to accomodate modifications to msort.log. * msort.c: Corrected format specifier from d to u for printing number of records. Moved closing of log to very end, avoiding problem of early closing, and moved this into function CloseLog, which adds log-termination. 2008-10-19 Bill Poser * msort.c: If one or more records have been discarded due to problems in key extraction but the run is otherwise successful, the exit code is now RECORDEXCLUDED rather than BADRECORD. * misc.c: Modified GetISO8601Key to handle an optional leading sign and moved it into iso8601.c. 2008-10-18 Bill Poser * msort.c: Made error-checking and reporting finer-grained in GetMonthNames. Split time and iso8601 date/time regression tests so as not to mix data with and without time zone offsets since mixing them causes tests to fail if executed in some time zones. 2008-10-11 Bill Poser Release of version 8.51. * msg.tcl: Added setting of random number generator seed. Added regression test for angles. Added regression tests for collating sequences. 2008-10-08 Bill Poser * msort.c: Moved completion log time stamp ahead of other information so that it immediately follows start time stamp, facilitating comparison. 2008-10-05 Bill Poser * msort.c: Moved initial log time stamp and key description to just before point at which records are read. 2008-09-30 Bill Poser * msort.c: Added -P option for setting randomization seed so that runs will be reproducible. Now report the randomization seed used in the log for future reference. 2008-09-28 Bill Poser Release of version 8.50. * msort.c: Fixed bug in which compound positional keys (those involving portions of more than one field) were not properly null terminated, resulting in various sorts of errors, including crashes. Key specifications with a character offset of zero are now treated as fatal errors and reported to the user. Added 17 more regression tests. 2008-09-26 Bill Poser * configure.ac: Made failure of check for libintl non-fatal. * msort.c: Made report of failure of key extraction on one or more records subject to Verbose flag. Added ISO8601 time/date stamps to beginning and end of log. * msort.c (GetKeys): Now trap fields with empty value, which previously could cause segfaults. 2008-09-24 Bill Poser Release of version 8.49. * RegressionTests Added nine regression tests. * README: Added section on Dependencies, discussing use of non-standard libraries and how to build the simplest configuration. 2008-09-22 Bill Poser * misc.c: Eliminated direct call to libgmp, which should simplify installation. Now get gmp version info from function in libuninum. 2008-09-21 Bill Poser * configure.ac: Added check for libintl. * msort.c: Eliminated printing of message "Consult the log for details" if logging is not enabled. * strs.c (ws2u8): Fixed bug resulting from allocation of insufficient memory. * msort.c (GetWhiteSpaceDefinition): Removed debugging line inadvertently left in. (GetSubstitutions): Removed inappropriate free of stack storage. 2008-09-20 Bill Poser Release of version 8.48. * misc.c (GetISO8601Key): Fixed bug that caused inappropriate return of error if no numerical time zone offset is present. (GetTimeKey): Fixed bug that caused inappropriate return of error from well-formed ISO8601 times. (GetDateKey): Fixed a bug that caused a segmentation fault if an attempt was made to analyze as a date a string not containing the expected first date component separator. 2008-09-19 Bill Poser * msort.c (CaseFoldTbl): Updated case folding to Unicode 5.1. * msort.c (DescribeKeys): Added indication of use of only first character if that option is selected. 2008-07-30 Bill Poser * misc.c (ShowVersion): Added information about system and machine type. 2008-07-14 Bill Poser * msort.c: Added option for lexicographic sorts of using only the first character (after subs, exclusions, etc.). This emulates pre-modern alphabetization practice. 2008-07-10 Bill Poser * unicode.h: Changed UTF32 etc. from standard types (unsigned long etc.) to minimum size types (u_int32_t) for portability. 2008-06-30 Bill Poser Release of version 8.47. * msort.c (ConstructSortOrder): Fixed storage allocation bug when using utf8proc as per patch by Steve Tinney. 2008-05-28 Bill Poser * msort.c: Modified domain name processing to handle optional protocol segment, which is treated as lowest priority component like the username in an email address. 2008-05-23 Bill Poser Release of version 8.46. * msort.c (ReverseDomainComponents): Fixed bugs in rearrangement of email addresses. 2008-05-18 Bill Poser * msort.c (MapHybrid): Fixed potential malloc bug (inconsistent use of long and int) 2008-05-14 Bill Poser * msort.c (GetKeys): Fixed small bug in Turkic case folding. 2008-04-19 Bill Poser * manual.tex Filled in missing text at end of section 10.7 (IP address example). 2008-04-10 Bill Poser * msg.tcl: Now check for Tk 8.5 and adapt font sizes accordingly. 2008-04-09 Bill Poser * msort.c: Fixed ValidateCRange so as not to detect error when first index of a character range is positive but second index is negative, fixing bug reported by Jeppe Oland. * misc.c: Added ifdef for include of uninum.h as per patch by Jeppe Oland. This eliminates a problem compiling without libuninum if libuninum's header files are not installed. 2008-01-27 Bill Poser * misc.c: Moved include of nsdefs.h within ifdef for uninum as per patch by Steve Tinney. 2007-10-05 Bill Poser * msort.c: Changed license to GPL3. Eliminated printing of version info when called with no arguments. 2007-10-02 Bill Poser * msort.c: Added command-line options for specifying input and output files. Also, if the specified input and output files are the same, the input is now overwritten. Added option of suppressing log. Refactored so most writes to log are via PrintLog and wPrintLog. 2007-09-04 Bill Poser * misc.c (ShowVersion): Now print version of glibc if present. 2007-09-02 Bill Poser * misc.c (GetTimeKey, GetISO8601Key): : Added code for handling ISO 8601 time zone info. Also, modified GetISO8601Key so that, like GetTimeKey, it works on a UTF8 string. The separators in ISO time-date strings are now optional, as per the standard. 2007-09-01 Bill Poser * misc.c: Added function TimezoneOffset for use in normalizing times to UTC. 2007-06-08 Bill Poser * msort.c: Now increase number of records by InitialMaxRecords rather than half that number. 2007-03-28 Bill Poser * msort.c: Now flush log during startup to preserve info on crashes. 2007-03-23 Bill Poser Release of version 8.40 * msort.c: It is now possible to choose between the utf8proc and icu libraries for normalization. 2007-03-21 Bill Poser Release of version 8.39. * msort.c: Added conditionals so that it is possible to use an option to configure to compile msort without libuninum or libgmp. This simplifies installation for those who do not need this capability. * misc.c (OpenFile): Inability to open a file now causes an error exit. 2007-03-20 Bill Poser * msort.c (main): Added unicode normalization of input records. Added unicode normalization of tag regexps. Added unicode normalization of exclusions read from files. Added unicode normalization of exclusions read from command line. Added unicode normalization of sort order file. Added unicode normalization of substitutions. Added unicode normalization of record separator. Added unicode normalization of field separators. * misc.c: Renamed IdentifySelf to ShowVersion for consistency with other programs. Added ICU version info to ShowVersion. * uniio.c: Unified uout.c and UTF8in.c into uniio.c. 2007-03-04 Bill Poser * msort.c: Month names may now be used in the month field of dates, with their ordering determined as with independent month names. * misc.c (GetDateKey): Added stricter error checking on number conversion so as to reject ill-formed numbers in dates like "4b". 2007-02-28 Bill Poser * misc.c (GetDateKey): Added ability to handle day of year keys. 2007-02-07 Bill Poser * msg.tcl (ExplainEndOfLineMarker): Adapted list of number systems to livuninum version 2.1. * info.c: Adapted ListNumberSystems to libuninum version 2.1. 2007-01-26 Bill Poser * info.c (PrintLimits): Made thousands separation consistent and ifdefed for C libraries that do not support it. * limits.h: Abstracted multigraph numbers and improved comments. * misc.c (IdentifySelf): Version info now provides the version of all three of the non-standard libraries used. 2007-01-25 Bill Poser Release 8.36.1 * configure.ac: Changed AC_FUNC_MALLOC in configure.ac to AC_CHECK_FUNCS([...malloc...]) since on Ubuntu malloc apparently fails the GNU test of returning non-null when passed an argument of zero. This causes the compilation to fail on unresolved references to rpl_malloc. * info.c misc.c: Added includes of . 2007-01-24 Bill Poser * msort.c (GetKeys): Adapted to version 2.0 of libuninum by changing NS_RETURN_* to NS_TYPE_*. 2007-01-12 Bill Poser * configure.ac: Added configuration option --disable-comparisoncount which removes the code that reports the number of comparisons. This speeds things up a little bit for sorts involving a lot of comparisons. 2007-01-09 Bill Poser Version 8.35 released. * msort.c (main): Added checks to several key-specific options to ensure that a key has been specified earlier on the command line. This eliminates segfaults when such incorrect command-lines are encountered. All key-specific options are now covered. For some reason this check was missing from a few of them. Also made error message more informative and moved the check into a function. * Makefile.am (AM_LDFLAGS): Force linkage with gmp library. Apparently this is not taken care of by the autoconf process on Mac OS X and OpenBSD. 2007-01-05 Bill Poser Version 8.34 released. * msg.tcl: Modified GUI to accomodate number system specification for numeric string keys. * msort.c (GetKeys): Added support for number system specification for numeric string keys. 2006-12-31 Bill Poser * msort.c (GetKeys): Modifed to use libuninum for non-Western numeric keys. 2006-12-29 Bill Poser * msort.c input.c: Modified input routines to make more informative reports on input errors including bad UTF-8. 2006-12-25 Bill Poser * msg.tcl (SetupKey): Added support for writing system specification for numeric keys. 2006-12-24 Bill Poser * msort.c: Added ability for numeric keys to use pretty much any number system, with -y flag for specifying number system. 2006-12-18 Bill Poser * sorts.c (Compare): Fixed bug that caused segfaults on numeric keys. 2006-12-17 Bill Poser * msort.c sorts.c: Fixed subtle bug in multigraph mapping (MapNonHybridLI). Redid the handling of non-locale-dependent hybrid keys, which required modifications of both Compare and GetKeys. This eliminates occasional, apparently random, segfaults. Corrected storage allocated for tmp in ExtractNum and ExtractTxt. 2006-12-10 Bill Poser * msort.c info.c: Separated listing of informational options from other general options in order to shorten the latter listing. 2006-12-09 Bill Poser * msort.c: Modified domain name comparison to handle email addresses as well, that is, domain names with a leading component separated from the domain name by an at-sign. Improved description of keys in log and added logging of domain name comparison type. 2006-11-29 Bill Poser * msort.c: Added domain name sort type. 2006-11-24 Bill Poser * msort.c (main): The report of the command line by which msort was invoked is now indented slightly. 2006-10-09 Bill Poser * info.c (PrintDefaults): Added default algorithm to list of defaults. * info.c msort.c (PrintGNUEquivalences): Added command line option -G which prints GNU sort equivalences. * msort.c: Added ifdef for alloca.h which fixes build problem on FreeBSD. 2006-09-17 Bill Poser * msg.tcl (PopupIPAEntryC): Fixed non-functional uvular trill button. 2006-09-06 Bill Poser * msort.c (DescribeKeys): Fixed Debian bug 383230 as per patch by celelibi@gmail.com (key index i instead of 0). (main): Fixed Debian bug 383232 as per patch by celebi@gmail.com. (Extra fclose on log.) 2006-08-10 Bill Poser * msort.c: Updated case-folding to Unicode 5.0. 2006-08-09 Bill Poser * msort.c: If there is only one record, we still mention that there is no point in sorting only one record but we now exit successfully after writing out that record. This is necessary for non-interactive use. 2006-07-06 Bill Poser * input.c strs.c: Modified to use new prefixed UTF8 error codes. * Get_UTF32_From_UTF8i.c: Patched to handle read interrupted in middle of UTF-8 sequence. 2006-05-22 Bill Poser * msg.tcl (About): Changed help popups to toggle. Made various sections of pages roll-up, reducing footprint. 2006-05-20 Bill Poser * msort.c (GetKeys): Updated case-folding to Unicode 4.1. Added the option of Turkic case-folding. 2006-05-18 Bill Poser * msort.c sorts.c record.h: Revamped hybrid locale comparison, eliminating bugs. 2006-05-13 Bill Poser * msort.c (GetKeys): Eliminated small memory leak (LocaleTempKey). 2006-05-12 Bill Poser * msg.tcl: Added explanatory popups for conversion of stylistic variants and enclosed forms, and stripping of diacritics. * conversions.c: Added Hebrew presentation forms to ConvertStylistic. This required storage reallocation. * msort.c (main): Added option of just checking whether the input is sorted. 2006-05-12 Bill Poser * conversions.c: Corrected a bug that erroneously converted "9" to "y" when the option for converting stylistic equivalents is used. Superscript and subscript forms are now converted to their plain equivalents. 2006-05-06 Bill Poser * info.c (PrintUsage): Updated usage message to reflect split between help for global and key-specific options. 2006-05-05 Bill Poser * msort.c: Added support for month names. Now distinguish count of well-formed records from count of input records, which corrects record numbers output with error messages. *passim: Sorted out configuration conditions into three groups, LOCALE_SORT_ORDER, LOCALE_MONTH_NAME, and LOCALE_GETTEXT, so that we now check for just the right combinations. 2006-04-28 Bill Poser Added options for treating certain classes of characters as their "basic" counterparts: (a) strip diacritics; (b) treat enclosed characters as basic. (c) treat stylistic variants as basic. At present this includes the stylistic variants of the ASCII characters, the Latin but non-ASCII symbols, the Arabic positional variants, the half-width CJK punctuation, the half-width kana, and the half-width hangul. 2006-04-21 Bill Poser * misc.c: Eliminated minor memory corruption arising in DelimitNumber. * msort.c: Eliminated significant memory leakage from GetKeys. Neatened up info generated about dynamic memory, comparisons, and record count. 2006-04-11 Bill Poser * info.c Split PrintFlags into PrintGeneralFlags and PrintKeySpecificFlags. 2006-04-10 Bill Poser * msort.c (main): Added long options if supported. 2006-04-08 Bill Poser * msg.tcl: Changed 0xff to 255 in three color default settings as a workaround to a bug in some MS Windows implementations of Tcl. 2006-04-03 Bill Poser * msort.c: If the argument to the -s flag is a locale name, the rules of that locale are now used. If the argument to the -s flag is "current" or "locale", the rules of the current locale are used. Added record of amount of memory dynamically allocated to log. 2006-03-26 Bill Poser * msort.c: Fixed bug that prevented multigraph mapping from affecting string length. 2006-03-09 Bill Poser * msort.c: In atofwc now strip space characters so as to prevent strto(l)d from reporting an error due to, e.g., a newline following the number when records are not lines and fields are not lines. 2006-03-05 Bill Poser * configure.ac: Added check for libtre so that absence will be detected prior to compilation. 2006-02-25 Bill Poser passim: Added option of numeric string comparison. 2006-02-17 Bill Poser passim: Key selection by position has been extended to allow keys to span contiguous fields from one position to another, where a position consists of a field number and a character offset. This makes key selection by position approximately the same as in GNU sort. One difference is that unlike GNU sort, msort permits field numbers to be negative, indicating a count from the end. The other is that in msort if only a single position is specified only that field is included in the key, whereas in GNU sort the key extends from the specified position to the end of the record. 2006-02-11 Bill Poser passim: Adds to the permitted format for angles the sexagesimal format in which the components are separated by whitespace rather than colon. Fixes a bug affecting negative angles. 2006-02-08 Bill Poser * misc.c (GetAngleKey): Added GetAngleKey. msort.c: Added support for angle key. info.c: Added info about angle key. 2006-02-05 Bill Poser * msort.c: Moved the four sort functions, ancillary routines, and Compare into sorts.c This required moving some definitions out of msort.c into header files, including the creation of comparisons.h and keys.h. * info.c: Added command line option for fixed length records to option summary. * msort.c: Added support for fixed length records. Fixed bug that added extra newlines to output. * input.c: Added GetFixedLengthRecord(). 2006-02-04 Bill Poser * msort.c (main): Added check of whether input is restricted to BMP if -B option is specified. Added choice of algorithm, and added Mergesort and InsertionSort as possible algorithms. Also added a configure option --(dis|en)able-allocaok, which controls whether alloca is used in Mergesort. By default it is, but storage may be allocated on the heap instead if alloca is buggy, as it is on some systems. 2006-01-17 Bill Poser * msort.c misc.c record.h: Now use long double internally for numeric keys rather than double if machine supports it. Version 8.11 2006-01-17 Bill Poser * info.c (PrintLimits): The maximum length of a numeric key is now listed as a limit. 2006-01-17 Bill Poser * msort.c (GetKeys): Now check the conversion of numeric strings to internal floats for errors. Fixed bug in which msort segfaulted if given a very long numeric string as key. Version 8.9 Carried out a thorough code-cleanup. Ran gcc with -Wall -pedantic and eliminated all but 2 warnings. Eliminated the restriction on number of keys. Fixed a bug that made the widget for inserting characters by their Unicode codepoint insert them into itself. Version 8.8 Modified msort to make inability to open log file non-fatal. It now tries to open a log in /tmp. Only if that fails does it exit. Updated msg to use improved font control panel. Updated character entry widgets. Updated configuration system. Incompatibilities: character entry widget definition format Boolean command names Added binding on <> to all scrollable windows in which a significant number of lines might appear that scrolls in larger increments than the left mouse button. version 8.7 Added hybrid sort type. Added random sort type. Positional key field now defaults to key number. Improved log/stderr info output. Changed ComparisonCnt to long long to prevent overflow. Right-click in trough of scale now changes font size by increment of five. Improved the font control panel in various ways. version 8.6.1 Fixes a bug in the exclusion entry widget in the GUI. version 8.6 Added the ability to configure msg via an initialization file. Added the ability to select fonts interactively. Moved the toggle for balloon help from the Help menu to the new Configure menu. Considerable cosmetic improvement to the GUI. Lines beginning with crosshatch in substitution files are now comments. Fixed a bug in GetSubstitutions that truncated long substitutions. Made a change that may result in browser execution working under MacOSX . Minor tweaking of info messages. version 8.5.1 Added include of stdlib to dstr.c in response to report of compiler warnings. version 8.5 Added character ranges as keys to msort and msg. Added regular expression substitution on keys. Fixed a bug in Unicode case folding. Added ability to specify CR (0x0D) as end-of-line character instead of LF (0x0A). Rearranged General page. Removed unused images and conditionals for using them. Updated manual. Removed DOS stuff from manual. version 8.4 Fixed serious bug affecting numeric keys. Fixed bug in msort that garbled copy of bad record when key extraction failed. Improved detection of OS and base graphics system by msg. Fixed bug in msg that triggered an error when the "How to Use this Program" popup was popped up. Added missing balloon help for save and cancel buttons of sort order file separator control panel. The Tk-Aqua adaptation of msg was improved. The command buttons are now positioned at the top of the window and are available at all times, not just when the General page is selected. 2005/07/26 Bill Poser version 8.3 The GUI does a better job of identifying the operating system. The GUI's adaptation to Tk-Aqua under Mac OS X has been improved. 2005/07/24 Bill Poser version 8.2 Added -W flag to allow the user to set which characters are treated as separators in the sort order file. Improved error messages regarding invalid UTF-8 input. Modified msg to handle -W flag. Fixed bug with optional keys. Fixed bug in sort order specification in msg. Fixed a bug in ASCII case-folding. Updated manual page and reference manual. 2005-07-21 Bill Poser version 8.1 Fixed a bug that interfered with use of multigraphs. Adds a modified configuration of msg adapted to the Aqua implementation of Tk. msort can now be conditionally compiled without the internationalization and localization libraries that are not available under Mac OS X. 2005-07-20 Bill Poser version 8.0 msort now accepts UTF-8 Unicode. The command line flag -B was added. This flag, if present, restricts the characters in the input and sort order specifications to the BMP. The command line flag -p was added. This flag instructs msort not to make internal use of the Unicode Private Use areas. In GUI added character entry tools. Replaced Henry Spencer regexp with TRE in msort. Added help link for regular expression syntax. Instead of just trying to use the default browser, msg now works through a list of browsers, trying each in turn. 2005-05-20 Bill Poser version 7.1 It is now possible to reorder keys by dragging one button over the other. Miscellaneous improvements in error-handling and error-reporting in msg. 2005-04-25 Bill Poser version 7.0 Eliminated the restriction of exclusions to lexicographic and string length keys. Added iso8601 date/time combinations as a key type. Added gui msg.tcl. 2005-04-24 Bill Poser version 6.20 Added case-folding option. Changed default date format to International Date Format (y-m-d). 2005-04-22 Bill Poser version 6.19 Correct manual, man page, and option printout to show date format as a key-specific option. 2005-02-03 Bill Poser version 6.18 Improved man page and reference manual. 2005-01-21 Bill Poser version 6.17 Eliminated -a option since it was not useful. 2003-12-15 Bill Poser version 6.14 Changed MAXMULTIGRAPHS in limits.h to 65279 from 65280. The maximum value now fits within an unsigned short, as it should. 2003-11-19 Bill Poser version 6.13 Fixed bug in error message for bad position code in GetExclusions. 2003-11-14 Bill Poser version 6.12 Fixed bug in allocation of temporary storage and cleaned up a bit. 2003-11-11 Bill Poser version 6.11 Now allocate temporary storage for tag strings dynamically, eliminating unlikely but possible overflow bug. 2003-02-27 Bill Poser version 6.10 Added test for field reduced to zero length by exclusions. If the field is optional, such a field is treated as an optional field that was missing outright. If not, the error is reported and execution aborted. Also corrected error in Compare() that reversed the intended semantics of the arguments to -o. 2003-02-24 Bill Poser version 6.9 Fixed bug that caused a crash when -t flag was used. 2003-02-22 Bill Poser version 6.8 Added comma delimitation of comparison count to make more readable. 2003-02-21 Bill Poser version 6.7 Fixed serious bug in storage reallocation for InputText. 2003-02-19 Bill Poser version 6.6 Now catch and abort on field numbered 0. 2003-02-18 Bill Poser version 6.5 Eliminated limit on record size by allocating dynamically. Eliminated associated command line flag B. 2003-02-17 Bill Poser version 6.4 Eliminated external sort option. Eliminated DOS-related conditional code. 2003-02-17 Bill Poser version 6.3 Added ability to sort on key size. Added count of number of comparisons, which is useful for understanding what is happening. Added logging-report of global inversion of order. 2003-02-16 Bill Poser version 6.2 = RCS version 1.10 of msort.c Modified DescribeKeys to produce more readable description of positional keys. 2003-02-16 Bill Poser version 6.1 Fixed bug that allowed no keys to be specified without specifying sort on whole record. This resulted in a non-sort since the key count was 0. Fixed bug that resulted in presence of keys not being correctly detected in Compare due to reversed test. 2002-12-23 Bill Poser version 6.0 Added argument to -o flag for specifying missing key comparison. Added field to keyinfo structure to store this. Modified comparison code to test for missing keys and handle them as specified by the argument to -o. 2002-12-22 Bill Poser version 5.23 Increased 8-bit MAXMULTIGRAPHS to 65,279, which is the maximum possible. all values above 0xFF are available as codes for multigraphs. That is 2^16 - 2^8 = 65,280. 2002-11-16 Bill Poser version 5.22 Added X flag to permit context-free exclusions to be specified on command line. 2002-06-02 Bill Poser version 5.21 Eliminated log entry of what file exclusions were read from. 2002-05-05 Bill Poser version 5.20 Added more specific information to log entry regarding ill-formed keys. Previously this information was written on stderr, but the log only received a copy of the ill-formed record. 2002-05-03 Bill Poser version 5.19 Increased number of digits for count of records processed. Also increased REPORTINTERVAL since machines have gotten so much faster. 2000-05-18 Bill Poser version 5.18 Now don't print warning about singleton record if not verbose. 2000-01-03 Bill Poser version 5.17 Eliminated limit on length of sort order file line by allocating dynamically 1999-04-04 Bill Poser version 5.16 Eliminated error exit on fewer than two records. A warning is still printed, but the run is completed. This facilitates use in shell scripts. 1998-12-21 Bill Poser version 5.15 Fixed bug in DescribeKeys. Improved information about command line flags. 1996-11-14 Bill Poser version 5.14 Eliminited limit on length of input file name by allocating dynamically. 1996-06-30 Bill Poser version 5.13 Eliminated limit on number of field delimiter characters by allocating dynamically. 1996-01-19 Bill Poser version 5.12 Eliminated limit on length of tag regexp by allocating dynamically. 1995-12-23 Bill Poser version 5.11 Eliminated limit on maximum number of fields per record by allocating storage for pointers dynamically. 1995-08-20 Bill Poser version 5.10 Improved format of report of exclusions and eliminated report on stderr of reading exclusion file. 1995-05-16 Bill Poser version 5.9 Eliminated elapsed time computation and report. 1994-12-18 Bill Poser version 5.8 Now allow spaces as separators in sort order file, with backslash escape when space is to be entered in sort order. 1994-09-23 Bill Poser version 5.7 Increased DEFMAXCHUNK. 1994-09-22 Bill Poser version 5.6 Fixed bug in -o flag. Eliminated typo in usage. 1994-06-21 Bill Poser version 5.5 Added initial newlines to error reports from PutExtRecord. 1994-04-26 Bill Poser version 5.4 Moved description of exclusions into DescribeKeys so as to associate with appropriate key. 1994-04-05 Bill Poser version 5.3 Slightly modified report of elapsed time and time per record. 1994-04-3 Bill Poser version 5.2 Corrected size of ymdinfo.fmt. 1994-03-24 Bill Poser version 5.1 Added specification of separators to date format. 1994-03-19 Bill Poser version 5.0 Increased maximum number of keys to 16. Moved limits into limits.h and made it unnecessary to transfer information manually into PrintLimits(). Generalized forward-inverse option so as to apply to textual keys as well as numeric ones. Added separate -i flag for setting inversion. Renamed old -i flag, which specified global inversion, -I. Removed -N flag and added -c flag with argument to specify comparison type. Added time key type. Eliminated multigraph count in DescribeKeys if count is 0. Added date key type, with date format info in keyinfo and init, and -f flag for setting date format. Added -o flag for making key optional instead of using ? before key spec. Eliminated option of writing on file. 1994-03-10 Bill Poser version 4.13 Eliminated dump of sort order in log, which was once useful for debugging but has little use now. 1994-03-03 Bill Poser version 4.12 Fixed bug in DescribeKeys when sorting on whole record. 1994-02-08 Bill Poser version 4.11 Now allow numeric key field specification to be negative, interpretated as counting from end of record. 1994-01-20 Bill Poser version 4.10 Now allocate MapTable dynamically, when needed, saving a fair amount of space when a key does not use any multigraphs. Added log entries regarding dynamic memory usage. Now allocate numeric keys dynamically. This makes numeric comparisons very slightly slower and wastes 4 bytes per record per key for numeric keys, but it saves 4 bytes per record per key for textual keys, which are far more common in the intended applications of this program. 1993-12-21 Bill Poser version 4.9 Reserved highest rank table slot for default key, reducing number of multigraphs permitted by one. Added copy of command line to log. Fixed small bug in exclusion code. 1993-12-19 Bill Poser version 4.8 Fixed bug in default key for records without optional key. Changed reports of records processed and written to in place. 1993-11-28 Bill Poser version 4.7 Inlined comparisons, saving a little code space and maybe some time. 1993-11-27 Bill Poser version 4.6 Reduced size of each record slightly (typically 4 bytes) by making file position and text pointer a union. 1993-11-27 Bill Poser version 4.5 Rescinded replacement of lexicographic keys with ranks, which was buggy and not worth fixing since the speedup was so small. Now use quicksort instead of shellsort for large numbers of records. Added -a flag to warn that input is almost in order, in which case shellsort is used for any number of records. Also changed report of time per record to integral milliseconds. 1993-10-28 Bill Poser version 4.4 Replaced lexicographic keys with ranks. 1993-10-27 Bill Poser version 4.3 Added reversal of key field, for producing reverse dictionaries. Changed max record flag to -M so as to use -R for this. 1993-07-05 Bill Poser version 4.2 Made key code type compile time option. If only 7-bit ASCII input is desired and 128 multigraphs are sufficient, msort can be compiled with SEVENBIT defined and will use half the space for textual keys. 1993-07-04 Bill Poser version 4.1 Modified format of elapsed time report and moved into library functions. 1993-06-26 Bill Poser version 4.0 Added exclusions. Reduced other memory usage, mostly by allocating RankTables only as needed. 1993-06-20 Bill Poser version 3.3 Sent info on flags, defaults, and limits to log as well as stdout. Sent ill-formed regexp to log, and copy of beginning of overlong record. Fixed bug in bug fix in version 3.2 in report of ill-formed keys. 1993-06-15 Bill Poser version 3.1 Add information to log. Improved formatting of summary of keys. 1993-06-19 Bill Poser version 3.2 Fixed bug that led to incorrect reports of ill-formed keys on external sorts. 1993-06-12 Bill Poser version 3.0 Implemented optional keys. Added information to log. Fixed bug fixed in version 1.6 and re-introduced in version 2.2 that prevented a string from sorting before a string of which it is a prefix. 1993-06-10 Bill Poser version2.4 Improved correspondance of output to input. Fixed bugs in input routines. 1993-05-30 Bill Poser version2.3 Made minor modifications to PrintDefaults and PrintFlags. 1993-05-19 Bill Poser version 2.2 Added backslash escapes to sort order file, -d and -r flags. Added logging to msort.log. Arranged for characters for which no rank is specified to be ranked after all others, in ASCII order. 1993-05-17 Bill Poser version 2.1 Added specification of record separator. 1993-05-17 Bill Poser version 2.0 Added subsorts. 1993-04-24 Bill Poser version 1.6 Fixed bug in ConstructSortOrder. Strings are now guaranteed to sort after prefixes to them. 1993-04-16 Bill Poser version1.5 Fixed bug in ConstructSortOrder. Spaces are now handled properly. 1993-04-12 Bill Poser version 1.4 Changed tag specification from strings to regular expressions. Improved formatting of record processing progress report. Added progress report on write-out of sorted records. 1993-04-11 Bill Poser version 1.3 Eliminated limitation on number of records. 1993-04-10 Bill Poser version 1.2 Added listing of multigraphs. Added numerical sort option. Rationalized flags. 1993-04-05 Bill Poser version 1.0 msort-8.53/INSTALL0000644000175100017510000002230611236173741010601 00000000000000Copyright 1994, 1995, 1996, 1999, 2000, 2001 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. (Caching is disabled by default to prevent problems with accidental use of stale cache files.) If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You only need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for variables by setting them in the environment. You can do that on the command line like this: ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not support the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH', the package will use PATH as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=PATH' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of host the package will run on. Usually `configure' can figure that out, but if it prints a message saying it cannot guess the host type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the host type. If you are _building_ compiler tools for cross-compiling, you should use the `--target=TYPE' option to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the host platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. In this case, you should also specify the build platform with `--build=TYPE', because, in this case, it may not be possible to guess the build platform (it sometimes involves compiling and running simple test programs, and this can't be done if the compiler is a cross compiler). Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc will cause the specified gcc to be used as the C compiler (unless it is overridden in the site shell script). `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of the options to `configure', and exit. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. msort-8.53/NEWS0000644000175100017510000001723011322476312010243 000000000000002010-01-10 8.53 Now use new function names with prefix tre_ exported by libtre. This makes msort compatible with libtre 0.8. Removed unnecessary conditioning of Hybrid mapping code on LOCALE_SORT_ORDER. Changed type of ExclusionTables, fixing a bug in the reporting of exclusions and saving considerable memory when exclusions are used. Added -Z option for copying the first record to the output without sorting it. This is useful for files with a header. Added a regression test for this option. 2008-12-05 8.52 If a key has comparison type "random, we don't bother to store it since we aren't going to use it. This saves a little time and possibly a good bit of storage. If one or more records have been discarded due to problems in key extraction but the run is otherwise successful, the exit code is now RECORDEXCLUDED (13) rather than BADRECORD (8). ISO8601 keys may now have an optional leading sign. Cleaned up and improved the log. Made error-checking and reporting finer-grained in GetMonthNames. A few of the regression tests depend on the locale system, which may fail for reasons independent of msort. These tests have now been separated so that their failure will not suggest that msort itself is not working. Typing "make test" runs the main set of tests. Typing "make localtest" runs the locale-dependent tests, the results of which are written to LocaleTestResults. Split time and iso8601 date/time regression tests so as not to mix data with and without time zone offsets since mixing them causes tests to fail if executed in some time zones. Added regression test for more complex substition. Added information to the manual section on random comparison. If you don't know how random comparison can be useful other than for unsorting, you might want to check this out. 2008-10-11 8.51 It is now possible to set the random number generator seed from the command-line, allowing replication of random sorts. Whatever its origin, the seed used is now reported in the log. Added regression tests for angles and collating sequences. Rearranged the start and completion time stamps in the log so that the former immediately precedes the latter, facilitating comparison. 2008-09-29 8.50 Null keys resulting from the presence of a tag with no following value, are now detected and handled like key fields that are missing in their entirety. Fixed a bug in which compound positional keys (those involving portions of more than one field) were not properly null terminated, resulting in various sorts of errors. Positional key specifications with a character offset of zero are now treated as fatal errors and reported to the user. Made report of failure of key extraction on one or more records subject to Verbose flag, so that giving the -q option completely silences msort so long as there are no non-fatal errors. ISO8601 time/date stamps are now written into the beginning and end of the log file. Made failure of check for libintl during configuration non-fatal. Added 16 more regression tests. 2008-09-24 8.49 Fixed bug resulting from allocation of insufficient memory. Removed inappropriate free of stack storage. Removed debugging line inadvertently left in. Eliminated printing of message "Consult the log for details" if logging is not enabled. Added section on Dependencies to README, discussing use of non-standard libraries and how to build the simplest configuration. Eliminated direct call to libgmp, which should simplify installation. Now get gmp version info from function in libuninum if a sufficiently recent version of libuninum is available. Added check for libintl. Added nine regression tests. 2008-09-20 8.48 Updated case-folding to Unicode 5.1. Fixed bug that caused inappropriate rejection of ISO8601 date/time stamps lacking a numerical time zone offset. Fixed bug that caused inappropriate return of error from well-formed ISO8601 times. Fixed a bug that caused a segmentation fault if an attempt was made to analyze as a date a string not containing the expected first date component separator. Added -A flag for lexicographic sorts of using only the first character (after subs, exclusions, etc.). This emulates pre-modern alphabetization practice. Added some regression tests, which may be executed by typing "make test". Added some sample sort order definition files. Added information about system and machine type to version info. 2008-07-01 8.47 Fixed segfault bug when using utf8proc for normalization. Modified domain name processing to handle optional protocol segment, which is treated as lowest priority component like the username in an email address. 2008-05-27 8.46 Fixed bugs in rearrangement of email addresses. Made license for msg consistently GPLv3. 2008-05-19 8.45 Fixed small bug in Turkic case folding. Fixed bug in hybrid comparison arising on 64-bit architectures. Version 8.44 Fixes bug in which a character range with a positive first index and negative second index was not accepted. Fixes bug that prevented compilation with --disable-uninum when is not present. Msg now checks for Tk 8.5 and adapts font sizes accordingly. Version 8.43 Fixes bug that prevented compilation with --disable-uninum if file is not present. Version 8.42 Added command-line options for specifying input and output files. Also, if the specified input and output files are the same, the input is now overwritten. Added the option of suppressing logging. License is now GPL version 3. Eliminated printing of version information when called with no arguments. Version 8.41 Time and date-time keys may now contain ISO 8601 time zone specifiers. Version 8.40 This version provides a choice between the International Components for Unicode and utf8proc libraries, which we use only for Unicode normalization. utf8proc is a smaller library with fewer dependencies and is likely easier to install. Version 8.39 This version normalizes all Unicode input by default. Version 8.38 Dates may now make use of any supported number system. Month fields in dates may contain month names rather than numbers. Dates may now consist of just year and day-of-year fields. Version 8.37 This release adapts msort and msg to libuninum 2.1. Version 8.34 Both numeric and numeric string keys may now be given in any of several dozen number systems. Version 8.31 Extended domain name comparison to handle email addresses. Fixed small bugs in description of keys. Version 8.30 Adds domain name comparison. Version 8.29 Updated documentation and added command line option giving equivalents to GNU sort. Version 8.28 Fixes a segfault on combination of -c n and -w options. Fixes a free of free pointer on failed key extraction. Version 8.27 If there is only one record, we still mention that there is no point in sorting only one record but we now exit successfully after writing out that record. This is desirable for non-interactive use. Version 8.26 Case-folding was updated to Unicode 4.1. Turkic case-folding has been added as an option. The GUI now rolls up as it was beginning to take up too much real estate. Version 8.25 The option of just checking whether the input is sorted is now available. Conversion of stylistic variants now handles Hebrew presentation forms. Version 8.24 Added ability to sort on month names and abbreviations. Version 8.23 Added options for treating certain classes of characters as their "basic" counterparts. Version 8.22 Memory usage has been significantly reduced. Version 8.20 It is now possible to use the collation rules for a locale rather than writing a sort order definition. This is done by giving a locale name as argument to the -s flag. If the argument to the -s flag is the word "locale", the collation rules for the current locale will be used. msort-8.53/TODO0000644000175100017510000000726411244155062010241 00000000000000Need to complete adaptation of MSG to handle the -Z option. Withdraw code for semi-external sort? Add record parser for case of separator string rather than single character. Add reocrd parser for case of record initiator that belongs to record (as in SDF). Add record parser for stanza format, where each record begins with a fixed string and ends with another fixed string, neither of which is part of the record. Material between a stanza terminator and a stanza initiator is ignored. To add merge sort, need to duplicate or localize global variables like RecordList so as to support two lists and make sure that there are no problems running GetFields on two input files. Once we've got the data all processed, basically we just need to pass it to the Merge routine of the existing merge sort. Probably should do this and test it as a first step. This won't, however, solve the memory problem. For that, we've got to arrange to buffer the inputs and have the Merge routine request refilling of the buffers when it runs out. Test compatibility normalization options. Consider adding to documentation an explanation of how to use msort to sort a spreadsheet by exporting in a suitable format, sorting using msort, and importing again. Add to the documentation an explanation of how to use msort to sort a database in Standard Dictionary Format. Check whether we are correctly handling the case in which we use locale comparison and the system is unable to set the locale to the one we specifiy. Need to review in more detail the substitution facility. Tests using back references produce peculiar results. Also, should add examples to manual. When doing regression tests, how should we distinguish between a true error and a problem resulting from the lack of locale data? It may be necessary to use a special exit code to indicate that a locale problem ocurred. The current "time" comparison uses ISO8601 time zone offsets but not the full ISO8601 format for the time itself. We should probably convert this to ISO8601 time. Case-folding does not preserve normalization, so we should either normalize after case-folding or, if it is necessary to normalize earlier, renormalize after case-folding. Need to update transformations to Unicode 5.1. Add to test suite: locales Consider making use of TRE regexp library optional. This would entail adding the option to configure.ac and ifdefing the portions of code relevant to: (a) tag matching; (b) substitutions; In the case of compilation without the regexp library: For tag matching, we'd have to use exact matching instead. For substitutions, we'd have to use simple string substitution. Add IPv6 address sorting: http://tools.ietf.org/html/rfc4291 full form is 8 groups of 4 hex digits separated by colons The last two groups may be replaced by four decimal bytes using dots as separators abbreviations: leading 0s within a group may be omitted any number of groups consisting entirely of 0 may be replaced by a double colon but only one double colon is permitted in order to avoid ambiguity. algorithm: (a) locate IPv4 tail if present and convert to IPv6 (b) expand :: (c) treat as hybrid Consider adding parallel merge sort (http://www.mweissmann.de/downloads/libpmsort-0.3.tar.bz2) as an additional algorithm choice. This would yield significant speed improvements on multi-core systems. Compare must be thread safe - need to check into this. Any global variables that might change need to be made thread-local by means of the declaration _thread, e.g.: _thread int foo; The only global variable that is written by Compare is ComparisonCnt. KeyCount and KeyInfo are never modified once the actual sort starts. msort-8.53/depcomp0000755000175100017510000003034511236173741011127 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects # Copyright 1999, 2000 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # `libtool' can also be set to `yes' or `no'. if test -z "$depfile"; then base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'` dir=`echo "$object" | sed 's,/.*$,/,'` if test "$dir" = "$object"; then dir= fi # FIXME: should be _deps on DOS. depfile="$dir.deps/$base" fi tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> $depfile echo >> $depfile # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> $depfile else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. This file always lives in the current directory. # Also, the AIX compiler puts `$object:' at the start of each line; # $object doesn't have directory information. stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'` tmpdepfile="$stripped.u" outname="$stripped.o" if test "$libtool" = yes; then "$@" -Wc,-M else "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; tru64) # The Tru64 AIX compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. base=`echo "$object" | sed -e 's/\.o$/.d/' -e 's/\.lo$/.d/'` tmpdepfile1="$base.o.d" tmpdepfile2="$base.d" if test "$libtool" = yes; then "$@" -Wc,-MD else "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi if test -f "$tmpdepfile1"; then tmpdepfile="$tmpdepfile1" else tmpdepfile="$tmpdepfile2" fi if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a space and a tab in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the proprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. test -z "$dashmflag" && dashmflag=-M ( IFS=" " case " $* " in *" --mode=compile "*) # this is libtool, let us make it quiet for arg do # cycle over the arguments case "$arg" in "--mode=compile") # insert --quiet before "--mode=compile" set fnord "$@" --quiet shift # fnord ;; esac set fnord "$@" "$arg" shift # fnord shift # "$arg" done ;; esac "$@" $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" ) & proc=$! "$@" stat=$? wait "$proc" if test "$stat" != 0; then exit $stat; fi rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) # X makedepend ( shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes esac case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift;; -*) ;; *) set fnord "$@" "$arg"; shift;; esac done obj_suffix="`echo $object | sed 's/^.*\././'`" touch "$tmpdepfile" ${MAKEDEPEND-makedepend} 2>/dev/null -o"$obj_suffix" -f"$tmpdepfile" "$@" ) & proc=$! "$@" stat=$? wait "$proc" if test "$stat" != 0; then exit $stat; fi rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the proprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. ( IFS=" " case " $* " in *" --mode=compile "*) for arg do # cycle over the arguments case $arg in "--mode=compile") # insert --quiet before "--mode=compile" set fnord "$@" --quiet shift # fnord ;; esac set fnord "$@" "$arg" shift # fnord shift # "$arg" done ;; esac "$@" -E | sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" ) & proc=$! "$@" stat=$? wait "$proc" if test "$stat" != 0; then exit $stat; fi rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the proprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. ( IFS=" " case " $* " in *" --mode=compile "*) for arg do # cycle over the arguments case $arg in "--mode=compile") # insert --quiet before "--mode=compile" set fnord "$@" --quiet shift # fnord ;; esac set fnord "$@" "$arg" shift # fnord shift # "$arg" done ;; esac for arg do case "$arg" in "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" ) & proc=$! "$@" stat=$? wait "$proc" if test "$stat" != 0; then exit $stat; fi rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 msort-8.53/install-sh0000755000175100017510000001267111236173741011560 00000000000000#!/bin/sh # # install - install a program, script, or datafile # This comes from X11R5 (mit/util/scripts/install.sh). # # Copyright 1991 by the Massachusetts Institute of Technology # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that # the above copyright notice appear in all copies and that both that # copyright notice and this permission notice appear in supporting # documentation, and that the name of M.I.T. not be used in advertising or # publicity pertaining to distribution of the software without specific, # written prior permission. M.I.T. makes no representations about the # suitability of this software for any purpose. It is provided "as is" # without express or implied warranty. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" dir_arg="" while [ x"$1" != x ]; do case $1 in -c) instcmd="$cpprog" shift continue;; -d) dir_arg=true shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd="$stripprog" shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; *) if [ x"$src" = x ] then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "install: no input file specified" exit 1 else : fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d $dst ]; then instcmd=: chmodcmd="" else instcmd=$mkdirprog fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if [ -f $src -o -d $src ] then : else echo "install: $src does not exist" exit 1 fi if [ x"$dst" = x ] then echo "install: no destination specified" exit 1 else : fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d $dst ] then dst="$dst"/`basename $src` else : fi fi ## this sed command emulates the dirname command dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then defaultIFS=' ' IFS="${IFS-${defaultIFS}}" oIFS="${IFS}" # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` IFS="${oIFS}" pathcomp='' while [ $# -ne 0 ] ; do pathcomp="${pathcomp}${1}" shift if [ ! -d "${pathcomp}" ] ; then $mkdirprog "${pathcomp}" else : fi pathcomp="${pathcomp}/" done fi if [ x"$dir_arg" != x ] then $doit $instcmd $dst && if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi else # If we're going to rename the final executable, determine the name now. if [ x"$transformarg" = x ] then dstfile=`basename $dst` else dstfile=`basename $dst $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename if [ x"$dstfile" = x ] then dstfile=`basename $dst` else : fi # Make a temp file name in the proper directory. dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name $doit $instcmd $src $dsttmp && trap "rm -f ${dsttmp}" 0 && # and set any options; do chmod last to preserve setuid bits # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi && # Now rename the file to the real destination. $doit $rmcmd -f $dstdir/$dstfile && $doit $mvcmd $dsttmp $dstdir/$dstfile fi && exit 0 msort-8.53/missing0000755000175100017510000002405011236173741011145 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. # Copyright 1996, 1997, 1999, 2000 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case "$1" in -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch]" ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing 0.4 - GNU automake" ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; aclocal*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case "$f" in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is needed, and you do not seem to have it handy on your system. You might have modified some files without having the proper tools for further handling them. You can get \`$1Help2man' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` fi if [ -f "$file" ]; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then # We have makeinfo, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` fi touch $file ;; tar) shift if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 fi # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar ${1+"$@"} && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar ${1+"$@"} && exit 0 fi firstarg="$1" if shift; then case "$firstarg" in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" ${1+"$@"} && exit 0 ;; esac case "$firstarg" in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" ${1+"$@"} && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and you do not seem to have it handy on your system. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequirements for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 msort-8.53/mkinstalldirs0000755000175100017510000000350411236173741012355 00000000000000#! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Public domain # $Id: mkinstalldirs,v 1.13 1999/01/05 03:18:55 bje Exp $ errstatus=0 dirmode="" usage="\ Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." # process command line arguments while test $# -gt 0 ; do case "${1}" in -h | --help | --h* ) # -h for help echo "${usage}" 1>&2; exit 0 ;; -m ) # -m PERM arg shift test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; } dirmode="${1}" shift ;; -- ) shift; break ;; # stop option processing -* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option * ) break ;; # first non-opt arg esac done for file do if test -d "$file"; then shift else break fi done case $# in 0) exit 0 ;; esac case $dirmode in '') if mkdir -p -- . 2>/dev/null; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" fi ;; *) if mkdir -m "$dirmode" -p -- . 2>/dev/null; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" fi ;; esac for file do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d do pathcomp="$pathcomp$d" case "$pathcomp" in -* ) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr else if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" lasterr="" chmod "$dirmode" "$pathcomp" || lasterr=$? if test ! -z "$lasterr"; then errstatus=$lasterr fi fi fi fi pathcomp="$pathcomp/" done done exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 3 # End: # mkinstalldirs ends here msort-8.53/conversions.c0000644000175100017510000014743211236173741012274 00000000000000/* Time-stamp: <2008-03-14 18:09:53 poser> */ /* * Copyright (C) 1993-2008 William J. Poser. * This program is free software; you can redistribute it and/or modify * it under the terms of version 3 of the GNU General Public License * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software Foundation, * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ #include "config.h" #include "compdefs.h" #include #ifdef HAVE_STDINT_H #include #endif #include #include #ifdef HAVE_UNINUM_UNICODE_H #include #else #include "unicode.h" #endif #include "dstr.h" #include "exitcode.h" void StripDiacritics (wchar_t *s) { wchar_t c; wchar_t *src; wchar_t *tgt; tgt = src = s; while ((c = *src) != L'\0'){ src++; switch (c) { case 0x00C0: case 0x00C1: case 0x00C2: case 0x00C3: case 0x00C4: case 0x00C5: case 0x0100: case 0x0102: case 0x0104: case 0x01CD: case 0x01DE: case 0x01E0: case 0x01E2: case 0x01FA: case 0x0200: case 0x0202: case 0x0226: case 0x1E00: case 0x1EA0: case 0x1EA2: case 0x1EA4: case 0x1EA6: case 0x1EA8: case 0x1EAA: case 0x1EAC: case 0x1EAE: case 0x1EB0: case 0x1EB2: case 0x1EB4: case 0x1EB6: *tgt++ = 0x0041; /* A */ break; case 0x0181: case 0x0182: case 0x0299: case 0x1E02: case 0x1E04: case 0x1E06: *tgt++ = 0x0042; /* B */ break; case 0x00C7: case 0x0106: case 0x0108: case 0x010A: case 0x010C: case 0x0187: case 0x023B: case 0x1E08: *tgt++ = 0x0043; /* C */ break; case 0x010E: case 0x0110: case 0x018A: case 0x018B: case 0x1E0A: case 0x1E0C: case 0x1E0E: case 0x1E10: case 0x1E12: *tgt++ = 0x0044; /* D */ break; case 0x00C8: case 0x00C9: case 0x00CA: case 0x00CB: case 0x0112: case 0x0114: case 0x0116: case 0x0118: case 0x011A: case 0x0204: case 0x0206: case 0x0228: case 0x1E14: case 0x1E16: case 0x1E18: case 0x1E1A: case 0x1E1C: case 0x1EB8: case 0x1EBA: case 0x1EBC: case 0x1EBE: case 0x1EC0: case 0x1EC2: case 0x1EC4: case 0x1EC6: *tgt++ = 0x0045; /* E */ break; case 0x0191: case 0x1E1E: *tgt++ = 0x0046; /* F */ break; case 0x011C: case 0x011E: case 0x0120: case 0x0122: case 0x0193: case 0x01E4: case 0x01E6: case 0x01F4: case 0x1E20: *tgt++ = 0x0047; /* G */ break; case 0x0124: case 0x0126: case 0x021E: *tgt++ = 0x0048; /* H */ break; case 0x00CC: case 0x00CD: case 0x00CE: case 0x00CF: case 0x0128: case 0x012A: case 0x012C: case 0x012E: case 0x0130: case 0x0197: case 0x01CF: case 0x0208: case 0x020A: case 0x026A: case 0x1D7B: case 0x1E2C: case 0x1E2E: case 0x1EC8: case 0x1ECA: *tgt++ = 0x0049; /* I */ break; case 0x0134: *tgt++ = 0x004A; /* J */ break; case 0x0198: case 0x01E8: case 0x1E30: case 0x1E32: case 0x1E34: *tgt++ = 0x004B; /* K */ break; case 0x023D: case 0x1E36: case 0x1E38: case 0x1E3A: case 0x1E3C: *tgt++ = 0x004C; /* L */ break; case 0x1E3E: case 0x1E40: case 0x1E42: *tgt++ = 0x004D; /* M */ break; case 0x00D1: case 0x019D: case 0x01F8: case 0x0220: case 0x1E44: case 0x1E46: case 0x1E48: case 0x1E4A: *tgt++ = 0x004E; /* N */ break; case 0x00D2: case 0x00D3: case 0x00D4: case 0x00D5: case 0x00D6: case 0x00D8: case 0x014C: case 0x014E: case 0x0150: case 0x019F: case 0x01A0: case 0x01D1: case 0x01EA: case 0x01EC: case 0x01FE: case 0x020C: case 0x020E: case 0x022A: case 0x022C: case 0x022E: case 0x0230: case 0x1D0F: case 0x1E4C: case 0x1E4E: case 0x1E50: case 0x1E52: case 0x1ECC: case 0x1ECE: case 0x1ED0: case 0x1ED2: case 0x1ED4: case 0x1ED6: case 0x1ED8: case 0x1EDA: case 0x1EDC: case 0x1EDE: case 0x1EE0: case 0x1EE2: *tgt++ = 0x004F; /* O */ break; case 0x01A4: case 0x1E54: case 0x1E56: *tgt++ = 0x0050; /* P */ break; case 0x0210: case 0x0212: case 0x1E58: case 0x1E5A: case 0x1E5C: case 0x1E5E: *tgt++ = 0x0052; /* R */ break; case 0x0218: case 0x1E60: case 0x1E62: case 0x1E64: case 0x1E66: case 0x1E68: *tgt++ = 0x0053; /* S */ break; case 0x01AC: case 0x01AE: case 0x021A: case 0x023E: case 0x1E6A: case 0x1E6C: case 0x1E6E: case 0x1E70: *tgt++ = 0x0054; /* T */ break; case 0x00D9: case 0x00DA: case 0x00DB: case 0x00DC: case 0x0168: case 0x016A: case 0x016C: case 0x016E: case 0x0170: case 0x0172: case 0x01AF: case 0x01D3: case 0x01D5: case 0x01D7: case 0x01D9: case 0x01DB: case 0x0214: case 0x0216: case 0x1D1C: case 0x1D7E: case 0x1E72: case 0x1E74: case 0x1E76: case 0x1E78: case 0x1E7A: case 0x1EE4: case 0x1EE6: case 0x1EE8: case 0x1EEA: case 0x1EEC: case 0x1EEE: case 0x1EF0: *tgt++ = 0x0055; /* U */ break; case 0x01B2: case 0x1E7C: case 0x1E7E: *tgt++ = 0x0056; /* V */ break; case 0x0174: case 0x1E80: case 0x1E82: case 0x1E84: case 0x1E86: case 0x1E88: *tgt++ = 0x0057; /* W */ break; case 0x1E8A: case 0x1E8C: *tgt++ = 0x0058; /* X */ break; case 0x00DD: case 0x0176: case 0x0178: case 0x01B3: case 0x0232: case 0x028F: case 0x1E8E: case 0x1EF2: case 0x1EF4: case 0x1EF6: case 0x1EF8: *tgt++ = 0x0059; /* Y */ break; case 0x0179: case 0x017B: case 0x017D: case 0x01B5: case 0x0224: case 0x1D22: case 0x1E90: case 0x1E92: case 0x1E94: *tgt++ = 0x005A; /* Z */ break; case 0x00E0: /* a */ case 0x00E1: case 0x00E2: case 0x00E3: case 0x00E4: case 0x00E5: case 0x0101: case 0x0103: case 0x0105: case 0x01CE: case 0x01DF: case 0x01E1: case 0x01FB: case 0x0201: case 0x0203: case 0x0227: case 0x1D00: case 0x1E01: case 0x1E9A: case 0x1EA1: case 0x1EA3: case 0x1EA5: case 0x1EA7: case 0x1EA9: case 0x1EB1: case 0x1EB3: case 0x1EB5: case 0x1EB7: *tgt++ = 0x0061; break; case 0x0062: /* b */ case 0x0180: case 0x0183: case 0x0253: case 0x1D03: case 0x1E03: case 0x1E05: case 0x1E07: *tgt++ = 0x0062; break; case 0x00E7: case 0x0107: case 0x0109: case 0x010B: case 0x010D: case 0x0188: case 0x0255: case 0x1E09: *tgt++ = 0x0063; /* c */ break; case 0x010F: case 0x0111: case 0x018C: case 0x0221: case 0x0256: case 0x0257: case 0x1D6D: case 0x1D81: case 0x1D91: case 0x1E0B: case 0x1E0D: case 0x1E0F: case 0x1E11: case 0x1E13: *tgt++ = 0x0064; /* d */ break; case 0x00E8: case 0x00E9: case 0x00EA: case 0x00EB: case 0x0113: case 0x0115: case 0x0117: case 0x0119: case 0x011B: case 0x0205: case 0x0207: case 0x0229: case 0x1D07: case 0x1E15: case 0x1E17: case 0x1E19: case 0x1E1B: case 0x1E1D: case 0x1EB9: case 0x1EBB: case 0x1EBD: case 0x1EBF: case 0x1EC1: case 0x1EC3: case 0x1EC5: case 0x1EC7: *tgt++ = 0x0065; /* e */ break; case 0x0192: case 0x1D6E: case 0x1D82: case 0x1E1F: *tgt++ = 0x0066; /* f */ break; case 0x011D: case 0x011F: case 0x0121: case 0x0123: case 0x01E5: case 0x01E7: case 0x01F5: case 0x0260: case 0x1E21: *tgt++ = 0x0067; /* g */ break; case 0x0125: case 0x0127: case 0x021F: case 0x0266: case 0x1E23: case 0x1E25: case 0x1E27: case 0x1E29: case 0x1E2B: case 0x1E96: *tgt++ = 0x0068; /* h */ break; case 0x00EC: case 0x00ED: case 0x00EE: case 0x00EF: case 0x0129: case 0x012B: case 0x012D: case 0x012F: case 0x01D0: case 0x0209: case 0x020B: case 0x0268: case 0x1D96: case 0x1E2D: case 0x1E2F: case 0x1EC9: case 0x1ECB: case 0x2071: *tgt++ = 0x0069; /* i */ break; case 0x0135: case 0x01F0: case 0x029D: *tgt++ = 0x006A; /* j */ break; case 0x0199: case 0x01E9: case 0x1D84: case 0x1E31: case 0x1E33: case 0x1E35: *tgt++ = 0x006B; /* k */ break; case 0x019A: case 0x0234: case 0x026B: case 0x026C: case 0x026D: case 0x1D85: case 0x1E37: case 0x1E39: case 0x1E3B: case 0x1E3D: *tgt++ = 0x006C; /* l */ break; case 0x0271: case 0x1D6F: case 0x1D86: case 0x1E3F: case 0x1E41: case 0x1E43: *tgt++ = 0x006D; /* m */ break; case 0x00F1: case 0x019E: case 0x01F9: case 0x0272: case 0x0273: case 0x1D70: case 0x1D87: case 0x1E45: case 0x1E47: case 0x1E49: case 0x1E4B: *tgt++ = 0x006E; /* n */ break; case 0x00F2: case 0x00F3: case 0x00F4: case 0x00F5: case 0x00F6: case 0x00F8: case 0x01A1: case 0x01D2: case 0x01EB: case 0x01ED: case 0x01FF: case 0x020D: case 0x020F: case 0x022B: case 0x022D: case 0x022F: case 0x0231: case 0x1E4D: case 0x1E4F: case 0x1E51: case 0x1E53: case 0x1ECD: case 0x1ECF: case 0x1ED1: case 0x1ED3: case 0x1ED5: case 0x1ED7: case 0x1ED9: case 0x1EDB: case 0x1EDD: case 0x1EDF: case 0x1EE1: case 0x1EE3: *tgt++ = 0x006F; /* o */ break; case 0x01A5: case 0x1D71: case 0x1D7D: case 0x1D88: case 0x1E55: case 0x1E57: *tgt++ = 0x0070; /* p */ break; case 0x02A0: *tgt++ = 0x0071; /* q */ break; case 0x0211: case 0x0213: case 0x027C: case 0x027D: case 0x027E: case 0x1D72: case 0x1D73: case 0x1D89: case 0x1E59: case 0x1E5B: case 0x1E5D: case 0x1E5F: *tgt++ = 0x0072; /* r */ break; case 0x0219: case 0x023F: case 0x0282: case 0x1D74: case 0x1D8A: case 0x1E61: case 0x1E63: case 0x1E65: case 0x1E67: case 0x1E69: *tgt++ = 0x0073; /* s */ break; case 0x01AB: case 0x01AD: case 0x021B: case 0x0288: case 0x1D75: case 0x1E6B: case 0x1E6D: case 0x1E6F: case 0x1E71: case 0x1E97: *tgt++ = 0x0074; /* t */ break; case 0x00F9: case 0x00FA: case 0x00FB: case 0x00FC: case 0x0171: case 0x0173: case 0x01B0: case 0x01D4: case 0x01D6: case 0x01D8: case 0x01DA: case 0x01DC: case 0x0215: case 0x0217: case 0x0289: case 0x1D99: case 0x1E73: case 0x1E75: case 0x1E77: case 0x1E79: case 0x1E7B: case 0x1EE5: case 0x1EE7: case 0x1EE9: case 0x1EEB: case 0x1EED: case 0x1EEF: case 0x1EF1: *tgt++ = 0x0075; /* u */ break; case 0x028B: case 0x1D8C: case 0x1E7D: case 0x1E7F: *tgt++ = 0x0076; /* v */ break; case 0x0175: case 0x1E81: case 0x1E83: case 0x1E85: case 0x1E87: case 0x1E89: case 0x1E98: *tgt++ = 0x0077; /* w */ break; case 0x1D8D: case 0x1E8B: case 0x1E8D: *tgt++ = 0x0078; /* x */ break; case 0x00FD: case 0x00FE: case 0x00FF: case 0x0177: case 0x01B4: case 0x0233: case 0x1E8F: case 0x1E99: case 0x1EF3: case 0x1EF5: case 0x1EF7: case 0x1EF9: *tgt++ = 0x0079; /* y */ break; case 0x017A: case 0x017C: case 0x017E: case 0x01B6: case 0x0225: case 0x0290: case 0x0291: case 0x1E91: case 0x1E93: case 0x1E95: *tgt++ = 0x007A; /* z */ break; case 0x0300: /* Combining diacrtics - just skip */ case 0x0301: case 0x0302: case 0x0303: case 0x0304: case 0x0305: case 0x0306: case 0x0307: case 0x0308: case 0x0309: case 0x030A: case 0x030B: case 0x030C: case 0x030D: case 0x030E: case 0x030F: case 0x0310: case 0x0311: case 0x0312: case 0x0313: case 0x0314: case 0x0315: case 0x0316: case 0x0317: case 0x0318: case 0x0319: case 0x031A: case 0x031B: case 0x031C: case 0x031D: case 0x031E: case 0x031F: case 0x0320: case 0x0321: case 0x0322: case 0x0323: case 0x0324: case 0x0325: case 0x0326: case 0x0327: case 0x0328: case 0x0329: case 0x032A: case 0x032B: case 0x032C: case 0x032D: case 0x032E: case 0x032F: case 0x0330: case 0x0331: case 0x0332: case 0x0333: case 0x0334: case 0x0335: case 0x0336: case 0x0337: case 0x0338: case 0x0339: case 0x033A: case 0x033B: case 0x033C: case 0x033D: case 0x033E: case 0x033F: case 0x0340: case 0x0341: case 0x0342: case 0x0343: case 0x0344: case 0x0345: case 0x0346: case 0x0347: case 0x0348: case 0x0349: case 0x034A: case 0x034B: case 0x034C: case 0x034D: case 0x034E: case 0x034F: case 0x0350: case 0x0351: case 0x0352: case 0x0353: case 0x0354: case 0x0355: case 0x0356: case 0x0357: case 0x0358: case 0x0359: case 0x035A: case 0x035B: case 0x035C: case 0x035D: case 0x035E: case 0x035F: case 0x0360: case 0x0361: case 0x0362: continue; default: *tgt++ = c; break; } /* End of switch */ } /* End of while */ *tgt = L'\0'; } void ConvertEnclosed (wchar_t *s) { wchar_t c; wchar_t *src; wchar_t *tgt; tgt = src = s; while ((c = *src) != L'\0'){ src++; switch (c) { /* Parenthesized letters */ case 0x249C: case 0x24D0: *tgt++ = 0x61; break; case 0x249D: case 0x24D1: *tgt++ = 0x62; break; case 0x249E: case 0x24D2: *tgt++ = 0x63; break; case 0x249F: case 0x24D3: *tgt++ = 0x64; break; case 0x24A0: case 0x24D4: *tgt++ = 0x65; break; case 0x24A1: case 0x24D5: *tgt++ = 0x66; break; case 0x24A2: case 0x24D6: *tgt++ = 0x67; break; case 0x24A3: case 0x24D7: *tgt++ = 0x68; break; case 0x24A4: case 0x24D8: *tgt++ = 0x69; break; case 0x24A5: case 0x24D9: *tgt++ = 0x6A; break; case 0x24A6: case 0x24DA: *tgt++ = 0x6B; break; case 0x24A7: case 0x24DB: *tgt++ = 0x6C; break; case 0x24A8: case 0x24DC: *tgt++ = 0x6D; break; case 0x24A9: case 0x24DD: *tgt++ = 0x6E; break; case 0x24AA: case 0x24DE: *tgt++ = 0x6F; break; case 0x24AB: case 0x24DF: *tgt++ = 0x70; break; case 0x24AC: case 0x24E0: *tgt++ = 0x71; break; case 0x24AD: case 0x24E1: *tgt++ = 0x72; break; case 0x24AE: case 0x24E2: *tgt++ = 0x73; break; case 0x24AF: case 0x24E3: *tgt++ = 0x74; break; case 0x24B0: case 0x24E4: *tgt++ = 0x75; break; case 0x24B1: case 0x24E5: *tgt++ = 0x76; break; case 0x24B2: case 0x24E6: *tgt++ = 0x77; break; case 0x24B3: case 0x24E7: *tgt++ = 0x78; break; case 0x24B4: case 0x24E8: *tgt++ = 0x79; break; case 0x24B5: case 0x24E9: *tgt++ = 0x7A; break; /* Circled capital letters */ case 0x24B6: *tgt++ = 0x41; break; case 0x24B7: *tgt++ = 0x42; break; case 0x24B8: *tgt++ = 0x43; break; case 0x24B9: *tgt++ = 0x44; break; case 0x24BA: *tgt++ = 0x45; break; case 0x24BB: *tgt++ = 0x46; break; case 0x24BC: *tgt++ = 0x47; break; case 0x24BD: *tgt++ = 0x48; break; case 0x24BE: *tgt++ = 0x49; break; case 0x24BF: *tgt++ = 0x4A; break; case 0x24C0: *tgt++ = 0x4B; break; case 0x24C1: *tgt++ = 0x4C; break; case 0x24C2: *tgt++ = 0x4D; break; case 0x24C3: *tgt++ = 0x4E; break; case 0x24C4: *tgt++ = 0x4F; break; case 0x24C5: *tgt++ = 0x50; break; case 0x24C6: *tgt++ = 0x51; break; case 0x24C7: *tgt++ = 0x52; break; case 0x24C8: *tgt++ = 0x53; break; case 0x24C9: *tgt++ = 0x54; break; case 0x24CA: *tgt++ = 0x55; break; case 0x24CB: *tgt++ = 0x56; break; case 0x24CC: *tgt++ = 0x57; break; case 0x24CD: *tgt++ = 0x58; break; case 0x24CE: *tgt++ = 0x59; break; case 0x24CF: *tgt++ = 0x5A; break; default: *tgt++ = c; break; } /* End of switch */ } /* End of while */ *tgt = L'\0'; } void ConvertStylistic (struct dstr *ptr) { wchar_t c; wchar_t *src; wchar_t *tgt; int ExtraCnt = 0; int CharCnt = 0; int CharsNeeded; wchar_t *new; /*If necessary, increase storage for Hebrew presentation forms */ src = ptr->s; while ((c = *src++) != L'\0'){ CharCnt++; if((c >= 0xFB1D) && (c <= 0xFB4F)) { ExtraCnt++; } } if(ExtraCnt) { CharsNeeded = CharCnt + ExtraCnt; if(CharsNeeded > ptr->c) { new = (wchar_t *) malloc((CharsNeeded +1) * sizeof(wchar_t)); if(new == NULL){ fprintf(stderr,"Out of memory.\n"); exit(OUTOFMEMORY); } ptr->l = ptr->c = CharsNeeded; } src = ptr->s; tgt = new; } else {tgt = src = ptr->s;} while ((c = *src) != L'\0'){ src++; switch (c) { case 0xFE57: case 0xFF01: /* Exclamation mark */ *tgt++ = 0x21; break; case 0xFF02: /* Quotation mark */ *tgt++ = 0x22; break; case 0xFE5F: case 0xFF03: /* Number sign */ *tgt++ = 0x23; break; case 0xFE69: case 0xFF04: /* Dollar sign */ *tgt++ = 0x24; break; case 0xFE6A: case 0xFF05: /* Percent sign */ *tgt++ = 0x25; break; case 0xFE60: case 0xFF06: /* Ampersand */ *tgt++ = 0x26; break; case 0xFF07: /* Apostrophe */ *tgt++ = 0x27; break; case 0x207D: case 0x208D: case 0xFE59: case 0xFF08: /* Left parenthesis */ *tgt++ = 0x28; break; case 0x207E: case 0x208E: case 0xFE5A: case 0xFF09: /* Right parenthesis */ *tgt++ = 0x29; break; case 0xFE61: case 0xFF0A: /* Asterisk */ *tgt++ = 0x2A; break; case 0x207A: case 0x208A: case 0xFE62: case 0xFF0B: /* Plus sign */ *tgt++ = 0x2B; break; case 0xFE50: case 0xFF0C: /* Comma */ *tgt++ = 0x2C; break; case 0x207B: case 0x208B: case 0xFE63: case 0xFF0D: /* Hyphen */ *tgt++ = 0x2D; break; case 0xFE52: case 0xFF0E: /* Full stop */ *tgt++ = 0x2E; break; case 0xFF0F: /* Solidus */ *tgt++ = 0x2F; break; case 0x2070: case 0x2080: case 0xFF10: /* Digit zero */ *tgt++ = 0x30; break; case 0x00B9: case 0x2081: case 0xFF11: *tgt++ = 0x31; break; case 0x00B2: case 0x2082: case 0xFF12: *tgt++ = 0x32; break; case 0x00B3: case 0x2083: case 0xFF13: *tgt++ = 0x33; break; case 0x2074: case 0x2084: case 0xFF14: *tgt++ = 0x34; break; case 0x2075: case 0x2085: case 0xFF15: *tgt++ = 0x35; break; case 0x2076: case 0x2086: case 0xFF16: *tgt++ = 0x36; break; case 0x2077: case 0x2087: case 0xFF17: *tgt++ = 0x37; break; case 0x2078: case 0x2088: case 0xFF18: *tgt++ = 0x38; break; case 0x2079: case 0x2089: case 0xFF19: /* Digit nine */ *tgt++ = 0x39; break; case 0xFE55: case 0xFF1A: /* Colon */ *tgt++ = 0x3A; break; case 0xFE54: case 0xFF1B: /* Semicolon */ *tgt++ = 0x3B; break; case 0xFE64: case 0xFF1C: /* Less than sign */ *tgt++ = 0x3C; break; case 0x207C: case 0x208C: case 0xFE66: case 0xFF1D: *tgt++ = 0x3D; /* Equals sign */ break; case 0xFE65: case 0xFF1E: /* Greater than sign */ *tgt++ = 0x3E; break; case 0xFE56: case 0xFF1F: /* Question mark */ *tgt++ = 0x3F; break; case 0xFE6B: case 0xFF20: /* At sign */ *tgt++ = 0x40; break; case 0x0041: /* A */ case 0xFF21: case 0x1D400: case 0x1D434: case 0x1D468: case 0x1D49C: case 0x1D4D0: case 0x1D504: case 0x1D538: case 0x1D56C: case 0x1D5A0: case 0x1D5D4: case 0x1D63C: case 0x1D670: *tgt++ = 0x41; break; case 0x0042: /* B */ case 0x212C: case 0xFF22: case 0x1D401: case 0x1D435: case 0x1D469: case 0x1D4D1: case 0x1D505: case 0x1D539: case 0x1D56D: case 0x1D5A1: case 0x1D5D5: case 0x1D609: case 0x1D63D: case 0x1D671: *tgt++ = 0x42; break; case 0x2102: case 0x212D: case 0xFF23: case 0x1D402: case 0x1D436: case 0x1D46A: case 0x1D49E: case 0x1D4D2: case 0x1D56E: case 0x1D5A2: case 0x1D5D6: case 0x1D60A: case 0x1D63E: case 0x1D672: *tgt++ = 0x43; /* C */ break; case 0x2145: case 0xFF24: case 0x1D403: case 0x1D437: case 0x1D46B: case 0x1D49F: case 0x1D4D3: case 0x1D507: case 0x1D53B: case 0x1D56F: case 0x1D5A3: case 0x1D5D7: case 0x1D60B: case 0x1D63F: case 0x1D673: *tgt++ = 0x44; /* D */ break; case 0x0045: /* E*/ case 0x2130: case 0xFF25: case 0x1D404: case 0x1D438: case 0x1D46C: case 0x1D4D4: case 0x1D508: case 0x1D53C: case 0x1D570: case 0x1D5A4: case 0x1D5D8: case 0x1D60C: case 0x1D640: case 0x1D674: *tgt++ = 0x45; break; case 0x2131: case 0x213F: case 0xFF26: case 0x1D405: case 0x1D439: case 0x1D46D: case 0x1D4D5: case 0x1D509: case 0x1D53D: case 0x1D571: case 0x1D5A5: case 0x1D5D9: case 0x1D60D: case 0x1D641: case 0x1D675: *tgt++ = 0x46; /* F */ break; case 0x0262: case 0xFF27: case 0x1D406: case 0x1D43A: case 0x1D46E: case 0x1D4A2: case 0x1D4D6: case 0x1D50A: case 0x1D53E: case 0x1D572: case 0x1D5A6: case 0x1D5DA: case 0x1D60E: case 0x1D642: case 0x1D676: *tgt++ = 0x47; /* G */ break; case 0x029C: case 0x210B: case 0x210C: case 0x210D: case 0xFF28: case 0x1D407: case 0x1D43B: case 0x1D46F: case 0x1D4D7: case 0x1D573: case 0x1D5A7: case 0x1D5DB: case 0x1D60F: case 0x1D643: case 0x1D677: *tgt++ = 0x48; /* H */ break; case 0x0049: case 0x2110: case 0x2111: case 0x2160: case 0xFF29: case 0x1D408: case 0x1D43C: case 0x1D470: case 0x1D4D8: case 0x1D540: case 0x1D574: case 0x1D5A8: case 0x1D5DC: case 0x1D610: case 0x1D644: case 0x1D678: *tgt++ = 0x49; /* I */ break; case 0x026A: case 0xFF2A: case 0x1D409: case 0x1D43D: case 0x1D471: case 0x1D4D9: case 0x1D541: case 0x1D575: case 0x1D5A9: case 0x1D5DD: case 0x1D611: case 0x1D645: case 0x1D679: *tgt++ = 0x4A; /* J */ break; case 0xFF2B: case 0x1D40A: case 0x1D43E: case 0x1D472: case 0x1D4A5: case 0x1D4DA: case 0x1D50D: case 0x1D542: case 0x1D576: case 0x1D5AA: case 0x1D5DE: case 0x1D612: case 0x1D646: case 0x1D67A: *tgt++ = 0x4B; /* K */ break; case 0xFF2C: case 0x1D40B: case 0x1D43F: case 0x1D473: case 0x1D4A6: case 0x1D4DB: case 0x1D50E: case 0x1D543: case 0x1D577: case 0x1D5AB: case 0x1D5DF: case 0x1D613: case 0x1D647: case 0x1D67B: *tgt++ = 0x4C; /* L */ break; case 0x029F: case 0xFF2D: case 0x2112: case 0x1D40C: case 0x1D440: case 0x1D474: case 0x1D4DC: case 0x1D50F: case 0x1D544: case 0x1D578: case 0x1D5AC: case 0x1D5E0: case 0x1D614: case 0x1D648: case 0x1D67C: *tgt++ = 0x4D; /* M */ break; case 0x2133: case 0xFF2E: case 0x1D40D: case 0x1D441: case 0x1D475: case 0x1D4A9: case 0x1D4DD: case 0x1D511: case 0x1D579: case 0x1D5AD: case 0x1D5E1: case 0x1D615: case 0x1D649: case 0x1D67D: *tgt++ = 0x4E; /* N */ break; case 0x004F: case 0x2205: case 0xFF2F: case 0x1D40E: case 0x1D442: case 0x1D476: case 0x1D4AA: case 0x1D4DE: case 0x1D512: case 0x1D546: case 0x1D57A: case 0x1D5AE: case 0x1D5E2: case 0x1D616: case 0x1D64A: case 0x1D67E: *tgt++ = 0x4F; /* O */ break; case 0x2118: case 0x2119: case 0xFF30: case 0x1D40F: case 0x1D443: case 0x1D477: case 0x1D4AB: case 0x1D4DF: case 0x1D513: case 0x1D57B: case 0x1D5AF: case 0x1D5E3: case 0x1D617: case 0x1D64B: case 0x1D67F: *tgt++ = 0x50; /* P */ break; case 0x211A: case 0xFF31: case 0x1D410: case 0x1D444: case 0x1D478: case 0x1D4AC: case 0x1D4E0: case 0x1D514: case 0x1D57C: case 0x1D5B0: case 0x1D5E4: case 0x1D618: case 0x1D64C: case 0x1D680: *tgt++ = 0x51; /* Q */ break; case 0x0280: case 0x211B: case 0x211C: case 0x211D: case 0xFF32: case 0x1D411: case 0x1D445: case 0x1D479: case 0x1D4E1: case 0x1D57D: case 0x1D5B1: case 0x1D5E5: case 0x1D619: case 0x1D64D: case 0x1D681: *tgt++ = 0x52; /* R */ break; case 0xFF33: case 0x1D412: case 0x1D446: case 0x1D47A: case 0x1D4AE: case 0x1D4E2: case 0x1D516: case 0x1D54A: case 0x1D57E: case 0x1D5B2: case 0x1D5E6: case 0x1D61A: case 0x1D64E: case 0x1D682: *tgt++ = 0x53; /* S */ break; case 0xFF34: case 0x1D413: case 0x1D447: case 0x1D47B: case 0x1D4AF: case 0x1D4E3: case 0x1D517: case 0x1D54B: case 0x1D57F: case 0x1D5B3: case 0x1D5E7: case 0x1D61B: case 0x1D64F: case 0x1D683: *tgt++ = 0x54; /* T */ break; case 0x0055: case 0xFF35: case 0x1D414: case 0x1D448: case 0x1D47C: case 0x1D4B0: case 0x1D4E4: case 0x1D518: case 0x1D54C: case 0x1D580: case 0x1D5B4: case 0x1D5E8: case 0x1D61C: case 0x1D650: case 0x1D684: *tgt++ = 0x55; /* U */ break; case 0xFF36: case 0x1D415: case 0x1D449: case 0x1D47D: case 0x1D4B1: case 0x1D4E5: case 0x1D519: case 0x1D54D: case 0x1D581: case 0x1D5B5: case 0x1D5E9: case 0x1D61D: case 0x1D651: case 0x1D685: *tgt++ = 0x56; /* V */ break; case 0xFF37: case 0x1D416: case 0x1D44A: case 0x1D47E: case 0x1D4B2: case 0x1D4E6: case 0x1D51A: case 0x1D54E: case 0x1D582: case 0x1D5B6: case 0x1D5EA: case 0x1D61E: case 0x1D652: case 0x1D686: *tgt++ = 0x57; /* W */ break; case 0xFF38: case 0x1D417: case 0x1D44B: case 0x1D47F: case 0x1D4B3: case 0x1D4E7: case 0x1D51B: case 0x1D54F: case 0x1D583: case 0x1D5B7: case 0x1D5EB: case 0x1D61F: case 0x1D653: case 0x1D687: *tgt++ = 0x58; /* X */ break; case 0x0059: case 0x2144: case 0xFF39: case 0x1D418: case 0x1D44C: case 0x1D480: case 0x1D4B4: case 0x1D4E8: case 0x1D51C: case 0x1D550: case 0x1D584: case 0x1D5B8: case 0x1D5EC: case 0x1D620: case 0x1D654: case 0x1D688: *tgt++ = 0x59; /* Y */ break; case 0x29F5: case 0x29F9: case 0xFE68: *tgt++ = 0x5C; /* Backslash */ break; case 0x1D00: case 0x2124: case 0x2128: case 0xFF3A: case 0x1D419: case 0x1D44D: case 0x1D656: case 0x1D68A: *tgt++ = 0x61; /* a */ break; case 0xFF42: /* b */ case 0x1D41B: case 0x1D44F: case 0x1D483: case 0x1D4B7: case 0x1D4EB: case 0x1D51F: case 0x1D553: case 0x1D587: case 0x1D5BB: case 0x1D5EF: case 0x1D623: case 0x1D657: case 0x1D68B: *tgt++ = 0x62; break; case 0x0063: /* c */ case 0x1D04: case 0xFF43: case 0x1D41C: case 0x1D450: case 0x1D484: case 0x1D4B8: case 0x1D4EC: case 0x1D520: case 0x1D554: case 0x1D588: case 0x1D5BC: case 0x1D5F0: case 0x1D624: case 0x1D658: case 0x1D68C: *tgt++ = 0x63; break; case 0x0064: /* d */ case 0x1D05: case 0x2146: case 0xFF44: case 0x1D41D: case 0x1D451: case 0x1D485: case 0x1D4B9: case 0x1D4ED: case 0x1D521: case 0x1D555: case 0x1D589: case 0x1D5BD: case 0x1D5F1: case 0x1D625: case 0x1D659: case 0x1D68D: *tgt++ = 0x64; break; case 0x1D07: case 0x212F: case 0x2147: case 0xFF45: case 0x1D41E: case 0x1D452: case 0x1D486: case 0x1D4EE: case 0x1D522: case 0x1D556: case 0x1D5BE: case 0x1D5F2: case 0x1D626: case 0x1D65A: case 0x1D68E: *tgt++ = 0x65; /* e */ break; case 0xFF46: case 0x1D41F: case 0x1D453: case 0x1D487: case 0x1D4BB: case 0x1D4EF: case 0x1D523: case 0x1D557: case 0x1D58B: case 0x1D5BF: case 0x1D5F3: case 0x1D627: case 0x1D65B: case 0x1D68F: *tgt++ = 0x66; break; case 0x0067: /* g */ case 0xFF47: case 0x210A: case 0x1D420: case 0x1D454: case 0x1D488: case 0x1D4F0: case 0x1D524: case 0x1D558: case 0x1D58C: case 0x1D5C0: case 0x1D5F4: case 0x1D628: case 0x1D65C: case 0x1D690: *tgt++ = 0x67; break; case 0x0068: /* h */ case 0xFF48: case 0x1D421: case 0x1D489: case 0x1D4BD: case 0x1D4F1: case 0x1D525: case 0x1D559: case 0x1D58D: case 0x1D5C1: case 0x1D5F5: case 0x1D629: case 0x1D65D: case 0x1D691: *tgt++ = 0x68; break; case 0x0069: /* i */ case 0xFF49: case 0x2148: case 0x1D422: case 0x1D456: case 0x1D48A: case 0x1D4BE: case 0x1D4F2: case 0x1D526: case 0x1D55A: case 0x1D58E: case 0x1D5C2: case 0x1D5F6: case 0x1D62A: case 0x1D65E: case 0x1D692: *tgt++ = 0x69; break; case 0x006A: /* j */ case 0x1D0A: case 0x2149: case 0xFF4A: case 0x1D423: case 0x1D457: case 0x1D48B: case 0x1D4BF: case 0x1D4F3: case 0x1D527: case 0x1D55B: case 0x1D58F: case 0x1D5C3: case 0x1D5F7: case 0x1D62B: case 0x1D65F: case 0x1D693: *tgt++ = 0x6A; break; case 0x006B: /* k */ case 0x1D0B: case 0xFF4B: case 0x1D424: case 0x1D458: case 0x1D48C: case 0x1D4C0: case 0x1D4F4: case 0x1D528: case 0x1D55C: case 0x1D590: case 0x1D5C4: case 0x1D5F8: case 0x1D62C: case 0x1D660: case 0x1D694: *tgt++ = 0x6B; break; case 0x006C: /* l */ case 0x2113: case 0xFF4C: case 0x1D425: case 0x1D459: case 0x1D48D: case 0x1D4C1: case 0x1D4F5: case 0x1D529: case 0x1D55D: case 0x1D591: case 0x1D5C5: case 0x1D5F9: case 0x1D62D: case 0x1D661: case 0x1D695: *tgt++ = 0x6C; break; case 0x006D: /* m */ case 0x1D0D: case 0xFF4D: case 0x1D426: case 0x1D45A: case 0x1D48E: case 0x1D4C2: case 0x1D52A: case 0x1D55E: case 0x1D592: case 0x1D5C6: case 0x1D5FA: case 0x1D62E: case 0x1D662: case 0x1D696: *tgt++ = 0x6D; break; case 0x207F: case 0xFF4E: case 0x1D427: case 0x1D45B: case 0x1D48F: case 0x1D4C3: case 0x1D4F7: case 0x1D52B: case 0x1D55F: case 0x1D593: case 0x1D5C7: case 0x1D5FB: case 0x1D62F: case 0x1D663: case 0x1D697: *tgt++ = 0x6E; /* n */ break; case 0x006F: /* o */ case 0x1D0F: case 0x2134: case 0xFF4F: case 0x1D428: case 0x1D45C: case 0x1D490: case 0x1D4F8: case 0x1D52C: case 0x1D560: case 0x1D594: case 0x1D5C8: case 0x1D5FC: case 0x1D630: case 0x1D664: case 0x1D698: *tgt++ = 0x6F; break; case 0x0070: /* p */ case 0x1D18: case 0xFF50: case 0x213C: case 0x1D429: case 0x1D45D: case 0x1D491: case 0x1D4C5: case 0x1D4F9: case 0x1D52D: case 0x1D561: case 0x1D595: case 0x1D5C9: case 0x1D5FD: case 0x1D631: case 0x1D665: case 0x1D699: *tgt++ = 0x70; break; case 0x0071: /* q */ case 0xFF51: case 0x1D42A: case 0x1D45E: case 0x1D492: case 0x1D4C6: case 0x1D4FA: case 0x1D52E: case 0x1D562: case 0x1D596: case 0x1D5CA: case 0x1D5FE: case 0x1D632: case 0x1D666: case 0x1D69A: *tgt++ = 0x71; break; case 0x0072: /* r */ case 0xFF52: case 0x1D42B: case 0x1D45F: case 0x1D493: case 0x1D4C7: case 0x1D4FB: case 0x1D52F: case 0x1D563: case 0x1D597: case 0x1D5CB: case 0x1D5FF: case 0x1D633: case 0x1D667: case 0x1D69B: *tgt++ = 0x72; break; case 0x0073: /* s */ case 0xFF53: case 0x1D42C: case 0x1D460: case 0x1D494: case 0x1D4C8: case 0x1D4FC: case 0x1D530: case 0x1D564: case 0x1D598: case 0x1D5CC: case 0x1D600: case 0x1D634: case 0x1D668: case 0x1D69C: *tgt++ = 0x73; break; case 0x0074: /* t */ case 0x1D1B: case 0xFF54: case 0x1D42D: case 0x1D461: case 0x1D495: case 0x1D4C9: case 0x1D4FD: case 0x1D531: case 0x1D565: case 0x1D599: case 0x1D5CD: case 0x1D601: case 0x1D635: case 0x1D669: case 0x1D69D: *tgt++ = 0x74; break; case 0x0075: /* u */ case 0x1D1C: case 0xFF55: case 0x1D42E: case 0x1D462: case 0x1D496: case 0x1D4CA: case 0x1D4FE: case 0x1D532: case 0x1D566: case 0x1D59A: case 0x1D5CE: case 0x1D602: case 0x1D636: case 0x1D66A: case 0x1D69E: *tgt++ = 0x75; break; case 0x0076: /* v */ case 0x1D20: case 0xFF56: case 0x1D42F: case 0x1D463: case 0x1D497: case 0x1D4CB: case 0x1D4FF: case 0x1D533: case 0x1D567: case 0x1D59B: case 0x1D5CF: case 0x1D603: case 0x1D637: case 0x1D66B: case 0x1D69F: *tgt++ = 0x76; break; case 0x0077: /* w */ case 0x1D21: case 0x24B2: case 0x24E6: case 0xFF57: case 0x1D430: case 0x1D464: case 0x1D498: case 0x1D4CC: case 0x1D500: case 0x1D534: case 0x1D568: case 0x1D59C: case 0x1D5D0: case 0x1D604: case 0x1D638: case 0x1D66C: case 0x1D6A0: *tgt++ = 0x77; break; case 0x0078: /* x */ case 0xFF58: case 0x1D431: case 0x1D465: case 0x1D499: case 0x1D4CD: case 0x1D501: case 0x1D535: case 0x1D569: case 0x1D59D: case 0x1D5D1: case 0x1D605: case 0x1D639: case 0x1D66D: case 0x1D6A1: *tgt++ = 0x78; break; case 0xFF59: case 0x1D432: case 0x1D466: case 0x1D49A: case 0x1D4CE: case 0x1D502: case 0x1D536: case 0x1D56A: case 0x1D59E: case 0x1D5D2: case 0x1D606: case 0x1D63A: case 0x1D66E: case 0x1D6A2: *tgt++ = 0x79; /* y */ break; case 0x007A: /* z */ case 0x1D22: case 0xFF5A: case 0x1D433: case 0x1D467: case 0x1D49B: case 0x1D4CF: case 0x1D503: case 0x1D537: case 0x1D56B: case 0x1D59F: case 0x1D5D3: case 0x1D607: case 0x1D63B: case 0x1D66F: case 0x1D6A3: *tgt++ = 0x7A; break; case 0xFE5B: case 0xFF5B: /* left curly bracket */ *tgt++ = 0x7B; break; case 0xFF5C: /* pipe */ *tgt++ = 0x7C; break; case 0xFE5C: case 0xFF5D: /* right curly bracket */ *tgt++ = 0x7D; break; case 0xFF5E: /* tilde */ *tgt++ = 0x7E; break; /* Hebrew presentation forms */ case 0xFB1D: break; *tgt++ = 0x05D9; *tgt++ = 0x05B4; case 0xFB1F: *tgt++ = 0x05F2; *tgt++ = 0x05B7; case 0xFB2A: *tgt++ = 0x05E9; *tgt++ = 0x05C1; case 0xFB2B: *tgt++ = 0x05E9; *tgt++ = 0x05C2; case 0xFB2C: *tgt++ = 0xFB49; *tgt++ = 0x05C1; case 0xFB2D: *tgt++ = 0xFB49; *tgt++ = 0x05C2; case 0xFB2E: *tgt++ = 0x05D0; *tgt++ = 0x05B7; case 0xFB2F: *tgt++ = 0x05D0; *tgt++ = 0x05B8; case 0xFB30: *tgt++ = 0x05D0; *tgt++ = 0x05BC; case 0xFB31: *tgt++ = 0x05D1; *tgt++ = 0x05BC; case 0xFB32: *tgt++ = 0x05D2; *tgt++ = 0x05BC; case 0xFB33: *tgt++ = 0x05D3; *tgt++ = 0x05BC; case 0xFB34: *tgt++ = 0x05D4; *tgt++ = 0x05BC; case 0xFB35: *tgt++ = 0x05D5; *tgt++ = 0x05BC; case 0xFB36: *tgt++ = 0x05D6; *tgt++ = 0x05BC; case 0xFB38: *tgt++ = 0x05D8; *tgt++ = 0x05BC; case 0xFB39: *tgt++ = 0x05D9; *tgt++ = 0x05BC; case 0xFB3A: *tgt++ = 0x05DA; *tgt++ = 0x05BC; case 0xFB3B: *tgt++ = 0x05DB; *tgt++ = 0x05BC; case 0xFB3C: *tgt++ = 0x05DC; *tgt++ = 0x05BC; case 0xFB3E: *tgt++ = 0x05DE; *tgt++ = 0x05BC; case 0xFB40: *tgt++ = 0x05E0; *tgt++ = 0x05BC; case 0xFB41: *tgt++ = 0x05E1; *tgt++ = 0x05BC; case 0xFB43: *tgt++ = 0x05E3; *tgt++ = 0x05BC; case 0xFB44: *tgt++ = 0x05E4; *tgt++ = 0x05BC; case 0xFB46: *tgt++ = 0x05E6; *tgt++ = 0x05BC; case 0xFB47: *tgt++ = 0x05E7; *tgt++ = 0x05BC; case 0xFB48: *tgt++ = 0x05E8; *tgt++ = 0x05BC; case 0xFB49: *tgt++ = 0x05E9; *tgt++ = 0x05BC; case 0xFB4A: *tgt++ = 0x05EA; *tgt++ = 0x05BC; case 0xFB4B: *tgt++ = 0x05D5; *tgt++ = 0x05B9; case 0xFB4C: *tgt++ = 0x05D1; *tgt++ = 0x05BF; case 0xFB4D: *tgt++ = 0x05DB; *tgt++ = 0x05BF; case 0xFB4E: *tgt++ = 0x05E4; *tgt++ = 0x05BF; case 0xFB4F: *tgt++ = 0x05D0; *tgt++ = 0x05DC; case 0xFB1E: *tgt++ = 0x05BF; case 0xFB20: *tgt++ = 0x05E2; case 0xFB21: *tgt++ = 0x05D0; case 0xFB22: *tgt++ = 0x05D3; case 0xFB23: *tgt++ = 0x05D4; case 0xFB24: *tgt++ = 0x05DB; case 0xFB25: *tgt++ = 0x05DC; case 0xFB26: *tgt++ = 0x05DD; case 0xFB27: *tgt++ = 0x05E8; case 0xFB28: *tgt++ = 0x05EA; case 0xFB29: *tgt++ = 0x002B; /* Arabic presentation forms */ case 0xFE81: case 0xFE82: *tgt++ = 0x0622; break; case 0xFE8D: case 0xFE8E: *tgt++ = 0x0627; break; case 0xFE8F: case 0xFE91: case 0xFE92: case 0xFE90: *tgt++ = 0x0628; break; case 0xFB56: case 0xFB58: case 0xFB59: case 0xFB57: *tgt++ = 0x067E; break; case 0xFE95: case 0xFE97: case 0xFE98: case 0xFE96: *tgt++ = 0x062A; break; case 0xFB66: case 0xFB68: case 0xFB69: case 0xFB67: *tgt++ = 0x0679; break; case 0xFE99: case 0xFE9B: case 0xFE9C: case 0xFE9A: *tgt++ = 0x062B; break; case 0xFE9D: case 0xFE9F: case 0xFEA0: case 0xFE9E: *tgt++ = 0x062C; break; case 0xFB7A: case 0xFB7C: case 0xFB7D: case 0xFB7B: *tgt++ = 0x0686; break; case 0xFEA1: case 0xFEA3: case 0xFEA4: case 0xFEA2: *tgt++ = 0x062D; break; case 0xFEA5: case 0xFEA7: case 0xFEA8: case 0xFEA6: *tgt++ = 0x062E; break; case 0xFEA9: case 0xFEAA: *tgt++ = 0x062F; break; case 0xFB88: case 0xFB89: *tgt++ = 0x0688; break; case 0xFEAB: case 0xFEAC: *tgt++ = 0x0630; break; case 0xFEAD: case 0xFEAE: case 0xFB8C: case 0xFB8D: *tgt++ = 0x0691; break; case 0xFB8A: case 0xFB8B: *tgt++ = 0x0698; break; case 0xFEAF: case 0xFEB0: *tgt++ = 0x0632; break; case 0xFEB1: case 0xFEB3: case 0xFEB4: case 0xFEB2: *tgt++ = 0x0633; break; case 0xFEB5: case 0xFEB7: case 0xFEB8: case 0xFEB6: *tgt++ = 0x0634; break; case 0xFEB9: case 0xFEBB: case 0xFEBC: case 0xFEBA: *tgt++ = 0x0635; break; case 0xFEBD: case 0xFEBF: case 0xFEC0: case 0xFEBE: *tgt++ = 0x0636; break; case 0xFEC1: case 0xFEC3: case 0xFEC4: case 0xFEC2: *tgt++ = 0x0637; break; case 0xFEC5: case 0xFEC7: case 0xFEC8: case 0xFEC6: *tgt++ = 0x0638; break; case 0xFEC9: case 0xFECB: case 0xFECC: case 0xFECA: *tgt++ = 0x0639; case 0xFECD: case 0xFECF: case 0xFED0: case 0xFECE: *tgt++ = 0x063A; break; case 0xFED1: case 0xFED3: case 0xFED4: case 0xFED2: *tgt++ = 0x0641; break; case 0xFED9: case 0xFEDB: case 0xFEDC: case 0xFEDA: *tgt++ = 0x0643; break; case 0xFB8E: case 0xFB90: case 0xFB91: case 0xFB8F: *tgt++ = 0x06A9; break; case 0xFED5: case 0xFED7: case 0xFED8: case 0xFED6: *tgt++ = 0x0642; break; case 0xFB92: case 0xFB94: case 0xFB95: case 0xFB93: *tgt++ = 0x06AF; break; case 0xFEDD: case 0xFEDE: case 0xFEDF: case 0xFEE0: *tgt++ = 0x0644; break; case 0xFEE1: case 0xFEE3: case 0xFEE4: case 0xFEE2: *tgt++ = 0x0645; break; case 0xFEE5: case 0xFEE7: case 0xFEE8: case 0xFEE6: *tgt++ = 0x0646; break; case 0xFB9E: case 0xFB9F: *tgt++ = 0x06BA; break; case 0xFEED: case 0xFEEE: *tgt++ = 0x0648; break; case 0xFE85: case 0xFE86: *tgt++ = 0x0624; break; case 0xFE80: *tgt++ = 0x0621; break; case 0xFBA6: case 0xFBA8: case 0xFBA9: case 0xFBA7: *tgt++ = 0x06C1; break; case 0xFEE9: case 0xFEEB: case 0xFEEC: case 0xFEEA: *tgt++ = 0x0647; break; case 0xFBAA: case 0xFBAC: case 0xFBAD: case 0xFBAB: *tgt++ = 0x06BE; break; case 0xFE93: case 0xFE94: *tgt++ = 0x0629; break; case 0xFBA4: case 0xFBA5: *tgt++ = 0x06C0; break; case 0xFBFC: case 0xFBFE: case 0xFBFF: case 0xFBFD: *tgt++ = 0x06CC; break; case 0xFEEF: case 0xFEF0: *tgt++ = 0x0649; break; case 0xFEF1: case 0xFEF3: case 0xFEF4: case 0xFEF2: *tgt++ = 0x064A; break; case 0xFBAE: case 0xFBAF: *tgt++ = 0x06D2; break; case 0xFBB0: case 0xFBB1: *tgt++ = 0x06D3; break; case 0xFE89: case 0xFE8B: case 0xFE8C: case 0xFE8A: *tgt++ = 0x0626; break; case 0xFE83: case 0xFE84: *tgt++ = 0x0623; break; case 0xFE87: case 0xFE88: *tgt++ = 0x0625; break; case 0xFD7A: case 0xFD7B: break; case 0xFE74: *tgt++ = 0x064D; break; case 0xFE7C: case 0xFE7D: *tgt++ = 0x0651; break; case 0xFE72: *tgt++ = 0x064C; break; case 0xFE76: case 0xFE77: *tgt++ = 0x064E; break; case 0xFE7E: case 0xFE7F: *tgt++ = 0x0652; break; case 0xFE70: *tgt++ = 0x064B; case 0xFDF7: *tgt++ = 0x0611; break; /* Halfwidth CJK punctuation */ case 0xFF61: *tgt++ = 0x3002; break; case 0xFF62: *tgt++ = 0x300C; break; case 0xFF63: *tgt++ = 0x300D; break; case 0xFF64: *tgt++ = 0x3001; break; /* Halfwidth kana */ case 0xFF65: *tgt++ = 0x30FB; break; case 0xFF66: *tgt++ = 0x30F2; break; case 0xFF67: *tgt++ = 0x30A1; break; case 0xFF68: *tgt++ = 0x30A3; break; case 0xFF69: *tgt++ = 0x30A5; break; case 0xFF6A: *tgt++ = 0x30A7; break; case 0xFF6B: *tgt++ = 0x30A9; break; case 0xFF6C: *tgt++ = 0x30E3; break; case 0xFF6D: *tgt++ = 0x30E5; break; case 0xFF6E: *tgt++ = 0x30E7; break; case 0xFF6F: *tgt++ = 0x30C3; break; case 0xFF70: *tgt++ = 0x30FC; break; case 0xFF71: *tgt++ = 0x30A2; break; case 0xFF72: *tgt++ = 0x30A4; break; case 0xFF73: *tgt++ = 0x30A6; break; case 0xFF74: *tgt++ = 0x30A8; break; case 0xFF75: *tgt++ = 0x30AA; break; case 0xFF76: *tgt++ = 0x30AB; break; case 0xFF77: *tgt++ = 0x30AD; break; case 0xFF78: *tgt++ = 0x30AF; break; case 0xFF79: *tgt++ = 0x30B1; break; case 0xFF7A: *tgt++ = 0x30B3; break; case 0xFF7B: *tgt++ = 0x30B5; break; case 0xFF7C: *tgt++ = 0x30B7; break; case 0xFF7D: *tgt++ = 0x30B9; break; case 0xFF7E: *tgt++ = 0x30BB; break; case 0xFF7F: *tgt++ = 0x30BD; break; case 0xFF80: *tgt++ = 0x30BF; break; case 0xFF81: *tgt++ = 0x30C1; break; case 0xFF82: *tgt++ = 0x30C4; break; case 0xFF83: *tgt++ = 0x30C6; break; case 0xFF84: *tgt++ = 0x30C8; break; case 0xFF85: *tgt++ = 0x30CA; break; case 0xFF86: *tgt++ = 0x30CB; break; case 0xFF87: *tgt++ = 0x30CC; break; case 0xFF88: *tgt++ = 0x30CD; break; case 0xFF89: *tgt++ = 0x30CE; break; case 0xFF8A: *tgt++ = 0x30CF; break; case 0xFF8B: *tgt++ = 0x30D2; break; case 0xFF8C: *tgt++ = 0x30D5; break; case 0xFF8D: *tgt++ = 0x30D8; break; case 0xFF8E: *tgt++ = 0x30DB; break; case 0xFF8F: *tgt++ = 0x30DE; break; case 0xFF90: *tgt++ = 0x30DF; break; case 0xFF91: *tgt++ = 0x30E0; break; case 0xFF92: *tgt++ = 0x30E1; break; case 0xFF93: *tgt++ = 0x30E2; break; case 0xFF94: *tgt++ = 0x30E4; break; case 0xFF95: *tgt++ = 0x30E6; break; case 0xFF96: *tgt++ = 0x30E8; break; case 0xFF97: *tgt++ = 0x30E9; break; case 0xFF98: *tgt++ = 0x30EA; break; case 0xFF99: *tgt++ = 0x30EB; break; case 0xFF9A: *tgt++ = 0x30EC; break; case 0xFF9B: *tgt++ = 0x30ED; break; case 0xFF9C: *tgt++ = 0x30EF; break; case 0xFF9D: *tgt++ = 0x30F3; break; case 0xFF9E: *tgt++ = 0x3099; break; case 0xFF9F: *tgt++ = 0x309A; break; /* Halfwidth hangul */ case 0xFFA0: *tgt++ = 0x3164; break; case 0xFFA1: *tgt++ = 0x3131; break; case 0xFFA2: *tgt++ = 0x3132; break; case 0xFFA3: *tgt++ = 0x3133; break; case 0xFFA4: *tgt++ = 0x3134; break; case 0xFFA5: *tgt++ = 0x3135; break; case 0xFFA6: *tgt++ = 0x3136; break; case 0xFFA7: *tgt++ = 0x3137; break; case 0xFFA8: *tgt++ = 0x3138; break; case 0xFFA9: *tgt++ = 0x3139; break; case 0xFFAA: *tgt++ = 0x313A; break; case 0xFFAB: *tgt++ = 0x313B; break; case 0xFFAC: *tgt++ = 0x313C; break; case 0xFFAD: *tgt++ = 0x313D; break; case 0xFFAE: *tgt++ = 0x313E; break; case 0xFFAF: *tgt++ = 0x313F; break; case 0xFFB0: *tgt++ = 0x3140; break; case 0xFFB1: *tgt++ = 0x3141; break; case 0xFFB2: *tgt++ = 0x3142; break; case 0xFFB3: *tgt++ = 0x3143; break; case 0xFFB4: *tgt++ = 0x3144; break; case 0xFFB5: *tgt++ = 0x3145; break; case 0xFFB6: *tgt++ = 0x3146; break; case 0xFFB7: *tgt++ = 0x3147; break; case 0xFFB8: *tgt++ = 0x3148; break; case 0xFFB9: *tgt++ = 0x3149; break; case 0xFFBA: *tgt++ = 0x314A; break; case 0xFFBB: *tgt++ = 0x314B; break; case 0xFFBC: *tgt++ = 0x314C; break; case 0xFFBD: *tgt++ = 0x314D; break; case 0xFFBE: *tgt++ = 0x314E; break; case 0xFFC2: *tgt++ = 0x314F; break; case 0xFFC3: *tgt++ = 0x3150; break; case 0xFFC4: *tgt++ = 0x3151; break; case 0xFFC5: *tgt++ = 0x3152; break; case 0xFFC6: *tgt++ = 0x3153; break; case 0xFFC7: *tgt++ = 0x3154; break; case 0xFFCA: *tgt++ = 0x3155; break; case 0xFFCB: *tgt++ = 0x3156; break; case 0xFFCC: *tgt++ = 0x3157; break; case 0xFFCD: *tgt++ = 0x3158; break; case 0xFFCE: *tgt++ = 0x3159; break; case 0xFFCF: *tgt++ = 0x315A; break; case 0xFFD2: *tgt++ = 0x315B; break; case 0xFFD3: *tgt++ = 0x315C; break; case 0xFFD4: *tgt++ = 0x315D; break; case 0xFFD5: *tgt++ = 0x315E; break; case 0xFFD6: *tgt++ = 0x315F; break; case 0xFFD7: *tgt++ = 0x3160; break; case 0xFFDA: *tgt++ = 0x3161; break; case 0xFFDB: *tgt++ = 0x3162; break; case 0xFFDC: *tgt++ = 0x3163; break; /* Halfwidth (Latin but non-ASCII) symbols */ case 0xFFE0: *tgt++ = 0x00A2; break; case 0xFFE1: *tgt++ = 0x00A3; break; case 0xFFE2: *tgt++ = 0x00AC; break; case 0xFFE3: *tgt++ = 0x00AF; break; case 0xFFE4: *tgt++ = 0x00A6; break; case 0xFFE5: *tgt++ = 0x00A5; break; case 0xFFE6: *tgt++ = 0x20A9; break; case 0xFFE8: *tgt++ = 0x2502; break; case 0xFFE9: *tgt++ = 0x2190; break; case 0xFFEA: *tgt++ = 0x2191; break; case 0xFFEB: *tgt++ = 0x2192; break; case 0xFFEC: *tgt++ = 0x2193; break; case 0xFFED: *tgt++ = 0x25A0; break; case 0xFFEE: *tgt++ = 0x25CB; break; default: *tgt++ = c; break; } /* End of switch */ } /* End of while */ *tgt = L'\0'; if(ExtraCnt) { ptr->s = new; free ( (void *) ptr->s); } } /* End of ConvertStylistic */ msort-8.53/dstr.c0000644000175100017510000000524211236173741010670 00000000000000/* Time-stamp: <2008-09-26 15:07:55 poser> */ /* * Copyright (C) 1993-2008 William J. Poser. * This program is free software; you can redistribute it and/or modify * it under the terms of version 3 of the GNU General Public License * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software Foundation, * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ #include "config.h" #include "compdefs.h" #include #ifdef HAVE_STDINT_H #include #endif #include #ifdef HAVE_UNINUM_UNICODE_H #include #else #include "unicode.h" #endif #include "exitcode.h" #include "retcodes.h" #define DSTR #include "dstr.h" /* Initialize a dynamic string */ void InitializeDynamicString (struct dstr *s) { s->s = NULL; s->c = s->l = 0; } void FreeDynamicString(struct dstr *d) { if (d) { if (d->s != NULL) free( (void *) (d->s)); free ( (void *) d); } } /* * Create a dynamic wide string and copy into it an existing regular wide string. */ struct dstr *MakeDynamicString(wchar_t *s) { struct dstr *new; int length; new = (struct dstr *) malloc(sizeof(struct dstr)); if(new == NULL) exit(OUTOFMEMORY); length = wcslen(s); new->s = (wchar_t *) malloc((length + 1) * sizeof(wchar_t)); if(new->s == NULL) exit(OUTOFMEMORY); wcscpy(new->s,s); new->c = new->l = length; return(new); } /* * Insert an existing wide string into a dynamic string. * The source is expected to be non-null. */ int FillDynamicString(struct dstr *tgt, wchar_t *src) { int length; length = wcslen(src); #ifdef SAFECALL if(length == 0) return(ERROR); #endif if (length > tgt->c) { if(tgt->s != NULL) free( (void *) tgt->s); tgt->s = (wchar_t *) malloc((length + 1) * sizeof(wchar_t)); if(tgt->s == NULL) return(ERROR); tgt->c = length; } wcscpy(tgt->s,src); tgt->l = length; return(SUCCESS); } /* Append a wide string to a dynamic wide string */ int AppendToDynamicString(struct dstr *tgt, wchar_t *src) { int SrcLength; int NewLength; SrcLength = wcslen(src); NewLength = SrcLength + tgt->l; if (NewLength > tgt->c) { tgt->s = (wchar_t *) realloc(tgt->s,(NewLength + 1) * sizeof(wchar_t)); if(tgt->s == NULL) return(ERROR); tgt->c = NewLength; } wcscpy(tgt->s+tgt->l,src); tgt->l = NewLength; return(SUCCESS); } msort-8.53/info.c0000644000175100017510000004043311236173741010650 00000000000000/* Time-stamp: <2009-02-25 17:40:37 poser> */ /* * Copyright (C) 1993-2008 William J. Poser (billposer@alum.mit.edu). * This program is free software; you can redistribute it and/or modify * it under the terms of version 3 of the GNU General Public License as published by * the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "config.h" #include "compdefs.h" #include #include #ifdef LOCALE_GETTEXT #include #define _(x) gettext(x) #else #define _(x) (x) #endif #include "limits.h" #ifdef HAVE_UNINUM_UNINUM_H #include #include #else #include "unicode.h" #endif #ifdef HAVE_GETOPT_LONG void PrintGeneralFlags(FILE *fp) { fprintf(fp,_("General options:\n")); fprintf(fp,_("\tThe following two options must precede any sort order specifications.\n")); fprintf(fp,_("\t-B,--BMP\t\tNo characters fall outside the BMP.\n")); fprintf(fp,_("\t-p,--reserve-private-use-area\n\t\t\t\tDo not use the Private Use areas.\n")); fputc('\n',fp); fprintf(fp,_("\t-b,--block\t\tA record is terminated by two or more\n\t\t\t\tend-of-line characters.\n")); fprintf(fp,_("\t-l,--line\t\tA record consists of a single line\n")); fprintf(fp,_("\t-r,--record-separator \n\t\t\t\tA record is terminated by separator character\n")); fprintf(fp,_("\t-O,--fixed-size-record-size \n\t\t\t\tA record consists of the specified number of bytes\n")); fputc('\n',fp); fprintf(fp,_("\t-d,--field-separators +\n\t\t\t\tFields are delimited by the named character(s)\n")); fprintf(fp,_("\t-w,--whole-record\tSort on the entire text of the record\n")); fputc('\n',fp); fprintf(fp,_("\t-a,--algorithm \n\t\t\t\tI(nsertionSort)\n")); fprintf(fp,_("\t\t\t\tM(ergeSort) \n")); fprintf(fp,_("\t\t\t\tQ(uickSort) \n")); fprintf(fp,_("\t\t\t\tS(hellSort)\n")); fprintf(fp,_("\t-M,--initial-maximum-records \n\t\t\t\tSet initial maximum number of records \n")); fprintf(fp,_("\t-m,--line-end-carriage-return\n\t\t\t\tEnd of line is marked by Carriage Return (0x0D)\n")); fprintf(fp,_("\t-I,--invert-globally\tInvert sense of comparisons globally\n")); fprintf(fp,_("\t-Q,--check-only\t\tCheck whether input is sorted. Generate no output.\n\t\t\t\tExit status is 0 if input is sorted, 11 if not.\n")); fprintf(fp,_("\t-u,--unicode-normalization \n")); fprintf(fp,_("\t\tc NFC canonical decomposition then composition (default)\n")); fprintf(fp,_("\t\td NFD canonical decomposition\n")); fprintf(fp,_("\t\tC NFKC compatibility decomposition then composition\n")); fprintf(fp,_("\t\tD NFKD compatibility decomposition\n")); fprintf(fp,_("\t\tn no normalization\n")); fprintf(fp,_("\t-P,--random-seed \n")); fprintf(fp,_("\t-Z,--skip-first-record\n")); fprintf(fp,_("\t-1,--in \n")); fprintf(fp,_("\t-2,--out \n")); fprintf(fp,_("\t-j,--suppress-log\tSuppress log output\n")); fprintf(fp,_("\t-q,--quiet\t\tBe quiet - do not chat while working\n")); fputc('\n',fp); } void PrintInformationalFlags(FILE *fp) { fprintf(fp,_("Informational options:\n")); fprintf(fp,_("\t-h,--help\t\tPrint usage message\n")); fprintf(fp,_("\t-v,--version\t\tPrint version message\n")); fprintf(fp,_("\t-D,--defaults\t\tList defaults\n")); fprintf(fp,_("\t-F,--general-options\tList general command line flags\n")); fprintf(fp,_("\t-G,--gnu-equivalences\tList GNU sort equivalences\n")); fprintf(fp,_("\t-H,--informational-options\n\t\t\t\tList informational command line flags\n")); fprintf(fp,_("\t-K,--key-specific-options\n\t\t\t\tList key-specific command line flags\n")); fprintf(fp,_("\t-L,--limits\t\tList limits\n")); #ifdef USE_UNINUM fprintf(fp,_("\t-N,--number-systems\tList the number systems supported\n")); #endif fputc('\n',fp); } void PrintKeySpecificFlags(FILE *fp) { fprintf(fp,_("Key specific options:\n")); fprintf(fp,_("\t-e,--character-range \n\t\t\t\tSort on characters m through n\n")); fprintf(fp,_("\t-n,--position (,)\n\t\t\t\tSort on the position or range of positions\n")); fprintf(fp,_("\t-t,--tag \tSort on the field with the specified tag\n")); fprintf(fp,_("\t-o,--optional \n\t\t\t\tOptional: if absent compare as (<,=,>)\n")); fprintf(fp,_("\t-C,--fold-case\t\tFold case\n")); fprintf(fp,_("\t-z,--fold-case-turkic\tFold case with additional Turkic conversions\n")); fprintf(fp,_("\t-c,--comparison-type \n\t\t\t\tl(exicographic)\n")); fprintf(fp,_("\t\t\t\tN(umeric string)\n")); fprintf(fp,_("\t\t\t\tn(umeric)\n")); fprintf(fp,_("\t\t\t\th(ybrid)\n")); fprintf(fp,_("\t\t\t\ts(ize)\n")); fprintf(fp,_("\t\t\t\ta(ngle) - ddd:mm:ss(.sss) or ddd mm ss(.sss)\n")); fprintf(fp,_("\t\t\t\tD(omain name)\n")); fprintf(fp,_("\t\t\t\td(ate)\n")); fprintf(fp,_("\t\t\t\tm(onth)\n")); fprintf(fp,_("\t\t\t\tt(ime)\n")); fprintf(fp,_("\t\t\t\ti(so8601 date/time)\n")); fprintf(fp,_("\t\t\t\tr(andom)\n")); #ifdef USE_UNINUM fprintf(fp,_("\t-y,--number-system \n")); #endif fprintf(fp,_("\t-f,--date-format \n\t\t\t\tPermutation of y(m)d with separators\n")); fprintf(fp,_("\t-W,--sort-order-file-separators \n\t\t\t\tRead separators for sort order file.\n")); fprintf(fp,_("\t-S,--substitution-file \n\t\t\t\tRead substitutions from named file\n")); #ifdef LOCALE_SORT_ORDER fprintf(fp,_("\t-s,--sort-order\t\n")); #else fprintf(fp,_("\t-s,--sort-order-file \n\t\t\t\tRead the sort order definition from .\n")); #endif fprintf(fp,_("\t-T,--transformations <(d)(e)(s)>\n\t\t\t\tApply the specified transformations\n")); fprintf(fp,_("\t\t\t\t\td = strip diacritics\n\t\t\t\t\te = strip enclosures\n\t\t\t\t\ts = simplify style\n")); fprintf(fp,_("\t-x,--exclusion-file \n\t\t\t\tRead exclusions from named file\n")); fprintf(fp,_("\t-X,--exclude-characters \n\t\t\t\tExclude specified characters\n")); fprintf(fp,_("\t-i,--invert-locally\tInvert sense of comparisons\n")); fprintf(fp,_("\t-R,--reverse-key\tReverse characters of key\n")); fprintf(fp,_("\t-A,--first-char-only\tUse only the first character of the field\n")); fputc('\n',fp); } void PrintGNUEquivalences(FILE *fp) { fprintf(fp,"GNU/BSD sort\t\t\t\tmsort\n"); fprintf(fp,"-c,--check\t\t\t\t-Q,--check-only\n"); fprintf(fp,"-f,--ignore-case\t\t\t-C,--fold-case\n"); fprintf(fp,"-g,--general-numeric-sort\t\t-c n,--comparison-type n\n"); fprintf(fp,"-M,--month-sort\t\t\t\t-c m,--comparison-type m\n"); fprintf(fp,"-n,--numeric-sort\t\t\t-c N,--comparison-type N\n"); fprintf(fp,"-r,--reverse\t\t\t\t-i,--invert-locally\n"); fprintf(fp,"-s,--stable\t\t\t\t-a I,--algorithm I\n"); fprintf(fp," \t\t\t\t-a M,--algorithm M\n"); fprintf(fp,"-t ,--field-separator \t\t-d ,--field-separators \n"); fprintf(fp,"-z,--zero-terminated\t\t\t-r \\000,--record-separator \\000\n"); fputc('\n',fp); } #else void PrintGeneralFlags(FILE *fp) { fprintf(fp,_("\tThe following two options must precede any sort order specifications.\n")); fprintf(fp,_("\t-B No characters fall outside the BMP.\n")); fprintf(fp,_("\t-p Do not use the Private Use areas.\n")); fputc('\n',fp); fprintf(fp,_("\t-b A record is terminated by two or more\n\t\t\t\tend-of-line characters.\n")); fprintf(fp,_("\t-l A record consists of a single line\n")); fprintf(fp,_("\t-r A record is terminated by separator character\n")); fprintf(fp,_("\t-O A record consists of the specified number of bytes\n")); fputc('\n',fp); fprintf(fp,_("\t-d + Fields are delimited by the named character(s)\n")); fprintf(fp,_("\t-w Sort on the entire text of the record\n")); fputc('\n',fp); fprintf(fp,_("\t-a I(nsertionSort)\n")); fprintf(fp,_("\t M(ergeSort) \n")); fprintf(fp,_("\t Q(uickSort) \n")); fprintf(fp,_("\t S(hellSort)\n")); fprintf(fp,_("\t-M Set initial maximum number of records \n")); fprintf(fp,_("\t-m End of line is marked by Carriage Return (0x0D)\n")); fprintf(fp,_("\t-I Invert sense of comparisons globally\n")); fprintf(fp,_("\t-P Set the random number generator seed.\n")); fprintf(fp,_("\t-Z,--skip-first-record\n")); fprintf(fp,_("\t-1 \n")); fprintf(fp,_("\t-2 \n")); fprintf(fp,_("\t-j Suppress log output\n")); fprintf(fp,_("\t-q Be quiet - do not chat while working\n")); fprintf(fp,_("\t-u \n")); fprintf(fp,_("\t\tc NFC canonical decomposition then composition (default)\n")); fprintf(fp,_("\t\td NFD canonical decomposition\n")); fprintf(fp,_("\t\tC NFKC compatibility decomposition then composition\n")); fprintf(fp,_("\t\tD NFKD compatibility decomposition\n")); fprintf(fp,_("\t\tn no normalization\n")); fputc('\n',fp); } void PrintInformationalFlags(FILE *fp) { fprintf(fp,_("General options:\n")); fprintf(fp,_("\t-h Print usage message\n")); fprintf(fp,_("\t-v Print version message\n")); fprintf(fp,_("\t-D List defaults\n")); fprintf(fp,_("\t-F List general command line flags\n")); fprintf(fp,_("\t-G List GNU equivalences\n")); fprintf(fp,_("\t-H List informational command line flags\n")); fprintf(fp,_("\t-K List key-specific command line flags\n")); fprintf(fp,_("\t-L List limits\n")); #ifdef USE_UNINUM fprintf(fp,_("\t-N List available number systems\n")); #endif fputc('\n',fp); } PrintKeySpecificFlags(FILE *fp) { fprintf(fp,_("Key specific options:\n")); fprintf(fp,_("\t-e Sort on characters m through n\n")); fprintf(fp,_("\t-n (,) Sort on the position or range of positions\n")); fprintf(fp,_("\t-t Sort on the field with the specified tag\n")); fprintf(fp,_("\t-o Optional: if absent compare as (<,=,>)\n")); fprintf(fp,_("\t-C Fold case\n")); fprintf(fp,_("\t-c l(exicographic)\n")); fprintf(fp,_("\t N(umeric string)\n")); fprintf(fp,_("\t n(umeric)\n")); fprintf(fp,_("\t h(ybrid)\n")); fprintf(fp,_("\t s(ize)\n")); fprintf(fp,_("\t a(ngle) - ddd:mm:ss(.sss) or ddd mm ss(.sss)\n")); fprintf(fp,_("\t D(omain name)\n")); fprintf(fp,_("\t d(ate)\n")); fprintf(fp,_("\t t(ime)\n")); fprintf(fp,_("\t i(so8601 date/time)\n")); fprintf(fp,_("\t r(andom)\n")); fprintf(fp,_("\t-f Permutation of y(m)d with separators\n")); fprintf(fp,_("\t-W Read separators for sort order file.\n")); fprintf(fp,_("\t-S Read substitutions from named file\n")); #ifdef LOCALE_SORT_ORDER fprintf(fp,_("\t-s \n")); fprintf(fp,_("\t If string is a file name, the sort order is read from the file.\n")); fprintf(fp,_("\t If string is a locale name, the sort order for the locale is used.\n")); fprintf(fp,_("\t If string is \"locale\", the sort order for the current locale is used.\n")); #else fprintf(fp,_("\t-s Read the sort order definition from .\n")); #endif fprintf(fp,_("\t-x Read exclusions from named file\n")); fprintf(fp,_("\t-X Exclude specified characters\n")); fprintf(fp,_("\t-i Invert sense of comparisons\n")); fprintf(fp,_("\t-R Reverse characters of key\n")); fprintf(fp,_("\t-A Use only the first character of the field\n")); fputc('\n',fp); } void PrintGNUEquivalences(FILE *fp) { fprintf(fp,"GNU/BSD sort\t\t\t\tmsort\n"); fprintf(fp,"-c,--check\t\t\t\t-Q\n"); fprintf(fp,"-f,--ignore-case\t\t\t-C\n"); fprintf(fp,"-g,--general-numeric-sort\t\t-c n\n"); fprintf(fp,"-M,--month-sort\t\t\t\t-c m\n"); fprintf(fp,"-n,--numeric-sort\t\t\t-c N\n"); fprintf(fp,"-r,--reverse\t\t\t\t-i\n"); fprintf(fp,"-s,--stable\t\t\t\t-a I\n"); fprintf(fp," \t\t\t\t-a M\n"); fprintf(fp,"-t ,--field-separator \t\t-d \n"); fprintf(fp,"-z,--zero-terminated\t\t\t-r \\000\n"); fputc('\n',fp); } #endif void PrintDefaults(FILE *fp) { fprintf(fp,_("Defaults:\n")); fprintf(fp,_(" Field terminator character(s)\n")); fprintf(fp,_(" Record = line whitespace (space or tab)\n")); fprintf(fp,_(" Record = block end-of-line\n")); fprintf(fp,_(" Key specification whole record\n")); fprintf(fp,_(" Initial number of records %4d\n"),DEFMAXRECORDS); fprintf(fp,_(" Presence of key obligatory\n")); fprintf(fp,_(" Record type double end-of-line terminated block\n")); fprintf(fp,_(" Skip first record no\n")); fprintf(fp,_(" Sense of sort forward\n")); fprintf(fp,_(" Date format y-m-d (International Date Format)\n")); fprintf(fp,_(" Sort order numerical Unicode order\n")); fprintf(fp,_(" Sort type lexicographic\n")); fprintf(fp,_(" Algorithm quicksort\n")); fprintf(fp,_(" Unicode normalization NFC\n")); fprintf(fp,"\n"); } #define BUFSIZE 128 void PrintLimits(FILE *fp) { char buf[BUFSIZE]; fprintf(fp,_("Limits:\n")); #ifdef HAVE_PRINTF_THSEP fprintf(fp,_(" Maximum length of numeric string key %'8d\n"), MAXDOUBLELEN); fprintf(fp,_(" Number of multigraphs per key with no restrictions %'8d\n"), FUL_MAXMULTIGRAPHS); fprintf(fp,_(" Number of multigraphs per key (BMP only) %'8d\n"), BMP_MAXMULTIGRAPHS); fprintf(fp,_(" Number of multigraphs per key (Private Use Areas reserved) %'8d\n"), NPU_MAXMULTIGRAPHS); fprintf(fp,_(" Number of subparts of a hybrid key with locale collation %'8s\n"), "127"); #else fprintf(fp,_(" Maximum length of numeric string key %8d\n"), MAXDOUBLELEN); fprintf(fp,_(" Number of multigraphs per key with no restrictions %8d\n"), FUL_MAXMULTIGRAPHS); fprintf(fp,_(" Number of multigraphs per key (BMP only) %8d\n"), BMP_MAXMULTIGRAPHS); fprintf(fp,_(" Number of multigraphs per key (Private Use Areas reserved) %8d\n"), NPU_MAXMULTIGRAPHS); fprintf(fp,_(" Number of subparts of a hybrid key with locale collation %8s\n"), "127"); #endif fprintf(fp,"\n"); } void PrintUsage(void) { extern char progname[]; fprintf(stdout,"\n"); fprintf(stdout,_("This program sorts text using arbitrary sort\norders on fields specified on the command-line.\n")); fprintf(stdout,_("Usage: %s ()\n"),progname); fprintf(stdout,_("Type %s -F to obtain a list of global options.\n"),progname); fprintf(stdout,_("Type %s -H to obtain a list of informational options.\n"),progname); fprintf(stdout,_("Type %s -K to obtain a list of key-specific options.\n"),progname); fprintf(stdout,_("There is also a graphical interface called msg.\n\n")); } #ifdef USE_UNINUM void PrintNumberSystems(FILE *fp) { char *ds; fprintf(fp,"The number systems available for numeric and numeric string keys are:\n"); while (ds = ListNumberSystems(1,0)) fprintf(fp,"\t%s\n",ds); ListNumberSystems(0,0); while (ds = ListNumberSystems(1,1)) fprintf(fp,"\t%s\n",ds); } #endif msort-8.53/input.c0000644000175100017510000001773211236173741011062 00000000000000/* Time-stamp: <2008-11-02 12:10:41 poser> */ /* * Copyright (C) 2005-2007 William J. Poser. * This program is free software; you can redistribute it and/or modify * it under the terms of version 3 of the GNU General Public License as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "config.h" #include "compdefs.h" #include #include #include #include #ifdef HAVE_STDINT_H #include #endif #include #ifdef LOCALE_GETTEXT #include #define _(x) gettext(x) #else #define _(x) (x) #endif #ifdef HAVE_UNINUM_UNICODE_H #include #else #include "unicode.h" #endif #include "input.h" #include "limits.h" #include "utf8error.h" #define MSGSIZE 128 #define MAXUTF8LEN 6 static char msg [MSGSIZE]; int ReportReadError( FILE *fp, UTF32 c, /* Error code */ unsigned char *rp, /* Pointer to raw input sequence */ unsigned long RecordNumber, unsigned long ByteCnt) { extern void ExplicateBadUTF8(FILE *, unsigned char *); switch (c) { case UTF8_NOTENOUGHBYTES: fprintf(fp,_("Truncated UTF-8 sequence encountered at record %ld, byte %ld.\n"), RecordNumber, ByteCnt); exit(1); break; case UTF8_BADINCODE: fprintf(fp,_("Invalid UTF-8 code encountered at record %ld, byte %ld.\n"), RecordNumber, ByteCnt); ExplicateBadUTF8(fp,rp); exit(1); break; case UTF8_BADOUTCODE: fprintf(fp,_("Encountered invalid Unicode at record %ld, byte %ld.\n"), RecordNumber, ByteCnt); exit(1); break; case UTF8_IOERROR: snprintf(msg,MSGSIZE-1,_("Error reading input at record %ld, byte %ld.\n"), RecordNumber,ByteCnt); perror(msg); exit(1); break; default: /* Normal EOF */ return(0); break; /* NOTREACHED */ } } /* * Read a block of UTF-8 text terminated by an extra newline into a buffer, * reallocating storage as necessary. The variable BufferSize is updated * if the size of the buffer is increased. * Returns the block of text. * The number of characters put into the buffer, not including * the terminating null is returned in the variable status if everything goes well. * Otherwise, the error code is placed in status: INPUT_BUFOVERFLOW if storage cannot be allocated. * On end of input a count of zero characters is returned in status. */ UTF8 * GetNNBlockRAUTF8(FILE *fp, UTF8 *buf, int *status, int *BufferSize, wchar_t t, unsigned long RecordNumber, unsigned long ByteCnt) { int cnt = 0; int c; int state = 0; int eol; static int done = 0; if(done){ done = 0; *status = INPUT_ENDOFINPUT; return(buf); } eol = (int) t; while( (c = getc(fp)) != EOF){ if(cnt == *BufferSize){ *BufferSize = 2 * *BufferSize; buf = (unsigned char *) realloc( (void *) buf, (size_t) (*BufferSize * sizeof(unsigned char))); if(buf == NULL){ *status=INPUT_BUFOVERFLOW; return(buf); } } if(c == eol) { if(state==0){ buf[cnt++]=eol; state=1; } else if(state == 1){ buf[cnt]='\0'; *status=cnt; return(buf); } } else { if(state==1) state=0; buf[cnt++]=c; } } /* End of while */ buf[cnt] = '\0'; done = 1; *status=cnt; return(buf); } void ucstrappend(unsigned char *tgt, unsigned char *src,int slen) { int i; for(i = 0; i = (*BufferSize -MAXUTF8LEN)){ *BufferSize = 2 * *BufferSize; buf = (UTF8 *) realloc( (void *) buf, (size_t) (((*BufferSize) +1) * sizeof(UTF8))); if(buf == NULL){ fprintf(stderr,"null buf ptr on request for %u bytes\n",*BufferSize);fflush(stderr); *status=INPUT_BUFOVERFLOW; return(buf); } } if(c == t){ *status=cnt; return(buf); } else { ucstrappend(buf+cnt,rawptr,UCBytes); cnt += UCBytes; } } if(c > UNI_MAX_UTF32){ ReportReadError(stderr,c,rawptr,RecordNumber,ByteCnt-UCBytes); } done = 1; *status=cnt; return(buf); } /* * Read a line into buffer from a file of UTF-8 characters, converting * en passant to UTF32. * Returns the number of characters in the line, not counting the * terminating null. Returns: * * INPUT_ENDOFINPUT if there is no more input * INPUT_BUFOVERFLOW if the length of the line exceeds the buffer size * */ #define DEFAULT 0 #define OVERFLOW 1 #define MSGSIZE 128 int ugetline(FILE *fp,wchar_t *buf, int size) { wchar_t c; int cnt = 0; int state = DEFAULT; static short GetLineDone = 0; char msg[MSGSIZE]; /* These two are not used here but I don't want to include two versions of Get_UTF32...*/ int UCBytes; unsigned char *rawptr; extern UTF32 UTF8in (int,int *,unsigned char **); if(GetLineDone){ GetLineDone = 0; return(INPUT_ENDOFINPUT); } while( (c = UTF8in(fileno(fp),&UCBytes,&rawptr)) <= UNI_MAX_UTF32){ if(cnt == size){ buf[cnt] = '\0'; state = OVERFLOW; } if(c == L'\n'){ if(state == OVERFLOW) return(INPUT_BUFOVERFLOW); else{ buf[cnt] = L'\0'; return(cnt); } } else if(state == DEFAULT) buf[cnt++] = c; } GetLineDone = 1; switch (c){ case UTF8_NOTENOUGHBYTES: fprintf(stderr,"Truncated UTF-8 sequence encountered.\n"); exit(1); break; case UTF8_BADINCODE: fprintf(stderr,"Invalid UTF-8 code encountered.\n"); exit(1); break; case UTF8_BADOUTCODE: fprintf(stderr,"Encountered invalid Unicode.\n"); exit(1); break; case UTF8_IOERROR: snprintf(msg,MSGSIZE-1,"Error reading input.\n"); perror(msg); exit(1); break; default: /* Normal EOF */ break; } if(state == OVERFLOW) return(INPUT_BUFOVERFLOW); else{ buf[cnt] = '\0'; GetLineDone = 1; return(cnt); } } UTF8 * GetFixedLengthRecord( FILE *fp, /* Stream from which to read */ UTF8 *buf, /* Address of buffer */ int *bread, /* Pointer to number of bytes actually read - return parameter */ int *lenptr, /* Pointer to intended length of record, in bytes */ wchar_t dummy2, /* Unused argument needed for consistency with other functions */ unsigned long RecordNumber, /* Dummy */ unsigned long ByteCnt /* Dummy */ ) { int BytesRead; BytesRead = read(fileno(fp),buf,*lenptr); if(BytesRead == 0) { *bread = INPUT_ENDOFINPUT; } else if (BytesRead < *lenptr) { *bread = INPUT_SHORTRECORD; } else { *bread = BytesRead; buf[*lenptr] = '\0'; } return buf; } msort-8.53/misc.c0000644000175100017510000003774111236173741010660 00000000000000/* Time-stamp: <2009-06-01 20:08:16 poser> */ /* * Copyright (C) 1993-2009 William J. Poser. * This program is free software; you can redistribute it and/or modify * it under the terms of version 3 of the GNU General Public License * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software Foundation, * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ #include "config.h" #include "compdefs.h" #include #ifdef HAVE_STDINT_H #include #endif #include #include #include #ifdef HAVE_LOCALE_H #include #endif #ifdef LOCALE_GETTEXT #include #define _(x) gettext(x) #else #define _(x) (x) #endif #include #include #include #ifndef USEUTF8PROC #include #include #else #include #include "unorm.h" #endif #include #include "key.h" #ifdef HAVE_UNINUM_UNICODE_H #include #include #else #include "unicode.h" #endif #ifdef HAVE_UNINUM_UNINUM_H #include #endif #include "dstr.h" #include "exitcode.h" #include "retcodes.h" #include "ex_codes.h" #ifdef HAVE_LONGDOUBLE #define DOUBLE (long double) #else #define DOUBLE double #endif void DumpExclusions(unsigned char *exct,long exctsize,FILE *fp) { unsigned long i; unsigned char flags; fprintf(fp,_("Characters excluded:\n")); if(exctsize > 1) printf("\n"); for(i = 0L;i < exctsize; i++){ if(exct[i]){ flags = exct[i]; fprintf(fp,"\t0x%04lX",i); if(flags & EX_INITIAL) fprintf(fp,_("\tinitial")); if(flags & EX_MEDIAL) fprintf(fp,_("\tmedial")); if(flags & EX_FINAL) fprintf(fp,_("\tfinal")); fprintf(fp,"\n"); } } } /* * Overwrite a textual key with itself, skipping characters specified * in the exclusion table. */ int Exclude(wchar_t *str, int len, unsigned char *exct) { int i; int cnt; cnt = 0; if(!(exct[str[0]] & EX_INITIAL)){ str[cnt++] = str[0]; } for(i = 1; i < len-1; i++){ if(exct[str[i]] & EX_MEDIAL) continue; else str[cnt++] = str[i]; } if(!(exct[str[len-1]] & EX_FINAL)){ str[cnt++] = str[len-1]; } str[cnt] = ((wchar_t) 0); /* Null terminate */ return(cnt); } void KeyCopy(wchar_t *t,wchar_t *s,int len) { register int i; for(i = 0;i < len;i++) *t++ = *s++; } void RevKeyCopy(wchar_t *t,wchar_t *s,int len) { register int i; s += (len-2); for(i = 0;i < len-1;i++) *t++ = *s--; *t= (wchar_t) 0; } void CopyCommandLine(FILE *fp,int ac, char **av) { int i; for(i=0; i < ac-1; i++){ fprintf(fp,"%s ",av[i]); } fprintf(fp,"%s\n",av[ac-1]); } int mywcscasecmp(wchar_t *a, wchar_t *b) { struct dstr *ad; struct dstr *bd; int Result; extern void UnicodeFoldCase(struct dstr *); ad = MakeDynamicString(a); bd = MakeDynamicString(b); UnicodeFoldCase(ad); UnicodeFoldCase(bd); Result = wcscmp(ad->s,bd->s); FreeDynamicString(ad); FreeDynamicString(bd); return(Result); } DOUBLE GetMonthKey(wchar_t *mn,wchar_t **mtbl) { int i; for(i=0;im < 0) { /* Day of year format */ sepptr1 = wcschr(field,ymd->sep1); if(sepptr1 == NULL) return(ERROR); *sepptr1 = L'\0'; sub[0] = field; sub[1] = sepptr1+1; #ifdef USE_UNINUM StringToInt(&UninumValue,(UTF32 *) (sub[ymd->d]),NS_TYPE_ULONG,NS_ALL); if (uninum_err != 0) return(ERROR); day = (int) UninumValue.u; StringToInt(&UninumValue,(UTF32 *) (sub[ymd->y]),NS_TYPE_ULONG,NS_ALL); if (uninum_err != 0) return(ERROR); year = (int) UninumValue.u; #else day = wcstol(sub[ymd->d],NULL,10); if((errno == EINVAL)||(errno == ERANGE)) return (ERROR); year = wcstol(sub[ymd->y],NULL,10); if((errno == EINVAL)||(errno == ERANGE)) return (ERROR); #endif *key = (366 * (DOUBLE) year) + (DOUBLE) day; return(SUCCESS); } /* Full ymd format */ sepptr1 = wcschr(field,ymd->sep1); if (sepptr1 == NULL) return(ERROR); sepptr2 = wcschr(sepptr1+1,ymd->sep2); if (sepptr2 == NULL) return(ERROR); *sepptr1 = L'\0'; *sepptr2 = L'\0'; sub[0] = field; sub[1] = sepptr1+1; sub[2] = sepptr2+1; if(KeyInfo[KeyNumber]->MapTable == NULL) month = (int) GetMonthKey(sub[ymd->m],KeyInfo[KeyNumber]->MonthNames); else month = GetMonthKeyFromMap(sub[ymd->m],KeyNumber); #ifdef USE_UNINUM if (month < 0) { StringToInt(&UninumValue,(UTF32 *) (sub[ymd->m]),NS_TYPE_ULONG,NS_ALL); if (uninum_err != 0) return(ERROR); month = (int) UninumValue.u; } StringToInt(&UninumValue,(UTF32 *) (sub[ymd->d]),NS_TYPE_ULONG,NS_ALL); if (uninum_err != 0) return(ERROR); day = (int) UninumValue.u; StringToInt(&UninumValue,(UTF32 *) (sub[ymd->y]),NS_TYPE_ULONG,NS_ALL); if (uninum_err != 0) return(ERROR); year = (int) UninumValue.u; #else day = wcstol(sub[ymd->d],NULL,10); if((errno == EINVAL)||(errno == ERANGE)) return (ERROR); month = wcstol(sub[ymd->m],NULL,10); if((errno == EINVAL)||(errno == ERANGE)) return (ERROR); year = wcstol(sub[ymd->y],NULL,10); if((errno == EINVAL)||(errno == ERANGE)) return (ERROR); #endif if(month < 0 || day < 0) return (ERROR); if(month > 12) return (ERROR); if(day > 31) return (ERROR); *key = (DOUBLE) ((month * 31) + day) + (DOUBLE) (366 *year); return(SUCCESS); } /* Given a time string, write the equivalent double into key. */ int GetTimeKey(wchar_t *field, DOUBLE *key) { int hours; int minutes; int iseconds; double seconds = 0.0; UTF8 *cfield; int FieldsFound; long TZOffset; /* Number of seconds to add to normalize to UTC */ short err; extern UTF8 * ws2u8(wchar_t *); extern long ExtractTimeZone(UTF8 *, short *); cfield = ws2u8(field); err=0; TZOffset = ExtractTimeZone(cfield,&err); if(err) return(ERROR); /* HH:MM:SS(.SSS) */ FieldsFound = sscanf((char *)cfield,"%d:%d:%lf",&hours,&minutes,&seconds); if(FieldsFound == 3) goto validate; /* HH:MM.SS */ FieldsFound = sscanf((char *)cfield,"%d:%d.%d",&hours,&minutes,&iseconds); if(FieldsFound == 3) { seconds = (double) iseconds; goto validate; } /* HH:MM */ FieldsFound = sscanf((char *)cfield,"%d:%d",&hours,&minutes); if(FieldsFound == 2) { seconds = 0.0; goto validate; } free(cfield); return(ERROR); validate: free(cfield); if(hours < 0 || minutes < 0 || seconds < 0) return (ERROR); if(hours > 24 || minutes > 59 || seconds >= 60) return (ERROR); *key = (DOUBLE) (((((DOUBLE) hours * 60) + (DOUBLE) minutes) * 60) + (DOUBLE) seconds + (DOUBLE) TZOffset); return(SUCCESS); } /* Given an angle string, write the equivalent double into key. */ int GetAngleKey(wchar_t *field, DOUBLE *key) { int degrees; int minutes; double seconds; UTF8 *cfield; int FieldsFound; short NegativeP = 0; DOUBLE Value; extern UTF8 * ws2u8(wchar_t *); cfield = ws2u8(field); FieldsFound = sscanf((char *)cfield,"%4d:%2d:%lf",°rees,&minutes,&seconds); if(FieldsFound!=3) { FieldsFound = sscanf((char *)cfield,"%4d %2d %lf",°rees,&minutes,&seconds); } free(cfield); if(FieldsFound != 3)return(ERROR); if(minutes < 0 || seconds < 0) return (ERROR); if( (minutes > 59) || (seconds >= 60)) return (ERROR); if(degrees < 0) { degrees *= (-1); NegativeP = 1; } degrees %= 360; if(NegativeP) degrees = 360 -degrees; Value = ((((DOUBLE) degrees * 60) + (DOUBLE) minutes) * 60) + seconds; *key = Value; return(SUCCESS); } #ifdef HAVE_GNU_LIBC_VERSION_H #include #endif void ShowVersion(FILE *fp) { extern char progname[]; extern char version[]; extern char* compdate; char *vp; char vnum[11+1]; struct utsname utsbuf; fprintf(fp,"%s %s\n",progname,version); vp = tre_version(); sscanf(vp,"%*s %11[0-9.] %*s",vnum); #ifdef USE_UNINUM #ifdef HAVE_UNINUM_GMP_VERSION fprintf(fp,_(" lib gmp %s\n"),uninum_gmp_version()); #endif #else fprintf(fp,_(" lib gmp not linked\n")); #endif #ifndef USEUTF8PROC fprintf(fp,_(" lib icu %s\n"),U_ICU_VERSION); #else fprintf(fp,_(" lib utf8proc\n")); #endif fprintf(fp,_(" lib tre %s\n"),vnum); #ifdef USE_UNINUM fprintf(fp,_(" lib uninum %s\n"),uninum_version()); #else fprintf(fp,_(" lib uninum not linked\n")); #endif #ifdef HAVE_GNU_LIBC_VERSION_H fprintf(fp,_(" glibc %s\n"),gnu_get_libc_version()); #endif if (uname(&utsbuf) >= 0) { fprintf(fp,_("Compiled %s on %s\nunder %s %s %s\n"), compdate, utsbuf.machine, utsbuf.sysname, utsbuf.release, utsbuf.version); } else fprintf(fp,_("Compiled %s\n"),compdate); #ifdef DEBUGBUILD #ifdef LOCALE_GETTEXT fprintf(fp,"LOCALE_GETTEXT is defined.\n"); #endif #ifdef LOCALE_SORT_ORDER fprintf(fp,"LOCALE_SORT_ORDER is defined.\n"); #endif #ifdef LOCALE_MONTHNAMES fprintf(fp,"LOCALE_MONTHNAMES is defined.\n"); #endif #ifdef HAVE_GETTEXT #endif fprintf(fp,"HAVE_GETTEXT is defined.\n"); #endif } FILE * OpenFile(char *file,char *mode,char *pgname) { FILE *fp; extern FILE *fopen(); if((fp = fopen(file,mode)) != NULL) return fp; else{ switch(*mode){ case 'r': fprintf(stderr,_("%s: can't open file %s for reading.\n"),pgname,file); break; case 'w': fprintf(stderr,_("%s: can't open file %s for writing.\n"),pgname,file); break; default: fprintf(stderr,_("%s: can't open file %s for appending.\n"),pgname,file); } exit(OPENERROR); } /* NOTREACHED */ } /* * Rewrite a string, replacing backslash escapes. * */ #define DEFAULT 0 #define READBACKSLASH 1 #define READONEDIGIT 2 #define READTWODIGITS 3 int EvalEscapes(wchar_t *s) { int state; wchar_t c; wchar_t odigit1 = 0L; wchar_t odigit2 = 0L; wchar_t sum = 0L; wchar_t *SStart; wchar_t *TStart; wchar_t *t; if(s == NULL) return(SUCCESS); /* Allocate storage for de-escaped copy of string */ t = (wchar_t *) malloc(sizeof(wchar_t) * (wcslen(s)+1)); if(t == NULL) return(ERROR); SStart = s; TStart = t; /* Work through string */ state = 0; while((c = *s++) != L'\0'){ switch(c){ case '\\': if(state == READBACKSLASH){ *t++ = L'\\'; /* Literal backslash */ state = DEFAULT; } else if(state == READONEDIGIT){ *t++ = L'\\'; *t++ = odigit1; state = DEFAULT; } else if(state == READTWODIGITS){ *t++ = L'\\'; *t++ = odigit1; *t++ = odigit2; state = DEFAULT; } else{ /* state == DEFAULT */ state = READBACKSLASH; } break; case 'n': if(state == READBACKSLASH){ *t++ = L'\n'; state = DEFAULT; } else{ if(state == READONEDIGIT){ *t++ = L'\\'; *t++ = odigit1; } else if(state == READTWODIGITS){ *t++ = L'\\'; *t++ = odigit1; *t++ = odigit2; } *t++ = c; state = DEFAULT; } break; case ' ': if(state == READBACKSLASH){ *t++ = L' '; state = DEFAULT; } else{ if(state == READONEDIGIT){ *t++ = L'\\'; *t++ = odigit1; } else if(state == READTWODIGITS){ *t++ = L'\\'; *t++ = odigit1; *t++ = odigit2; } *t++ = c; state = DEFAULT; } break; case 't': if(state == READBACKSLASH){ *t++ = L'\t'; state = DEFAULT; } else{ if(state == READONEDIGIT){ *t++ = L'\\'; *t++ = odigit1; } else if(state == READTWODIGITS){ *t++ = L'\\'; *t++ = odigit1; *t++ = odigit2; } *t++ = c; state = DEFAULT; } break; case '0': case '1': case '2': case '3': if(state == READBACKSLASH){ odigit1 = c; sum = ( (c - L'0') * 64); state = READONEDIGIT; } else if(state == READONEDIGIT){ odigit2 = c; sum+=( (c - L'0') * 8); state = READTWODIGITS; } else if(state == READTWODIGITS){ sum+= (c - L'0'); *t++ = sum; state = DEFAULT; } else *t++ = c; break; case '4': case '5': case '6': case '7': /* These are not possible leading digits */ if(state == READBACKSLASH){ *t++ = L'\\'; *t++ = c; state = DEFAULT; } else if(state == READONEDIGIT){ odigit2 = c; sum+=( (c - L'0') * 8); state = READTWODIGITS; } else if(state == READTWODIGITS){ sum+= (c - L'0'); *t++ = sum; state = DEFAULT; } else *t++ = c; break; default: if(state == READBACKSLASH){ *t++ = L'\\'; } else if(state == READONEDIGIT){ *t++ = L'\\'; *t++ = odigit1; } else if(state == READTWODIGITS){ *t++ = L'\\'; *t++ = odigit1; *t++ = odigit2; } *t++ = c; state = DEFAULT; break; } } /* Null terminate copy and overwrite original */ *t = L'\0'; wcscpy(SStart,TStart); free((void *) TStart); return(SUCCESS); } /* * Overwrite a textual key with itself, skipping characters specified * in the exclusion table. This version differs from the main Exclude * function in operating on chars and in not overwriting its input. */ int ExcludeChar(wchar_t *str, wchar_t **out, int len, unsigned char *exct) { int i; int cnt; static wchar_t *OutStr; cnt = 0; if(OutStr != NULL) free((void *) OutStr); OutStr = (wchar_t *) malloc ( (size_t) (len+1) * sizeof(wchar_t)); if (OutStr == NULL) { fprintf(stderr,_("ExcludeChar: out of memory\n")); exit(OUTOFMEMORY); } if(!(exct[str[0]] & EX_INITIAL) ){ OutStr[cnt++] = str[0]; } for(i = 1; i < len-1; i++) { if(exct[str[i]] & EX_MEDIAL) continue; else OutStr[cnt++] = str[i]; } if(!(exct[str[len-1]] & EX_FINAL)) { OutStr[cnt++] = str[len-1]; } OutStr[cnt] = ((wchar_t) 0); /* Null terminate */ *out = OutStr; return(cnt); } #ifndef USEUTF8PROC /* * Return the normalized input string in fresh storage. * It is the responsability of the caller to free the original * un-normalized string, if it is no longer needed. * The length of the normalized string is returned via * the pointer ResultLength. */ UTF32 * NormalizeString(UTF32 *s, int32_t *ResultLength, UNormalizationMode type) { UChar *Result; UErrorCode status; int CharsNormalized; UTF16 *s16; UTF32 *r32; extern UTF16 *ConvertUTF32toUTF16 (const UTF32*, int *); extern UTF32 *ConvertUTF16toUTF32 (const UTF16*, int *); s16 = ConvertUTF32toUTF16(s,&status); if(!s16) { *ResultLength = 0; return NULL; } status = U_ZERO_ERROR; *ResultLength = unorm_normalize(s16,-1,type, 0, NULL, 0, &status); Result = (UChar*) malloc(sizeof(UChar) * ((*ResultLength) + 1)); if (!Result) { *ResultLength = 0; return NULL; } status = U_ZERO_ERROR; /* Add 1 to *ResultLength to allow addition of terminal null and prevent error code */ CharsNormalized = unorm_normalize(s16, -1,type, 0, Result, (*ResultLength+1), &status); free((void *) s16); if(status != U_ZERO_ERROR) { *ResultLength = -1; return NULL; } r32 = ConvertUTF16toUTF32(Result,&status); if(!r32) { *ResultLength = 0; return NULL; } free((void *) Result); *ResultLength = CharsNormalized; return (r32); } #endif /* Reverse a plain C string in place */ void ReverseString(char *s) { int i, j; int len; char t; len = strlen(s); for (i = 0, j = len-1; i < len/2; i++, j--) { t = s[i]; s[i] = s[j]; s[j] = t; } } msort-8.53/msort.c0000644000175100017510000042515111322473214011057 00000000000000/* Time-stamp: <2010-01-10 16:53:32 poser> */ /* * Copyright (C) 1993-2010 William J. Poser. * This program is free software; you can redistribute it and/or modify * it under the terms of version 3 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * or go to the web page: http://www.gnu.org/licenses/gpl.txt. * * This program sorts text using an arbitrary sort order specified * in a file. Records may be either single lines or blocks of text. * Sorting may be on the entire record or on a specified field,. * where the set of field terminator characters may be specified * on the command line. The fields on which to sort may be specified * either by number or by the tags with which they begin. * Keys may be optional or obligatory. * * Author: Bill Poser * */ #define PROGNAME PACKAGE_NAME #define LOGNAME PROGNAME ".log" #include "config.h" #include "compdefs.h" #include #include #include #include #include #include #ifdef HAVE_STDINT_H #include #endif #ifdef HAVE_ALLOCA_H #include #endif #include #include #include /* #include */ #include #include #include #include #include #ifndef USEUTF8PROC #include #else #include #include "unorm.h" #endif #ifdef HAVE_UNINUM_UNICODE_H #include #else #include "unicode.h" #endif #ifdef USE_UNINUM #include #include #endif #include #ifdef HAVE_LONG_LONG typedef unsigned long long ULongLong; #else typedef unsigned long ULongLong; #endif #include "exitcode.h" #include "retcodes.h" #include "input.h" #include "limits.h" #include "key.h" #include "record.h" #include "ex_codes.h" #include "dstr.h" #include "comparisons.h" #ifdef HAVE_GETOPT_LONG #define _GNU_SOURCE #include #endif #ifdef HAVE_LANGINFO_H #include #endif #ifdef HAVE_LOCALE_H #include #endif #ifdef LOCALE_GETTEXT #include #define _(x) gettext(x) #else #define _(x) (x) #endif #define REPORTINTERVAL 500 #define QUICKSORTTHRESHOLD 1000L #define INTWREPORTINTERVAL (4 * REPORTINTERVAL) #define NOTACHARACTER (wchar_t) 0xFDDF #ifdef HAVE_LONGDOUBLE #define DOUBLE (long double) #else #define DOUBLE double #endif #define TDSBUFSIZE 64 /* time-date stamp buffer size */ #define PRTEMPSTRLEN 128 #define MIN(x,y) (xy?x:y) #define TRUE 1 #define FALSE 0 /* How are exclusions specified? */ #define FILESPEC 1 #define STRINGSPEC 2 #ifndef HAVE_GETOPT_LONG struct option { # if (defined __STDC__ && __STDC__) || defined __cplusplus const char *name; # else char *name; # endif /* has_arg can't be an enum because some compilers complain about type mismatches in all the code that assumes it is an int. */ int has_arg; int *flag; int val; }; int getopt_long(int ac, char *const *av, const char * sopts, const struct option *lopts, int *lind){ return(getopt(ac,av,sopts)); } #endif char progname[]=PROGNAME; char version[]=PACKAGE_VERSION; char *compdate= __DATE__ " " __TIME__; char **xav; int xac; /* * Missing key comparison options * DO NOT CHANGE THESE VALUES! The code in Compare() * depends on these specific values. */ #define COMPARE_LESSTHAN 0 #define COMPARE_EQUAL 1 #define COMPARE_GREATERTHAN 2 /* Types of key field selections */ #define WHOLE 0 #define TAGGED 1 #define NUMBERED 2 #define CRANGE 3 #define RPT_NNBLOCK 0 #define RPT_LINE 1 #define RPT_SEPCHAR 2 #define RPT_FIXEDLENGTH 3 long RankTableSize = MAXUNICODE; wchar_t *DefaultWhiteSpace=L"\x0020\x0009\x1361\x1680\x2000\x2001\x2002\x2003\x2004\x2005\x2006\x2007\x2008\x2009\x200A\x200B\x205F\x3000"; struct option opts[]={ {"algorithm",1,NULL,'a'}, {"BMP",0,NULL,'B'}, {"block",0,NULL,'b'}, {"check-only",0,NULL,'Q'}, {"fold-case",0,NULL,'C'}, {"character-range",1,NULL,'e'}, {"comparison-type",1,NULL,'c'}, {"defaults",0,NULL,'D'}, {"field-separators",1,NULL,'d'}, {"general-options",0,NULL,'F'}, {"date-format",1,NULL,'f'}, {"first-char-only",0,NULL,'A'}, {"gnu-equivalences",0,NULL,'G'}, {"informational-options",0,NULL,'H'}, {"help",0,NULL,'h'}, {"in",1,NULL,'1'}, {"invert-globally",0,NULL,'I'}, {"invert-locally",0,NULL,'i'}, {"key-specific-options",0,NULL,'K'}, {"limits",0,NULL,'L'}, {"line",0,NULL,'l'}, {"initial-maximum-records",1,NULL,'M'}, {"line-end-carriage-return",0,NULL,'m'}, #ifdef USE_UNINUM {"list-number-systems",0,NULL,'N'}, #endif {"position",1,NULL,'n'}, {"fixed-size-record-size",1,NULL,'O'}, {"optional",1,NULL,'o'}, {"out",1,NULL,'2'}, {"random-seed",1,NULL,'P'}, {"reserve-private-use-areas",0,NULL,'p'}, {"quiet",0,NULL,'q'}, {"reverse-key",0,NULL,'R'}, {"record-separator",1,NULL,'r'}, {"skip-first-record",0,NULL,'Z'}, {"substitution-file",1,NULL,'S'}, {"sort-order",1,NULL,'s'}, {"suppress-log",0,NULL,'j'}, {"transformations",1,NULL,'T'}, {"tag",1,NULL,'t'}, {"unicode-normalization",1,NULL,'u'}, {"version",0,NULL,'v'}, {"sort-order-file-separators",1,NULL,'W'}, {"whole-record",0,NULL,'w'}, {"exclude-characters",1,NULL,'X'}, {"exclusion-file",1,NULL,'x'}, {"number-system",1,NULL,'y'}, {"fold-case-turkic",0,NULL,'z'}, {0,0,0,0} }; /* This is the array containing information about all the keys */ #define INITIALKEYS 4 struct keyinfo **KeyInfo; /* This is the list of all of the records */ struct record **RecordList; int VerboseP=1; /* Chat while we work */ int LogP=1; /* Write out log */ int KeyCount; /* Number of keys to sort on */ UTF8 *InputText; /* Temporary storage for input text*/ wchar_t *wcInputText; /* UTF-32 counterpart of above */ struct dstr TempString; wchar_t *Terminators; /* Characters terminating fields */ int TerminatorCnt; /* Number of terminator characters */ int InitialMaxFields; /* Initial value of MaxFields */ short BMPOnlyP; /* Only deal with Basic Multilingual Plane? */ short MultipleLocalesP; /* Are we using more than one locale? */ short ReservePrivateUseAreaP; short ReverseP; /* Invert the sense of comparisons */ short SemiExternalP = 0; FILE *Logfp = NULL; /* Log file */ wchar_t *DefaultMonthNames[]={ L"January",L"Jan", L"February",L"Feb", L"March",L"Mar", L"April",L"Apr", L"May",L"May", L"June",L"Jun", L"July",L"Jul", L"August",L"Aug", L"September",L"Sep", L"October",L"Oct", L"November",L"Nov", L"December",L"Dec" }; #ifndef USEUTF8PROC static UNormalizationMode UnicodeNormalization = UNORM_NFC; #else static int UnicodeNormalization = UNORM_NFC; #endif #ifndef NOCOMPARISONCNT ULongLong ComparisonCnt; /* Calls to Compare */ #endif wchar_t MG_First; wchar_t MG_Last; long MG_Total; int LogStartedP = 0; extern void putu8s(wchar_t *, FILE *); static char buf[TDSBUFSIZE]; /* Write out an ISO8601 time/date stamp */ char * TimeDateStamp(void) { time_t EpochSeconds; struct tm *TimeDateInfoPtr; EpochSeconds = time(NULL); TimeDateInfoPtr = localtime(&EpochSeconds); strftime(buf,TDSBUFSIZE,"%Y-%m-%dT%T%z",TimeDateInfoPtr); return &(buf[0]); } void Copyright(FILE *fp) { fprintf(fp,"Copyright 1993-2009 William J. Poser (http://billposer.org)\n"); fprintf(fp,_("This program is free software; you can redistribute\n\ it and/or modify it under the terms of version 3 of\n\ the GNU General Public License as published by the\n\ Free Software Foundation.\n")); } void PrintLog(char *fmt,...) { va_list args; void StartLog(void); if(!LogP) return; if(!LogStartedP) StartLog(); va_start(args,fmt); vfprintf(Logfp,fmt,args); va_end(args); } void wPrintLog(wchar_t *fmt,...) { va_list args; void StartLog(void); if(!LogP) return; if(!LogStartedP) StartLog(); va_start(args,fmt); vfwprintf(Logfp,(wchar_t *)fmt,args); va_end(args); } void CloseLog(void) { if(Logfp != NULL) { PrintLog("----------------------------------------------------------------------\n"); fclose(Logfp); } } void StartLog (void) { char PrTempString[PRTEMPSTRLEN+1]; extern FILE *OpenFile(char *,char *,char *); extern void ShowVersion(FILE *); extern void CopyCommandLine(FILE *, int, char **); if(LogP) { Logfp = OpenFile(LOGNAME,"w",progname); if(Logfp == NULL) { fprintf(stderr,_("Warning: unable to open log file %s in current directory.\n"),LOGNAME); snprintf(PrTempString,PRTEMPSTRLEN,"/tmp/%s",LOGNAME); Logfp = OpenFile(PrTempString,"w",progname); if(Logfp == NULL) { fprintf(stderr,_("Warning: unable to open log file %s.\n"),PrTempString); exit(OPENERROR); } } ShowVersion(Logfp); Copyright(Logfp); fprintf(Logfp,_("Invoked by command line:\n ")); CopyCommandLine(Logfp,xac,xav); fflush(Logfp); LogStartedP = 1; } } #define CF_BUFSIZ 8192 int CopyFile(char *src, char *tgt, mode_t mode) { int srcfd; int tgtfd; char buf[CF_BUFSIZ]; int nread; int nwritten; int ErrorP = 0; srcfd = open(src,O_RDONLY); if(srcfd == (-1)) { fprintf(stderr,"CopyFile: failed to open input file %s.\n",src); return (-1); } tgtfd = open(tgt,O_WRONLY|O_CREAT,mode); if(tgtfd == (-1)) { fprintf(stderr,"CopyFile: failed to open output file %s.\n",tgt); close(srcfd); return (-1); } while((nread = read(srcfd,buf,CF_BUFSIZ)) > 0) { nwritten = write(tgtfd,buf,nread); if(nwritten < 0) { ErrorP = 1; break; } } close(srcfd); close(tgtfd); if(ErrorP) return(-1); return(0); } void SetInitialKeysMultigraphInfo () { int i; for(i=0; i< INITIALKEYS; i++) { KeyInfo[i]->NextCode = MG_First; KeyInfo[i]->MaxMGCode = MG_Last; KeyInfo[i]->TotalCodes = MG_Total; } } void SetMultigraphInfo (void) { if(ReservePrivateUseAreaP){ MG_First = NPU_FIRSTMULTIGRAPHCODE; MG_Last = NPU_MAXMULTIGRAPHCODE; } else if (BMPOnlyP) { MG_First = BMP_FIRSTMULTIGRAPHCODE; MG_Last = BMP_MAXMULTIGRAPHCODE; } else { MG_First = FUL_FIRSTMULTIGRAPHCODE; MG_Last = FUL_MAXMULTIGRAPHCODE; } MG_Total = (long) (MG_Last - MG_First + 1); SetInitialKeysMultigraphInfo(); } void ValidateCRange(char *s,int fields,int keycnt) { if(fields != 2) { fprintf(stderr,_("Ill-formed character range %s\n"),s); exit(BADOPTIONARG); } if(KeyInfo[keycnt]->RangeFirst > KeyInfo[keycnt]->RangeLast) { if (KeyInfo[keycnt]->RangeLast > 0) { fprintf(stderr,_("Invalid character range: %s. Beginning of character range must not follow end.\n"),s); exit(BADOPTIONARG); } } } #ifdef LOCALE_MONTHNAMES int mb2u32(char *src,wchar_t **tgt,struct keyinfo *ki) { int CharsNeeded; int BytesNeeded; int Status; wchar_t *new; /* Do I need to save and restore the previous locale? */ CharsNeeded = mbstowcs(NULL,src,0); /* allocate */ BytesNeeded = (size_t) ((CharsNeeded + 1) * sizeof(wchar_t)); if((new = (wchar_t *) malloc(BytesNeeded)) == NULL) { fprintf(stderr,"Out of memory.\n"); exit(OUTOFMEMORY); } Status = mbstowcs(new,src,CharsNeeded); if(Status < 0) { return 1; } else { *tgt = new; return 0; } } #endif void GetMonthNames(int KeyNumber) { #ifdef LOCALE_MONTHNAMES char *tmp; int status = 0; if(KeyInfo[KeyNumber]->LocaleP) { tmp = setlocale(LC_TIME,KeyInfo[KeyNumber]->Locale); if(tmp == NULL) { fprintf(stderr,_("The locale %s is not supported.\n"),KeyInfo[KeyNumber]->Locale); exit(OTHERERROR); } (void) setlocale(LC_CTYPE,KeyInfo[KeyNumber]->Locale); } else{ tmp = setlocale(LC_TIME,""); if(tmp == NULL) { fprintf(stderr,_("The current locale is not supported.\n")); exit(OTHERERROR); } (void) setlocale(LC_CTYPE,""); } status+=mb2u32(nl_langinfo(MON_1),&(KeyInfo[KeyNumber]->MonthNames[0]),KeyInfo[KeyNumber]); status+=mb2u32(nl_langinfo(ABMON_1),&(KeyInfo[KeyNumber]->MonthNames[1]),KeyInfo[KeyNumber]); status+=mb2u32(nl_langinfo(MON_2),&(KeyInfo[KeyNumber]->MonthNames[2]),KeyInfo[KeyNumber]); status+=mb2u32(nl_langinfo(ABMON_2),&(KeyInfo[KeyNumber]->MonthNames[3]),KeyInfo[KeyNumber]); status+=mb2u32(nl_langinfo(MON_3),&(KeyInfo[KeyNumber]->MonthNames[4]),KeyInfo[KeyNumber]); status+=mb2u32(nl_langinfo(ABMON_3),&(KeyInfo[KeyNumber]->MonthNames[5]),KeyInfo[KeyNumber]); status+=mb2u32(nl_langinfo(MON_4),&(KeyInfo[KeyNumber]->MonthNames[6]),KeyInfo[KeyNumber]); status+=mb2u32(nl_langinfo(ABMON_4),&(KeyInfo[KeyNumber]->MonthNames[7]),KeyInfo[KeyNumber]); status+=mb2u32(nl_langinfo(MON_5),&(KeyInfo[KeyNumber]->MonthNames[8]),KeyInfo[KeyNumber]); status+=mb2u32(nl_langinfo(ABMON_5),&(KeyInfo[KeyNumber]->MonthNames[9]),KeyInfo[KeyNumber]); status+=mb2u32(nl_langinfo(MON_6),&(KeyInfo[KeyNumber]->MonthNames[10]),KeyInfo[KeyNumber]); status+=mb2u32(nl_langinfo(ABMON_6),&(KeyInfo[KeyNumber]->MonthNames[11]),KeyInfo[KeyNumber]); status+=mb2u32(nl_langinfo(MON_7),&(KeyInfo[KeyNumber]->MonthNames[12]),KeyInfo[KeyNumber]); status+=mb2u32(nl_langinfo(ABMON_7),&(KeyInfo[KeyNumber]->MonthNames[13]),KeyInfo[KeyNumber]); status+=mb2u32(nl_langinfo(MON_8),&(KeyInfo[KeyNumber]->MonthNames[14]),KeyInfo[KeyNumber]); status+=mb2u32(nl_langinfo(ABMON_8),&(KeyInfo[KeyNumber]->MonthNames[15]),KeyInfo[KeyNumber]); status+=mb2u32(nl_langinfo(MON_9),&(KeyInfo[KeyNumber]->MonthNames[16]),KeyInfo[KeyNumber]); status+=mb2u32(nl_langinfo(ABMON_9),&(KeyInfo[KeyNumber]->MonthNames[17]),KeyInfo[KeyNumber]); status+=mb2u32(nl_langinfo(MON_10),&(KeyInfo[KeyNumber]->MonthNames[18]),KeyInfo[KeyNumber]); status+=mb2u32(nl_langinfo(ABMON_10),&(KeyInfo[KeyNumber]->MonthNames[19]),KeyInfo[KeyNumber]); status+=mb2u32(nl_langinfo(MON_11),&(KeyInfo[KeyNumber]->MonthNames[20]),KeyInfo[KeyNumber]); status+=mb2u32(nl_langinfo(ABMON_11),&(KeyInfo[KeyNumber]->MonthNames[21]),KeyInfo[KeyNumber]); status+=mb2u32(nl_langinfo(MON_12),&(KeyInfo[KeyNumber]->MonthNames[22]),KeyInfo[KeyNumber]); status+=mb2u32(nl_langinfo(ABMON_12),&(KeyInfo[KeyNumber]->MonthNames[23]),KeyInfo[KeyNumber]); if(status) { fprintf(stderr,"Error reading month name information for locale.\n"); exit(OTHERERROR); } #else int i; for(i=0;i<24;i++){ KeyInfo[KeyNumber]->MonthNames[i] = DefaultMonthNames[i]; } #endif } int GetMonthKeyFromMap (wchar_t *s, int k) { int mte = 0; while(mte < KeyInfo[k]->MapTableEntries){ if(wcsncmp(s,KeyInfo[k]->MapTable[mte]->str,KeyInfo[k]->MapTable[mte]->len) == 0) { return (int) (KeyInfo[k]->MapTable[mte]->code - MG_First +1); } ++mte; } return(-1); } void CheckFree (void *p,int lineno) { #ifdef DEBUGP fprintf(stderr,"CheckFree - line %5d: %p\n",lineno,p); #endif if(p != NULL) free(p); else { fprintf(stderr,"Attemp to free null pointer %p at line %d.\n",p,lineno); fflush(stderr); } } #define CheckFree(x,y) free(x) void CheckKeySelected(char *s){ if(KeyCount <1){ fprintf(stderr,_("%c%s specified without previous key selector (-e, -n, -t, or -w).\n"), toupper(*s),s+1); exit(BADOPTION); } } #ifdef GNU_COMP #define CL_IN 0x69 #define CL_OUT 0x6F #else #define CL_IN 0x31 #define CL_OUT 0x32 #endif FILE *infp; /* Input file */ int infd; int main(int ac, char **av) { int i; /* Loop index */ int InitialMaxRecords; /* Initial value of MaxRecords */ long MaxRecords; /* Maximum records allocated */ int MaxKeys = INITIALKEYS; /* Maximum number of keys for which slots are currently available */ int InputTextSize; /* Size of input text buffer */ unsigned long Records; /* Number of well-formed records */ unsigned long InputRecords; /* Number of records in input, ill-formed or well-formed */ int RecordLength; /* Length of text in current record */ unsigned long BytesRead; /* Bytes read thus far from input. */ int WholeKeyP; /* Use whole record as key? */ enum Algorithm {INSERTIONSORT,MERGESORT,QUICKSORT,SHELLSORT}; enum Algorithm SortAlgorithm = QUICKSORT; short RecordParseType; /* Line, block, etc. */ int opt; /* Option returned by getopt() */ int TerminatorsSetP; /* Did user override default terminators? */ short SeedSetByUserP = 0; /* Did user set the seed for random number generation? */ unsigned int RandomSeed; wchar_t RecordSeparator; wchar_t MaxCodeInInput = 0L; wchar_t tmpwc; int tmpint1; /* Temporary integer */ short FailedKeyP; /* True if key extraction failed on some record */ short CheckOnlyP= 0; int ExitValue = SUCCESS; short SkipFirstRecordP = 0; /* Pass through the first record without sorting it */ struct record *FirstRecordPointer; wchar_t *TagTemp = NULL; /* Temporary string storage */ size_t TagTempStringLength =0; /* Current length of above */ size_t TagTempLengthNeeded; char PrTempString[PRTEMPSTRLEN+1]; char TempOutputName [] = "/tmp/msortXXXXXX"; char EndOfLine = 0x0A; /* Default to linefeed */ char *tmpptr1; /* Temporary pointer */ char *tmpptr2; /* Temporary pointer */ UTF8 *tmputf8ptr; /* Temporary pointer */ wchar_t *tmpwcptr; /* Temporary pointer */ wchar_t *tmpwcptr2; /* Temporary pointer */ FILE *outfp; /* Output file */ int outfd; FILE *fp; int status; int SortOrderSpecifiedP = 0; char *endptr; /* Used by strtol */ char * tmpstr; char *FirstLocale = NULL; void *InitialBreak; int lgoindex; /* Unused but needed by getopt_long */ char t; #ifndef USEUTF8PROC int32_t NormalizationResult; #endif struct record **SavedRecordList; char *InputFile = NULL; /* Name of input file */ char *OutputFile = NULL; /* Name of output file */ int OverWriteInputP = 0; struct stat InputFileInfo; char StartTimeStamp[TDSBUFSIZE]; UTF8 * (*GetRecord)(FILE *, UTF8 *, int *, int *, wchar_t, unsigned long, unsigned long); int GetExclusions(char *,struct keyinfo *); int GetKeys(struct record *, struct keyinfo **,int,wchar_t, short); int GetSortOrder(char *,struct keyinfo *); int SetDateFormat(wchar_t *, struct ymdinfo *); void WriteOutRecords(long, FILE *,int,wchar_t); void WriteOutRecordsExternal(long, FILE *,int,wchar_t); void DescribeKeys(FILE *); void InitializeKeyInfo(struct keyinfo *); void CreateRankTable(struct keyinfo *); void ProvideDefaultRanks(void); void CreateInitialKeys(void); void GetExclusionsString(UTF8 *,struct keyinfo *); void CheckKeyAllocation(int, int *); int GetSubstitutions(char *, struct keyinfo *); int GetWhiteSpaceDefinition(char *, struct keyinfo *); void WriteSingleRecord(struct record *, FILE *,wchar_t); extern int optind; /* Set by getopt */ extern char *optarg; /* Set by getopt */ extern int optopt; extern int opterr; extern FILE *OpenFile(char *,char *,char *); extern char *copy_string(char *); extern wchar_t *wCreateString(int); extern int EvalEscapes(wchar_t *); extern UTF8 * GetNNBlockRAUTF8(FILE *, unsigned char *, int *, int *, wchar_t, unsigned long, unsigned long); extern UTF8 * GetBlockSepCharRAUTF8(FILE *, UTF8 *, int *, int *, wchar_t, unsigned long, unsigned long); extern UTF8 * GetFixedLengthRecord(FILE *, UTF8 *, int *, int *, wchar_t, unsigned long, unsigned long); extern void InsertionSort(struct record **,long); extern void MergeSort(struct record **, long, long); extern void QuickSort(struct record **,long,long); extern void ShellSort(struct record **,long); extern void CopyCommandLine(FILE *, int, char **); extern void ShowVersion(FILE *); extern void PrintDefaults(FILE *); extern void PrintGeneralFlags(FILE *); extern void PrintGNUEquivalences(FILE *); extern void PrintInformationalFlags(FILE *); extern void PrintKeySpecificFlags(FILE *); extern void PrintLimits(FILE *); #ifdef USE_UNINUM extern void PrintNumberSystems(FILE *); #endif extern void PrintUsage(void); extern int u82u32 (UTF8 *,wchar_t **,wchar_t *); #ifndef USEUTF8PROC extern UTF32 * NormalizeString(UTF32 *, int32_t *, UNormalizationMode); #endif extern void ReverseString(char *); extern int getopt(int,char * const [],const char *); extern UTF8 *strcpyu8(UTF8 *, UTF8 *); /* Executable statements begin here */ xav = av; xac = ac; InitialBreak = sbrk(0); #ifdef HAVE_SETLOCALE (void) setlocale(LC_ALL,""); #endif #ifdef LOCALE_GETTEXT bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); #endif if(ac < 2){ Copyright(stderr); PrintUsage(); exit(INFO); } /* * Initializations and defaults. * * Note that the defaults for field terminators are set * after the command line is processed since they depend * on whether records are lines or blocks. */ Records = 0L; InputRecords = 0L; KeyCount = 0; #ifndef NOCOMPARISONCNT ComparisonCnt = 0L; #endif InitialMaxRecords = DEFMAXRECORDS; InitialMaxFields = DEFMAXFIELDS; InputTextSize = INPUTTEXTSIZEINIT; RecordParseType = RPT_NNBLOCK; GetRecord = GetNNBlockRAUTF8; ReverseP = FALSE; TerminatorsSetP = FALSE; WholeKeyP = FALSE; FailedKeyP = FALSE; BMPOnlyP = FALSE; MultipleLocalesP = FALSE; ReservePrivateUseAreaP = FALSE; /* Allocate storage */ InputText = (UTF8 *) malloc((size_t) InputTextSize * sizeof(UTF8)); if(InputText == NULL){ fprintf(stderr,_("%s: out of memory - InputText .\n"),progname); exit(OUTOFMEMORY); } TempString.c = InputTextSize; TempString.l = 0; TempString.s = (wchar_t *) malloc((size_t) TempString.l * sizeof(wchar_t)); if(TempString.s == NULL){ fprintf(stderr,_("%s: out of memory - TempString.\n"),progname); exit(OUTOFMEMORY); } CreateInitialKeys(); /* Process command line */ #ifdef DEBUGP fprintf(stderr,"About to process command line.\n");fflush(stderr); #endif /* EgJkPUVYZ */ opterr = 0; /* We'll handle errors ourselves */ #ifdef USE_UNINUM while( (opt = getopt_long(ac,av,":1:2:Aa:Bbc:Cd:De:f:FGHhiIjKlLmM:Nn:O:o:P:pQqr:Rs:S:T:t:u:vwW:x:X:y:Zz",&opts[0],&lgoindex)) != EOF){ #else while( (opt = getopt_long(ac,av,":1:2:Aa:Bbc:Cd:De:f:FGHhiIjKlLmM:n:O:o:P:pQqr:Rs:S:T:t:u:vwW:x:X:Zz",&opts[0],&lgoindex)) != EOF){ #endif switch(opt){ case CL_IN: InputFile = optarg; break; case CL_OUT: OutputFile = optarg; break; case 'A': CheckKeySelected("use first character only"); KeyInfo[KeyCount-1]->FirstCharOnlyP = 1; break; case 'a': switch(tolower(optarg[0])){ case 'i': SortAlgorithm = INSERTIONSORT; break; case 'm': SortAlgorithm = MERGESORT; break; case 'q': SortAlgorithm = QUICKSORT; break; case 's': SortAlgorithm = SHELLSORT; break; default: fprintf(stderr,_("Unrecognized sort algorithm %s"),optarg); exit(BADOPTIONARG); } break; case 'm': EndOfLine = 0x0d; /* Carriage return, as on Mac */ break; case 'P': /* Set randomization seed */ RandomSeed=strtoul(optarg,&endptr,10); if(errno == ERANGE){ fprintf(stderr,_("%s: value %s for random seed is beyond representable range\n"), progname,optarg); exit(BADOPTIONARG); } if(errno == EINVAL){ fprintf(stderr,_("%s: value %s for random seed is ill-formed\n"), progname,optarg); exit(BADOPTIONARG); } if(*endptr != '\0'){ fprintf(stderr,_("%s: ill-formed input %s for random seed.\n"),progname,optarg); exit(BADOPTIONARG); } SeedSetByUserP = 1; break; case 'p': if(SortOrderSpecifiedP) { fprintf(stderr,_("The -p flag must precede all sort order specifications.\n")); fprintf(stderr,_("Since this is not the case, it will be ignored.\n")); break; } ReservePrivateUseAreaP = 1; break; case 'B': /* Keys will not contain characters outside the BMP */ if(SortOrderSpecifiedP) { fprintf(stderr,_("The -B flag must precede all sort order specifications.\n")); fprintf(stderr,_("Since this is not the case, it will be ignored.\n")); break; } BMPOnlyP = 1; RankTableSize = MAXBMP; break; /* How records are delimited */ case 'b': /* A record is a newline-terminated block */ RecordParseType = RPT_NNBLOCK; break; case 'l': RecordParseType = RPT_LINE; break; case 'r': /* Specify record separator */ RecordParseType = RPT_SEPCHAR; #ifdef USEUTF8PROC if( (UnicodeNormalization == UNORM_NFC) || (UnicodeNormalization == UNORM_NFD)) { if(UnicodeNormalization == UNORM_NFC) { tmpint1 = utf8proc_map((UTF8 *)optarg,0, &tmputf8ptr, UTF8PROC_NULLTERM | UTF8PROC_COMPOSE); } if(UnicodeNormalization == UNORM_NFD) { tmpint1 = utf8proc_map((UTF8 *)optarg,0, &tmputf8ptr, UTF8PROC_NULLTERM | UTF8PROC_DECOMPOSE); } optarg = (char *)tmputf8ptr; } if ((status = u82u32((unsigned char *)optarg,&tmpwcptr,&tmpwc)) != 0) { fprintf(stderr,_("Fatal error while setting record separator.\n")); exit(status); } #else if ((status = u82u32((unsigned char *)optarg,&tmpwcptr,&tmpwc)) != 0) { fprintf(stderr,_("Fatal error while setting record separator.\n")); exit(status); } if(UnicodeNormalization != UNORM_NONE) { tmpwcptr2 = (wchar_t *) NormalizeString((UTF32 *) tmpwcptr, &NormalizationResult, UnicodeNormalization); if(NormalizationResult <= 0) { fprintf(stderr, _("Unicode normalization failed on tag %s.\n"),optarg); exit(OTHERERROR); } free((void *) tmpwcptr); tmpwcptr = tmpwcptr2; } #endif if(EvalEscapes(tmpwcptr) == ERROR){ fprintf(stderr,_("EvalEscapes: out of memory.\n")); exit(OUTOFMEMORY); } RecordSeparator = tmpwcptr[0]; CheckFree(tmpwcptr,__LINE__); break; case 'Z': SkipFirstRecordP = 1; break; case 'O': /* Fixed-length record */ RecordParseType = RPT_FIXEDLENGTH; tmpint1 = (int) strtol(optarg,&endptr,0); if(errno == ERANGE){ fprintf(stderr,_("%s: value %s out of representable range\n"), progname,optarg); exit(BADOPTIONARG); } if(errno == EINVAL){ fprintf(stderr,_("%s: value %s ill-formed\n"), progname,optarg); exit(BADOPTIONARG); } if(*endptr != '\0'){ fprintf(stderr,_("%s: ill-formed input %s\n"),progname,optarg); exit(BADOPTIONARG); } if (tmpint1 < 1) { fprintf(stderr,_("%s: The length of a fixed length record must be positive.\n"),progname); exit(BADOPTIONARG); } InputTextSize = tmpint1; break; /* How fields are delimited */ case 'd': /* Fields are terminated by the named characters */ if((status = u82u32((UTF8 *)optarg,&tmpwcptr,&tmpwc)) != 0) { fprintf(stderr,_("Fatal error while setting field separator.\n")); exit(status); } #ifdef USEUTF8PROC if( (UnicodeNormalization == UNORM_NFC) || (UnicodeNormalization == UNORM_NFD)) { if(UnicodeNormalization == UNORM_NFC) { tmpint1 = utf8proc_map((UTF8 *)optarg,0, &tmputf8ptr, UTF8PROC_NULLTERM | UTF8PROC_COMPOSE); } if(UnicodeNormalization == UNORM_NFD) { tmpint1 = utf8proc_map((UTF8 *)optarg,0, &tmputf8ptr, UTF8PROC_NULLTERM | UTF8PROC_DECOMPOSE); } optarg = (char *)tmputf8ptr; } if ((status = u82u32((unsigned char *)optarg,&tmpwcptr,&tmpwc)) != 0) { fprintf(stderr,_("Fatal error while setting record separator.\n")); exit(status); } #else if ((status = u82u32((unsigned char *)optarg,&tmpwcptr,&tmpwc)) != 0) { fprintf(stderr,_("Fatal error while setting record separator.\n")); exit(status); } if(UnicodeNormalization != UNORM_NONE) { tmpwcptr2 = (wchar_t *) NormalizeString((UTF32 *) tmpwcptr, &NormalizationResult, UnicodeNormalization); if(NormalizationResult <= 0) { fprintf(stderr, _("Unicode normalization failed on tag %s.\n"),optarg); exit(OTHERERROR); } free((void *) tmpwcptr); tmpwcptr = tmpwcptr2; } #endif if(EvalEscapes(tmpwcptr) == ERROR){ fprintf(stderr,_("EvalEscapes: out of memory.\n")); exit(OUTOFMEMORY); } Terminators = tmpwcptr; tmpwcptr = NULL; TerminatorsSetP = TRUE; break; /* What to sort on */ case 'e': /* Character range */ if(WholeKeyP){ fprintf(stderr,_("Use of key field and whole record is inconsistent.\n")); exit(BADOPTION); } CheckKeyAllocation (KeyCount,&MaxKeys); KeyInfo[KeyCount]->SelectType = CRANGE; tmpint1 = sscanf(optarg,"%d,%d",&KeyInfo[KeyCount]->RangeFirst,&KeyInfo[KeyCount]->RangeLast); /* Our indices are zero-based but the user's are one-based */ if (KeyInfo[KeyCount]->RangeFirst > 0) KeyInfo[KeyCount]->RangeFirst--; if (KeyInfo[KeyCount]->RangeLast > 0) KeyInfo[KeyCount]->RangeLast--; ValidateCRange(optarg,tmpint1,KeyCount); ++KeyCount; break; case 't': /* Next key has specified tag */ if(WholeKeyP){ fprintf(stderr,_("Use of key field and whole record is inconsistent.\n")); exit(BADOPTION); } CheckKeyAllocation(KeyCount,&MaxKeys); KeyInfo[KeyCount]->SelectType = TAGGED; #ifdef USEUTF8PROC if( (UnicodeNormalization == UNORM_NFC) || (UnicodeNormalization == UNORM_NFD)) { if(UnicodeNormalization == UNORM_NFC) { tmpint1 = utf8proc_map((UTF8 *)optarg,0, &tmputf8ptr, UTF8PROC_NULLTERM | UTF8PROC_COMPOSE); } if(UnicodeNormalization == UNORM_NFD) { tmpint1 = utf8proc_map((UTF8 *)optarg,0, &tmputf8ptr, UTF8PROC_NULLTERM | UTF8PROC_DECOMPOSE); } optarg = (char *)tmputf8ptr; } if((status = u82u32((UTF8 *)optarg,&tmpwcptr,&tmpwc)) != 0) { fprintf(stderr,_("Fatal error while setting tag.\n")); exit(status); } #else if((status = u82u32((UTF8 *)optarg,&tmpwcptr,&tmpwc)) != 0) { fprintf(stderr,_("Fatal error while setting tag.\n")); exit(status); } if(UnicodeNormalization != UNORM_NONE) { tmpwcptr2 = (wchar_t *) NormalizeString((UTF32 *) tmpwcptr, &NormalizationResult, UnicodeNormalization); if(NormalizationResult <= 0) { fprintf(stderr, _("Unicode normalization failed on tag %s.\n"),optarg); exit(OTHERERROR); } free((void *) tmpwcptr); tmpwcptr = tmpwcptr2; } #endif TagTempLengthNeeded = wcslen(tmpwcptr)+wcslen(L"()(.*)")+2; if( TagTempLengthNeeded > TagTempStringLength){ TagTemp = (wchar_t *) realloc((void *)TagTemp,(size_t) TagTempLengthNeeded * sizeof(wchar_t)); if(TagTemp == NULL){ fprintf(stderr,_("TagTemp: out of memory.\n")); exit(OUTOFMEMORY); } TagTempStringLength = TagTempLengthNeeded; } tmpint1 = swprintf(TagTemp,TagTempStringLength-1,L"(%ls)(.*)",tmpwcptr); if(EvalEscapes(TagTemp) == ERROR){ fprintf(stderr,_("EvalEscapes: out of memory.\n")); exit(OUTOFMEMORY); } tmpint1 =tre_regwcomp(&(KeyInfo[KeyCount]->cregexp),TagTemp,REG_EXTENDED); if(tmpint1 != 0){ fprintf(stderr,_("Failed to compile regular expression: %s.\n"), optarg); PrintLog( _("Failed to compile regular expression: %s.\n"), optarg); exit(BADOPTIONARG); } KeyInfo[KeyCount]->Tag = (wchar_t *) malloc(sizeof(wchar_t) * (wcslen(tmpwcptr)+1)); if(KeyInfo[KeyCount]->Tag) wcscpy(KeyInfo[KeyCount]->Tag,tmpwcptr); /* For report */ else{ fprintf(stderr,_("Out of memory.\n")); exit(OUTOFMEMORY); } ++KeyCount; CheckFree((void *)tmpwcptr,__LINE__); break; case 'n': /* Next key is position or range between positions */ if(WholeKeyP){ fprintf(stderr,_("Use of key field and whole record is inconsistent.\n")); exit(BADOPTION); } CheckKeyAllocation(KeyCount,&MaxKeys); tmpptr1 = strchr(optarg,','); if(tmpptr1 != NULL) { *tmpptr1 = '\0'; /* First = optarg */ tmpptr2 = strchr(optarg,'.'); if(tmpptr2 != NULL) { *tmpptr2 = '\0'; KeyInfo[KeyCount]->FirstOffset = atoi(tmpptr2+1)-1; if(KeyInfo[KeyCount]->FirstOffset < 0) { fprintf(stderr,_("Character offsets in key specifications have origin 1.\n")); exit(BADOPTIONARG); } } KeyInfo[KeyCount]->Number = atoi(optarg) -1; /* Second = tmpptr1+1 */ tmpptr2 = strchr(tmpptr1+1,'.'); if(tmpptr2 != NULL) { *tmpptr2 = '\0'; KeyInfo[KeyCount]->LastOffset = atoi(tmpptr2+1)-1; if(KeyInfo[KeyCount]->LastOffset < 0) { fprintf(stderr,_("Character offsets in key specifications have origin 1.\n")); exit(BADOPTIONARG); } } KeyInfo[KeyCount]->Last = atoi(tmpptr1+1) -1; } else { tmpptr2 = strchr(optarg,'.'); if(tmpptr2 != NULL) { *tmpptr2 = '\0'; KeyInfo[KeyCount]->FirstOffset = atoi(tmpptr2+1)-1; } KeyInfo[KeyCount]->Number = atoi(optarg) -1; KeyInfo[KeyCount]->Last = KeyInfo[KeyCount]->Number; } KeyInfo[KeyCount]->SelectType = NUMBERED; ++KeyCount; break; case 'Q': CheckOnlyP = 1; break; case 'w': /* Sort on the entire input text */ WholeKeyP=TRUE; if(KeyCount > 0){ fprintf(stderr,_("Use of key field and whole record is inconsistent.\n")); exit(BADOPTION); } KeyCount = 1; KeyInfo[0]->SelectType = WHOLE; break; case 'i': CheckKeySelected("key inversion"); KeyInfo[KeyCount-1]->CompType |= CINVERSE; break; case 'C': CheckKeySelected("case folding"); KeyInfo[KeyCount-1]->FoldCaseP = 1; break; case 'z': CheckKeySelected("turkic case folding"); KeyInfo[KeyCount-1]->FoldCaseP = 1; KeyInfo[KeyCount-1]->TurkicFoldCaseP = 1; break; case 'R': CheckKeySelected("key reversal"); KeyInfo[KeyCount-1]->ReverseP = TRUE; break; case 'f': CheckKeySelected("date format"); if((status = u82u32((UTF8 *)optarg,&tmpwcptr,&tmpwc)) != 0) { fprintf(stderr,_("Fatal error setting date format.\n")); exit(status); } if(KeyInfo[KeyCount-1]->CompType & CDATE) { if(SetDateFormat(tmpwcptr,&(KeyInfo[KeyCount-1]->ymd)) == ERROR){ fprintf(stderr,_("%s is not a valid date format.\n"),optarg); exit(BADOPTIONARG); } } else { fprintf(stderr, _("It doesn't make sense to set a format for a key that is not a date or time.\n")); } CheckFree((void *)tmpwcptr,__LINE__); break; case 'o': CheckKeySelected("optionality"); if(KeyInfo[0]->SelectType == WHOLE){ fprintf(stderr,_("If the whole record is the key, the key may not be optional.\n")); exit(BADOPTION); } KeyInfo[KeyCount-1]->OptionalP = TRUE; switch(optarg[0]){ case 'l': case 'L': case '<': KeyInfo[KeyCount-1]->MissingKeyComparison = COMPARE_LESSTHAN; break; case 'g': case 'G': case '>': KeyInfo[KeyCount-1]->MissingKeyComparison = COMPARE_GREATERTHAN; break; case 'e': case 'E': case '=': default: KeyInfo[KeyCount-1]->MissingKeyComparison = COMPARE_EQUAL; break; } break; /* What files to use */ case 'S': /* Read substitutions from the named file */ CheckKeySelected("substitutions"); if(GetSubstitutions(optarg,KeyInfo[KeyCount-1]) != SUCCESS){ fprintf(stderr, _("Attempt to read substitutions from file %s failed.\n"),optarg); exit(OTHERERROR); } PrintLog(_("Read %d substitutions for key %d from file %s.\n"), KeyInfo[KeyCount-1]->SubListEntries,KeyCount,optarg); break; case 's': /* Use sort order provided by locale or file */ CheckKeySelected("sort order"); if( (strcmp(optarg,"locale") == 0) || (strcmp(optarg,"current") == 0)) { #ifdef LOCALE_SORT_ORDER tmpstr = setlocale(LC_COLLATE,""); if(tmpstr != NULL) { KeyInfo[KeyCount-1]->LocaleP = TRUE; KeyInfo[KeyCount-1]->Locale = copy_string(tmpstr); break; } else { fprintf(stderr,_("Current locale is not supported.\n")); exit(BADOPTIONARG); } #else fprintf(stderr,"The use of locale information is not available on this system.\n"); exit(BADOPTIONARG); #endif } /* First see if the argument is a filename */ if ((fp = fopen(optarg,"r")) == NULL) { #ifdef LOCALE_SORT_ORDER if( (tmpstr = setlocale(LC_COLLATE,optarg)) == NULL) { fprintf(stderr,_("Could not set LC_COLLATE to %s.\n"),optarg); exit(BADOPTIONARG); } else { KeyInfo[KeyCount-1]->LocaleP = TRUE; KeyInfo[KeyCount-1]->Locale = copy_string(tmpstr); break; } #else fprintf(stderr,"Could not open file %s.\n",optarg); #endif } else fclose(fp); if(SortOrderSpecifiedP == 0) SetMultigraphInfo(); SortOrderSpecifiedP = 1; if(GetSortOrder(optarg,KeyInfo[KeyCount-1]) == ERROR){ fprintf(stderr, _("Attempt to read sort order from file %s failed.\n"),optarg); exit(OTHERERROR); } PrintLog(_("Read sort order with %d multigraphs for key %d from file %s.\n"), KeyInfo[KeyCount-1]->MapTableEntries,KeyCount,optarg); break; case 'x': /* Read exclusions from the named file */ CheckKeySelected("exclusions"); if(KeyInfo[KeyCount-1]->ExclusionSpec == STRINGSPEC){ fprintf(stderr,_("Exclusions already specified on command line for this key.\n")); exit(BADOPTION); } if(GetExclusions(optarg,KeyInfo[KeyCount-1]) != SUCCESS){ fprintf(stderr, _("Attempt to read exclusions from file %s failed.\n"),optarg); exit(OTHERERROR); } PrintLog(_("Read %d exclusions for key %d from file %s.\n"), KeyInfo[KeyCount-1]->ExclusionEntries,KeyCount,optarg); KeyInfo[KeyCount-1]->ExclusionSpec=FILESPEC; break; case 'T': /* Transformations */ CheckKeySelected("transformations"); tmpptr1 = optarg; while((t = *tmpptr1)) { tmpptr1++; switch(t) { case 'd': KeyInfo[KeyCount-1]->StripDiacriticsP = 1; break; case 'e': KeyInfo[KeyCount-1]->ConvertEnclosedP = 1; break; case 's': KeyInfo[KeyCount-1]->ConvertStylisticP = 1; break; default: fprintf(stderr,_("%c is not a recognized transformation designation.\n"),t); exit(BADOPTIONARG); } } break; case 'X': /* Read exclusions from command line */ CheckKeySelected("exclusions"); if(KeyInfo[KeyCount-1]->ExclusionSpec == FILESPEC){ fprintf(stderr,_("Exclusions already specified in file for this key.\n")); exit(BADOPTION); } GetExclusionsString((unsigned char *)optarg,KeyInfo[KeyCount-1]); KeyInfo[KeyCount-1]->ExclusionSpec=STRINGSPEC; break; /* Sizes of things */ case 'M': InitialMaxRecords = atoi(optarg); if(InitialMaxRecords <= 2){ fprintf(stderr, _("%s: invalid initial maximum record specification %s.\n"), progname,optarg); exit(BADOPTIONARG); } break; /* Miscellaneous */ case 'I': /* Reverse sense of comparisons globally */ ReverseP = TRUE; break; case 'u': switch(optarg[0]){ case 'c': UnicodeNormalization = UNORM_NFC; break; case 'd': UnicodeNormalization = UNORM_NFD; break; case 'n': UnicodeNormalization = UNORM_NONE; break; case 'C': UnicodeNormalization = UNORM_NFKC; break; case 'D': UnicodeNormalization = UNORM_NFKD; break; default: fprintf(stderr, _("Unicode normalization %s not recognized.\n"),optarg); exit(BADOPTIONARG); } break; case 'c': /* Comparison type */ CheckKeySelected("comparison type"); switch(optarg[0]){ case 'a': KeyInfo[KeyCount-1]->CompType |= (CANGLE | CNUMERIC); break; case 'D': KeyInfo[KeyCount-1]->CompType |= CDOMAIN; break; case 'd': KeyInfo[KeyCount-1]->CompType |= (CDATE | CNUMERIC); break; case 'h': KeyInfo[KeyCount-1]->CompType |= CHYBRID; break; case 'i': KeyInfo[KeyCount-1]->CompType |= (CISO8601 | CNUMERIC); break; case 'l': KeyInfo[KeyCount-1]->CompType &= ~CNUMERIC; break; case 'N': KeyInfo[KeyCount-1]->CompType |= CNUMSTR; break; case 'm': KeyInfo[KeyCount-1]->CompType |= CMONTH; break; case 'n': KeyInfo[KeyCount-1]->CompType |= CNUMERIC; break; case 'r': KeyInfo[KeyCount-1]->CompType |= CRANDOM; break; case 's': KeyInfo[KeyCount-1]->CompType |= CSIZE; /* Don't set numeric yet */ break; case 't': KeyInfo[KeyCount-1]->CompType |= (CTIME | CNUMERIC); break; default: fprintf(stderr, _("Comparison type %s not recognized.\n"),optarg); exit(BADOPTIONARG); } break; case 'W': /* Specify whitespace for this key's sort order file */ CheckKeySelected("whitespace for sort order file"); if(KeyInfo[KeyCount-1]->RankTable != NULL) { fprintf(stderr,_("The sort order for key %d has already been read.\n"), KeyCount); fprintf(stderr,_("The whitespace definition must come first.\n")); exit(OTHERERROR); } if(GetWhiteSpaceDefinition(optarg,KeyInfo[KeyCount-1]) == ERROR) { fprintf(stderr, _("Attempt to read whitespace list from file %s failed.\n"),optarg); exit(OTHERERROR); } PrintLog(_("Read whitespace list for key %d from file %s.\n"), KeyCount,optarg); break; #ifdef USE_UNINUM case 'y': /* Number system */ CheckKeySelected("number system"); tmpint1 = StringToNumberSystem(optarg); if (tmpint1 == NS_UNKNOWN) { fprintf(stderr,"Number system specification %s not recognized.\n",optarg); exit(BADOPTIONARG); } else if(tmpint1 == NS_ANY) { KeyInfo[KeyCount-1]->NumberSystemAnyP = 1; KeyInfo[KeyCount-1]->NumberSystem = NS_UNKNOWN; /* So it won't be NS_WESTERN */ } else KeyInfo[KeyCount-1]->NumberSystem = tmpint1; break; #endif case 'q': /* Be quiet */ VerboseP = FALSE; break; case 'j': LogP = 0; break; /* Provide information */ case 'D': /* List defaults */ PrintDefaults(stdout); if(LogP) { if(LogStartedP == 0) StartLog(); PrintDefaults(Logfp); } exit(INFO); case 'F': PrintGeneralFlags(stdout); if(LogP) { if(LogStartedP == 0) StartLog(); PrintGeneralFlags(Logfp); } exit(INFO); case 'G': /* List GNU equivalences */ PrintGNUEquivalences(stdout); if(LogP) { if(LogStartedP == 0) StartLog(); PrintGNUEquivalences(Logfp); } exit(INFO); case 'K': PrintKeySpecificFlags(stdout); if(LogP) { if(LogStartedP == 0) StartLog(); PrintKeySpecificFlags(Logfp); } exit(INFO); case 'L': /* List limits */ PrintLimits(stdout); if(LogP) { if(LogStartedP == 0) StartLog(); PrintLimits(Logfp); } exit(INFO); #ifdef USE_UNINUM case 'N': PrintNumberSystems(stdout); if(LogP) { if(LogStartedP == 0) StartLog(); PrintNumberSystems(Logfp); } exit(INFO); #endif case 'H': PrintInformationalFlags(stdout); if(LogP) { if(LogStartedP == 0) StartLog(); PrintInformationalFlags(Logfp); } exit(INFO); case 'h': PrintUsage(); exit(INFO); case 'v': /* This info is always printed so provide flag for compatibility */ ShowVersion(stdout); exit(INFO); case ':': fprintf(stderr,_("%s: missing argument to option flag %c.\n"),progname,optopt); exit(BADOPTIONARG); case '?': fprintf(stderr,_("%s: invalid option flag %c\n"),progname,optopt); exit(BADOPTION); } /* End switch */ } /* End getopt while */ for(i=0; i < KeyCount; i++) { if(KeyInfo[i]->FirstCharOnlyP && ( (KeyInfo[i]->CompType & CNUMERIC) || (KeyInfo[i]->CompType & CSIZE) )) { fprintf(stderr,_("%s: the option first-char-only is available only with lexicographic keys.\n"),progname); exit(BADOPTION); } } if(LogStartedP == 0) StartLog(); #ifdef DEBUGP fprintf(stderr,"Processed command line.\n"); fflush(stderr); #endif if(KeyCount < 1){ fprintf(stderr,_("%s: no sort key specified.\n\n"),progname); exit(OTHERERROR); } ProvideDefaultRanks(); #ifdef DEBUGP fprintf(stderr,"Provided default ranks.\n"); fflush(stderr); #endif #ifdef DEBUGP fprintf(stderr,"Described keys.\n");fflush(stderr); #endif if(VerboseP){ DescribeKeys(stderr); if(ReverseP) fprintf(stderr,_("Order globally inverted.\n")); } switch(RecordParseType) { case RPT_LINE: GetRecord = GetBlockSepCharRAUTF8; RecordSeparator = EndOfLine; break; case RPT_NNBLOCK: GetRecord = GetNNBlockRAUTF8; RecordSeparator = EndOfLine; break; case RPT_SEPCHAR: GetRecord = GetBlockSepCharRAUTF8; break; case RPT_FIXEDLENGTH: GetRecord = GetFixedLengthRecord; RecordSeparator = NOTACHARACTER; /* This is a codepoint guaranteed to be undefined */ break; } /* Set field terminators here since defaults are option-dependent */ if(!TerminatorsSetP){ if(RecordParseType == RPT_LINE) { Terminators = wCreateString(2); Terminators[0] = L'\t'; Terminators[1] = L' '; Terminators[2] = L'\0'; } else{ /* Block */ Terminators = wCreateString(1); Terminators[0] = (wchar_t) (0x00FF & EndOfLine); Terminators[1] = L'\0'; } } TerminatorCnt = wcslen(Terminators); /* We wait to do this here so that we have the locale if it was set with the -s flag */ for(i=0;i < KeyCount;i++) { if( ((KeyInfo[i]->CompType & CMONTH) || (KeyInfo[i]->CompType & CDATE)) && (KeyInfo[i]->MapTable == NULL)) { GetMonthNames(i); KeyInfo[i]->CompType |= CNUMERIC; } } /* Set up input and output */ if(ac > optind){ InputFile = av[optind]; } if(InputFile == NULL) { InputFile=copy_string("stdin"); infp = stdin; } else { infp = OpenFile(InputFile,"r",progname); if(infp == NULL) exit(OTHERERROR); } infd = fileno(infp); if(OutputFile == NULL) { OutputFile=copy_string("stdout"); outfp = stdout; } else { if (strcmp(InputFile,OutputFile) == 0) { OverWriteInputP = 1; outfd = mkstemp(TempOutputName); if (outfd == (-1)) { fprintf(stderr,"%s: could not open temporary output file.\n",progname); exit(OPENERROR); } outfp = fdopen(outfd,"w"); if(outfp == NULL) { fprintf(stderr,"%s: could not fdopen temporary output file.\n",progname); exit(OPENERROR); } if(fstat(fileno(infp),&InputFileInfo) < 0) { fprintf(stderr,"%s: could not fstat input file.\n",progname); exit(OTHERERROR); } } else { outfp = OpenFile(OutputFile,"w",progname); if(outfp == NULL) exit(OTHERERROR); } } if(VerboseP) fprintf(stderr,_("Reading from %s.\n"),InputFile); MaxRecords = InitialMaxRecords; RecordList = (struct record **) malloc((size_t) MaxRecords * sizeof(struct record *)); if(RecordList == (struct record **)0){ fprintf(stderr,_("%s: out of memory - RecordList.\n"),progname); exit(OUTOFMEMORY); } #ifdef LOCALE_SORT_ORDER /* Find out if we are using more than one distinct locale */ FirstLocale = NULL; for(i =0; i < KeyCount; i++) { if(KeyInfo[i]->LocaleP) { if(NULL == FirstLocale) FirstLocale = KeyInfo[i]->Locale; else { if(strcmp(FirstLocale,KeyInfo[i]->Locale)) { MultipleLocalesP = 1; break; } } } } if( (MultipleLocalesP == 0) && (FirstLocale != NULL)) { tmpstr=setlocale(LC_COLLATE,FirstLocale); if (NULL == tmpstr) { fprintf(stderr,_("Could not set LC_COLLATE to requested locale.\n")); exit(BADOPTIONARG); } } #endif /* Seed random number generator for use in random comparisons */ if (!SeedSetByUserP) { RandomSeed = (unsigned int) time(NULL); snprintf(PrTempString,PRTEMPSTRLEN,"%u",RandomSeed); ReverseString(PrTempString); RandomSeed = (unsigned int) atoi(PrTempString); } srandom(RandomSeed); if(LogP) { if(LogStartedP == 0) StartLog(); DescribeKeys(Logfp);fflush(Logfp); strcpy(StartTimeStamp,TimeDateStamp()); } /* Now we read in one record at a time and extract and store its key */ BytesRead = 0L; if(VerboseP)fprintf(stderr,_("Records processed: %15ld"),Records); while(TRUE){ InputText = (*GetRecord)(infp,InputText,&RecordLength,&InputTextSize, RecordSeparator,InputRecords++,BytesRead); if(RecordLength == INPUT_BUFOVERFLOW){ fprintf(stderr,_("%s: unable to allocate memory for input buffer.\n"),progname); exit(OUTOFMEMORY); } else if(RecordLength == INPUT_SHORTRECORD) { fprintf(stderr,_("%s: fixed length record %lu too short.\n"),progname,InputRecords); exit(BADRECORD); } else if(RecordLength == INPUT_BADENCODING) { fprintf(stderr,_("%s: record %6lu at byte %10lu contains ill-formed UTF-8.\n"), progname,InputRecords,BytesRead); exit(BADRECORD); } else if(RecordLength == INPUT_ENDOFINPUT) break; else if(RecordLength == 0) { BytesRead++; continue; } /* Absorb extra separators - should perhaps be done by input routines */ else if((RecordLength == 1) && (InputText[0] == RecordSeparator)) { BytesRead++; continue; } BytesRead += RecordLength; if(Records == MaxRecords){ /* Need more storage? */ MaxRecords += InitialMaxRecords; RecordList = (struct record **) realloc((void *) RecordList, (unsigned) MaxRecords * sizeof(struct record *)); if(RecordList == (struct record **)0){ fprintf(stderr,_("\n%s: out of memory - RecordList.\n"),progname); fprintf(stderr,_("Storage allocation failed on record %ld.\n"), InputRecords+1L); exit(OUTOFMEMORY); } } /* Allocate storage for record structure */ RecordList[Records] = (struct record *) malloc(sizeof(struct record)); if(RecordList[Records] == (struct record *) 0){ fprintf(stderr,_("\n%s: out of memory - new record - #%ld.\n"), progname,InputRecords+1L); exit(OUTOFMEMORY); } RecordList[Records]->length = (size_t) RecordLength; RecordList[Records]->text = NULL; RecordList[Records]->klistptr = (union key *) malloc( (unsigned) KeyCount * sizeof(union key)); if(RecordList[Records]->klistptr == (union key *) 0){ fprintf(stderr,_("\n%s: out of memory - keylist of record -#%ld.\n"), progname,InputRecords+1L); exit(OUTOFMEMORY); } /* Store record text */ if(!SemiExternalP) { if(!CheckOnlyP) { RecordList[Records]->text = (UTF8 *) malloc((size_t) (RecordLength+1) * sizeof(UTF8)); if(RecordList[Records]->text == NULL){ fprintf(stderr,_("\n%s: out of memory - record text -#%ld.\n"), progname,InputRecords+1L); exit(OUTOFMEMORY); } (void)strcpyu8(RecordList[Records]->text,InputText); } } else RecordList[Records]->fpos = lseek(infd,0,SEEK_CUR) - RecordList[Records]->length- 1L; /* Reallocate TempString if necessary to ensure size exceeds current record */ if(TempString.c <= RecordLength){ TempString.c = RecordLength+1; TempString.s = (wchar_t *) realloc((void *) TempString.s, TempString.c * sizeof(wchar_t)); } if(TempString.s == NULL){ fprintf(stderr,_("\n%s: Failed to reallocate memory for TempString.\n"),progname); exit(OUTOFMEMORY); } #ifdef USEUTF8PROC if( (UnicodeNormalization == UNORM_NFC) || (UnicodeNormalization == UNORM_NFD)) { if(UnicodeNormalization == UNORM_NFC) { tmpint1 = utf8proc_map(InputText,0, &tmputf8ptr, UTF8PROC_NULLTERM | UTF8PROC_COMPOSE); } if(UnicodeNormalization == UNORM_NFD) { tmpint1 = utf8proc_map(InputText,0, &tmputf8ptr, UTF8PROC_NULLTERM | UTF8PROC_DECOMPOSE); } if(tmpint1 > 0) { free(InputText); InputText = tmputf8ptr; InputTextSize = tmpint1; } } #endif /* Generate the UTF32 copy of the record text. */ if((status = u82u32(InputText,&wcInputText,&MaxCodeInInput)) != 0) { fprintf(stderr,_("Fatal error while making UTF32 copy of record %ld.\n"), InputRecords); exit(status); } if(BMPOnlyP && (MaxCodeInInput > UNI_MAX_BMP)) { PrintLog( _("The character U+%06lX, which lies outside the BMP, was detected in record %lu:\n%s\n"), (unsigned long)MaxCodeInInput,InputRecords,InputText); fprintf(stderr,_("The character U+%06lX, which lies outside the BMP, was detected.\n"), (unsigned long)MaxCodeInInput); fprintf(stderr,_("A copy of the offending record is in the log.\n")); exit(RANGEERROR); } #ifndef USEUTF8PROC if((UnicodeNormalization != UNORM_NONE) && (MaxCodeInInput > UNI_MAX_ASCII)) { tmpwcptr = (wchar_t *) NormalizeString((UTF32 *) wcInputText, &NormalizationResult, UnicodeNormalization); if(NormalizationResult <= 0) { PrintLog( _("Unicode normalization failed on record %lu:\n%s\n"),InputRecords,InputText); fprintf(stderr, _("Unicode normalization failed on record %lu.\n"),InputRecords); fprintf(stderr,_("A copy of the offending record is in the log.\n")); exit(OTHERERROR); } free((void *) wcInputText); wcInputText = tmpwcptr; } #endif /* Now extract and store the sort key */ if ((Records == 0) && (SkipFirstRecordP)) { Records++; continue; } if(GetKeys(RecordList[Records++],KeyInfo,KeyCount,MaxCodeInInput,(Records == 0)) == ERROR){ FailedKeyP=1; PrintLog(_("Key extraction failed on ill-formed record %ld:\n%s\n"), InputRecords,InputText); /* Just skip the record by decrementing counter. */ Records--; /* Free up the storage we already allocated */ CheckFree((void *) (RecordList[Records]->text), __LINE__); CheckFree((void *) (RecordList[Records]),__LINE__); } CheckFree((void *) wcInputText, __LINE__); /* Report on progress */ if(VerboseP && (Records % REPORTINTERVAL == 0)){ fprintf(stderr,"\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b%15ld",Records); } #ifdef DEBUGP if(LogP) fflush(Logfp); fflush(stderr); #endif } /* End of record-reading loop */ if(VerboseP) fprintf(stderr,"\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b%15ld\n",Records); fclose(infp); if(SemiExternalP) { infd=open(InputFile,O_RDONLY); /* POLISH */ } if(InputRecords > 2L) { if(Records < 1L) { fprintf(stderr,_("All of the input records were ill-formed.\n")); } else if(Records < 2L) { fprintf(stderr,_("All but one input record was ill-formed.\n")); } } if(Records < 2L) { fprintf(stderr,_("There's no point in sorting fewer than two records.\n")); if(!CheckOnlyP) { WriteOutRecords(Records,outfp,ReverseP,RecordSeparator); } if(LogP) fclose(Logfp); exit(0); } if(SkipFirstRecordP) { FirstRecordPointer = RecordList[0]; RecordList += 1; Records -=1; } /* Copy the record pointer list if we're doing a check */ if(CheckOnlyP) { SavedRecordList = (struct record **) malloc((size_t) Records * sizeof(struct record *)); if(SavedRecordList == NULL) { fprintf(stderr,"Cannot allocate storage for pointer list copy.\n"); exit(OUTOFMEMORY); } for(i = 0; i < Records; i++) SavedRecordList[i] = RecordList[i]; } /* Make keys sorted on string length compare numerically */ for(i =0; i < KeyCount; i++) { if(KeyInfo[i]->CompType & CSIZE) KeyInfo[i]->CompType |= CNUMERIC; } /* Sort the stored records */ if(VerboseP) fprintf(stderr,_("Sorting...")); if(VerboseP) fprintf(stderr,"\n"); if(Records > 1L){ switch (SortAlgorithm) { case INSERTIONSORT: InsertionSort(RecordList,Records); break; case MERGESORT: MergeSort(RecordList,0L,Records); break; case SHELLSORT: ShellSort(RecordList,Records); break; case QUICKSORT: default: QuickSort(RecordList,0L,Records-1L); break; } } if(VerboseP){ fputs("\b\b\b\b\b\b\b\b\b\b",stderr); } /* Write the sorted records back out */ if(!CheckOnlyP) { if(VerboseP) fprintf(stderr,_("Records written: %15ld"),0L); } fflush(stdout);fflush(stderr); if(!CheckOnlyP) { if(SkipFirstRecordP) { WriteSingleRecord(FirstRecordPointer,outfp,RecordSeparator); } if(SemiExternalP) WriteOutRecordsExternal(Records,outfp,ReverseP,RecordSeparator); else WriteOutRecords(Records,outfp,ReverseP,RecordSeparator); } else { for (i = 0; i < Records; i++) { if(RecordList[i] != SavedRecordList[i]) { ExitValue = NOTSORTED; break; } } } if(OverWriteInputP) { fclose(outfp); unlink(InputFile); if(CopyFile(TempOutputName,InputFile,InputFileInfo.st_mode) < 0) { fprintf(stderr,"%s: overwrite of input file %s by temporary output file %s failed.\n", progname,InputFile,TempOutputName); } unlink(TempOutputName); } if(LogP) { PrintLog(_("Started:\t\t\t ")); fputs(StartTimeStamp,Logfp); fputs("\n",Logfp); PrintLog(_("Completed:\t\t\t ")); tmpstr=TimeDateStamp(); fputs(tmpstr,Logfp); fputs("\n",Logfp); } if(LogP) { /* Record random number generator seed, dynamic memory usage and number of comparisons */ #ifdef HAVE_PRINTF_THSEP PrintLog(_("Dynamically allocated memory: %'15d bytes\n"), ((char *)sbrk(0) - (char *)InitialBreak)); PrintLog(_("Random number generator seed: %15u\n"),RandomSeed); #ifndef NOCOMPARISONCNT PrintLog(_("Comparisons: %'15llu\n"),ComparisonCnt); if(VerboseP) fprintf(stderr,_("Comparisons: %'15llu\n"),ComparisonCnt); #endif #else PrintLog("Dynamically allocated memory: %d bytes\n", ((char *)sbrk(0) - (char *)InitialBreak)); PrintLog(_("Random number generator seed: %15u\n"),RandomSeed); #ifndef NOCOMPARISONCNT PrintLog(_("Comparisons: %'14llu\n"),ComparisonCnt); if(VerboseP) fprintf(stderr,_("Comparisons: %'14llu\n"),ComparisonCnt); #endif #endif } if(CheckOnlyP) { if(ExitValue == NOTSORTED) { if(VerboseP) fprintf(stdout,"The input is not already sorted.\n"); } else { if(VerboseP) fprintf(stdout,"The input is already sorted.\n"); } } /* We're done */ if(FailedKeyP == TRUE){ if(VerboseP) fprintf(stderr, _("Key extraction failed on one or more records.\n")); if(VerboseP && LogP) fprintf(stderr,_("Consult the log for details.\n")); ExitValue = RECORDEXCLUDED; } #ifdef HAVE_PRINTF_THSEP PrintLog(_("Records written: %'15lu\n"),Records); #else PrintLog(_("Records written: %15lu\n"),Records); #endif CloseLog(); exit(ExitValue); } /* End of main() */ int SetDateFormat(wchar_t *str, struct ymdinfo *ymd) { int i; int j; int len; len = wcslen(str); if(len == 3) { /* Day of year format */ ymd->sep1 = str[1]; ymd->m = -1; /* Flag for doy format */ for(i = 0, j=0; i < 2; i++,j+=2){ switch(str[j]){ case 'y': ymd->y = i; break; case 'd': ymd->d = i; break; default: return(ERROR); } } if(ymd->y < 0 || ymd->d < 0) return(ERROR); else return(SUCCESS); } /* If we get here we've got a full ymd format */ if(len != 5) return(ERROR); ymd->sep1 = str[1]; ymd->sep2 = str[3]; ymd->y = ymd->m = ymd->d = -1; /* For testing if value has been set */ for(i = 0, j=0; i < 3; i++,j+=2){ switch(str[j]){ case 'y': ymd->y = i; break; case 'm': ymd->m = i; break; case 'd': ymd->d = i; break; default: return(ERROR); } } if(ymd->y < 0 || ymd->m < 0 || ymd->d < 0) return(ERROR); else return(SUCCESS); } #define TMPSIZE 128 void DescribeKeys(FILE *fp) { int i; int first; int last; wchar_t wctmp[TMPSIZE]; char tmp[TMPSIZE]; extern void DumpExclusions(unsigned char *,long,FILE *); if(KeyInfo[0]->SelectType == WHOLE){ fprintf(fp,"Sorting on whole record.\n"); if(!(KeyInfo[0]->CompType & CRANDOM)) { if(KeyInfo[0]->CompType & CINVERSE)fprintf(fp,"Decreasing "); else fprintf(fp,"Increasing "); } if(!(KeyInfo[0]->CompType & CNUMERIC)){ if(KeyInfo[0]->ReverseP) fprintf(fp,"reversed "); if(KeyInfo[0]->CompType & CSIZE) fprintf(fp,"by size\n"); else if(KeyInfo[0]->CompType & CNUMSTR) fprintf(fp,"numeric string\n"); else if(KeyInfo[0]->CompType & CRANDOM) fprintf(fp,"random\n"); else if(KeyInfo[0]->CompType & CHYBRID) fprintf(fp,"hybrid\n"); else if(KeyInfo[0]->CompType & CDOMAIN) fprintf(fp,"domain name\n"); else if(KeyInfo[0]->CompType & CMONTH) fprintf(fp,"month name\n"); else { if(KeyInfo[0]->FirstCharOnlyP) fprintf(fp,"lexicographic using only first character\n"); else fprintf(fp,"lexicographic\n"); } if(KeyInfo[0]->MapTableEntries) fprintf(fp," %3d multigraph%s\n", KeyInfo[0]->MapTableEntries, (KeyInfo[0]->MapTableEntries == 1 ? "":"s")); if(KeyInfo[0]->ExclusionTable != NULL){ DumpExclusions(KeyInfo[0]->ExclusionTable,RankTableSize,fp); } } else{ if(KeyInfo[0]->CompType & CDATE) fprintf(fp,"date\n"); else if(KeyInfo[0]->CompType & CTIME) fprintf(fp,"time\n"); else if(KeyInfo[0]->CompType & CISO8601) fprintf(fp,"iso8601 date/time\n"); else if(KeyInfo[0]->CompType & CANGLE) fprintf(fp,"angle\n"); else if(KeyInfo[0]->CompType & CMONTH) fprintf(fp,"month name\n"); else { fprintf(fp,"numeric"); #ifdef USE_UNINUM if(KeyInfo[0]->NumberSystem != NS_WESTERN) { fprintf(fp," (%s)\n",NumberSystemToString(KeyInfo[0]->NumberSystem)); } else #endif fprintf(fp,"\n"); } } return; } for(i = 0;i < KeyCount; i++){ fprintf(fp,"Key %d ",i+1); fprintf(fp,"%-11.11s ",(KeyInfo[i]->OptionalP ? "optional":"obligatory")); if(KeyInfo[i]->SelectType == NUMBERED){ first = 1+KeyInfo[i]->Number; if(first > 0){ if(first == 1) sprintf(tmp,"first field"); else if(first == 2) sprintf(tmp,"second field"); else if(first == 3) sprintf(tmp,"third field"); else if(first == 4) sprintf(tmp,"fourth field"); else if(first == 5) sprintf(tmp,"fifth field"); else if(first % 100 == 11) sprintf(tmp,"%dth field",first); else if(first % 100 == 12) sprintf(tmp,"%dth field",first); else if(first % 10 == 1) sprintf(tmp,"%dst field",first); else if(first % 10 == 2) sprintf(tmp,"%dnd field",first); else sprintf(tmp,"%dth field",first); } else{ first *= -1; if(first == 1) sprintf(tmp,"last field"); else if(first == 2) sprintf(tmp,"penultimate field"); else if(first == 3) sprintf(tmp,"antepenultimate field"); else if(first == 4) sprintf(tmp,"fourth field from end"); else if(first == 5) sprintf(tmp,"fifth field from end"); else if(first % 100 == 11) sprintf(tmp,"%dth field from end",first); else if(first % 100 == 12) sprintf(tmp,"%dth field from end",first); else if(first % 10 == 1) sprintf(tmp,"%dst field from end",first); else if(first % 10 == 2) sprintf(tmp,"%dnd field from end",first); else sprintf(tmp,"%dth field from end",first); } fprintf(fp,tmp); if (KeyInfo[i]->FirstOffset > 0) { fprintf(fp," character %d",(KeyInfo[i]->FirstOffset)+1); } last = 1+KeyInfo[i]->Last; if(last != first) { fprintf(fp," through "); if(last > 0){ if(last == 1) sprintf(tmp,"first field"); else if(last == 2) sprintf(tmp,"second field"); else if(last == 3) sprintf(tmp,"third field"); else if(last == 4) sprintf(tmp,"fourth field"); else if(last == 5) sprintf(tmp,"fifth field"); else if(last % 100 == 11) sprintf(tmp,"%dth field",last); else if(last % 100 == 12) sprintf(tmp,"%dth field",last); else if(last % 10 == 1) sprintf(tmp,"%dst field",last); else if(last % 10 == 2) sprintf(tmp,"%dnd field",last); else sprintf(tmp,"%dth field",last); } else{ last *= -1; if(last == 1) sprintf(tmp,"last field"); else if(last == 2) sprintf(tmp,"penultimate field"); else if(last == 3) sprintf(tmp,"antepenultimate field"); else if(last == 4) sprintf(tmp,"fourth field from end"); else if(last == 5) sprintf(tmp,"fifth field from end"); else if(last % 100 == 11) sprintf(tmp,"%dth field from end",last); else if(last % 100 == 12) sprintf(tmp,"%dth field from end",last); else if(last % 10 == 1) sprintf(tmp,"%dst field from end",last); else if(last % 10 == 2) sprintf(tmp,"%dnd field from end",last); else sprintf(tmp,"%dth field from end",last); } fprintf(fp,tmp); if (KeyInfo[i]->LastOffset > 0) { fprintf(fp," character %d",(KeyInfo[i]->LastOffset)+1); } } fprintf(fp," "); } else if (KeyInfo[i]->SelectType == CRANGE) { fprintf(fp,"character range %02d through %02d ", KeyInfo[i]->RangeFirst,KeyInfo[i]->RangeLast); } else { (void) swprintf(wctmp,TMPSIZE,L" tag %ls ",KeyInfo[i]->Tag); putu8s(wctmp,fp); } fflush(fp); if(!(KeyInfo[i]->CompType & CRANDOM)) { if(KeyInfo[i]->CompType & CINVERSE)fprintf(fp,"Decreasing "); else fprintf(fp,"Increasing "); } if(!(KeyInfo[i]->CompType & CNUMERIC)){ if(KeyInfo[i]->ReverseP) fprintf(fp,"reversed "); if(KeyInfo[i]->CompType & CSIZE) fprintf(fp,"by size\n"); else if(KeyInfo[i]->CompType & CNUMSTR) fprintf(fp,"numeric string\n"); else if(KeyInfo[i]->CompType & CRANDOM) fprintf(fp,"random\n"); else if(KeyInfo[i]->CompType & CMONTH) fprintf(fp,"month name\n"); else if(KeyInfo[i]->CompType & CDOMAIN) fprintf(fp,"domain name\n"); else if(KeyInfo[i]->CompType & CHYBRID) fprintf(fp,"hybrid\n"); else { if(KeyInfo[i]->FirstCharOnlyP) fprintf(fp,"lexicographic using only first character\n"); else fprintf(fp,"lexicographic\n"); } if(KeyInfo[i]->MapTableEntries){ fprintf(fp," %3d multigraph%s\n", KeyInfo[i]->MapTableEntries, (KeyInfo[i]->MapTableEntries == 1 ? "":"s")); } if(KeyInfo[i]->ExclusionTable != NULL){ DumpExclusions(KeyInfo[i]->ExclusionTable,RankTableSize,fp); } } else{ if(KeyInfo[i]->CompType & CDATE) fprintf(fp,"date\n"); else if(KeyInfo[i]->CompType & CTIME) fprintf(fp,"time\n"); else if(KeyInfo[i]->CompType & CISO8601) fprintf(fp,"iso8601 date/time\n"); else if(KeyInfo[i]->CompType & CANGLE) fprintf(fp,"angle\n"); else if(KeyInfo[i]->CompType & CMONTH) fprintf(fp,"month name\n"); else { fprintf(fp,"numeric"); #ifdef USE_UNINUM if(KeyInfo[i]->NumberSystem != NS_WESTERN) fprintf(fp," (%s)\n", NumberSystemToString(KeyInfo[i]->NumberSystem)); else #endif fprintf(fp,"\n"); } } } } DOUBLE * AllocateDouble() { DOUBLE *new; new = (DOUBLE *) malloc(sizeof(DOUBLE)); if(new == NULL){ fprintf(stderr,_("%s: out of memory - numeric key\n"),progname); exit(OUTOFMEMORY); } return(new); } DOUBLE atofwc(wchar_t *s, int *status){ char ts[MAXDOUBLELEN+1]; char *t; double rval; char *endptr; if(wcslen(s) > MAXDOUBLELEN) return RANGEERROR; t = ts; while (*s != L'\0'){ /* Strip whitespace from end of field */ if(!iswspace(*s)) *t++ = 0x00FF & (char) *s; s++; } *t = '\0'; #ifdef HAVE_LONGDOUBLE rval = strtold(ts,&endptr); #else rval = strtod(ts,&endptr); #endif if(errno == ERANGE){ *status = RANGEERROR; return 0; } if(*endptr != '\0'){ *status = BADRECORD; return 0; } *status = SUCCESS; return (rval); } void ASCIIFoldCase (wchar_t *s) { while (*s != 0){ if ( (*s < 0x5B) && (*s > 0x40) ) *s |= 0x20; s++; } } void TurkicFoldCase (wchar_t *s){ wchar_t c; while ((c = *s) != L'\0') { switch(c) { case 0x0049: /* capital dotless i to lower case dotless i */ *s++ = 0x0131; break; case 0x0130: /* capital dotted i to lower case dotted i */ *s++ = 0x0069; break; default: s++; break; } } } /* Full Unicode case folding */ struct cp { wchar_t i; wchar_t *o; }; static struct cp CaseFoldTbl []={ {0x0041,L"\x0061"}, {0x0042,L"\x0062"}, {0x0043,L"\x0063"}, {0x0044,L"\x0064"}, {0x0045,L"\x0065"}, {0x0046,L"\x0066"}, {0x0047,L"\x0067"}, {0x0048,L"\x0068"}, {0x0049,L"\x0069"}, {0x004A,L"\x006A"}, {0x004B,L"\x006B"}, {0x004C,L"\x006C"}, {0x004D,L"\x006D"}, {0x004E,L"\x006E"}, {0x004F,L"\x006F"}, {0x0050,L"\x0070"}, {0x0051,L"\x0071"}, {0x0052,L"\x0072"}, {0x0053,L"\x0073"}, {0x0054,L"\x0074"}, {0x0055,L"\x0075"}, {0x0056,L"\x0076"}, {0x0057,L"\x0077"}, {0x0058,L"\x0078"}, {0x0059,L"\x0079"}, {0x005A,L"\x007A"}, {0x00B5,L"\x03BC"}, {0x00C0,L"\x00E0"}, {0x00C1,L"\x00E1"}, {0x00C2,L"\x00E2"}, {0x00C3,L"\x00E3"}, {0x00C4,L"\x00E4"}, {0x00C5,L"\x00E5"}, {0x00C6,L"\x00E6"}, {0x00C7,L"\x00E7"}, {0x00C8,L"\x00E8"}, {0x00C9,L"\x00E9"}, {0x00CA,L"\x00EA"}, {0x00CB,L"\x00EB"}, {0x00CC,L"\x00EC"}, {0x00CD,L"\x00ED"}, {0x00CE,L"\x00EE"}, {0x00CF,L"\x00EF"}, {0x00D0,L"\x00F0"}, {0x00D1,L"\x00F1"}, {0x00D2,L"\x00F2"}, {0x00D3,L"\x00F3"}, {0x00D4,L"\x00F4"}, {0x00D5,L"\x00F5"}, {0x00D6,L"\x00F6"}, {0x00D8,L"\x00F8"}, {0x00D9,L"\x00F9"}, {0x00DA,L"\x00FA"}, {0x00DB,L"\x00FB"}, {0x00DC,L"\x00FC"}, {0x00DD,L"\x00FD"}, {0x00DE,L"\x00FE"}, {0x00DF,L"\x0073\x0073"}, {0x0100,L"\x0101"}, {0x0102,L"\x0103"}, {0x0104,L"\x0105"}, {0x0106,L"\x0107"}, {0x0108,L"\x0109"}, {0x010A,L"\x010B"}, {0x010C,L"\x010D"}, {0x010E,L"\x010F"}, {0x0110,L"\x0111"}, {0x0112,L"\x0113"}, {0x0114,L"\x0115"}, {0x0116,L"\x0117"}, {0x0118,L"\x0119"}, {0x011A,L"\x011B"}, {0x011C,L"\x011D"}, {0x011E,L"\x011F"}, {0x0120,L"\x0121"}, {0x0122,L"\x0123"}, {0x0124,L"\x0125"}, {0x0126,L"\x0127"}, {0x0128,L"\x0129"}, {0x012A,L"\x012B"}, {0x012C,L"\x012D"}, {0x012E,L"\x012F"}, {0x0130,L"\x0069\x0307"}, {0x0132,L"\x0133"}, {0x0134,L"\x0135"}, {0x0136,L"\x0137"}, {0x0139,L"\x013A"}, {0x013B,L"\x013C"}, {0x013D,L"\x013E"}, {0x013F,L"\x0140"}, {0x0141,L"\x0142"}, {0x0143,L"\x0144"}, {0x0145,L"\x0146"}, {0x0147,L"\x0148"}, {0x0149,L"\x02BC\x006E"}, {0x014A,L"\x014B"}, {0x014C,L"\x014D"}, {0x014E,L"\x014F"}, {0x0150,L"\x0151"}, {0x0152,L"\x0153"}, {0x0154,L"\x0155"}, {0x0156,L"\x0157"}, {0x0158,L"\x0159"}, {0x015A,L"\x015B"}, {0x015C,L"\x015D"}, {0x015E,L"\x015F"}, {0x0160,L"\x0161"}, {0x0162,L"\x0163"}, {0x0164,L"\x0165"}, {0x0166,L"\x0167"}, {0x0168,L"\x0169"}, {0x016A,L"\x016B"}, {0x016C,L"\x016D"}, {0x016E,L"\x016F"}, {0x0170,L"\x0171"}, {0x0172,L"\x0173"}, {0x0174,L"\x0175"}, {0x0176,L"\x0177"}, {0x0178,L"\x00FF"}, {0x0179,L"\x017A"}, {0x017B,L"\x017C"}, {0x017D,L"\x017E"}, {0x017F,L"\x0073"}, {0x0181,L"\x0253"}, {0x0182,L"\x0183"}, {0x0184,L"\x0185"}, {0x0186,L"\x0254"}, {0x0187,L"\x0188"}, {0x0189,L"\x0256"}, {0x018A,L"\x0257"}, {0x018B,L"\x018C"}, {0x018E,L"\x01DD"}, {0x018F,L"\x0259"}, {0x0190,L"\x025B"}, {0x0191,L"\x0192"}, {0x0193,L"\x0260"}, {0x0194,L"\x0263"}, {0x0196,L"\x0269"}, {0x0197,L"\x0268"}, {0x0198,L"\x0199"}, {0x019C,L"\x026F"}, {0x019D,L"\x0272"}, {0x019F,L"\x0275"}, {0x01A0,L"\x01A1"}, {0x01A2,L"\x01A3"}, {0x01A4,L"\x01A5"}, {0x01A6,L"\x0280"}, {0x01A7,L"\x01A8"}, {0x01A9,L"\x0283"}, {0x01AC,L"\x01AD"}, {0x01AE,L"\x0288"}, {0x01AF,L"\x01B0"}, {0x01B1,L"\x028A"}, {0x01B2,L"\x028B"}, {0x01B3,L"\x01B4"}, {0x01B5,L"\x01B6"}, {0x01B7,L"\x0292"}, {0x01B8,L"\x01B9"}, {0x01BC,L"\x01BD"}, {0x01C4,L"\x01C6"}, {0x01C5,L"\x01C6"}, {0x01C7,L"\x01C9"}, {0x01C8,L"\x01C9"}, {0x01CA,L"\x01CC"}, {0x01CB,L"\x01CC"}, {0x01CD,L"\x01CE"}, {0x01CF,L"\x01D0"}, {0x01D1,L"\x01D2"}, {0x01D3,L"\x01D4"}, {0x01D5,L"\x01D6"}, {0x01D7,L"\x01D8"}, {0x01D9,L"\x01DA"}, {0x01DB,L"\x01DC"}, {0x01DE,L"\x01DF"}, {0x01E0,L"\x01E1"}, {0x01E2,L"\x01E3"}, {0x01E4,L"\x01E5"}, {0x01E6,L"\x01E7"}, {0x01E8,L"\x01E9"}, {0x01EA,L"\x01EB"}, {0x01EC,L"\x01ED"}, {0x01EE,L"\x01EF"}, {0x01F0,L"\x006A\x030C"}, {0x01F1,L"\x01F3"}, {0x01F2,L"\x01F3"}, {0x01F4,L"\x01F5"}, {0x01F6,L"\x0195"}, {0x01F7,L"\x01BF"}, {0x01F8,L"\x01F9"}, {0x01FA,L"\x01FB"}, {0x01FC,L"\x01FD"}, {0x01FE,L"\x01FF"}, {0x0200,L"\x0201"}, {0x0202,L"\x0203"}, {0x0204,L"\x0205"}, {0x0206,L"\x0207"}, {0x0208,L"\x0209"}, {0x020A,L"\x020B"}, {0x020C,L"\x020D"}, {0x020E,L"\x020F"}, {0x0210,L"\x0211"}, {0x0212,L"\x0213"}, {0x0214,L"\x0215"}, {0x0216,L"\x0217"}, {0x0218,L"\x0219"}, {0x021A,L"\x021B"}, {0x021C,L"\x021D"}, {0x021E,L"\x021F"}, {0x0220,L"\x019E"}, {0x0222,L"\x0223"}, {0x0224,L"\x0225"}, {0x0226,L"\x0227"}, {0x0228,L"\x0229"}, {0x022A,L"\x022B"}, {0x022C,L"\x022D"}, {0x022E,L"\x022F"}, {0x0230,L"\x0231"}, {0x0232,L"\x0233"}, {0x023A,L"\x2C65"}, {0x023B,L"\x023C"}, {0x023D,L"\x019A"}, {0x023E,L"\x2C66"}, {0x0241,L"\x0242"}, {0x0243,L"\x0180"}, {0x0244,L"\x0289"}, {0x0245,L"\x028C"}, {0x0246,L"\x0247"}, {0x0248,L"\x0249"}, {0x024A,L"\x024B"}, {0x024C,L"\x024D"}, {0x024E,L"\x024F"}, {0x0345,L"\x03B9"}, {0x0370,L"\x0371"}, {0x0372,L"\x0373"}, {0x0376,L"\x0377"}, {0x0386,L"\x03AC"}, {0x0388,L"\x03AD"}, {0x0389,L"\x03AE"}, {0x038A,L"\x03AF"}, {0x038C,L"\x03CC"}, {0x038E,L"\x03CD"}, {0x038F,L"\x03CE"}, {0x0390,L"\x03B9\x0308\x0301"}, {0x0391,L"\x03B1"}, {0x0392,L"\x03B2"}, {0x0393,L"\x03B3"}, {0x0394,L"\x03B4"}, {0x0395,L"\x03B5"}, {0x0396,L"\x03B6"}, {0x0397,L"\x03B7"}, {0x0398,L"\x03B8"}, {0x0399,L"\x03B9"}, {0x039A,L"\x03BA"}, {0x039B,L"\x03BB"}, {0x039C,L"\x03BC"}, {0x039D,L"\x03BD"}, {0x039E,L"\x03BE"}, {0x039F,L"\x03BF"}, {0x03A0,L"\x03C0"}, {0x03A1,L"\x03C1"}, {0x03A3,L"\x03C3"}, {0x03A4,L"\x03C4"}, {0x03A5,L"\x03C5"}, {0x03A6,L"\x03C6"}, {0x03A7,L"\x03C7"}, {0x03A8,L"\x03C8"}, {0x03A9,L"\x03C9"}, {0x03AA,L"\x03CA"}, {0x03AB,L"\x03CB"}, {0x03B0,L"\x03C5\x0308\x0301"}, {0x03C2,L"\x03C3"}, {0x03CF,L"\x03D7"}, {0x03D0,L"\x03B2"}, {0x03D1,L"\x03B8"}, {0x03D5,L"\x03C6"}, {0x03D6,L"\x03C0"}, {0x03D8,L"\x03D9"}, {0x03DA,L"\x03DB"}, {0x03DC,L"\x03DD"}, {0x03DE,L"\x03DF"}, {0x03E0,L"\x03E1"}, {0x03E2,L"\x03E3"}, {0x03E4,L"\x03E5"}, {0x03E6,L"\x03E7"}, {0x03E8,L"\x03E9"}, {0x03EA,L"\x03EB"}, {0x03EC,L"\x03ED"}, {0x03EE,L"\x03EF"}, {0x03F0,L"\x03BA"}, {0x03F1,L"\x03C1"}, {0x03F4,L"\x03B8"}, {0x03F5,L"\x03B5"}, {0x03F7,L"\x03F8"}, {0x03F9,L"\x03F2"}, {0x03FA,L"\x03FB"}, {0x03FD,L"\x037B"}, {0x03FE,L"\x037C"}, {0x03FF,L"\x037D"}, {0x0400,L"\x0450"}, {0x0401,L"\x0451"}, {0x0402,L"\x0452"}, {0x0403,L"\x0453"}, {0x0404,L"\x0454"}, {0x0405,L"\x0455"}, {0x0406,L"\x0456"}, {0x0407,L"\x0457"}, {0x0408,L"\x0458"}, {0x0409,L"\x0459"}, {0x040A,L"\x045A"}, {0x040B,L"\x045B"}, {0x040C,L"\x045C"}, {0x040D,L"\x045D"}, {0x040E,L"\x045E"}, {0x040F,L"\x045F"}, {0x0410,L"\x0430"}, {0x0411,L"\x0431"}, {0x0412,L"\x0432"}, {0x0413,L"\x0433"}, {0x0414,L"\x0434"}, {0x0415,L"\x0435"}, {0x0416,L"\x0436"}, {0x0417,L"\x0437"}, {0x0418,L"\x0438"}, {0x0419,L"\x0439"}, {0x041A,L"\x043A"}, {0x041B,L"\x043B"}, {0x041C,L"\x043C"}, {0x041D,L"\x043D"}, {0x041E,L"\x043E"}, {0x041F,L"\x043F"}, {0x0420,L"\x0440"}, {0x0421,L"\x0441"}, {0x0422,L"\x0442"}, {0x0423,L"\x0443"}, {0x0424,L"\x0444"}, {0x0425,L"\x0445"}, {0x0426,L"\x0446"}, {0x0427,L"\x0447"}, {0x0428,L"\x0448"}, {0x0429,L"\x0449"}, {0x042A,L"\x044A"}, {0x042B,L"\x044B"}, {0x042C,L"\x044C"}, {0x042D,L"\x044D"}, {0x042E,L"\x044E"}, {0x042F,L"\x044F"}, {0x0460,L"\x0461"}, {0x0462,L"\x0463"}, {0x0464,L"\x0465"}, {0x0466,L"\x0467"}, {0x0468,L"\x0469"}, {0x046A,L"\x046B"}, {0x046C,L"\x046D"}, {0x046E,L"\x046F"}, {0x0470,L"\x0471"}, {0x0472,L"\x0473"}, {0x0474,L"\x0475"}, {0x0476,L"\x0477"}, {0x0478,L"\x0479"}, {0x047A,L"\x047B"}, {0x047C,L"\x047D"}, {0x047E,L"\x047F"}, {0x0480,L"\x0481"}, {0x048A,L"\x048B"}, {0x048C,L"\x048D"}, {0x048E,L"\x048F"}, {0x0490,L"\x0491"}, {0x0492,L"\x0493"}, {0x0494,L"\x0495"}, {0x0496,L"\x0497"}, {0x0498,L"\x0499"}, {0x049A,L"\x049B"}, {0x049C,L"\x049D"}, {0x049E,L"\x049F"}, {0x04A0,L"\x04A1"}, {0x04A2,L"\x04A3"}, {0x04A4,L"\x04A5"}, {0x04A6,L"\x04A7"}, {0x04A8,L"\x04A9"}, {0x04AA,L"\x04AB"}, {0x04AC,L"\x04AD"}, {0x04AE,L"\x04AF"}, {0x04B0,L"\x04B1"}, {0x04B2,L"\x04B3"}, {0x04B4,L"\x04B5"}, {0x04B6,L"\x04B7"}, {0x04B8,L"\x04B9"}, {0x04BA,L"\x04BB"}, {0x04BC,L"\x04BD"}, {0x04BE,L"\x04BF"}, {0x04C0,L"\x04CF"}, {0x04C1,L"\x04C2"}, {0x04C3,L"\x04C4"}, {0x04C5,L"\x04C6"}, {0x04C7,L"\x04C8"}, {0x04C9,L"\x04CA"}, {0x04CB,L"\x04CC"}, {0x04CD,L"\x04CE"}, {0x04D0,L"\x04D1"}, {0x04D2,L"\x04D3"}, {0x04D4,L"\x04D5"}, {0x04D6,L"\x04D7"}, {0x04D8,L"\x04D9"}, {0x04DA,L"\x04DB"}, {0x04DC,L"\x04DD"}, {0x04DE,L"\x04DF"}, {0x04E0,L"\x04E1"}, {0x04E2,L"\x04E3"}, {0x04E4,L"\x04E5"}, {0x04E6,L"\x04E7"}, {0x04E8,L"\x04E9"}, {0x04EA,L"\x04EB"}, {0x04EC,L"\x04ED"}, {0x04EE,L"\x04EF"}, {0x04F0,L"\x04F1"}, {0x04F2,L"\x04F3"}, {0x04F4,L"\x04F5"}, {0x04F6,L"\x04F7"}, {0x04F8,L"\x04F9"}, {0x04FA,L"\x04FB"}, {0x04FC,L"\x04FD"}, {0x04FE,L"\x04FF"}, {0x0500,L"\x0501"}, {0x0502,L"\x0503"}, {0x0504,L"\x0505"}, {0x0506,L"\x0507"}, {0x0508,L"\x0509"}, {0x050A,L"\x050B"}, {0x050C,L"\x050D"}, {0x050E,L"\x050F"}, {0x0510,L"\x0511"}, {0x0512,L"\x0513"}, {0x0514,L"\x0515"}, {0x0516,L"\x0517"}, {0x0518,L"\x0519"}, {0x051A,L"\x051B"}, {0x051C,L"\x051D"}, {0x051E,L"\x051F"}, {0x0520,L"\x0521"}, {0x0522,L"\x0523"}, {0x0531,L"\x0561"}, {0x0532,L"\x0562"}, {0x0533,L"\x0563"}, {0x0534,L"\x0564"}, {0x0535,L"\x0565"}, {0x0536,L"\x0566"}, {0x0537,L"\x0567"}, {0x0538,L"\x0568"}, {0x0539,L"\x0569"}, {0x053A,L"\x056A"}, {0x053B,L"\x056B"}, {0x053C,L"\x056C"}, {0x053D,L"\x056D"}, {0x053E,L"\x056E"}, {0x053F,L"\x056F"}, {0x0540,L"\x0570"}, {0x0541,L"\x0571"}, {0x0542,L"\x0572"}, {0x0543,L"\x0573"}, {0x0544,L"\x0574"}, {0x0545,L"\x0575"}, {0x0546,L"\x0576"}, {0x0547,L"\x0577"}, {0x0548,L"\x0578"}, {0x0549,L"\x0579"}, {0x054A,L"\x057A"}, {0x054B,L"\x057B"}, {0x054C,L"\x057C"}, {0x054D,L"\x057D"}, {0x054E,L"\x057E"}, {0x054F,L"\x057F"}, {0x0550,L"\x0580"}, {0x0551,L"\x0581"}, {0x0552,L"\x0582"}, {0x0553,L"\x0583"}, {0x0554,L"\x0584"}, {0x0555,L"\x0585"}, {0x0556,L"\x0586"}, {0x0587,L"\x0565\x0582"}, {0x10A0,L"\x2D00"}, {0x10A1,L"\x2D01"}, {0x10A2,L"\x2D02"}, {0x10A3,L"\x2D03"}, {0x10A4,L"\x2D04"}, {0x10A5,L"\x2D05"}, {0x10A6,L"\x2D06"}, {0x10A7,L"\x2D07"}, {0x10A8,L"\x2D08"}, {0x10A9,L"\x2D09"}, {0x10AA,L"\x2D0A"}, {0x10AB,L"\x2D0B"}, {0x10AC,L"\x2D0C"}, {0x10AD,L"\x2D0D"}, {0x10AE,L"\x2D0E"}, {0x10AF,L"\x2D0F"}, {0x10B0,L"\x2D10"}, {0x10B1,L"\x2D11"}, {0x10B2,L"\x2D12"}, {0x10B3,L"\x2D13"}, {0x10B4,L"\x2D14"}, {0x10B5,L"\x2D15"}, {0x10B6,L"\x2D16"}, {0x10B7,L"\x2D17"}, {0x10B8,L"\x2D18"}, {0x10B9,L"\x2D19"}, {0x10BA,L"\x2D1A"}, {0x10BB,L"\x2D1B"}, {0x10BC,L"\x2D1C"}, {0x10BD,L"\x2D1D"}, {0x10BE,L"\x2D1E"}, {0x10BF,L"\x2D1F"}, {0x10C0,L"\x2D20"}, {0x10C1,L"\x2D21"}, {0x10C2,L"\x2D22"}, {0x10C3,L"\x2D23"}, {0x10C4,L"\x2D24"}, {0x10C5,L"\x2D25"}, {0x1E00,L"\x1E01"}, {0x1E02,L"\x1E03"}, {0x1E04,L"\x1E05"}, {0x1E06,L"\x1E07"}, {0x1E08,L"\x1E09"}, {0x1E0A,L"\x1E0B"}, {0x1E0C,L"\x1E0D"}, {0x1E0E,L"\x1E0F"}, {0x1E10,L"\x1E11"}, {0x1E12,L"\x1E13"}, {0x1E14,L"\x1E15"}, {0x1E16,L"\x1E17"}, {0x1E18,L"\x1E19"}, {0x1E1A,L"\x1E1B"}, {0x1E1C,L"\x1E1D"}, {0x1E1E,L"\x1E1F"}, {0x1E20,L"\x1E21"}, {0x1E22,L"\x1E23"}, {0x1E24,L"\x1E25"}, {0x1E26,L"\x1E27"}, {0x1E28,L"\x1E29"}, {0x1E2A,L"\x1E2B"}, {0x1E2C,L"\x1E2D"}, {0x1E2E,L"\x1E2F"}, {0x1E30,L"\x1E31"}, {0x1E32,L"\x1E33"}, {0x1E34,L"\x1E35"}, {0x1E36,L"\x1E37"}, {0x1E38,L"\x1E39"}, {0x1E3A,L"\x1E3B"}, {0x1E3C,L"\x1E3D"}, {0x1E3E,L"\x1E3F"}, {0x1E40,L"\x1E41"}, {0x1E42,L"\x1E43"}, {0x1E44,L"\x1E45"}, {0x1E46,L"\x1E47"}, {0x1E48,L"\x1E49"}, {0x1E4A,L"\x1E4B"}, {0x1E4C,L"\x1E4D"}, {0x1E4E,L"\x1E4F"}, {0x1E50,L"\x1E51"}, {0x1E52,L"\x1E53"}, {0x1E54,L"\x1E55"}, {0x1E56,L"\x1E57"}, {0x1E58,L"\x1E59"}, {0x1E5A,L"\x1E5B"}, {0x1E5C,L"\x1E5D"}, {0x1E5E,L"\x1E5F"}, {0x1E60,L"\x1E61"}, {0x1E62,L"\x1E63"}, {0x1E64,L"\x1E65"}, {0x1E66,L"\x1E67"}, {0x1E68,L"\x1E69"}, {0x1E6A,L"\x1E6B"}, {0x1E6C,L"\x1E6D"}, {0x1E6E,L"\x1E6F"}, {0x1E70,L"\x1E71"}, {0x1E72,L"\x1E73"}, {0x1E74,L"\x1E75"}, {0x1E76,L"\x1E77"}, {0x1E78,L"\x1E79"}, {0x1E7A,L"\x1E7B"}, {0x1E7C,L"\x1E7D"}, {0x1E7E,L"\x1E7F"}, {0x1E80,L"\x1E81"}, {0x1E82,L"\x1E83"}, {0x1E84,L"\x1E85"}, {0x1E86,L"\x1E87"}, {0x1E88,L"\x1E89"}, {0x1E8A,L"\x1E8B"}, {0x1E8C,L"\x1E8D"}, {0x1E8E,L"\x1E8F"}, {0x1E90,L"\x1E91"}, {0x1E92,L"\x1E93"}, {0x1E94,L"\x1E95"}, {0x1E96,L"\x0068\x0331"}, {0x1E97,L"\x0074\x0308"}, {0x1E98,L"\x0077\x030A"}, {0x1E99,L"\x0079\x030A"}, {0x1E9A,L"\x0061\x02BE"}, {0x1E9B,L"\x1E61"}, {0x1EA0,L"\x1EA1"}, {0x1EA2,L"\x1EA3"}, {0x1EA4,L"\x1EA5"}, {0x1EA6,L"\x1EA7"}, {0x1EA8,L"\x1EA9"}, {0x1EAA,L"\x1EAB"}, {0x1EAC,L"\x1EAD"}, {0x1EAE,L"\x1EAF"}, {0x1EB0,L"\x1EB1"}, {0x1EB2,L"\x1EB3"}, {0x1EB4,L"\x1EB5"}, {0x1EB6,L"\x1EB7"}, {0x1EB8,L"\x1EB9"}, {0x1EBA,L"\x1EBB"}, {0x1EBC,L"\x1EBD"}, {0x1EBE,L"\x1EBF"}, {0x1EC0,L"\x1EC1"}, {0x1EC2,L"\x1EC3"}, {0x1EC4,L"\x1EC5"}, {0x1EC6,L"\x1EC7"}, {0x1EC8,L"\x1EC9"}, {0x1ECA,L"\x1ECB"}, {0x1ECC,L"\x1ECD"}, {0x1ECE,L"\x1ECF"}, {0x1ED0,L"\x1ED1"}, {0x1ED2,L"\x1ED3"}, {0x1ED4,L"\x1ED5"}, {0x1ED6,L"\x1ED7"}, {0x1ED8,L"\x1ED9"}, {0x1EDA,L"\x1EDB"}, {0x1EDC,L"\x1EDD"}, {0x1EDE,L"\x1EDF"}, {0x1EE0,L"\x1EE1"}, {0x1EE2,L"\x1EE3"}, {0x1EE4,L"\x1EE5"}, {0x1EE6,L"\x1EE7"}, {0x1EE8,L"\x1EE9"}, {0x1EEA,L"\x1EEB"}, {0x1EEC,L"\x1EED"}, {0x1EEE,L"\x1EEF"}, {0x1EF0,L"\x1EF1"}, {0x1EF2,L"\x1EF3"}, {0x1EF4,L"\x1EF5"}, {0x1EF6,L"\x1EF7"}, {0x1EF8,L"\x1EF9"}, {0x1EFA,L"\x1EFB"}, {0x1EFC,L"\x1EFD"}, {0x1EFE,L"\x1EFF"}, {0x1F08,L"\x1F00"}, {0x1F09,L"\x1F01"}, {0x1F0A,L"\x1F02"}, {0x1F0B,L"\x1F03"}, {0x1F0C,L"\x1F04"}, {0x1F0D,L"\x1F05"}, {0x1F0E,L"\x1F06"}, {0x1F0F,L"\x1F07"}, {0x1F18,L"\x1F10"}, {0x1F19,L"\x1F11"}, {0x1F1A,L"\x1F12"}, {0x1F1B,L"\x1F13"}, {0x1F1C,L"\x1F14"}, {0x1F1D,L"\x1F15"}, {0x1F28,L"\x1F20"}, {0x1F29,L"\x1F21"}, {0x1F2A,L"\x1F22"}, {0x1F2B,L"\x1F23"}, {0x1F2C,L"\x1F24"}, {0x1F2D,L"\x1F25"}, {0x1F2E,L"\x1F26"}, {0x1F2F,L"\x1F27"}, {0x1F38,L"\x1F30"}, {0x1F39,L"\x1F31"}, {0x1F3A,L"\x1F32"}, {0x1F3B,L"\x1F33"}, {0x1F3C,L"\x1F34"}, {0x1F3D,L"\x1F35"}, {0x1F3E,L"\x1F36"}, {0x1F3F,L"\x1F37"}, {0x1F48,L"\x1F40"}, {0x1F49,L"\x1F41"}, {0x1F4A,L"\x1F42"}, {0x1F4B,L"\x1F43"}, {0x1F4C,L"\x1F44"}, {0x1F4D,L"\x1F45"}, {0x1F50,L"\x03C5\x0313"}, {0x1F52,L"\x03C5\x0313\x0300"}, {0x1F54,L"\x03C5\x0313\x0301"}, {0x1F56,L"\x03C5\x0313\x0342"}, {0x1F59,L"\x1F51"}, {0x1F5B,L"\x1F53"}, {0x1F5D,L"\x1F55"}, {0x1F5F,L"\x1F57"}, {0x1F68,L"\x1F60"}, {0x1F69,L"\x1F61"}, {0x1F6A,L"\x1F62"}, {0x1F6B,L"\x1F63"}, {0x1F6C,L"\x1F64"}, {0x1F6D,L"\x1F65"}, {0x1F6E,L"\x1F66"}, {0x1F6F,L"\x1F67"}, {0x1F80,L"\x1F00\x03B9"}, {0x1F81,L"\x1F01\x03B9"}, {0x1F82,L"\x1F02\x03B9"}, {0x1F83,L"\x1F03\x03B9"}, {0x1F84,L"\x1F04\x03B9"}, {0x1F85,L"\x1F05\x03B9"}, {0x1F86,L"\x1F06\x03B9"}, {0x1F87,L"\x1F07\x03B9"}, {0x1F88,L"\x1F00\x03B9"}, {0x1F88,L"\x1F00\x03B9"}, {0x1F89,L"\x1F01\x03B9"}, {0x1F89,L"\x1F01\x03B9"}, {0x1F8A,L"\x1F02\x03B9"}, {0x1F8A,L"\x1F02\x03B9"}, {0x1F8B,L"\x1F03\x03B9"}, {0x1F8B,L"\x1F03\x03B9"}, {0x1F8C,L"\x1F04\x03B9"}, {0x1F8C,L"\x1F04\x03B9"}, {0x1F8D,L"\x1F05\x03B9"}, {0x1F8D,L"\x1F05\x03B9"}, {0x1F8E,L"\x1F06\x03B9"}, {0x1F8E,L"\x1F06\x03B9"}, {0x1F8F,L"\x1F07\x03B9"}, {0x1F8F,L"\x1F07\x03B9"}, {0x1F90,L"\x1F20\x03B9"}, {0x1F91,L"\x1F21\x03B9"}, {0x1F92,L"\x1F22\x03B9"}, {0x1F93,L"\x1F23\x03B9"}, {0x1F94,L"\x1F24\x03B9"}, {0x1F95,L"\x1F25\x03B9"}, {0x1F96,L"\x1F26\x03B9"}, {0x1F97,L"\x1F27\x03B9"}, {0x1F98,L"\x1F20\x03B9"}, {0x1F98,L"\x1F20\x03B9"}, {0x1F99,L"\x1F21\x03B9"}, {0x1F99,L"\x1F21\x03B9"}, {0x1F9A,L"\x1F22\x03B9"}, {0x1F9A,L"\x1F22\x03B9"}, {0x1F9B,L"\x1F23\x03B9"}, {0x1F9B,L"\x1F23\x03B9"}, {0x1F9C,L"\x1F24\x03B9"}, {0x1F9C,L"\x1F24\x03B9"}, {0x1F9D,L"\x1F25\x03B9"}, {0x1F9D,L"\x1F25\x03B9"}, {0x1F9E,L"\x1F26\x03B9"}, {0x1F9E,L"\x1F26\x03B9"}, {0x1F9F,L"\x1F27\x03B9"}, {0x1F9F,L"\x1F27\x03B9"}, {0x1FA0,L"\x1F60\x03B9"}, {0x1FA1,L"\x1F61\x03B9"}, {0x1FA2,L"\x1F62\x03B9"}, {0x1FA3,L"\x1F63\x03B9"}, {0x1FA4,L"\x1F64\x03B9"}, {0x1FA5,L"\x1F65\x03B9"}, {0x1FA6,L"\x1F66\x03B9"}, {0x1FA7,L"\x1F67\x03B9"}, {0x1FA8,L"\x1F60\x03B9"}, {0x1FA8,L"\x1F60\x03B9"}, {0x1FA9,L"\x1F61\x03B9"}, {0x1FA9,L"\x1F61\x03B9"}, {0x1FAA,L"\x1F62\x03B9"}, {0x1FAA,L"\x1F62\x03B9"}, {0x1FAB,L"\x1F63\x03B9"}, {0x1FAB,L"\x1F63\x03B9"}, {0x1FAC,L"\x1F64\x03B9"}, {0x1FAC,L"\x1F64\x03B9"}, {0x1FAD,L"\x1F65\x03B9"}, {0x1FAD,L"\x1F65\x03B9"}, {0x1FAE,L"\x1F66\x03B9"}, {0x1FAE,L"\x1F66\x03B9"}, {0x1FAF,L"\x1F67\x03B9"}, {0x1FAF,L"\x1F67\x03B9"}, {0x1FB2,L"\x1F70\x03B9"}, {0x1FB3,L"\x03B1\x03B9"}, {0x1FB4,L"\x03AC\x03B9"}, {0x1FB6,L"\x03B1\x0342"}, {0x1FB7,L"\x03B1\x0342\x03B9"}, {0x1FB8,L"\x1FB0"}, {0x1FB9,L"\x1FB1"}, {0x1FBA,L"\x1F70"}, {0x1FBB,L"\x1F71"}, {0x1FBC,L"\x03B1\x03B9"}, {0x1FBC,L"\x03B1\x03B9"}, {0x1FBE,L"\x03B9"}, {0x1FC2,L"\x1F74\x03B9"}, {0x1FC3,L"\x03B7\x03B9"}, {0x1FC4,L"\x03AE\x03B9"}, {0x1FC6,L"\x03B7\x0342"}, {0x1FC7,L"\x03B7\x0342\x03B9"}, {0x1FC8,L"\x1F72"}, {0x1FC9,L"\x1F73"}, {0x1FCA,L"\x1F74"}, {0x1FCB,L"\x1F75"}, {0x1FCC,L"\x03B7\x03B9"}, {0x1FCC,L"\x03B7\x03B9"}, {0x1FD2,L"\x03B9\x0308\x0300"}, {0x1FD3,L"\x03B9\x0308\x0301"}, {0x1FD6,L"\x03B9\x0342"}, {0x1FD7,L"\x03B9\x0308\x0342"}, {0x1FD8,L"\x1FD0"}, {0x1FD9,L"\x1FD1"}, {0x1FDA,L"\x1F76"}, {0x1FDB,L"\x1F77"}, {0x1FE2,L"\x03C5\x0308\x0300"}, {0x1FE3,L"\x03C5\x0308\x0301"}, {0x1FE4,L"\x03C1\x0313"}, {0x1FE6,L"\x03C5\x0342"}, {0x1FE7,L"\x03C5\x0308\x0342"}, {0x1FE8,L"\x1FE0"}, {0x1FE9,L"\x1FE1"}, {0x1FEA,L"\x1F7A"}, {0x1FEB,L"\x1F7B"}, {0x1FEC,L"\x1FE5"}, {0x1FF2,L"\x1F7C\x03B9"}, {0x1FF3,L"\x03C9\x03B9"}, {0x1FF4,L"\x03CE\x03B9"}, {0x1FF6,L"\x03C9\x0342"}, {0x1FF7,L"\x03C9\x0342\x03B9"}, {0x1FF8,L"\x1F78"}, {0x1FF9,L"\x1F79"}, {0x1FFA,L"\x1F7C"}, {0x1FFB,L"\x1F7D"}, {0x1FFC,L"\x03C9\x03B9"}, {0x1FFC,L"\x03C9\x03B9"}, {0x2126,L"\x03C9"}, {0x212A,L"\x006B"}, {0x212B,L"\x00E5"}, {0x2132,L"\x214E"}, {0x2160,L"\x2170"}, {0x2161,L"\x2171"}, {0x2162,L"\x2172"}, {0x2163,L"\x2173"}, {0x2164,L"\x2174"}, {0x2165,L"\x2175"}, {0x2166,L"\x2176"}, {0x2167,L"\x2177"}, {0x2168,L"\x2178"}, {0x2169,L"\x2179"}, {0x216A,L"\x217A"}, {0x216B,L"\x217B"}, {0x216C,L"\x217C"}, {0x216D,L"\x217D"}, {0x216E,L"\x217E"}, {0x216F,L"\x217F"}, {0x2183,L"\x2184"}, {0x24B6,L"\x24D0"}, {0x24B7,L"\x24D1"}, {0x24B8,L"\x24D2"}, {0x24B9,L"\x24D3"}, {0x24BA,L"\x24D4"}, {0x24BB,L"\x24D5"}, {0x24BC,L"\x24D6"}, {0x24BD,L"\x24D7"}, {0x24BE,L"\x24D8"}, {0x24BF,L"\x24D9"}, {0x24C0,L"\x24DA"}, {0x24C1,L"\x24DB"}, {0x24C2,L"\x24DC"}, {0x24C3,L"\x24DD"}, {0x24C4,L"\x24DE"}, {0x24C5,L"\x24DF"}, {0x24C6,L"\x24E0"}, {0x24C7,L"\x24E1"}, {0x24C8,L"\x24E2"}, {0x24C9,L"\x24E3"}, {0x24CA,L"\x24E4"}, {0x24CB,L"\x24E5"}, {0x24CC,L"\x24E6"}, {0x24CD,L"\x24E7"}, {0x24CE,L"\x24E8"}, {0x24CF,L"\x24E9"}, {0x2C00,L"\x2C30"}, {0x2C01,L"\x2C31"}, {0x2C02,L"\x2C32"}, {0x2C03,L"\x2C33"}, {0x2C04,L"\x2C34"}, {0x2C05,L"\x2C35"}, {0x2C06,L"\x2C36"}, {0x2C07,L"\x2C37"}, {0x2C08,L"\x2C38"}, {0x2C09,L"\x2C39"}, {0x2C0A,L"\x2C3A"}, {0x2C0B,L"\x2C3B"}, {0x2C0C,L"\x2C3C"}, {0x2C0D,L"\x2C3D"}, {0x2C0E,L"\x2C3E"}, {0x2C0F,L"\x2C3F"}, {0x2C10,L"\x2C40"}, {0x2C11,L"\x2C41"}, {0x2C12,L"\x2C42"}, {0x2C13,L"\x2C43"}, {0x2C14,L"\x2C44"}, {0x2C15,L"\x2C45"}, {0x2C16,L"\x2C46"}, {0x2C17,L"\x2C47"}, {0x2C18,L"\x2C48"}, {0x2C19,L"\x2C49"}, {0x2C1A,L"\x2C4A"}, {0x2C1B,L"\x2C4B"}, {0x2C1C,L"\x2C4C"}, {0x2C1D,L"\x2C4D"}, {0x2C1E,L"\x2C4E"}, {0x2C1F,L"\x2C4F"}, {0x2C20,L"\x2C50"}, {0x2C21,L"\x2C51"}, {0x2C22,L"\x2C52"}, {0x2C23,L"\x2C53"}, {0x2C24,L"\x2C54"}, {0x2C25,L"\x2C55"}, {0x2C26,L"\x2C56"}, {0x2C27,L"\x2C57"}, {0x2C28,L"\x2C58"}, {0x2C29,L"\x2C59"}, {0x2C2A,L"\x2C5A"}, {0x2C2B,L"\x2C5B"}, {0x2C2C,L"\x2C5C"}, {0x2C2D,L"\x2C5D"}, {0x2C2E,L"\x2C5E"}, {0x2C60,L"\x2C61"}, {0x2C62,L"\x026B"}, {0x2C63,L"\x1D7D"}, {0x2C64,L"\x027D"}, {0x2C67,L"\x2C68"}, {0x2C69,L"\x2C6A"}, {0x2C6B,L"\x2C6C"}, {0x2C6D,L"\x0251"}, {0x2C6E,L"\x0271"}, {0x2C6F,L"\x0250"}, {0x2C72,L"\x2C73"}, {0x2C75,L"\x2C76"}, {0x2C80,L"\x2C81"}, {0x2C82,L"\x2C83"}, {0x2C84,L"\x2C85"}, {0x2C86,L"\x2C87"}, {0x2C88,L"\x2C89"}, {0x2C8A,L"\x2C8B"}, {0x2C8C,L"\x2C8D"}, {0x2C8E,L"\x2C8F"}, {0x2C90,L"\x2C91"}, {0x2C92,L"\x2C93"}, {0x2C94,L"\x2C95"}, {0x2C96,L"\x2C97"}, {0x2C98,L"\x2C99"}, {0x2C9A,L"\x2C9B"}, {0x2C9C,L"\x2C9D"}, {0x2C9E,L"\x2C9F"}, {0x2CA0,L"\x2CA1"}, {0x2CA2,L"\x2CA3"}, {0x2CA4,L"\x2CA5"}, {0x2CA6,L"\x2CA7"}, {0x2CA8,L"\x2CA9"}, {0x2CAA,L"\x2CAB"}, {0x2CAC,L"\x2CAD"}, {0x2CAE,L"\x2CAF"}, {0x2CB0,L"\x2CB1"}, {0x2CB2,L"\x2CB3"}, {0x2CB4,L"\x2CB5"}, {0x2CB6,L"\x2CB7"}, {0x2CB8,L"\x2CB9"}, {0x2CBA,L"\x2CBB"}, {0x2CBC,L"\x2CBD"}, {0x2CBE,L"\x2CBF"}, {0x2CC0,L"\x2CC1"}, {0x2CC2,L"\x2CC3"}, {0x2CC4,L"\x2CC5"}, {0x2CC6,L"\x2CC7"}, {0x2CC8,L"\x2CC9"}, {0x2CCA,L"\x2CCB"}, {0x2CCC,L"\x2CCD"}, {0x2CCE,L"\x2CCF"}, {0x2CD0,L"\x2CD1"}, {0x2CD2,L"\x2CD3"}, {0x2CD4,L"\x2CD5"}, {0x2CD6,L"\x2CD7"}, {0x2CD8,L"\x2CD9"}, {0x2CDA,L"\x2CDB"}, {0x2CDC,L"\x2CDD"}, {0x2CDE,L"\x2CDF"}, {0x2CE0,L"\x2CE1"}, {0x2CE2,L"\x2CE3"}, {0xA640,L"\xA641"}, {0xA642,L"\xA643"}, {0xA644,L"\xA645"}, {0xA646,L"\xA647"}, {0xA648,L"\xA649"}, {0xA64A,L"\xA64B"}, {0xA64C,L"\xA64D"}, {0xA64E,L"\xA64F"}, {0xA650,L"\xA651"}, {0xA652,L"\xA653"}, {0xA654,L"\xA655"}, {0xA656,L"\xA657"}, {0xA658,L"\xA659"}, {0xA65A,L"\xA65B"}, {0xA65C,L"\xA65D"}, {0xA65E,L"\xA65F"}, {0xA662,L"\xA663"}, {0xA664,L"\xA665"}, {0xA666,L"\xA667"}, {0xA668,L"\xA669"}, {0xA66A,L"\xA66B"}, {0xA66C,L"\xA66D"}, {0xA680,L"\xA681"}, {0xA682,L"\xA683"}, {0xA684,L"\xA685"}, {0xA686,L"\xA687"}, {0xA688,L"\xA689"}, {0xA68A,L"\xA68B"}, {0xA68C,L"\xA68D"}, {0xA68E,L"\xA68F"}, {0xA690,L"\xA691"}, {0xA692,L"\xA693"}, {0xA694,L"\xA695"}, {0xA696,L"\xA697"}, {0xA722,L"\xA723"}, {0xA724,L"\xA725"}, {0xA726,L"\xA727"}, {0xA728,L"\xA729"}, {0xA72A,L"\xA72B"}, {0xA72C,L"\xA72D"}, {0xA72E,L"\xA72F"}, {0xA732,L"\xA733"}, {0xA734,L"\xA735"}, {0xA736,L"\xA737"}, {0xA738,L"\xA739"}, {0xA73A,L"\xA73B"}, {0xA73C,L"\xA73D"}, {0xA73E,L"\xA73F"}, {0xA740,L"\xA741"}, {0xA742,L"\xA743"}, {0xA744,L"\xA745"}, {0xA746,L"\xA747"}, {0xA748,L"\xA749"}, {0xA74A,L"\xA74B"}, {0xA74C,L"\xA74D"}, {0xA74E,L"\xA74F"}, {0xA750,L"\xA751"}, {0xA752,L"\xA753"}, {0xA754,L"\xA755"}, {0xA756,L"\xA757"}, {0xA758,L"\xA759"}, {0xA75A,L"\xA75B"}, {0xA75C,L"\xA75D"}, {0xA75E,L"\xA75F"}, {0xA760,L"\xA761"}, {0xA762,L"\xA763"}, {0xA764,L"\xA765"}, {0xA766,L"\xA767"}, {0xA768,L"\xA769"}, {0xA76A,L"\xA76B"}, {0xA76C,L"\xA76D"}, {0xA76E,L"\xA76F"}, {0xA779,L"\xA77A"}, {0xA77B,L"\xA77C"}, {0xA77D,L"\x1D79"}, {0xA77E,L"\xA77F"}, {0xA780,L"\xA781"}, {0xA782,L"\xA783"}, {0xA784,L"\xA785"}, {0xA786,L"\xA787"}, {0xA78B,L"\xA78C"}, {0xFB00,L"\x0066\x0066"}, {0xFB01,L"\x0066\x0069"}, {0xFB02,L"\x0066\x006C"}, {0xFB03,L"\x0066\x0066\x0069"}, {0xFB04,L"\x0066\x0066\x006C"}, {0xFB05,L"\x0073\x0074"}, {0xFB06,L"\x0073\x0074"}, {0xFB13,L"\x0574\x0576"}, {0xFB14,L"\x0574\x0565"}, {0xFB15,L"\x0574\x056B"}, {0xFB16,L"\x057E\x0576"}, {0xFB17,L"\x0574\x056D"}, {0xFF21,L"\xFF41"}, {0xFF22,L"\xFF42"}, {0xFF23,L"\xFF43"}, {0xFF24,L"\xFF44"}, {0xFF25,L"\xFF45"}, {0xFF26,L"\xFF46"}, {0xFF27,L"\xFF47"}, {0xFF28,L"\xFF48"}, {0xFF29,L"\xFF49"}, {0xFF2A,L"\xFF4A"}, {0xFF2B,L"\xFF4B"}, {0xFF2C,L"\xFF4C"}, {0xFF2D,L"\xFF4D"}, {0xFF2E,L"\xFF4E"}, {0xFF2F,L"\xFF4F"}, {0xFF30,L"\xFF50"}, {0xFF31,L"\xFF51"}, {0xFF32,L"\xFF52"}, {0xFF33,L"\xFF53"}, {0xFF34,L"\xFF54"}, {0xFF35,L"\xFF55"}, {0xFF36,L"\xFF56"}, {0xFF37,L"\xFF57"}, {0xFF38,L"\xFF58"}, {0xFF39,L"\xFF59"}, {0xFF3A,L"\xFF5A"}, {0x10400,L"\x10428"}, {0x10401,L"\x10429"}, {0x10402,L"\x1042A"}, {0x10403,L"\x1042B"}, {0x10404,L"\x1042C"}, {0x10405,L"\x1042D"}, {0x10406,L"\x1042E"}, {0x10407,L"\x1042F"}, {0x10408,L"\x10430"}, {0x10409,L"\x10431"}, {0x1040A,L"\x10432"}, {0x1040B,L"\x10433"}, {0x1040C,L"\x10434"}, {0x1040D,L"\x10435"}, {0x1040E,L"\x10436"}, {0x1040F,L"\x10437"}, {0x10410,L"\x10438"}, {0x10411,L"\x10439"}, {0x10412,L"\x1043A"}, {0x10413,L"\x1043B"}, {0x10414,L"\x1043C"}, {0x10415,L"\x1043D"}, {0x10416,L"\x1043E"}, {0x10417,L"\x1043F"}, {0x10418,L"\x10440"}, {0x10419,L"\x10441"}, {0x1041A,L"\x10442"}, {0x1041B,L"\x10443"}, {0x1041C,L"\x10444"}, {0x1041D,L"\x10445"}, {0x1041E,L"\x10446"}, {0x1041F,L"\x10447"}, {0x10420,L"\x10448"}, {0x10421,L"\x10449"}, {0x10422,L"\x1044A"}, {0x10423,L"\x1044B"}, {0x10424,L"\x1044C"}, {0x10425,L"\x1044D"}, {0x10426,L"\x1044E"}, {0x10427,L"\x1044F"} }; static int Count = sizeof(CaseFoldTbl)/sizeof(struct cp); /* * Since Unicode case folding can translate a single character * into as many as three, we reallocate storage here. */ void UnicodeFoldCase(struct dstr *ds) { int FoundP; int MaximumCharsNeeded; long l; /* Lower bound of range */ long u; /* Upper bound of range */ long m; /* Midpoint of range */ wchar_t c; wchar_t *t; wchar_t *t0; wchar_t *s; wchar_t *s0; wchar_t *cf; wchar_t *new; size_t NewCharCnt; size_t OriginalCharCnt; /* Allocate a working buffer guaranteed to be large enough */ /* The output can be no longer than three times the length of the input */ s0 = s = ds->s; MaximumCharsNeeded = (wcslen(s) * 3) + 1; t = (wchar_t *) malloc(MaximumCharsNeeded * sizeof(wchar_t)); if(t == NULL){ fprintf(stderr,_("Out of memory.\n")); exit(OUTOFMEMORY); } t0 = t; while ((c = *s) != L'\0'){ l = 0; u = Count - 1; FoundP = 0; while(l <= u){ /* Textbook binary search */ m = (l + u) / 2; if (c == CaseFoldTbl[m].i){ cf = CaseFoldTbl[m].o; while (*cf != L'\0') { *t++ = *cf++; } FoundP = 1; break; } else if(c > CaseFoldTbl[m].i) l = m + 1; else u = m - 1; } if(!FoundP) *t++ = c; s++; } *t = L'\0'; OriginalCharCnt = s - s0; NewCharCnt = t - t0; if(NewCharCnt > OriginalCharCnt) { free( (void *) s0); new = (wchar_t *) malloc((NewCharCnt +1) * sizeof(wchar_t)); if(new == NULL){ fprintf(stderr,_("Out of memory.\n")); exit(OUTOFMEMORY); } ds->s = wcscpy(new,t0); } else { ds->s = wcscpy(s0,t0); } ds->l = ds->c = NewCharCnt; free( (void *) t0); } /* Returns the number of characters preceding the decimal point */ inline int NumStrKeyCopy(char * tgt,wchar_t *src) { int cnt= 0; int GotDecimalP = 0; if(*src == 0x002e) cnt = 1; while (*src != L'\0') { *tgt = (char) *src++; if (*tgt == '.') GotDecimalP = 1; if (!GotDecimalP) cnt++; tgt++; } *tgt = '\0'; return cnt; } void MapNonHybridPerLocale(struct dstr *sptr) { size_t WCharsNeeded; wchar_t *new; errno = 0; WCharsNeeded = wcsxfrm(NULL,sptr->s,0) + 1; if(errno == EINVAL) { fprintf(stderr, "Key contains characters outside the collation sequence for the locale.\n"); exit(OTHERERROR); } new = (wchar_t *) malloc(WCharsNeeded * sizeof(wchar_t)); if(new == NULL) {fprintf(stderr,_("Out of memory.\n"));exit(OUTOFMEMORY);} (void)wcsxfrm(new,sptr->s,WCharsNeeded); free((void *) sptr->s); sptr->s = new; sptr->l = sptr->c = WCharsNeeded; } /* #ifdef LOCALE_SORT_ORDER */ long ExtractNum(wchar_t *str,int f, int n) { wchar_t *tmp; size_t Length; int i; wchar_t *s; long num; Length = n-f; #ifdef ALLOCAOK tmp = (wchar_t *) alloca((Length+1) * sizeof(wchar_t)); #else tmp = (wchar_t *) malloc((Length+1) * sizeof(wchar_t)); #endif s = str+f; for(i=0; i < Length; i++) *(tmp+i) = *s++; *(tmp+i) = L'\0'; errno = 0; num = wcstol(tmp,NULL,10); #ifndef ALLOCAOK free((void *) tmp); #endif if((errno == EINVAL)||(errno == ERANGE)){ return -1L; } return num; } wchar_t * ExtractTxt(wchar_t *str,int f, int n, int key) { wchar_t *tmp; size_t Length; int i; wchar_t *s; wchar_t *xstr; int WCharsNeeded; struct dstr *dsptr; int MapNonHybridLI(struct dstr *,struct mapentry **,int); Length = n-f; #ifdef ALLOCAOK tmp = (wchar_t *) alloca((Length+1) * sizeof(wchar_t)); #else tmp = (wchar_t *) malloc((Length+1) * sizeof(wchar_t)); #endif s = str+f; for(i=0; i < Length; i++) *(tmp+i) = *s++; *(tmp+i) = L'\0'; #ifdef LOCALE_SORT_ORDER if (KeyInfo[key]->LocaleP) { WCharsNeeded = wcsxfrm(NULL,tmp,0); if(errno == EINVAL) { fprintf(stderr,"Key contains characters outside the collation sequence for the locale.\n"); return NULL; } xstr = (wchar_t *) malloc((WCharsNeeded+1) * sizeof(wchar_t)); if(xstr == NULL) return NULL; (void)wcsxfrm(xstr,tmp,WCharsNeeded); } else { #endif /* Create a dstr and call MapNonHybridLI on it */ dsptr = MakeDynamicString(tmp); MapNonHybridLI(dsptr, KeyInfo[key]->MapTable, KeyInfo[key]->MapTableEntries); xstr = (wchar_t *) malloc((dsptr->l+1) * sizeof(wchar_t)); if(xstr == NULL) return NULL; wcscpy(xstr,dsptr->s); FreeDynamicString(dsptr); #ifdef LOCALE_SORT_ORDER } #endif #ifndef ALLOCAOK free((void *) tmp); #endif return xstr; } /* We have to avoid transforming the digits so parse and only xfrm non-digits */ /* Or with the following */ #define SETHIGHBITMASK 0x80 /* And with the following */ #define UNSETHIGHBITMASK 0x7F #define MAXHYBRIDSUBPARTS 128 struct HybridList * MapHybrid (struct dstr *sptr, int KeyNum) { wchar_t *s; short FirstPartIsNumericP = 0; int i,k; int Offsets[MAXHYBRIDSUBPARTS]; size_t SubParts = 0; size_t TxtCnt = 0; size_t NumCnt = 0; enum {START,NUM,TXT} State; struct HybridList *ptr; s = sptr->s; if(iswdigit((wint_t) (*s))) FirstPartIsNumericP = 1; State = START; i = 0; /* Record the offsets of the transition points */ while(*s != L'\0') { if(iswdigit(*s++)) { if(State != NUM) { Offsets[SubParts] = i; SubParts++; if(SubParts > MAXHYBRIDSUBPARTS ) { fprintf(stderr,"A hybrid string cannot have more than %d subparts.\n",MAXHYBRIDSUBPARTS); exit(LIMITEXCEEDED); } State = NUM; } } else { if(State != TXT) { Offsets[SubParts] = i; SubParts++; if(SubParts > MAXHYBRIDSUBPARTS ) { fprintf(stderr,"A hybrid string cannot have more than %d subparts.\n",MAXHYBRIDSUBPARTS); exit(LIMITEXCEEDED); } State = TXT; } } i++; } Offsets[SubParts] =i; ptr = (struct HybridList *) malloc(sizeof(struct HybridList)); if(ptr == NULL) return NULL; /* Record cnt and start */ ptr->cnt = ((unsigned char) SubParts) & UNSETHIGHBITMASK; if(FirstPartIsNumericP) ptr->cnt |= SETHIGHBITMASK; /* We can now compute how many subparts there are of each type */ NumCnt = SubParts/2; if( (SubParts%2 == 1) && FirstPartIsNumericP) NumCnt+=1; TxtCnt = SubParts - NumCnt; /* Allocate storage for txt list and num list */ ptr->ilist = (long *) malloc(NumCnt * sizeof(long)); ptr->tlist = (wchar_t **) malloc(TxtCnt * sizeof(wchar_t *)); if((ptr->ilist == NULL) || (ptr->tlist == NULL)) { fprintf(stderr,_("%s: out of memory.\n"),progname); exit(OUTOFMEMORY); } /* Convert num strings to ints and store */ for(i = 0; i < NumCnt; i++) { k = 2*i - FirstPartIsNumericP +1; ptr->ilist[i] = ExtractNum(sptr->s,Offsets[k],Offsets[k+1]); if(ptr->ilist[i] < 0L) return NULL; } /* Transform txt strings and store */ for(i = 0; i < TxtCnt; i++) { k = 2*i + FirstPartIsNumericP; ptr->tlist[i] = ExtractTxt(sptr->s,Offsets[k],Offsets[k+1],KeyNum); if(ptr->tlist[i] == NULL) return NULL; } return ptr; } /* #endif */ /* * Reverse the components of an internet domain name * or email address in place. For example: * * lorax.ldc.upenn.edu -> edu.upenn.ldc.lorax * billposer@alum.mit.edu -> edu.mit.alum@billposer * xia.florence@uvic.ca -> ca.uvic@xia.florence * * This yields an ordering in which the more general component * dominates the less particular, e.g.: * * xia.florence@uvic.ca * billposer@alum.mit.edu * jsmith@alum.mit.edu * billposer@lorax.ldc.upenn.edu * * The current version ignores schemes. */ void ProcessDomainComponents(struct dstr *ds) { size_t DomainNameLength = 0; /* Length of domain name component */ size_t InitialLength = 0; /* Length of scheme or username */ wchar_t *tmp; /* Temporary copy of domain name */ wchar_t *Initial; /* Temporary copy of scheme or username */ wchar_t *optr; /* Current position in output string */ wchar_t *DomainStart; /* First character of domain name */ wchar_t *Isep; /* Separator between scheme/username and domain name */ wchar_t *ptr; /* Current position */ short SchemeP = 0; /* Split off scheme if present */ Isep = wcschr(ds->s,L':'); if(Isep != NULL) { InitialLength = Isep - ds->s; DomainStart = Isep + 1; SchemeP = 1; } else DomainStart = ds->s; if(!SchemeP) { /* Split off username if present */ Isep = wcschr(ds->s,L'@'); if (Isep != NULL) { InitialLength = Isep - ds->s; DomainStart = Isep + 1; } else DomainStart = ds->s; } DomainNameLength = ds->s + ds->l - DomainStart; #ifdef ALLOCAOK if (InitialLength > 0) Initial = (wchar_t *) alloca((InitialLength+1) * sizeof(wchar_t)); tmp = (wchar_t *) alloca((DomainNameLength+1) * sizeof(wchar_t)); #else if (InitialLength > 0) Initial = (wchar_t *) malloc((InitialLength+1) * sizeof(wchar_t)); tmp = (wchar_t *) malloc((DomainNameLength+1) * sizeof(wchar_t)); #endif if( (tmp == NULL) || ( (Initial == NULL) && (InitialLength > 0) )) { fprintf(stderr,"Failed to allocate storage in ProcessDomainComponents.\n"); exit(OUTOFMEMORY); } /* Stash initial component */ if (InitialLength > 0) { wcsncpy(Initial,ds->s,InitialLength+1); Initial[InitialLength] = L'\0'; } /* Put the domain name into tmp */ wcscpy(tmp,DomainStart); /* Now parse the tmp copy and copy back into the original string */ optr = ds->s; while(1) { ptr=wcsrchr(tmp,L'.'); if(ptr==NULL) break; /* We've done all but the first component of the dn */ wcscpy(optr,ptr+1); optr+=wcslen(ptr+1); *optr++ = L'.'; *ptr = L'\0'; } wcscpy(optr,tmp); /* First component */ /* Now append initial component if there is one */ if (InitialLength > 0) { if (SchemeP) { *(ds->s + DomainNameLength) = L'.'; } else { *(ds->s + DomainNameLength) = L'@'; } wcsncpy(ds->s + DomainNameLength+1,Initial,InitialLength); ds->s[DomainNameLength+InitialLength+1] = L'\0'; } #ifndef ALLOCAOK free((void *) tmp); free((void *) Initial); #endif } /* * Extract the keys from the record, map them into internal form * and store them with the record. */ #define CAPTURED_GROUPS 10 int GetKeys(struct record *recptr, struct keyinfo **info,int keys,wchar_t MaxInInput, short FirstRecordP) { wchar_t *Next; wchar_t *FStart; wchar_t **FieldPtrs; wchar_t *wcstokStore; int i, j,k; int FieldCnt; int FieldsNeeded; int MaxFields; int KeyLength; int FieldLength; int FirstIndex; int LastIndex; int SrcStart; int TgtStart; long first; /* Index of first character in range */ long last; /* Index of last character in range */ DOUBLE TempNumKey; short FoundP; short KeyMissingP; int stat; regmatch_t pm[CAPTURED_GROUPS]; wchar_t *OutPtr; wchar_t *Key; wchar_t *ConstKey; struct dstr TempKey; short FreeKeyP; /* Does Key point at memory that should be freed? */ size_t BytesNeeded; size_t WCharsNeeded; int ns; /* Number system of current key */ #ifdef USE_UNINUM union ns_rval UninumValue; #endif void KeyCopy(wchar_t *, wchar_t *, int); void RevKeyCopy(wchar_t *, wchar_t *, int); int MapNonHybridLI(struct dstr *,struct mapentry **,int); void UnicodeFoldCase (struct dstr *); int SubKey(struct dstr *, struct keyinfo *); extern void StripDiacritics (wchar_t *); extern void ConvertEnclosed (wchar_t *); extern void ConvertStylistic (struct dstr *); extern int Exclude(wchar_t *,int, unsigned char *); extern int ExcludeChar(wchar_t *, wchar_t **, int, unsigned char *); extern int GetAngleKey(wchar_t *, DOUBLE *); extern int GetDateKey(wchar_t *, DOUBLE *,struct ymdinfo *,int); extern int GetISO8601Key(wchar_t *, DOUBLE *); extern DOUBLE GetMonthKey(wchar_t *, wchar_t **); extern int GetTimeKey(wchar_t *, DOUBLE *); extern wchar_t *wcCopyRange(wchar_t *, long, long); InitializeDynamicString(&TempKey); /* * If the whole record is to be used as key, skip the parse and * treat the whole record as the first key. */ if(info[0]->SelectType == WHOLE) MaxFields = 1; else MaxFields = InitialMaxFields; FieldPtrs = (wchar_t **) malloc((size_t) MaxFields * sizeof(wchar_t *)); if(FieldPtrs == NULL){ fprintf(stderr,"%s: out of memory - FieldPtrs.\n",progname); exit(OUTOFMEMORY); } if(info[0]->SelectType == WHOLE){ FieldCnt = 1; FieldPtrs[0] = wcInputText; } else { /* * Parse the record into fields, leaving the number of fields * found in Fieldcnt and pointers to the beginnings in FieldPtrs. */ FieldCnt = 0; Next = &(wcInputText[0]); for (FStart = wcstok(Next,Terminators,&wcstokStore); FStart != NULL; FStart = wcstok(NULL,Terminators,&wcstokStore)) { if(FieldCnt == MaxFields){/* Reallocate pointers here */ MaxFields += InitialMaxFields/2; FieldPtrs = (wchar_t **) realloc((void *) FieldPtrs, (unsigned) MaxFields * sizeof(wchar_t *)); if(FieldPtrs == (wchar_t **)0){ fprintf(stderr,"\n%s: out of memory - FieldPtrs.\n",progname); exit(OUTOFMEMORY); } } FieldPtrs[FieldCnt++] = FStart; Next = NULL; } } /* We have now got all of the fields into FieldPtrs except for any ranges */ /* For each key, find the required field and process. */ FreeKeyP = 0; for(i = 0; i < keys; i++){ if(info[i]->CompType & CRANDOM) continue; FoundP = FALSE; if(FreeKeyP) free( (void *) ConstKey); FreeKeyP = 0; KeyMissingP = FALSE; /* Key fields identified by character range */ if(info[i]->SelectType == CRANGE) { if(info[i]->RangeFirst < 0) first = recptr->length + info[i]->RangeFirst; else first = info[i]->RangeFirst; if(info[i]->RangeLast < 0) last = recptr->length + info[i]->RangeLast; else last = info[i]->RangeLast; if( (first > recptr->length - 1) || (last > recptr->length - 1) || (first < 0) || (last < 0)) { if(info[i]->OptionalP == FALSE){ /* If not optional, gripe */ fprintf(stderr, _("The specified range falls outside the bounds of this record.\n")); PrintLog( _("The specified range falls outside the bounds of this record.\n")); return(ERROR); } else KeyMissingP=TRUE; } else { Key = wcCopyRange(wcInputText,first,last); FreeKeyP = 1; } /* Key fields identified by numerical position */ } else if( (info[i]->SelectType == NUMBERED) || (info[i]->SelectType == WHOLE)){ if(info[i]->Number < 0) FirstIndex = FieldCnt + info[i]->Number +1; else FirstIndex = info[i]->Number; if(info[i]->Last < 0) LastIndex = FieldCnt + info[i]->Last+1; else LastIndex = info[i]->Last; if(FirstIndex > LastIndex) { PrintLog("The start field is greater than the end field.\n"); return(ERROR); } if((FirstIndex >= 0) && (FirstIndex < FieldCnt) && (LastIndex >= 0) && (LastIndex < FieldCnt)) { if (FirstIndex == LastIndex) { FieldLength = wcslen(FieldPtrs[FirstIndex]); if (FieldLength > info[i]->FirstOffset) { Key = FieldPtrs[FirstIndex] + info[i]->FirstOffset; } else { PrintLog("Field %d is not as long as the offset.\n",i+1); return(ERROR); } } else { FreeKeyP = 1; KeyLength = 0; /* Allocate enough storage for the key */ for(j = FirstIndex; j <= LastIndex; j++) KeyLength += wcslen(FieldPtrs[j]); Key = (wchar_t *) malloc ( (KeyLength+1+(LastIndex-FirstIndex)) * sizeof(wchar_t)); if (Key == NULL) { fprintf(stderr,"\n%s: out of memory - FieldPtrs.\n",progname); exit(OUTOFMEMORY); } TgtStart =0; for(j = FirstIndex; j <= LastIndex; j++) { SrcStart = 0; /* Default */ if(j == FirstIndex) { if (wcslen(FieldPtrs[j]) > info[i]->FirstOffset) { SrcStart = info[i]->FirstOffset; } else { PrintLog("Field %d is not as long as the offset.\n",j+1); return(ERROR); } } if(j == LastIndex) { if(info[i]->LastOffset < 0) { /* No last offset specified -> use whole field */ wcscpy(Key+TgtStart,FieldPtrs[j]); } else { if (wcslen(FieldPtrs[j]) <= info[i]->LastOffset) { PrintLog("Field %d is not as long as the offset.\n",j+1); return(ERROR); } for (k = 0; k <= info[i]->LastOffset; k++) { Key[TgtStart+k] = FieldPtrs[j][k]; } Key[TgtStart+k] = L'\0'; } } else { wcscpy(Key+TgtStart,FieldPtrs[j]+SrcStart); TgtStart+= (wcslen(FieldPtrs[j]) - SrcStart); Key[TgtStart++] = Terminators[0]; } } /* Use this to print out compound keys when debugging. fputs("key: ",stderr);putu8s(Key,stderr);fputc('\n',stderr); fflush(stderr); */ } } else{ /* Key field not present */ if( (FirstIndex < 0) || (LastIndex < 0) ) { FieldsNeeded = (-1 * MIN(info[i]->Number,info[i]->Last)) - 1; } if( (FirstIndex >= FieldCnt) || (LastIndex >= FieldCnt)) { FieldsNeeded = MAX(FirstIndex,LastIndex) + 1; } if(info[i]->OptionalP == FALSE){ /* If not optional, gripe */ fprintf(stderr, "\n%s: record does not have %d fields.\n", progname,FieldsNeeded); PrintLog( "\n%s: record does not have %d fields.\n", progname,FieldsNeeded); return(ERROR); } else KeyMissingP=TRUE; } } else{ /* Key fields identified by tag */ for(j = 0;j < FieldCnt; j++){ stat =tre_regwexec(&(info[i]->cregexp),FieldPtrs[j],CAPTURED_GROUPS,pm,0); if(stat == 0) { /* Check whether value is empty */ Key = FieldPtrs[j] + pm[1].rm_eo; if (wcslen(Key) == 0) { wPrintLog(L"\nField with tag matching \"%s\" is empty.\n",info[i]->Tag); } else FoundP = TRUE; } } if(FoundP == FALSE){ if(info[i]->OptionalP == FALSE){ /* If not optional, gripe */ wPrintLog( L"\nRecord does not have a field with tag matching \"%s\" on which to sort.\n", info[i]->Tag); return(ERROR); } else KeyMissingP=TRUE; } } /* End of search for tagged key */ if(KeyMissingP){ if(info[i]->CompType & CNUMERIC){ recptr->klistptr[i].n = NULL; } else { recptr->klistptr[i].t = NULL; } continue; } /* If we get here, we have found the key, so we process it */ ConstKey = Key; /* Save since we may skip leading chars in Key */ if(info[i]->CompType & CNUMERIC){ if(info[i]->ExclusionTable != NULL){ KeyLength = wcslen(Key); KeyLength = ExcludeChar(Key,&OutPtr,KeyLength,info[i]->ExclusionTable); if(KeyLength == 0){ fprintf(stderr,"After exclusions record is empty.\n"); return(ERROR); } Key = OutPtr; ConstKey = Key; } if(info[i]->CompType & CTIME){ if(GetTimeKey(Key,&TempNumKey) == ERROR){ wPrintLog(L"\n%s is not a well-formed time\n",Key); return(ERROR); } } else if(info[i]->CompType & CANGLE){ if(GetAngleKey(Key,&TempNumKey) == ERROR){ wPrintLog(L"\n%s is not a well-formed angle\n",Key); return(ERROR); } } else if(info[i]->CompType & CISO8601){ if(GetISO8601Key(Key,&TempNumKey) == ERROR){ wPrintLog(L"\n%s is not a well-formed ISO8601 date/time combination.\n", Key); return(ERROR); } } else if(info[i]->CompType & CDATE){ if(GetDateKey(Key, &TempNumKey,&(info[i]->ymd),i) == ERROR){ wPrintLog(L"\n%s is not a well-formed date.\n",Key); return(ERROR); } } else if ((info[i]->CompType & CMONTH) && (info[i]->CompType & CNUMERIC)) { TempNumKey = GetMonthKey(Key,info[i]->MonthNames); if(TempNumKey < 1.0) { wPrintLog(L"\n%s is not a recognized month name.\n",Key); return(ERROR); } } else { #ifdef USE_UNINUM if (info[i]->NumberSystem != NS_WESTERN) { if (info[i]->NumberSystem == NS_ALL) { ns = GuessNumberSystem((UTF32 *)Key); if (ns == NS_UNKNOWN) { wPrintLog(L"\nUnable to determine number system of key %s.\n",Key); return(ERROR); } } else if (info[i]->NumberSystemAnyP) { if(FirstRecordP) { ns = GuessNumberSystem((UTF32 *)Key); if (ns == NS_UNKNOWN) { wPrintLog(L"\nUnable to determine number system of key %s.\n",Key); /* Probably should do more here */ return(ERROR); } else { info[i]->NumberSystem = ns; PrintLog("Number system for key %d set to %s by first record.\n", i+1,NumberSystemToString(ns)); } } ns = info[i]->NumberSystem; } else ns = info[i]->NumberSystem; StringToInt(&UninumValue,(UTF32 *)Key,NS_TYPE_ULONG,ns); if (uninum_err == NS_BADCHARACTER) { wPrintLog(L"\n%s is not a well-formed number.\n",Key); return(ERROR); } if (uninum_err == NS_DOESNOTFIT) { wPrintLog(L"\n%s is too large to store as a number.\n",Key); return(ERROR); } TempNumKey = (DOUBLE) UninumValue.u; } else { /* We get here if the number system is NS_WESTERN */ #endif TempNumKey = atofwc(Key,&stat); if(stat == BADRECORD) { wPrintLog(L"\n%s is not a well-formed number.\n",Key); return(ERROR); } if(stat == RANGEERROR) { wPrintLog(L"\n%s is outside the range of representable numbers.\n",Key); return(ERROR); } #ifdef USE_UNINUM } #endif } } /* End of plain numeric key */ else if(info[i]->CompType & CNUMSTR){ if(!KeyMissingP){ #ifdef USE_UNINUM if (info[i]->NumberSystem != NS_WESTERN) { if (info[i]->NumberSystem == NS_ALL) { ns = GuessNumberSystem((UTF32 *)Key); if (ns == NS_UNKNOWN) { wPrintLog(L"\nUnable to determine number system of key %s.\n",Key); return(ERROR); } } else if (info[i]->NumberSystemAnyP) { if(FirstRecordP) { ns = GuessNumberSystem((UTF32 *)Key); if (ns == NS_UNKNOWN) { wPrintLog(L"\nUnable to determine number system of key %s.\n",Key); /* Probably should do more here */ return(ERROR); } else { info[i]->NumberSystem = ns; PrintLog("Number system for key %d set to %s by first record.\n", i+1,NumberSystemToString(ns)); } } ns = info[i]->NumberSystem; } else ns = info[i]->NumberSystem; StringToInt(&UninumValue,(UTF32 *)Key,NS_TYPE_STRING,ns); if (uninum_err == NS_BADCHARACTER) { wPrintLog(L"\n%s is not a well-formed number.\n",Key); return(ERROR); } KeyLength = strlen(UninumValue.s); recptr->klistptr[i].N.sign = 1; recptr->klistptr[i].N.txt = (char *) malloc(sizeof(char) * (KeyLength +1)); if(recptr->klistptr[i].N.txt == NULL) { fprintf(stderr,"\n%s: out of memory - new key.\n", progname); exit(OUTOFMEMORY); } strcpy(recptr->klistptr[i].N.txt,UninumValue.s); recptr->klistptr[i].N.cnt = KeyLength; } /* End of non-western number system */ else { #endif if (Key[0] == 0x002d) { /* negative sign */ Key++; recptr->klistptr[i].N.sign = -1; } else if (Key[0] == 0x002b) { /* positive sign */ Key++; recptr->klistptr[i].N.sign = 1; } else recptr->klistptr[i].N.sign = 1; while(*Key == 0x0030) Key++; /* skip leading zeroes */ KeyLength = wcslen(Key); recptr->klistptr[i].N.txt = (char *) malloc(sizeof(char) * (KeyLength +1)); if(recptr->klistptr[i].N.txt == NULL) { fprintf(stderr,"\n%s: out of memory - new key.\n", progname); exit(OUTOFMEMORY); } recptr->klistptr[i].N.cnt = NumStrKeyCopy(recptr->klistptr[i].N.txt,Key); #ifdef USE_UNINUM } #endif } /* End of not key missing */ continue; } else {/* Lexicographic key: pure lexicographic, hybrid, and string length */ /* In certain cases, in which the tag regexp matches nothing, we are getting here with an empty key. This should be detected earlier */ if(FillDynamicString(&TempKey,Key) == ERROR) { fprintf(stderr,_("Out of memory.\n")); exit(OUTOFMEMORY); } if(info[i]->CompType & CDOMAIN){ ProcessDomainComponents(&TempKey); } /* Perform substitutions */ if(info[i]->SubListEntries > 0) { (void)SubKey(&TempKey,info[i]); #ifdef DEBUGP fputs("sub: ",stderr);putu8s(TempKey.s,stderr);fputc('\n',stderr); fflush(stderr); #endif } /* Handle exclusions */ if( (info[i]->ExclusionTable != NULL) && !KeyMissingP){ KeyLength = Exclude(TempKey.s,TempKey.l,info[i]->ExclusionTable); if(KeyLength == 0){ if(!info[i]->OptionalP){ fprintf(stderr,"After exclusions non-optional field is empty.\n"); return(ERROR); } KeyMissingP=TRUE; } } if (info[i]->StripDiacriticsP) { StripDiacritics(TempKey.s); } if (info[i]->ConvertEnclosedP) { ConvertEnclosed(TempKey.s); } if (info[i]->ConvertStylisticP) { ConvertStylistic(&TempKey); } /* Fold case */ if(info[i]->FoldCaseP) { if ( (MaxInInput <= 0x7F) && (!info[i]->TurkicFoldCaseP)) ASCIIFoldCase(TempKey.s); else { /* Do not reorder these - we need bleeding order */ if(info[i]->TurkicFoldCaseP) TurkicFoldCase(TempKey.s); UnicodeFoldCase(&TempKey); } } /* Map multigraphs */ #ifdef LOCALE_SORT_ORDER if(info[i]->LocaleP) { if(MultipleLocalesP) setlocale(LC_COLLATE,info[i]->Locale); } #endif if(info[i]->CompType & CHYBRID) { recptr->klistptr[i].H = MapHybrid(&TempKey,i); if(recptr->klistptr[i].H == NULL) { fprintf(stderr,"\n%s: out of memory - new key.\n", progname); exit(OUTOFMEMORY); } continue; } else { /* Non-hybrid */ #ifdef LOCALE_SORT_ORDER if(info[i]->LocaleP) MapNonHybridPerLocale(&TempKey); else { #endif (void)MapNonHybridLI(&TempKey, info[i]->MapTable, info[i]->MapTableEntries); #ifdef LOCALE_SORT_ORDER } #endif } } /* Store the key */ if(info[i]->CompType & CNUMERIC){ if(!KeyMissingP){ recptr->klistptr[i].n = AllocateDouble(); *(recptr->klistptr[i].n) = TempNumKey; } else recptr->klistptr[i].n = NULL; } else{ /* Lexicographic key */ if(!KeyMissingP){ if(info[i]->CompType & CSIZE){ recptr->klistptr[i].n = AllocateDouble(); *(recptr->klistptr[i].n) = (DOUBLE) TempKey.l; } else{ if(info[i]->FirstCharOnlyP) WCharsNeeded = 2; else WCharsNeeded = 1 + TempKey.l; BytesNeeded = WCharsNeeded * sizeof(wchar_t); recptr->klistptr[i].t = (wchar_t *) malloc(BytesNeeded); if(recptr->klistptr[i].t == (wchar_t *) 0){ fprintf(stderr,"\n%s: out of memory - new key.\n", progname); exit(OUTOFMEMORY); } if(info[i]->ReverseP) RevKeyCopy(recptr->klistptr[i].t, TempKey.s,WCharsNeeded); else if(info[i]->FirstCharOnlyP) { recptr->klistptr[i].t[0] = TempKey.s[0]; recptr->klistptr[i].t[1] = (UTF32) 0; } else wcscpy(recptr->klistptr[i].t,TempKey.s); } } else{ if(info[i]->CompType & CSIZE) recptr->klistptr[i].n = NULL; else recptr->klistptr[i].t = NULL; } } } /* End of loop over keys */ if(FieldPtrs != NULL) {free((void *) FieldPtrs);FieldPtrs = NULL;} if(TempKey.s != NULL) {free((void *) TempKey.s); TempKey.s = NULL;} return (SUCCESS); } /* End of GetKeys */ int GetSortOrder(char *file,struct keyinfo *ki) { FILE *fp; extern FILE *OpenFile(char *, char *, char *); void SortMapTable(struct keyinfo *); void CreateRankTable(struct keyinfo *); int ConstructSortOrder(FILE *, struct keyinfo *); fp = OpenFile(file,"r",progname); if(fp == NULL) return(ERROR); CreateRankTable(ki); if(ConstructSortOrder(fp,ki) == ERROR) return(ERROR); fclose(fp); SortMapTable(ki); return(SUCCESS); } /* * Initialize all characters into numerical order but so that, * if left unset, they will be ranked after all characters whose * order is set. */ void CreateRankTable(struct keyinfo *ki) { long i; ki->RankTable = (wchar_t *) malloc(sizeof(wchar_t) * RankTableSize); if(ki->RankTable == NULL){ fprintf(stderr,_("Out of memory.\n")); exit(OUTOFMEMORY); } /* * Code 0 must rank first so that a string will sort before * a string of which it is a prefix. */ ki->RankTable[0] = 0; /* This yields machine collating order but after all user-specified codes */ for(i=1;iRankTable[i] = RankTableSize + i +1; } /* Multigraph info is initialized separately, after reading the command line */ void InitializeKeyInfo(struct keyinfo *ptr) { ptr->SelectType = NUMBERED; ptr->Number = 0; ptr->Last = 0; ptr->CompType = (unsigned char) (0 & ~CNUMERIC & ~CINVERSE); ptr->RangeFirst = 0; ptr->RangeLast = 0; ptr->FirstOffset = 0; ptr->LastOffset = -1; ptr->OptionalP = FALSE; ptr->MissingKeyComparison = COMPARE_EQUAL; ptr->ReverseP = FALSE; ptr->FoldCaseP = FALSE; ptr->TurkicFoldCaseP = FALSE; ptr->StripDiacriticsP = FALSE; ptr->ConvertEnclosedP = FALSE; ptr->ConvertStylisticP = FALSE; ptr->FirstCharOnlyP = FALSE; ptr->LocaleP = FALSE; ptr->Locale = NULL; ptr->MapTable = NULL; ptr->MapTableEntries = 0; ptr->SubList = NULL; ptr->SubListEntries = 0; ptr->RankTable = NULL; ptr->ExclusionTable = NULL; ptr->ExclusionSpec=0; ptr->ExclusionEntries = 0; ptr->ymd.y = 0; ptr->ymd.m = 1; ptr->ymd.d = 2; ptr->ymd.sep1 = L'-'; ptr->ymd.sep2 = L'-'; ptr->WhiteSpace = DefaultWhiteSpace; ptr->NextCode = MG_First; ptr->MaxMGCode = MG_Last; ptr->TotalCodes = MG_Total; #ifdef USE_UNINUM ptr->NumberSystem = NS_WESTERN; ptr->NumberSystemAnyP = 0; #endif } /* Allocate storage for a key and initialize it */ struct keyinfo * SetupKey(void) { struct keyinfo *ptr; ptr = (struct keyinfo *) malloc(sizeof(struct keyinfo)); if(ptr == NULL) { fprintf(stderr,"Could not allocate initial key struct.\n"); exit(OUTOFMEMORY); } InitializeKeyInfo(ptr); return ptr; } void CreateInitialKeys (void) { int i; KeyInfo = (struct keyinfo **) malloc (INITIALKEYS * sizeof(struct keyinfo *)); if(NULL == KeyInfo) { fprintf(stderr,"Could not allocate initial key array.\n"); exit(OUTOFMEMORY); } for(i = 0; i < INITIALKEYS; i++) { KeyInfo[i] = SetupKey(); } } void CheckKeyAllocation (int keycount, int *maxkeys) { if (keycount < *maxkeys) return; *maxkeys = *maxkeys + 1; KeyInfo = (struct keyinfo **) realloc(KeyInfo,sizeof(struct keyinfo *) * *maxkeys); if(KeyInfo == NULL) { fprintf(stderr,_("Out of memory: cannot reallocate KeyInfo.\n")); exit(OUTOFMEMORY); } KeyInfo[(*maxkeys)-1] = SetupKey(); } void WriteSingleRecord(struct record *ptr, FILE *fp,wchar_t sep) { long i; int fd; int seplen; short FixedLengthP; UTF8 utf8sep[6]; extern int wc2utf8(UTF8 *, wchar_t); if(sep == NOTACHARACTER) { FixedLengthP = 1; } else { FixedLengthP = 0; seplen = wc2utf8(utf8sep,sep); } fd = fileno(fp); write(fd,ptr->text,ptr->length); if(!FixedLengthP) write(fd,utf8sep,seplen); } /* Write the records out in sorted order */ void WriteOutRecords(long Records, FILE *fp,int ReverseP,wchar_t sep) { long i; int fd; int seplen; short FixedLengthP; UTF8 utf8sep[6]; struct record *ptr; extern int wc2utf8(UTF8 *, wchar_t); if(sep == NOTACHARACTER) { FixedLengthP = 1; } else { FixedLengthP = 0; seplen = wc2utf8(utf8sep,sep); } fd = fileno(fp); for(i=1L; i <= Records; i++){ ptr = RecordList[(ReverseP ? Records-i : i-1)]; write(fd,ptr->text,ptr->length); if(!FixedLengthP) write(fd,utf8sep,seplen); if(VerboseP && (i % INTWREPORTINTERVAL == 0)){ fprintf(stderr,"\b\b\b\b\b\b\b\b\b%9ld",i); } } if(VerboseP) { #ifdef HAVE_PRINTF_THSEP fprintf(stderr,_("\b\b\b\b\b\b\b\b\b%'9ld\n"),i-1); #else fprintf(stderr,_("\b\b\b\b\b\b\b\b\b%9ld\n"),i-1); #endif } } void WriteOutRecordsExternal(long Records, FILE *fp,int ReverseP,wchar_t sep) { long i; int fd; int seplen; int max = 0; short FixedLengthP; UTF8 utf8sep[6]; struct record *ptr; UTF8 *rbuf; extern int wc2utf8(UTF8 *, wchar_t); if(sep == NOTACHARACTER) { FixedLengthP = 1; } else { FixedLengthP = 0; seplen = wc2utf8(utf8sep,sep); } fd = fileno(fp); /* Allocate a buffer large enough for the largest record */ for(i=1L; i <= Records; i++){ ptr = RecordList[(ReverseP ? Records-i : i-1)]; if(ptr->length > max) max = ptr->length; } rbuf = (UTF8 *) malloc(max+1); if(rbuf == NULL) { fprintf(stderr,"Unable to allocate output buffer.\n"); exit(OUTOFMEMORY); } for(i=1L; i <= Records; i++){ ptr = RecordList[(ReverseP ? Records-i : i-1)]; if(lseek(infd,ptr->fpos,SEEK_SET) < 0) { fprintf(stderr,"Seek on input file failed.\n"); perror(NULL);fflush(stderr); exit(EIOERROR); } if(read(infd,rbuf,ptr->length) != ptr->length) { fprintf(stderr,"Read of record from input file failed.\n"); exit(EIOERROR); } write(fd,rbuf,ptr->length); if(!FixedLengthP) write(fd,utf8sep,seplen); if(VerboseP && (i % INTWREPORTINTERVAL == 0)){ fprintf(stderr,"\b\b\b\b\b\b\b\b\b%9ld",i); } fclose(infp); free(rbuf); } if(VerboseP) { #ifdef HAVE_PRINTF_THSEP fprintf(stderr,_("\b\b\b\b\b\b\b\b\b%'9ld\n"),i-1); #else fprintf(stderr,_("\b\b\b\b\b\b\b\b\b%9ld\n"),i-1); #endif } } #define INITIPSIZE 128 int ConstructSortOrder(FILE *sfp, struct keyinfo *ki) { int CurrentRank = 0; wchar_t *Field; wchar_t *str; UTF8 *InputLine; wchar_t *wcstokStore; wchar_t Index; int status; int InputLineSize; unsigned long LineNumber; unsigned long ByteOffset; wchar_t tmpwc; wchar_t *tmpwcptr; #ifndef USEUTF8PROC int32_t NormalizationResult; #else UTF8 *tmputf8ptr; #endif wchar_t AddStringToMapTable(wchar_t *,struct keyinfo *); extern int u82u32 (UTF8 *,wchar_t **,wchar_t *); extern UTF8 * GetBlockSepCharRAUTF8(FILE *, UTF8 *, int *, int *, wchar_t, unsigned long, unsigned long); extern int EvalEscapes(wchar_t *); #ifndef USEUTF8PROC extern UTF32 * NormalizeString(UTF32 *, int32_t *, UNormalizationMode); #endif InputLineSize = INITIPSIZE; InputLine = (UTF8 *) malloc(INITIPSIZE * sizeof(UTF8)); if(InputLine == NULL){ fprintf(stderr,_("ConstructSortOrder: out of memory\n")); exit(OUTOFMEMORY); } LineNumber = 0L; ByteOffset = 0L; while(1){ InputLine = GetBlockSepCharRAUTF8(sfp,InputLine,&status,&InputLineSize,L'\n', LineNumber++,ByteOffset); if(status == INPUT_ENDOFINPUT) break; if(status == 0) continue; if(status == INPUT_BUFOVERFLOW) { fprintf(stderr,_("ConstructSortOrder: out of memory\n")); return ERROR; } ByteOffset += status; ++CurrentRank; #ifdef USEUTF8PROC if( (UnicodeNormalization == UNORM_NFC) || (UnicodeNormalization == UNORM_NFD)) { if(UnicodeNormalization == UNORM_NFC) { status = utf8proc_map(InputLine,0, &tmputf8ptr, UTF8PROC_NULLTERM | UTF8PROC_COMPOSE); } else if(UnicodeNormalization == UNORM_NFD) { status = utf8proc_map(InputLine,0, &tmputf8ptr, UTF8PROC_NULLTERM | UTF8PROC_DECOMPOSE); } if(status > 0) { memcpy(InputLine,tmputf8ptr,status+1); free((void*)tmputf8ptr); } } if ((status = u82u32(InputLine,&str,&tmpwc)) != 0) { fprintf(stderr,_("Fatal error in ConstructSortOrder.\n")); exit(status); } #else if ((status = u82u32(InputLine,&str,&tmpwc)) != 0) { fprintf(stderr,_("Fatal error in ConstructSortOrder.\n")); exit(status); } if(UnicodeNormalization != UNORM_NONE) { tmpwcptr = (wchar_t *) NormalizeString((UTF32 *) str, &NormalizationResult, UnicodeNormalization); if(NormalizationResult <= 0) { fprintf(stderr, _("Unicode normalization failed on sort order file line %d.\n"),LineNumber); exit(OTHERERROR); } free((void *) str); str = tmpwcptr; } #endif for (Field = wcstok(str,ki->WhiteSpace,&wcstokStore); Field != NULL; Field = wcstok(NULL,ki->WhiteSpace,&wcstokStore)){ if(EvalEscapes(Field) == ERROR){ fprintf(stderr,_("EvalEscapes: out of memory.\n")); exit(OUTOFMEMORY); } if(wcslen(Field) > 1){ Index = AddStringToMapTable(Field,ki); ki->RankTable[Index] = CurrentRank; } else { Index = Field[0]; if(BMPOnlyP) { if(Index > MAXBMP) { fprintf(stderr,"Character in sort order at line %lu lies outside of BMP.\n",LineNumber); exit(LIMITEXCEEDED); } } ki->RankTable[Index] = CurrentRank; } } } free((void *)InputLine); free((void *)str); return(SUCCESS); } struct mapentry ** AllocateMapTable(long TotalCodes) { struct mapentry **new; int bytes; bytes = sizeof(struct mapentry *) * TotalCodes; new = malloc((size_t) bytes); if(new == NULL){ fprintf(stderr,"%s: out of memory - map table\n",progname); exit(OUTOFMEMORY); } return(new); } /* * Add a string to the mapping table and return the code allocated to it. */ wchar_t AddStringToMapTable(wchar_t *s, struct keyinfo *ki) { struct mapentry *new; if(ki->MapTable == NULL) ki->MapTable = AllocateMapTable(ki->TotalCodes); if(ki->NextCode == ki->MaxMGCode){ fprintf(stderr,"%s:Too many multigraphs defined.\n",progname); fprintf(stderr, "NextCode = %lX MaxMGCode == %lX\n", (unsigned long)(ki->NextCode), (unsigned long)(ki->MaxMGCode)); exit(LIMITEXCEEDED); } /* Allocate a new map table entry */ new = (struct mapentry *) malloc(sizeof(struct mapentry)); if(new == (struct mapentry *) 0){ fprintf(stderr,"%s: out of memory - map table entry\n",progname); exit(OUTOFMEMORY); } new->len = wcslen(s); new->str = (wchar_t *) malloc((new->len + 1) * sizeof(wchar_t)); if(new->str == NULL){ fprintf(stderr,"%s:out of memory - map table string\n",progname); exit(OUTOFMEMORY); } wcscpy(new->str,s); new->code = ki->NextCode; ki->MapTable[ki->MapTableEntries]=new; ki->MapTableEntries+=1; return((ki->NextCode)++); } /* Sort the map table so that sequence length is decreasing */ void SortMapTable(struct keyinfo *ki) { int gap; int i; int j; struct mapentry *temp; for(gap = ki->MapTableEntries/2; gap > 0; gap /= 2){ for(i = gap; i < ki->MapTableEntries; i++){ for(j = i-gap; j>= 0; j -= gap){ if(ki->MapTable[j]->len >= ki->MapTable[j+gap]->len) break; else{ temp = ki->MapTable[j]; ki->MapTable[j] = ki->MapTable[j+gap]; ki->MapTable[j+gap] = temp; } } } } } #define GEBUFSIZE 16 int GetExclusions(char *file,struct keyinfo *ki) { FILE *fp; wchar_t buf[GEBUFSIZE]; int i; unsigned char flag; int poslen; int ExCount; int LineNo; int cnt; wchar_t *Field1; wchar_t *Field2; wchar_t *wcstokStore; wchar_t *tmp; #ifndef USEUTF8PROC int32_t NormalizationResult; #endif extern FILE *OpenFile(char *, char *, char *); extern int ugetline(FILE *,wchar_t *, int); extern int EvalEscapes(wchar_t *); #ifndef USEUTF8PROC extern UTF32 * NormalizeString(UTF32 *, int32_t *, UNormalizationMode); #endif unsigned char *CreateExclusionTable(void); ExCount = 0; LineNo = 0; fp = OpenFile(file,"r",progname); ki->ExclusionTable = CreateExclusionTable(); while( (cnt = ugetline(fp,buf,GEBUFSIZE)) >= 0) { LineNo++; if(cnt == 0) continue; Field1 = wcstok(buf,L" \t",&wcstokStore); Field2 = wcstok(NULL,L" \t",&wcstokStore); if( (Field1 == NULL) || (Field2 == NULL)) { fprintf(stderr,"Format error in exclusion file %s at line %d.\n",file,LineNo); exit(OTHERERROR); } if(EvalEscapes(Field1) == ERROR){ fprintf(stderr,"EvalEscapes: out of memory.\n"); exit(OUTOFMEMORY); } #ifndef USEUTF8PROC if(UnicodeNormalization != UNORM_NONE) { tmp = (wchar_t *) NormalizeString((UTF32 *) Field1, &NormalizationResult, UnicodeNormalization); if(NormalizationResult <= 0) { fprintf(stderr, _("Unicode normalization failed on exclusion.\n")); exit(OTHERERROR); } Field1 = tmp; } #endif if(*Field1 > RankTableSize) { fprintf(stderr,"Character 0x%X out of range in exclusion file %s at line %d.\n", (unsigned)*Field1,file,LineNo); exit(LIMITEXCEEDED); } flag = 0; poslen = wcslen(Field2); for(i = 0; i < poslen; i++){ switch(Field2[i]){ case 'F': case 'f': flag |= EX_FINAL; break; case 'I': case 'i': flag |= EX_INITIAL; break; case 'M': case 'm': flag |= EX_MEDIAL; break; default: fprintf(stderr, "Invalid exclusion position specifier at line %d ofn file %s\n", LineNo,file); exit(OTHERERROR); } } ki->ExclusionTable[*Field1] = flag; ++ExCount; } fclose(fp); if(ExCount < 1){ free((void *) ki->ExclusionTable); ki->ExclusionTable = NULL; } ki->ExclusionEntries = ExCount; return(SUCCESS); } unsigned char * CreateExclusionTable(void) { unsigned char *new; long i; new = (unsigned char *) malloc(sizeof(wchar_t) * RankTableSize); if(new == NULL){ fprintf(stderr,"Out of memory.\n"); exit(OUTOFMEMORY); } for(i = 0L; i < RankTableSize; i++) new[i] = 0; return(new); } void GetExclusionsString(UTF8 *string,struct keyinfo *ki) { unsigned char *CreateExclusionTable(void); int len; int ExCount; wchar_t *exstr; int i; int status; wchar_t max; wchar_t c; #ifndef USEUTF8PROC int32_t NormalizationResult; #endif wchar_t *tmp; extern int u82u32(UTF8 *, wchar_t **,wchar_t *); extern int EvalEscapes(wchar_t *); #ifndef USEUTF8PROC extern UTF32 * NormalizeString(UTF32 *, int32_t *, UNormalizationMode); #endif ExCount = 0; ki->ExclusionTable = CreateExclusionTable(); if ((status = u82u32(string,&exstr,&max)) != 0) { fprintf(stderr,_("Fatal error in GetExclusionsString.\n")); exit(status); } if(EvalEscapes(exstr) == ERROR){ fprintf(stderr,"EvalEscapes: out of memory.\n"); exit(OUTOFMEMORY); } #ifndef USEUTF8PROC if(UnicodeNormalization != UNORM_NONE) { tmp = (wchar_t *) NormalizeString((UTF32 *) exstr, &NormalizationResult, UnicodeNormalization); if(NormalizationResult <= 0) { fprintf(stderr, _("Unicode normalization failed on exclusion.\n")); exit(OTHERERROR); } free((void *) exstr); exstr = tmp; } #endif len= wcslen(exstr); for(i=0;i RankTableSize) { fprintf(stderr,"Character 0x%X out of range in command-line exclusion.\n",(unsigned)c); exit(LIMITEXCEEDED); } ki->ExclusionTable[c] = (EX_FINAL | EX_INITIAL | EX_MEDIAL); ++ExCount; } free((void *) exstr); } /* * Map key string characters and sequences to internal sort codes. * This presupposes that the map table has been sorted by SortMapTable() * into decreasing order of length. * * Start at the beginning of the input string. * While there are still characters in the input string * Set the index into the MapTable to zero * Work through MapTable, looking for prefixes of the input string. * If we find a prefix * copy the corresponding code to the output * advance the input pointer by the length of the prefix * try again * If we don't find a prefix * copy the current character to the output * advance the input pointer one character * try again * Else we're done mapping this string */ int MapNonHybridLI(struct dstr *ds,struct mapentry **table,int entries) { int mte; int FoundP; wchar_t *ip; wchar_t *op; if(entries == 0) return(ds->l); ip = op = ds->s; FoundP = FALSE; while(*ip != L'\0'){ mte = 0; FoundP = FALSE; while(mte < entries){ if(wcsncmp(ip,table[mte]->str,table[mte]->len) == 0){ FoundP = TRUE; *op++ = table[mte]->code; ip+=table[mte]->len; break; } ++mte; } if(!FoundP) { *op++ = *ip++; } } *op = (wchar_t) L'\0'; return(ds->l = op-(ds->s)+1); } int AddSubEntry (struct keyinfo *ki,wchar_t *restr,wchar_t *se) { int tmpint1; struct subentry *new; extern wchar_t *WCopyString(wchar_t *); new = (struct subentry *) malloc(sizeof(struct subentry)); if (new == NULL) { fprintf(stderr,_("Out of memory.\n")); exit(OUTOFMEMORY); } tmpint1 =tre_regwcomp(&(new->cregexp),restr,REG_EXTENDED); if(tmpint1 != 0) return -1; if(se == NULL) { new->se = NULL; new->len = 0; } else { new->se = WCopyString(se); new->len = wcslen(se); } /* Prepend new entry to linked list */ new->next = ki->SubList; ki->SubList = new; (ki->SubListEntries)++; return 0; } #define GSBUFSIZE 128 int GetSubstitutions(char *file, struct keyinfo *ki) { FILE *fp; wchar_t buf[GSBUFSIZE]; int LineNo; int cnt; wchar_t CommentCharacter = L'#'; wchar_t *Field1; wchar_t *Field2; wchar_t *wcstokStore; wchar_t *tmpwcptr; #ifdef USEUTF8PROC UTF8 *utf8Field1; UTF8 *tmputf8ptr; wchar_t dummy; int tmpint1; #else int32_t NormalizationResult; #endif extern FILE *OpenFile(char *, char *, char *); extern int ugetline(FILE *,wchar_t *, int); extern int EvalEscapes(wchar_t *); #ifndef USEUTF8PROC extern UTF32 * NormalizeString(UTF32 *, int32_t *, UNormalizationMode); #else extern int u82u32(UTF8 *, wchar_t **,wchar_t *); extern UTF8 * ws2u8(wchar_t *); #endif LineNo = 0; fp = OpenFile(file,"r",progname); while ( (cnt = ugetline(fp,buf,GSBUFSIZE)) >= 0) { LineNo++; if(cnt == 0) continue; if(buf[0] == CommentCharacter) continue; Field1 = wcstok(buf,L" \t",&wcstokStore); Field2 = wcstok(NULL,L" \t",&wcstokStore); if(Field1 == NULL) { fprintf(stderr,_("Format error in substitution file %s at line %d.\n"),file,LineNo); exit(OTHERERROR); } if((EvalEscapes(Field1) == ERROR) || (EvalEscapes(Field2) == ERROR)){ fprintf(stderr,_("EvalEscapes: out of memory.\n")); exit(OUTOFMEMORY); } #ifdef USEUTF8PROC if( (UnicodeNormalization == UNORM_NFC) || (UnicodeNormalization == UNORM_NFD)) { /* convert to utf8 */ utf8Field1 = (UTF8 *) ws2u8(Field1); if(UnicodeNormalization == UNORM_NFC) { tmpint1 = utf8proc_map(utf8Field1,0, &tmputf8ptr, UTF8PROC_NULLTERM | UTF8PROC_COMPOSE); } if(UnicodeNormalization == UNORM_NFD) { tmpint1 = utf8proc_map(utf8Field1,0, &tmputf8ptr, UTF8PROC_NULLTERM | UTF8PROC_DECOMPOSE); } if(tmpint1 > 0) free(utf8Field1); /* convert back to utf32 */ if ((tmpint1 = u82u32(tmputf8ptr,&Field1,&dummy)) != 0) { fprintf(stderr,_("Fatal error while processing substitution file.\n")); exit(tmpint1); } free(tmputf8ptr); } #else if(UnicodeNormalization != UNORM_NONE) { tmpwcptr = (wchar_t *) NormalizeString((UTF32 *) Field1, &NormalizationResult, UnicodeNormalization); if(NormalizationResult <= 0) { fprintf(stderr, _("Unicode normalization failed in substitution file %s at line %d.\n"), file,LineNo); exit(OTHERERROR); } free((void *) Field1); Field1 = tmpwcptr; } #endif if(AddSubEntry(ki,Field1,Field2) < 0) { fprintf(stderr, _( "Failed to compile regular expression in substitution file %s at line %d.\n"), file,LineNo); exit(OTHERERROR); } } fclose(fp); return(SUCCESS); } /* * Substitute se for each match to re in str. * Return the result in newly allocated memory. * Record the number of substitutions in matches. */ wchar_t * regwsub(regex_t *cre,wchar_t *se,wchar_t *str,int *matches) { regmatch_t pm[2]; wchar_t *s; /* Subject portion of string */ wchar_t *new; int Substitutions = 0; int TotalChars = 0; int NewCharsAvailable; int CharsAvailable; extern wchar_t *wcCatRange(wchar_t *,wchar_t *, long, long); CharsAvailable = 3+wcslen(str); new = (wchar_t *) malloc (sizeof(wchar_t) * CharsAvailable); if(new == NULL) { fprintf(stderr,_("Out of memory.\n")); exit(OUTOFMEMORY); } new[0] = L'\0'; s = str; while (*s != L'\0') { if(tre_regwexec(cre,s,2,pm,0) != 0) { TotalChars += wcslen(s); wcscat(new,s); break; } TotalChars += pm[0].rm_so; (void)wcCatRange(new,s,0,pm[0].rm_so-1); /* Append the region preceding the match */ TotalChars += (pm[0].rm_eo - pm[0].rm_so); if (se != NULL) { TotalChars += wcslen(se); } if (TotalChars >= CharsAvailable) { NewCharsAvailable = TotalChars+3; new = (wchar_t *) realloc(new,sizeof(wchar_t) * NewCharsAvailable); if (new == NULL) { fprintf(stderr,_("Out of memory.\n")); exit(OUTOFMEMORY); } else CharsAvailable = NewCharsAvailable; } if (se != NULL) { (void)wcscat(new,se); /* Append the substitution for the match */ } Substitutions++; s = s + pm[0].rm_eo; } *matches = Substitutions; return new; } int SubKey(struct dstr *in, struct keyinfo *ki) { int len; struct subentry *sp; wchar_t *substr; int matches; sp = ki->SubList; substr = in->s; while (sp != NULL) { substr = regwsub(&(sp->cregexp), sp->se, substr, &matches); sp = sp->next; } free ( (void *) in->s); in->s = substr; /* This assumes that regwsub allocates just enough storage, which is a conservative assumption. */ in->l = in->c = len = wcslen(substr); return len; } void ProvideDefaultRanks(void) { int i; for(i = 0; i < KeyCount;i++){ if((!(KeyInfo[i]->CompType & CNUMERIC)) && (KeyInfo[i]->RankTable == NULL)){ CreateRankTable(KeyInfo[i]); } } } #define LBUFSIZE 64 #define WSBUFSIZE 128 int GetWhiteSpaceDefinition(char *fname, struct keyinfo *ki) { FILE *fp; int cnt; wchar_t lbuf[LBUFSIZE]; wchar_t buf[WSBUFSIZE]; extern FILE *OpenFile(char *, char *, char *); extern int ugetline(FILE *,wchar_t *, int); extern wchar_t *WCopyString(wchar_t *); extern int EvalEscapes(wchar_t *); fp = OpenFile(fname,"r",progname); while ( (cnt = ugetline(fp,lbuf,LBUFSIZE)) != INPUT_ENDOFINPUT) { if(cnt == 0) continue; if(EvalEscapes(lbuf) == ERROR){ fprintf(stderr,"EvalEscapes: out of memory.\n"); exit(OUTOFMEMORY); } wcsncat(buf,lbuf,WSBUFSIZE-1); } ki->WhiteSpace = WCopyString(buf); return(1); } msort-8.53/sorts.c0000644000175100017510000002332211236173741011065 00000000000000/* * Copyright (C) 1993-2007 William J. Poser. * This program is free software; you can redistribute it and/or modify * it under the terms of version 3 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * or go to the web page: http://www.gnu.org/licenses/gpl.txt. */ #include "config.h" #include "compdefs.h" #include #ifdef HAVE_STDINT_H #include #endif #include #include #include #include #include #ifdef HAVE_UNINUM_UNICODE_H #include #else #include "unicode.h" #endif #include "comparisons.h" #include "key.h" #include "record.h" #ifdef HAVE_LONG_LONG typedef long long LongLong; #else typedef long LongLong; #endif #ifdef HAVE_LONGDOUBLE #define DOUBLE (long double) #else #define DOUBLE double #endif #define INSERTIONSORTTHRESHOLD 7L #define TRUE 1 #define FALSE 0 /* * This is the recursive routine in K&R with swap in-lined as a macro * and use of a straight insertion sort for small sub-partitions. */ #define SWAP(a,b,c) temp = a[b];a[b] = a[c];a[c] = temp; void QuickSort(struct record **rlist, long left, long right) { long i; long last; long j; long elts; struct record *temp; int Compare(struct record *,struct record *); elts = right - left + 1L; if(elts < 2L) return; if(elts < INSERTIONSORTTHRESHOLD){ /* Do a straight insertion sort */ for(j=1L;j < elts;j++){ temp = rlist[j+left]; i = j -1L; while( (i >= 0) && (Compare(rlist[i+left],temp) > 0)){ rlist[i+1L+left] = rlist[i+left]; --i; } rlist[i+1L+left] = temp; } return; } /* If we get here it is worth continuing with quicksort. */ j = (left + right)/2L; SWAP(rlist,left,j) last = left; for(i = left+1; i <= right; i++){ if(Compare(rlist[i],rlist[left]) < 0){ ++last; SWAP(rlist,last,i); } } SWAP(rlist,left,last); QuickSort(rlist,left,last-1L); QuickSort(rlist,last+1L,right); } void ShellSort(struct record **rlist,long cnt) { long gap; long i; long j; struct record *temp; int Compare(struct record *,struct record *); for(gap = cnt/2; gap > 0; gap /= 2){ for(i = gap; i < cnt; i++){ for(j = i-gap; j>= 0; j -= gap){ if(Compare(rlist[j],rlist[j+gap]) <= 0) break; else{ temp = rlist[j]; rlist[j] = rlist[j+gap]; rlist[j+gap] = temp; } } } } return; } void Merge(struct record **rlist, long start, long mid, long end) { long i; long j; long k; struct record **tmp; int Compare(struct record *,struct record *); #ifdef ALLOCAOK tmp = (struct record **) alloca(sizeof(struct record *) * (end - start)); #else tmp = (struct record **) malloc(sizeof(struct record *) * (end - start)); #endif i = start; j = mid; k = 0; while ((i < mid) && (j < end)) { if (Compare(rlist[i],rlist[j]) <= 0) tmp[k++] = rlist[i++]; else tmp[k++] = rlist[j++]; } while (i < mid) { tmp[k++] = rlist[i++]; } while (j < end) { tmp[k++] = rlist[j++]; } for (i = 0L; i < (end-start); i++) { rlist[start+i] = tmp[i]; } #ifndef ALLOCAOK free((void *) tmp); #endif } void MergeSort(struct record **rlist, long begin, long end) { long mid; if (end - begin <= 1L) return; mid = (begin + end) / 2L; MergeSort(rlist, begin, mid); MergeSort(rlist, mid, end); Merge(rlist, begin, mid, end); } void InsertionSort(struct record **rlist, long items) { long i; long j; struct record *value; int Compare(struct record *,struct record *); for(i = 1L; i < items; i++) { value = rlist[i]; for (j = i - 1L; (j >= 0L) && (Compare(rlist[j],value) > 0);j--) { rlist[j + 1] = rlist[j]; } rlist[j + 1] = value; } } inline int sign(DOUBLE x) { if(x > 0.0) return (1); else if (x < 0.0) return (-1); else return (0); } inline int isign(long x) { if(x > 0L) return (1); else if (x < 0L) return (-1); else return (0); } /* Compare two wide strings using a rank table, without reference to the locale. */ int wcscmpli (const wchar_t *rt, const wchar_t *a, const wchar_t *b) { while (rt[*a] == rt[*b++]) { if (*a++ =='\0') return(0); } return(rt[*a] - rt[*--b]); } /* * This is the subroutine that does the actual comparison of two records. * * It returns: * 0 if a = b * -1 if a < b * 1 if b > a * * It iterates over the keys, returning as soon as it finds a key on * which the two records compare differently. For each key it first * tests to see if the records have values for that key. If they do, * it does the actual comparison, the details depending on whether the * comparison is numeric (including dates, times, and sizes), or lexicographic. * If both records lack the key, it returns 0. If one record lacks the * key and the other does not, it returns a value depending on how * MissingKeyComparison is set for this key. * * Whether a key exists for a particular record is determined by * testing whether the pointer is null. It is therefore important * that key pointers be set to null during key extraction if a key is missing. */ #define LOWBITONLYMASK 0x01 #define HIGHBITOFFMASK 0x7F #define HIGHBITSHIFT 7 #define MIN(a,b) (a>b?b:a) int Compare(struct record *a,struct record *b) { int i, j, k, r; int rval; wchar_t *ap; wchar_t *bp; wchar_t *rt; unsigned short APresent; unsigned short BPresent; wchar_t **ATxt; wchar_t **BTxt; long *ANum; long *BNum; short ANumericFirstP; short BNumericFirstP; int AParts; int BParts; int lim; #ifndef NOCOMPARISONCNT extern LongLong ComparisonCnt; #endif extern int KeyCount; extern struct keyinfo **KeyInfo; rval = 0; #ifndef NOCOMPARISONCNT ComparisonCnt++; #endif for(i = 0; i < KeyCount; i++){ if(KeyInfo[i]->CompType & CRANDOM) { return((random()%3)-1); } /* Set flags for presence of key in each record */ APresent = BPresent = FALSE; if(KeyInfo[i]->CompType & CNUMERIC){ if(a->klistptr[i].n != NULL) APresent=TRUE; if(b->klistptr[i].n != NULL) BPresent=TRUE; } else{ ap = a->klistptr[i].t; if(ap != NULL) APresent=TRUE; bp = b->klistptr[i].t; if(bp != NULL) BPresent=TRUE; } if(APresent && BPresent){ /* Straight numeric */ if(KeyInfo[i]->CompType & CNUMERIC){ if(KeyInfo[i]->CompType & CINVERSE){ rval = sign(*(b->klistptr[i].n) - *(a->klistptr[i].n)); } else rval = sign(*(a->klistptr[i].n) - *(b->klistptr[i].n)); } /* Numeric string */ else if(KeyInfo[i]->CompType & CNUMSTR){ if(a->klistptr[i].N.sign < b->klistptr[i].N.sign) rval = -1; else if(a->klistptr[i].N.sign > b->klistptr[i].N.sign) rval = 1; /* Signs are same */ else if(a->klistptr[i].N.cnt < b->klistptr[i].N.cnt) rval = -1 * a->klistptr[i].N.sign; else if(b->klistptr[i].N.cnt < a->klistptr[i].N.cnt) rval = a->klistptr[i].N.sign; else rval = a->klistptr[i].N.sign * strcmp(a->klistptr[i].N.txt,b->klistptr[i].N.txt); } /* Non-numeric */ else { rt = KeyInfo[i]->RankTable; rval = 1; /* Use as flag to see if we reached end of string */ if(KeyInfo[i]->CompType & CHYBRID) { ANumericFirstP = (a->klistptr[i].H->cnt >> HIGHBITSHIFT) & LOWBITONLYMASK; BNumericFirstP = (b->klistptr[i].H->cnt >> HIGHBITSHIFT) & LOWBITONLYMASK; AParts = a->klistptr[i].H->cnt & HIGHBITOFFMASK; BParts = b->klistptr[i].H->cnt & HIGHBITOFFMASK; ATxt = a->klistptr[i].H->tlist;BTxt = b->klistptr[i].H->tlist; ANum = a->klistptr[i].H->ilist;BNum = b->klistptr[i].H->ilist; if(ANumericFirstP && !BNumericFirstP) return -1; else if(BNumericFirstP && !ANumericFirstP) return 1; else { lim = MIN(AParts,BParts); for(j=0; j < lim; j++) { k = j/2; r= j%2; if(r == ANumericFirstP) { #ifdef LOCALE_SORT_ORDER if(KeyInfo[i]->LocaleP) rval = wcscmp(ATxt[k],BTxt[k]); else rval = wcscmpli(rt,ATxt[k],BTxt[k]); #else rval = wcscmpli(rt,ATxt[k],BTxt[k]); #endif } else rval = isign(ANum[k]-BNum[k]); if(rval != 0) return rval; } if(BParts > AParts) rval = -1; else if(AParts > BParts) rval = 1; if(rval != 0) return(rval); else continue; } } /* End of hybrid section */ else { /* Non-hybrid lexicographic comparison */ #ifdef LOCALE_SORT_ORDER /* Locale-based */ if(KeyInfo[i]->LocaleP) { rval = wcscmp(ap,bp); if(rval!=0) return(rval); else continue; } /* Locale-independent */ else { #endif for( ; rt[*ap] == rt[*bp]; ap++, bp++){ if(*ap == (wchar_t) '\0'){rval=0;break;} } if(rval != 0){ if(KeyInfo[i]->CompType & CINVERSE) rval = rt[*bp] - rt[*ap]; else rval = rt[*ap] - rt[*bp]; } #ifdef LOCALE_SORT_ORDER } #endif } /* End of non-hybrid lexicographic comparison */ } /* End of lexicographic comparison */ } /* End of case where both keys are present */ /* If we get here at least one record lacks this key */ else{ if (APresent && !BPresent) rval = 1 - KeyInfo[i]->MissingKeyComparison; else{ if (!APresent && BPresent) rval = KeyInfo[i]->MissingKeyComparison - 1; else{ if (!APresent && !BPresent)rval = 0; } } } if(rval != 0) return(rval); /* If records are same on this key, go on to next key */ } /* End of loop over keys */ return(0); /* If we get here, records tie on all keys */ } msort-8.53/strs.c0000644000175100017510000002476411236173741010721 00000000000000/* * Copyright (C) 1993-2007 William J. Poser. * This program is free software; you can redistribute it and/or modify * it under the terms of version 3 of the GNU General Public License * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * or go to the web page: http://www.gnu.org/licenses/gpl.txt. */ #include "config.h" #include "compdefs.h" #include #ifdef HAVE_STDINT_H #include #endif #include #include #include #include #ifdef HAVE_UNINUM_UNICODE_H #include #else #include "unicode.h" #endif #include "utf8error.h" #include "exitcode.h" #define TRUE 1 #define FALSE 0 /* * Copy a string and return a pointer to the new storage allocated * to contain it. This function differs from strcpy(3) in that it * allocates the necessary storage instead of just copying into * storage provided by the caller. */ char * copy_string(char *string) { char *new; if((new = (char *) malloc( (size_t) (strlen(string) + 1) ) ) != NULL){ strcpy(new,string); } else { fprintf(stderr,"copy_string: out of memory\n"); exit(OUTOFMEMORY); } return(new); } /* * Allocate storage for a string of the required length and * return a pointer to it. The string is initialized to null * by placing a null character in its first byte. */ wchar_t * wCreateString(int length) { wchar_t *nptr; nptr = (wchar_t *) malloc(sizeof(wchar_t) * (size_t) (length + 1)); if(nptr != NULL) nptr[0] = L'\0'; return(nptr); } /* * Copy a wide string and return a pointer to the new storage allocated * to contain it. Equivalent to GNU wcsdup. */ wchar_t *WCopyString(wchar_t *string) { wchar_t *new; if((new = (wchar_t *) malloc( (size_t) ((wcslen(string) + 1) * sizeof(wchar_t)) ) ) != NULL){ wcscpy(new,string); } return(new); } /* * Copy a range from a wide string and return a pointer to the new storage allocated * to contain it. Assume that the string is known to be long enough. */ wchar_t *wcCopyRange(wchar_t *string,long first,long last) { wchar_t *new; long len; long i; len = last - first +1; if((new = (wchar_t *) malloc( (size_t) ((len + 1) * sizeof(wchar_t)) ) ) != NULL){ for (i = 0; i < len; i++) { new[i] = string[i+first]; } new[i] = L'\0'; } return(new); } /* Return the number of characters in a null-terminated UTF-8 string */ static unsigned int utf8len (UTF8 *s) { int cnt = 0; while (*s != '\0') { if ((*s++ & 0xC0) != 0x80) cnt++; } return cnt; } static unsigned int utf16len(const UTF16 *s) { UTF16 c; int cnt = 0; while ((c = *s++) != 0) cnt++; return cnt; } static unsigned int utf32len(const UTF32 *s) { UTF32 c; int cnt = 0; while ((c = *s++) != 0) cnt++; return cnt; } /* * Magic values subtracted from a buffer value during UTF8 conversion. * This table contains as many values as there might be trailing bytes * in a UTF-8 sequence. */ static const UTF32 OffsetsFromUTF8[6] = { 0x00000000UL, 0x00003080UL, 0x000E2080UL, 0x03C82080UL, 0xFA082080UL, 0x82082080UL }; /* * Index into the table below with the first byte of a UTF-8 sequence to * get the number of bytes that should follow. */ static const char TrailingBytesForUTF8[256] = { 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,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,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,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,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, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 3,3,3,3,3,3,3,3,4,4,4,4,5,5,5,5 }; /* * Utility routine to tell whether a sequence of bytes is legal UTF-8. * This must be called with the length pre-determined by the first byte. * If not calling this from ConvertUTF8to*, then the length can be set by: * length = TrailingBytesForUTF8[*source]+1; */ static Boolean isLegalUTF8P(const UTF8 *source, int length) { UTF8 a; const UTF8 *srcptr = source+length; switch (length) { default: return FALSE; /* Everything else falls through when "TRUE"... */ case 4: if ((a = (*--srcptr)) < 0x80 || a > 0xBF) return FALSE; case 3: if ((a = (*--srcptr)) < 0x80 || a > 0xBF) return FALSE; case 2: if ((a = (*--srcptr)) > 0xBF) return FALSE; switch (*source) { /* no fall-through in this inner switch */ case 0xE0: if (a < 0xA0) return FALSE; break; case 0xF0: if (a < 0x90) return FALSE; break; case 0xF4: if (a > 0x8F) return FALSE; break; default: if (a < 0x80) return FALSE; } case 1: if (*source >= 0x80 && *source < 0xC2) return FALSE; if (*source > 0xF4) return FALSE; } return TRUE; } /* * Return a UTF32 translation of a UTF8 string in newly allocated memory. * The translation is pointed to by the variable t. * The return value is a status code. * * We keep track of the maximum code since this allows * certain optimizations, e.g., if no characters outside * the ASCII range are encountered, we can use ASCII * case-folding, which is considerably faster than * Unicode case-folding. */ int u82u32 (UTF8 *s, wchar_t **t,wchar_t *maxptr) { wchar_t *new; wchar_t *n; wchar_t ch; wchar_t max; UTF8 *s0; UTF8 *cptr; int BytesNeeded; size_t StorageNeeded; max = *maxptr; StorageNeeded = (size_t) ((utf8len(s) + 1) * sizeof(UTF32)); if((new = (wchar_t *) malloc(StorageNeeded)) == NULL) { fprintf(stderr,"u82u32: malloc failure.\n"); return(-1); } n = new; s0 = s; max = 0; while (*s != '\0') { cptr = s; BytesNeeded = (int) TrailingBytesForUTF8[*s]; if(!isLegalUTF8P(cptr,BytesNeeded+1)){ fprintf(stderr,"u82u32: invalid UTF-8 input at byte %d.\n",(cptr-s0)+1); return(UTF8_BADINCODE); } ch = 0; switch (BytesNeeded) { case 5: ch += *cptr++; ch <<= 6; case 4: ch += *cptr++; ch <<= 6; case 3: ch += *cptr++; ch <<= 6; case 2: ch += *cptr++; ch <<= 6; case 1: ch += *cptr++; ch <<= 6; case 0: ch += *cptr++; } ch -= OffsetsFromUTF8[BytesNeeded]; *n++ = ch; if(ch > max) max = ch; s+= (BytesNeeded +1); } *n = L'\0'; *t = new; *maxptr = max; return 0; } UTF8 * strcpyu8(UTF8 *t, UTF8 *s) { while(*s != '\0') { *t++ = *s++; } return (t); } /* * Convert a UTF32 character to UTF8, placing the result in the * supplied buffer, which must be large enough to accomodate it. * Return the number of bytes in the UTF8 sequence. */ int wc2utf8(UTF8 *t, wchar_t c){ UTF8 *to; to = t; if (c < 0x80) { /* ASCII */ *t++ = c; } else if (c < 0x800) { *t++ = (0xC0 | c>>6); *t++ = (0x80 | (c & 0x3F)); } else if (c < 0x10000) { *t++ = (0xE0 | c>>12); *t++ = (0x80 | (c>>6 & 0x3F)); *t++ = (0x80 | (c & 0x3F)); } else if (c < 0x200000) { /* 2^21 */ *t++ = (0xF0 | c>>18); *t++ = (0x80 | (c>>12 & 0x3F)); *t++ = (0x80 | (c>>6 & 0x3F)); *t++ = (0x80 | (c & 0x3F)); } *t = 0x00; return (t-to); } /* * Convert a UTF-32 string to UTF-8 in newly allocated storage. */ UTF8 * ws2u8(wchar_t *s) { wchar_t c; UTF8 *t; UTF8 *to; int cnt; t = (UTF8 *) malloc((wcslen(s)+1) * sizeof(UTF32)); if(t == NULL) exit(OUTOFMEMORY); to = t; cnt = 0; while ( (c = *s++) != L'\0') { if (c < 0x80) { /* ASCII */ *t++ = c; cnt++; } else if (c < 0x800) { *t++ = (0xC0 | c>>6);cnt++; *t++ = (0x80 | (c & 0x3F));cnt++; } else if (c < 0x10000) { *t++ = (0xE0 | c>>12);cnt++; *t++ = (0x80 | (c>>6 & 0x3F));cnt++; *t++ = (0x80 | (c & 0x3F));cnt++; } else if (c < 0x200000) { /* 2^21 */ *t++ = (0xF0 | c>>18);cnt++; *t++ = (0x80 | (c>>12 & 0x3F));cnt++; *t++ = (0x80 | (c>>6 & 0x3F));cnt++; *t++ = (0x80 | (c & 0x3F));cnt++; } } *t = '\0';cnt++; to = (UTF8 *)realloc((void *)to,cnt); if(to == NULL) exit(OUTOFMEMORY); return (to); } /* * Append a range from a wide string to another wide string. * Assume that there is enough space. */ wchar_t * wcCatRange(wchar_t *dest, wchar_t *src,long first,long last) { long len; long i; while(*dest != L'\0') dest++; /* Find end of dest */ len = last - first +1; for (i = 0; i < len; i++) dest[i] = src[i+first]; dest[i] = L'\0'; return(dest); } static const int halfShift = 10; /* used for shifting by 10 bits */ static const UTF32 halfBase = 0x0010000UL; static const UTF32 halfMask = 0x3FFUL; #define ERROR_OUTOFMEMORY (-2) #define SURROGATE_ERROR (-3) #define EXCEEDS_UTF16_ERROR (-4) UTF16 *ConvertUTF32toUTF16 (const UTF32* s, int *chcnt) { UTF32 c; UTF16 *t; UTF16 *n; n = malloc(sizeof(UTF16) * ((2 * utf32len(s)) + 1)); if(!n) { *chcnt = ERROR_OUTOFMEMORY; return NULL; } t = n; while ((c = *s++) != 0) { if (c <= UNI_MAX_BMP) { if ((c >= UNI_SUR_HIGH_START) && (c <= UNI_SUR_LOW_END)) { *chcnt = SURROGATE_ERROR; return NULL; } else *t++ = c; } else { if (c > UNI_MAX_UTF16) { *chcnt = EXCEEDS_UTF16_ERROR; return NULL; } else { c -= halfBase; *t++ = (c >> halfShift) + UNI_SUR_HIGH_START; *t++ = (c & halfMask) + UNI_SUR_LOW_START; } } } *t = 0; *chcnt = t - n; return n; } UTF32 *ConvertUTF16toUTF32 (const UTF16* s, int *chcnt) { UTF16 c; UTF32 c2; UTF32 *t; UTF32 *n; n = malloc(sizeof(UTF32) * ((2 * utf16len(s)) + 1)); if(!n) { *chcnt = ERROR_OUTOFMEMORY; return NULL; } t = n; while ((c = *s++) != 0) { if (c >= UNI_SUR_HIGH_START && c <= UNI_SUR_HIGH_END && (*s != 0)) { c2 = *s; if (c2 >= UNI_SUR_LOW_START && c2 <= UNI_SUR_LOW_END) { c = ((c - UNI_SUR_HIGH_START) << halfShift) + (c2 - UNI_SUR_LOW_START) + halfBase; ++s; } else { /* Unpaired high surrogate */ *chcnt = SURROGATE_ERROR; return NULL; } } else if ((c >= UNI_SUR_LOW_START && c <= UNI_SUR_LOW_END)) { /* an unpaired low surrogate */ *chcnt = SURROGATE_ERROR; return NULL; } *t++ = c; } *t = 0; *chcnt = t - n; return n; } msort-8.53/uniio.c0000644000175100017510000001372011236173741011037 00000000000000/* * Copyright (C) 2003-2007 William J. Poser. * This program is free software; you can redistribute it and/or modify * it under the terms of version 3 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * or go to the web page: http://www.gnu.org/licenses/gpl.txt. */ #include "config.h" #include #include #include #ifdef HAVE_STDINT_H #include #endif #include #include #ifdef HAVE_UNINUM_UNICODE_H #include #else #include "unicode.h" #endif #include "utf8error.h" #define FALSE 0 #define TRUE 1 /* * Takes a UTF-32 code as input and outputs UTF-8. * Based on Roman Czyborra: http://czyborra.com/utf/ */ void fputu8(wchar_t c,FILE *fp) { if (c < 0x80) { /* ASCII */ putc (c,fp); } else if (c < 0x800) { putc (0xC0 | c>>6,fp); putc (0x80 | (c & 0x3F),fp); } else if (c < 0x10000) { putc (0xE0 | c>>12,fp); putc (0x80 | (c>>6 & 0x3F),fp); putc (0x80 | (c & 0x3F),fp); } else if (c < 0x200000) { /* 2^21 */ putc (0xF0 | c>>18,fp); putc (0x80 | (c>>12 & 0x3F),fp); putc (0x80 | (c>>6 & 0x3F),fp); putc (0x80 | (c & 0x3F),fp); } } /* * Convert a null terminated UTF-32 string to UTF-8 and write it out. */ void putu8s(wchar_t *str,FILE *fp) { wchar_t *ptr; wchar_t c; ptr = str; while( (c = *ptr++) != L'\0'){ fputu8(c,fp); } } /* * This function reads from a file descriptor presumed to contain text encoded * in UTF-8 and returns the next UTF-32 character. It performs the same * conversion from UTF-8 to UTF-32 as the model function provided by the * Unicode consortium but is intended for reading from streams. For some * applications it may be more efficient to read large blocks of input * and then use the buffer conversion function, but this is not compatible * with reading from pipes. * * This version "returns" via pointers passed as arguments the number of bytes read * and a pointer to the raw byte string. * * Author: Bill Poser (billposer@alum.mit.edu) * Patch by Dylan Thurston to resume read interrupted in mid-sequence. * */ /* * The following are based on the Unicode consortium code. */ /* * Index into the table below with the first byte of a UTF-8 sequence to * get the number of bytes that should follow. */ static const char TrailingBytesForUTF8[256] = { 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,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,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,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,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, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 3,3,3,3,3,3,3,3,4,4,4,4,5,5,5,5 }; /* * Magic values subtracted from a buffer value during UTF8 conversion. * This table contains as many values as there might be trailing bytes * in a UTF-8 sequence. */ static const UTF32 OffsetsFromUTF8[6] = { 0x00000000UL, 0x00003080UL, 0x000E2080UL, 0x03C82080UL, 0xFA082080UL, 0x82082080UL }; /* * Utility routine to tell whether a sequence of bytes is legal UTF-8. * This must be called with the length pre-determined by the first byte. * If not calling this from ConvertUTF8to*, then the length can be set by: * length = TrailingBytesForUTF8[*source]+1; */ static Boolean LegalUTF8P(const UTF8 *source, int length) { UTF8 a; const UTF8 *srcptr = source+length; switch (length) { default: return FALSE; /* Everything else falls through when "TRUE"... */ case 4: if ((a = (*--srcptr)) < 0x80 || a > 0xBF) return FALSE; case 3: if ((a = (*--srcptr)) < 0x80 || a > 0xBF) return FALSE; case 2: if ((a = (*--srcptr)) > 0xBF) return FALSE; switch (*source) { /* no fall-through in this inner switch */ case 0xE0: if (a < 0xA0) return FALSE; break; case 0xF0: if (a < 0x90) return FALSE; break; case 0xF4: if (a > 0x8F) return FALSE; break; default: if (a < 0x80) return FALSE; } case 1: if (*source >= 0x80 && *source < 0xC2) return FALSE; if (*source > 0xF4) return FALSE; } return TRUE; } /* End of Unicode Consortium code */ UTF32 UTF8in (int fd, int *bytes, unsigned char **bstr) { int BytesSoFar; int BytesRead; int BytesNeeded; /* Additional bytes after initial byte */ static unsigned char c[6]; UTF32 ch; /* Result character */ unsigned char *cptr; cptr = &(c[0]); /* Get the first byte */ BytesRead = read(fd,(void *) c,1); if (BytesRead == 0) return (UTF8_ENDOFFILE); if (BytesRead < 0) return (UTF8_IOERROR); /* Now get the remaining bytes */ BytesNeeded = (int) TrailingBytesForUTF8[c[0]]; BytesSoFar = 0; do { BytesRead = read(fd,(void *) &c[BytesSoFar+1],(size_t) (BytesNeeded-BytesSoFar)); BytesSoFar += BytesRead; } while (BytesRead > 0 || BytesSoFar < BytesNeeded); if(BytesSoFar != BytesNeeded) return(UTF8_NOTENOUGHBYTES); *bytes = BytesNeeded+1; *bstr = &c[0]; /* Check validity of source */ if(! LegalUTF8P((void *) c,BytesNeeded+1)) return(UTF8_BADINCODE); ch = 0; switch (BytesNeeded) { case 5: ch += *cptr++; ch <<= 6; case 4: ch += *cptr++; ch <<= 6; case 3: ch += *cptr++; ch <<= 6; case 2: ch += *cptr++; ch <<= 6; case 1: ch += *cptr++; ch <<= 6; case 0: ch += *cptr++; } ch -= OffsetsFromUTF8[BytesNeeded]; if(ch <= UNI_MAX_UTF32) return(ch); else return(UNI_REPLACEMENT_CHAR); } msort-8.53/ExplicateBadUTF8.c0000644000175100017510000000620511236173741012710 00000000000000/* Time-stamp: <2008-03-14 18:12:11 poser> /* * Copyright (C) 2004 William J. Poser. * This program is free software; you can redistribute it and/or modify * it under the terms of version 3 of the GNU General Public License * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software Foundation, * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * or go to the web page: http://www.gnu.org/licenses/gpl.txt. * * Given a bad UTF-8 sequence, explain why it is bad. * * Author: Bill Poser (http://billposer.org, alum.mit.edu) * */ #include "config.h" #include #include #ifdef HAVE_STDINT_H #include #endif #include #include #include #include #ifdef HAVE_UNINUM_UNICODE_H #include #else #include "unicode.h" #endif #define FALSE 0 #define TRUE 1 /* * Index into the table below with the first byte of a UTF-8 sequence to * get the number of bytes that should follow. */ static const char TrailingBytesForUTF8[256] = { 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,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,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,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,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, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 3,3,3,3,3,3,3,3,4,4,4,4,5,5,5,5 }; /* * Magic values subtracted from a buffer value during UTF8 conversion. * This table contains as many values as there might be trailing bytes * in a UTF-8 sequence. */ static const UTF32 OffsetsFromUTF8[6] = { 0x00000000UL, 0x00003080UL, 0x000E2080UL, 0x03C82080UL, 0xFA082080UL, 0x82082080UL }; void ExplicateBadUTF8(FILE *fp, unsigned char *c){ int BytesNeeded; int i; unsigned char *cptr; extern char * binfmtc(unsigned char); cptr = c; if( (c[0] & 0xC0) == 0x80){ fprintf(fp,"The first byte, value 0x%02X, with bit pattern %s,\nis not a valid first byte of a UTF-8 sequence because its high bits are 10.\nA valid first byte must be of the form 0nnnnnnn or 11nnnnnn.\n",c[0],binfmtc(c[0])); return; } BytesNeeded = (int) TrailingBytesForUTF8[c[0]]; for (i = 1; i <= BytesNeeded; i++){ if (( c[i] & 0xC0) != 0x80){ fprintf(fp,"The sequence is not a valid UTF-8 character because\nthe first byte, value 0x%02X, bit pattern %s,\nrequires %d continuation bytes, but of the immediately\nfollowing bytes, byte %d, value 0x%02X, bit pattern\n%s is not a valid continuation byte, since\nits high bits are not 10.\n",c[0],binfmtc(c[0]),BytesNeeded,i,c[i],binfmtc(c[i])); return; } } } msort-8.53/binfmt.c0000644000175100017510000000525011315316622011165 00000000000000/* Time-stamp: <2009-12-25 21:20:47 poser> */ /* * Copyright (C) 2003, 2009 William J. Poser (billposer@alum.mit.edu) * * This program is free software; you can redistribute it and/or modify * it under the terms of version 3 of the GNU Lesser General Public License * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * or go to the web page: http://www.gnu.org/copyleft/lesser.html */ /* * These functions format unsigned integers into base-2 text. * They return a pointer to static storage containing the resulting * null terminated string. There are five otherwise identical functions * for char,short,int, long, and long long operands. They are * written in such a way as to adapt at compile time to the * operand sizes used on a particular machine. * * They assume that a byte consists of eight bits. In the unlikely * event that this is not true of your system, define CHAR_BITS to the * appropriate value. */ #ifndef CHAR_BITS #define CHAR_BITS 8 #endif #define CBITS (sizeof(unsigned char) * CHAR_BITS) #define SBITS (sizeof(unsigned short) * CHAR_BITS) #define IBITS (sizeof(unsigned int) * CHAR_BITS) #define LBITS (sizeof(unsigned long) * CHAR_BITS) #define QBITS (sizeof(unsigned long long) * CHAR_BITS) #define MASK 0x01 char * binfmtc(unsigned char n) { int i; static char str [CBITS+1]; for (i = CBITS-1; i >= 0;i--){ str[i] = (n & MASK ? '1' : '0'); n >>= 1; } str[CBITS] = '\0'; return(str); } char * binfmts(unsigned short n) { int i; static char str [SBITS+1]; for (i = SBITS-1; i >= 0;i--){ str[i] = (n & MASK ? '1' : '0'); n >>= 1; } str[SBITS] = '\0'; return(str); } char * binfmti(unsigned int n) { int i; static char str [IBITS+1]; for (i = IBITS-1; i >= 0;i--){ str[i] = (n & MASK ? '1' : '0'); n >>= 1; } str[IBITS] = '\0'; return(str); } char * binfmtl(unsigned long n) { int i; static char str [LBITS+1]; for (i = LBITS-1; i >= 0;i--){ str[i] = (n & MASK ? '1' : '0'); n >>= 1; } str[LBITS] = '\0'; return(str); } char * binfmtq(unsigned long long n) { int i; static char str [QBITS+1]; for (i = QBITS-1; i >= 0;i--){ str[i] = (n & MASK ? '1' : '0'); n >>= 1; } str[QBITS] = '\0'; return(str); } msort-8.53/iso8601.c0000644000175100017510000001512211236173743011025 00000000000000/* Time-stamp: <2008-10-19 00:14:01 poser> */ /* * Copyright (C) 2007, 2008 William J. Poser. * This program is free software; you can redistribute it and/or modify * it under the terms of version 3 of the GNU General Public License * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * or go to the web page: http://www.gnu.org/licenses/gpl.txt. */ /* These are functions for interpreting ISO8601 time/date stamps */ #include "config.h" #include "compdefs.h" #include #ifdef HAVE_UNINUM_UNICODE_H #include #else #include "unicode.h" #endif #ifdef HAVE_STDINT_H #include #endif #include #include #ifdef LOCALE_GETTEXT #include #define _(x) gettext(x) #else #define _(x) (x) #endif #include #include #include #include "retcodes.h" #ifdef HAVE_LONGDOUBLE #define DOUBLE (long double) #else #define DOUBLE double #endif /* * Return the difference between UTC and the local time zone, in seconds. * Add this value to local time to obtain UTC. * * We call localtime() rather than tzset because localtime is guaranteed by * POSIX to set timezone while tzset is not. */ static long TimezoneOffset(void) { time_t lt; /* timezone is defined in time.h */ lt = time(NULL); (void) localtime(<); return((long) timezone); } /* * Given a time as a string in one of the following formats, return the value in seconds: * hh * hhmm * hh:mm * If the expression is ill-formed, set the error flag. */ static long BrokenTimeToSeconds (char *s, short *eflag) { int hours = 0; int minutes = 0; int FieldsFound; short status = 1; /* No valid return value yet */ FieldsFound = sscanf((char *)s,"%2u:%2u",&hours,&minutes); if(FieldsFound == 2) { status = 0; goto end; } FieldsFound = sscanf((char *)s,"%2u%2u",&hours,&minutes); if(FieldsFound == 2) { status = 0; goto end; } if(FieldsFound == 1) status = 0; end: if (minutes > 59) status = 1; if (hours > 24) status = 1; *eflag = status; if (status == 0) return (((hours * 60) + minutes) * 60); else return 0; } /* Extract the time zone info if any and return the number of seconds * that must be added to normalize the time to UTC. * The time zone marker (Z,z,-,+) is ovewritten with a null, * modifying the original string. */ long ExtractTimeZone(UTF8 *s, short *eflag) { char *sep; long Offset; short err = 0; /* Z/z means the value is already UTC */ if ((sep = strchr((char *) s,'Z'))) { *sep = '\0'; return 0; } if ((sep = strchr((char *) s,'z'))) { *sep = '\0'; return 0; } /* + means subtract the following offset to get UTC */ if ((sep = strchr((char *) s,'+'))) { Offset = BrokenTimeToSeconds(sep+1,&err); *eflag = err; *sep = '\0'; return (-Offset); } /* - means add the following offset to get UTC */ if ((sep = strchr((char *) s,'-'))) { Offset = BrokenTimeToSeconds(sep+1,&err); *eflag = err; *sep = '\0'; return (Offset); } /* * If there is no time zone indicator, we default to the time zone of the * environment of this process. */ return(TimezoneOffset()); } /* * Remove hyphen-minus and colon from time-date strings * Return the adjusted location of the T. */ char * StripTimeDateSeparators(char *s, char *tloc) { char *src; char *tgt; char c; int cnt = 0; /* Number of hyphens stripped */ src = tgt = s; while (src < tloc) { c = *src++; if (c == '-') {cnt++;continue;} *tgt++ = c; } while ( (c = *src++) != '\0') { if (c == ':') continue; *tgt++ = c; } *tgt = '\0'; return(tloc-cnt); } /* * This produces a value that is suitable for ordering dates and times. * It is NOT accurate for computing differences between dates and times * because the conversion of dates to days is not exact. For simplicity's * sake it treats years as containing 366 days and months as all containing * 31 days. * * This handles both basic and extended formats. It also permits an optional leading sign, * restricts the year to four digits. */ #define DTITYPE unsigned long #define SECONDSINDAY (60*60*24) int GetISO8601Key(wchar_t *field, DOUBLE *key) { unsigned int year = 0; unsigned int month =0; unsigned int day = 0; unsigned int hour = 0; unsigned int minute = 0; unsigned int second = 0; long TZOffset; /* Number of seconds to add to normalize to UTC */ DTITYPE Days; DTITYPE DaySeconds; int f1, f2; char *cfield; char *nscfield; /* cfield without optional leading sign */ char * Tloc; short err; int YearSign = 1; extern UTF8 * ws2u8(wchar_t *); cfield = (char *) ws2u8(field); Tloc = strchr(cfield,'T'); if(!Tloc) {free(cfield);return(ERROR);} Tloc = StripTimeDateSeparators(cfield,Tloc); err=0; TZOffset = ExtractTimeZone(((UTF8 *)Tloc)+1,&err); if(err) return(ERROR); if(cfield[0] == '-') { YearSign = -1; nscfield = cfield + 1; } else if(cfield[0] == '+') nscfield = cfield + 1; else nscfield = cfield; f1=sscanf(nscfield,"%4u%2u%2uT%2u%2u.%2u", &year,&month,&day,&hour,&minute,&second); if(f1 != 6) { f2=sscanf(nscfield,"%4u%2u%2uT%2u%2u", &year,&month,&day,&hour,&minute); if(f2 != 5) {free(cfield);return(ERROR);} } free(cfield); if(month < 0 || day < 0) return (ERROR); if(month > 12) return (ERROR); if(day > 31) return (ERROR); if(hour < 0 || minute < 0 || second < 0) return (ERROR); if(hour > 24) return(ERROR); if(minute > 60 || second > 60) return (ERROR); #ifdef UNNECESSARY /* * If making actual date calculations, the following is necessary as per the spec. * That is, 2007-04-05T24:00 is the same instant as 2007-04-06T00:00 * For our purposes it is unnecessary as it has no effect on ordering, * so we'd might as well be slightly more efficient and omit it. */ if ((hour == 24) && (minute == 0)) { hour = 0; day += 1; } #endif Days = (DTITYPE) ( (366 * (DTITYPE) year) + (31 * month) + day); DaySeconds = (DTITYPE) (((((DTITYPE) hour * 60) + (DTITYPE) minute) * 60) + (DTITYPE) second); *key = (DOUBLE) ((DOUBLE) YearSign * ( ( (DOUBLE)Days * (DOUBLE)SECONDSINDAY) + (DOUBLE)DaySeconds + (DOUBLE)TZOffset)); return(SUCCESS); } msort-8.53/msg.tcl0000755000175100017510000142773611236173741011066 00000000000000#!/bin/sh # the next line restarts using tclsh \ exec tclsh $0 $@ # Time-stamp: <2009-02-25 18:20:15 poser> # # Copyright (C) 2005-2009 William J. Poser (billposer@alum.mit.edu) # This program is free software; you can redistribute it and/or modify # it under the terms of version 3 of the GNU General Public License # as published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA # or go to the web page: http://www.gnu.org/licenses/gpl.txt. set Version "1.28"; set PackageVersion "8.53"; set DebugP 0; # General debugging #If you are running this under MS Windows without using cygwin, I am told that #wish, the Tcl/Tk windowing shell, will not work properly. Try using tclsh.exe #as the Tcl interpreter and uncomment the following line to import Tk. #package require Tk package require msgcat package require Iwidgets set UseCheckbuttonP 1; proc dmsg {msg} { if {$::DebugP} { puts $msg; flush stdout; } } # Portability stuff set KeySelHeight 1; set KeySelWidth 10; set InitFile ".msgrc"; #Figure out what system we are running on if {[string equal $tcl_platform(platform) windows]} { set System MSWindows; dmsg "Running under MS Windows"; } elseif {[string equal $tcl_platform(platform) unix]} { if {[string equal $tcl_platform(os) Darwin]} { set System MacOSX; dmsg "Running under Mac OS X"; } else { set System Unix; dmsg "Running under Unix"; } } #Find out what our base graphics system is if {[string match X11* [winfo server .]]} { set AquaP 0 set WindowSystem X11 } else { if {[string match $System MSWindows]} { set AquaP 0; set WindowSystem MSWindows; } if {[string match $System MacOSX]} { set AquaP 1 set WindowSystem Aqua } } #Find out if we are running in Tcl/Tk 8.5 or greater #This matters because fonts are bigger in 8.5+ under Linux set TkEightFivePlusOnX11P 0 set VLevelList [split [info patchlevel] "."] set Major [lindex $VLevelList 0] set Minor [lindex $VLevelList 1] if {$WindowSystem eq "X11"} { if {$Major > 8} { set TkEightFivePlusOnX11P 1 } else { if {($Major == 8) && ($Minor >= 5)} { set TkEightFivePlusOnX11P 1 } } } if {[info exists ::env(TMP)]} { set TempDir $::env(TMP); } elseif {[info exists ::env(TEMP)]} { set TempDir $::env(TEMP); } else { if {[string equal $System MSWindows]} { set TempDir "C:\tmp"; } else { set TempDir "/tmp"; } } switch $System { Unix { event add <> event add <> } MacOSX { event add <> event add <> if {$AquaP} { set KeySelHeight 2; set KeySelWidth 10; } } MSWindows { event add <> event add <> set InitFile "Msgrc" } } proc _ {s} {return [::msgcat::mc $s]}; # Define shorthand for gettext set BalloonHelpP 1; set HPWidth 64; # Width of help popups. set HPLines 10; # Number of lines for help popups. set xcwidth 5; set genfxpad 540 set grelief solid set gborder 1 set LastCommandLineSaveTime 0; # Time (in sec. since epoch) of last command line save. set LastExecutionTime 0; # Time (in sec. since epoch) of last msort execution. set SortInProgressP 0; set SortAbortedP 0; set SubdHeight 6; set ReadInitFileP 1; set CustomChartList ""; set FixedRecordLength 0; set RecordParseDisplayedP 0; set MiscOptionsDisplayedP 0; set UnicodeDisplayedP 0; set RandomNumberSeedDisplayedP 0; set AlgorithmDisplayedP 0; set InputFileDisplayedP 0; set OutputFileDisplayedP 0; set ExclusionsDisplayedP 0; set KeyFieldIdentificationDisplayedP 0; set MiscellaneousOptionsDisplayedP 0; set SortOrderDisplayedP 0; set SortTypeDisplayedP 0; set SubstitutionsDisplayedP 0; set UnicodeNormalization 0; #set Opts(RandomSeed) "" set Opts(RandomSeed) 17 set ColorSpecs(BalloonHelp,Background) "\#FF8888" set ColorSpecs(BalloonHelp,Foreground) black set ColorSpecs(Default,Background) "light grey" set ColorSpecs(Backdrop,Background) black set ColorSpecs(Menu,ActiveBackground) salmon; set ColorSpecs(Menu,ActiveForeground) black set ColorSpecs(Menu,Background) azure3 set ColorSpecs(Menu,Foreground) black set ColorSpecs(Menu,Select) coral set ColorSpecs(Menubar,Background) "\#c36176"; set ColorSpecs(Menubar,Foreground) "\#fee4a9"; set ColorSpecs(Menubar,ActiveBackground) "\#fee4a9"; set ColorSpecs(Menubar,ActiveForeground) "\#c36176"; set ColorSpecs(Messages,Background) "\#e9c4dc"; set ColorSpecs(Messages,Foreground) "\#000000"; set ColorSpecs(IPAEntry,Background) "\#FFFFFF"; set ColorSpecs(IPAEntry,Foreground) "\#000000"; set ColorSpecs(IPAHeadings,Background) "\#09ffb2"; set ColorSpecs(PageChoice,Background) "\#e6b483"; set ColorSpecs(PageChoice,ActiveBackground) "\#5040FF"; set ColorSpecs(PageChoice,Selected) "\#F30086"; set ColorSpecs(PageChoice,ActiveForeground) "\#FFFFFF"; set ColorSpecs(PageChoice,UnselectedPageForeground) "\#000000"; set ColorSpecs(RadioButton,Background) "\#A0A0FF" set ColorSpecs(RadioButton,SelectedBackground) green set ColorSpecs(RadioButton,ActiveBackground) "\#FF8080" set ColorSpecs(SortOrderDefinition,Background) "\#FFFFFF"; set ColorSpecs(SortOrderSeparator,Background) "\#FFFFFF"; set ColorSpecs(Substitutions,Background) "\#FFFFFF"; set ColorSpecs(UserTextEntry,Background) "\#FFFFFF"; set ColorSpecs(UserTextEntry,Foreground) black set ColorSpecs(Entry,Background) "navajo white" set ColorSpecs(Entry,DisabledBackground) blue set ColorSpecs(UserText,Foreground) \#0000FF set ColorSpecs(RollUpButton,ActiveBackground) NavajoWhite set ColorSpecs(RollUpButton,ActiveForeground) red # General defaults set BMPOnlyP 0; set GlobalInversionP 0; set ReservePrivateUseAreasP 0; set FieldSeparator "" set RecordSeparator ""; set KeyCount 0; set MaxKeyCount $KeyCount; set WhichKey 0; set RecordParse 1; set WholeRecordIsKeyP 0; set EOLCarriageReturnP 0; set WhichFontToSet MainFont #This array maps key numbers to page names, e.g. 0-> .gen, 1->.ks1 array set KeyMap {}; array set InverseKeyMap {}; #This array maps key numbers to key selection buttons, e.g. 0->.top.sel.gen, 1->.top.sel.ks1 array set SelectionButtonMap {}; array set InverseSelectionButtonMap {}; array set CommandGlosses {}; array set PopupList {}; #This array is indexed on piece of information and key name. array set KeyInfo {}; #Defaults set SortAlgorithm q set DefaultBrowser dillo #For this purpose dillo is in many respects arguably the best choice because #it is very lightweight and starts up fast. However, it isn't as fully #featured as the others, and in particular, doesn't handle the full range of #Unicode characters. #To select a different default browser - uncomment (delete the initial #-sign from) one of the #following lines: #set DefaultBrowser firefox #set DefaultBrowser epiphany; #set DefaultBrowser galeon; #set DefaultBrowser konqueror; #set DefaultBrowser mozilla; #set DefaultBrowser netscape; #set DefaultBrowser opera; set BrowserList [list firefox mozilla epiphany galeon konqueror dillo netscape] set BrowserPIDS [list]; proc LoadMessageCatalog {} { global DebugP; if { $DebugP } { if { [::msgcat::mcload "msgs"] == 0} { puts "No message catalog loaded." } else { puts "Message catalog loaded." } } else { ::msgcat::mcload [file join [file dirname [info script]] msgs]; } } proc ShutDown {} { global BrowserPIDS; #Shutdown child browsers foreach pid $BrowserPIDS { catch {exec kill $pid}; } exit 0; } proc OldShutDown {} { global BrowserPIDS; #Shutdown child browsers foreach pid $BrowserPIDS { catch {exec kill $pid}; } if {$::LastCommandLineSaveTime < $::LastExecutionTime} { ShowMessage [_ "The command line has not been saved recently."] SaveCommandLine; } exit 0; } proc ShowWebPage {url} { global BrowserPIDS; if {[string equal $::System MacOSX]} { lappend BrowserPIDS [exec osascript -e "\"open location $url\""] return } set BrowserFound 0; foreach Browser $::BrowserList { if { [string length [auto_execok $Browser]]} { set BrowserFound 1; break ; } else { ShowMessage [format \ [_ "The browser %s is not available on this machine or not in your path."]\ $Browser]; } } if {$BrowserFound} { lappend BrowserPIDS [exec $Browser $url &] } else { ShowMessage [_ "No browser on the browser list was located."] } } proc BindInsertionTarget {v} { bind $v "+SetInsertionTargets $v" } #This provides an addition to the default methods of the Scrollbar #widget. The default method, bound to , #increments or decrements #the value by the resolution, by default 1. If you want a larger #increment, you can use a larger resolution, but sometimes it is #convenient to have a finer resolutio available while also being #able to move in larger increments. A solution is to bind to #, or some other event if you wish, a larger movement. #This procedure moves by the specified multiplier k times #the resolution of the Scrollbar. proc ScrollbarMoveBigIncrement {w f x y} { set part [$w identify $x $y] switch -exact -- $part { trough1 { set dir -1; } arrow1 { set dir -1; } trough2 { set dir 1; } arrow2 { set dir 1; } default { return ; } } set CurrentFraction [lindex [$w get] 0] set NewFraction [expr $CurrentFraction + ($dir * $f)] eval [concat [$w cget -command] moveto $NewFraction] } #Font stuff #Font system begins here # We set these outside the namespace since FontInfo has to be global. # Default defaults set FontInfo(family) courier set FontInfo(size) 12 set FontInfo(weight) normal set FontInfo(slant) roman set FontInfo(underline) 0 set FontInfo(overstrike) 0 namespace eval fontsel { variable FontPropertyList [list family size weight slant underline overstrike] variable FontPropertyClass variable FSCColors foreach p $FontPropertyList { set FontPropertyClass($p) generic; } set FontPropertyClass(underline) boolean set FontPropertyClass(overstrike) boolean #We check the existence of the variable so that this #can safely be called AFTER non-default values are set. proc SetFontInfoDefaults {} { global FontInfo; foreach ft $::FontList { if {![info exist FontInfo($ft,family)]} { set FontInfo($ft,family) $FontInfo(family) } if {![info exist FontInfo($ft,size)]} { set FontInfo($ft,size) $FontInfo(size) } if {![info exist FontInfo($ft,weight)]} { set FontInfo($ft,weight) $FontInfo(weight) } if {![info exist FontInfo($ft,slant)]} { set FontInfo($ft,slant) $FontInfo(slant) } if {![info exist FontInfo($ft,underline)]} { set FontInfo($ft,underline) $FontInfo(underline) } if {![info exist FontInfo($ft,overstrike)]} { set FontInfo($ft,overstrike) $FontInfo(overstrike) } if {![info exist FontInfo($ft,gloss)]} { set FontInfo($ft,gloss) $ft; } if {![info exist FontInfo($ft,help)]} { set FontInfo($ft,help) "?" } } } #For a given font assign font-specific properties from generics. proc FontSet {which} { global FontInfo variable FontPropertyList foreach prop $FontPropertyList { set FontInfo($which,$prop) $FontInfo($prop); } } #Assign the proprety values of a specified font to the generics. proc InverseFontSet {which} { global FontInfo variable FontPropertyList foreach prop $FontPropertyList { set FontInfo($prop) $FontInfo($which,$prop); } } #Configure a specified font according to the font-specific properties. proc ConfigureFont {which} { global FontInfo variable FontPropertyList foreach prop $FontPropertyList { font configure $which -$prop $FontInfo($which,$prop) } } #Record as default values the font-specific values of properties at the #time of the call. The recorded values are intended for use by #ResetToDefaults proc RecordDefaults {} { global FontInfo global FontList; variable FontPropertyList foreach f $FontList { foreach p $FontPropertyList { set FontInfo($f,$p,Default) $FontInfo($f,$p); } } } #Create all of the fonts on the font list and configure them #according to the generic values of the properties, which are #also assigned at this time to the font-specific variables. proc CreateFonts {} { global FontList; foreach ft $FontList { font create $ft; InverseFontSet $ft; ConfigureFont $ft; } } #Get the values from the three scales, combine them into a hex RGB spec, #assign its value to FontExampleColor, and configure the two examples. proc UpdateFontExampleColor {x} { variable FSCColors global FontExampleColorConfigureWhich UpdateFontExampleColorHex; .selectFont.curcan.att.r1c1 configure \ -$::FontExampleColorConfigureWhich \#$::FontExampleColor .selectFont.curcan.att.r2c1 configure \ -$::FontExampleColorConfigureWhich \#$::FontExampleColor set FSCColors(red,$FontExampleColorConfigureWhich) $::FontRed; set FSCColors(green,$FontExampleColorConfigureWhich) $::FontGreen; set FSCColors(blue,$FontExampleColorConfigureWhich) $::FontBlue; } proc UpdateFontExampleColorHex {} { set ::FontExampleColor [format "%02X%02X%02X" $::FontRed $::FontGreen $::FontBlue]; } proc RestoreCSColors {} { variable FSCColors global FontExampleColorConfigureWhich set ::FontRed $FSCColors(red,$FontExampleColorConfigureWhich) set ::FontGreen $FSCColors(green,$FontExampleColorConfigureWhich) set ::FontBlue $FSCColors(blue,$FontExampleColorConfigureWhich) UpdateFontExampleColorHex; } proc CloneMainFontAsFontControlPanelFont {} { variable FontPropertyList global FontInfo foreach p $FontPropertyList { font configure FontControlPanelFont -$p $FontInfo(MainFont,$p); } } #We create this separately because we don't want it on the FontList. font create FontControlPanelFont; #This is the main procedure of this package. #It creates the font control panel. proc CreateFontControlPanel {args} { global FontInfo; global WhichFontToSet global FontList; variable FontPropertyList variable FSCColors set General 1 set exwid 10 set w .selectFont if {[winfo exists $w]} { wm deiconify $w; raise $w; return ; } toplevel $w wm title $w [_ "Font Selection"] BindKeys $w wm protocol $w WM_DELETE_WINDOW "wm withdraw $w" #The idea is that in general we want to use the main #font here, but we keep them separate so that we #can wait before switching the control panel to #the new main font configuration so that #the user isn't confronted with an unusable #control panel if he or she sets the mainfont to something #crazy. CloneMainFontAsFontControlPanelFont; if {[llength $args] > 0} { set ::WhichFontToSet [lindex $args 0]; set General 0; } set FontTypes [llength $FontList]; if {$FontTypes == 1} { set ::WhichFontToSet [lindex $FontList 0]; set General 0; } frame $w.which -relief ridge -border 3 if {$General} { set msg [_ "For what aspect of the program\ndo you wish to set the font?"] balloonhelp_for $w.which $msg label $w.which.title -text [_ "Use for which to set font"] \ -anchor w -font FontControlPanelFont frame $w.which.btns; set k 0; set PerRow 4; set ypad 3 set xpad 10 foreach ft $FontList { set bn $w.which.btns.f$ft; radiobutton $bn -text [_ $FontInfo($ft,gloss)] \ -variable WhichFontToSet -value $ft \ -command fontsel::SetFontSelectionDefaults \ -font FontControlPanelFont \ -indicatoron 0 -selectcolor $::ColorSpecs(Default,Background) balloonhelp_for $w.which.btns.f$ft $FontInfo($ft,help) set row [expr 1+ $k/$PerRow] set col [expr $k%$PerRow] if {$FontTypes >= $PerRow} { grid $w.which.btns.f$ft -row $row -column $col \ -sticky we -ipadx 3 -padx $xpad -pady $ypad } incr k } if {$FontTypes < $PerRow} { foreach ft $FontList { pack $w.which.btns.f$ft -side left -expand 1 -fill x \ -ipadx 5 -ipady 3 -padx 40 -pady 3 } } frame $w.which.pad -height 4 pack $w.which.title -side top -expand 1 -fill both -anchor w pack $w.which.btns -side top -expand 1 -fill both -anchor w pack $w.which.pad -side top -expand 0 -fill x -anchor w } frame $w.mid frame $w.mid.opts -relief ridge -border 3 frame $w.mid.families -relief ridge -border 3 label $w.mid.families.lab -text [_ "Family"] -relief ridge \ -justify center -font FontControlPanelFont listbox $w.mid.families.lb -height 1 -exportselection 0 \ -yscrollcommand "$w.mid.families.sbar set" -selectmode single \ -font FontControlPanelFont scrollbar $w.mid.families.sbar -orient vertical -command "$w.mid.families.lb yview" bind $w.mid.families.sbar <> \ "ScrollbarMoveBigIncrement $w.mid.families.sbar 0.20 %x %y" bind $w.mid.families.lb <> ProvideFontDescription pack $w.mid.families.lab -side top -expand 0 -fill x pack $w.mid.families.lb -side left -expand 1 -fill both pack $w.mid.families.sbar -side left -expand 1 -fill y label $w.mid.opts.lab -text [_ "Attributes"] -relief ridge \ -justify center -font FontControlPanelFont label $w.mid.opts.sizel -text [_ "Size:"] -font FontControlPanelFont scale $w.mid.opts.size -orient h -digit 1 -from 5 -to 55 \ -variable FontInfo(size) -tickinterval 0 -length 150 \ -font FontControlPanelFont bind $w.mid.opts.size <> "ScaleMoveBigIncrement $w.mid.opts.size 5 %x %y" label $w.mid.opts.weightl -text [::msgcat::mc "Bold:"] \ -font FontControlPanelFont checkbutton $w.mid.opts.weight -variable FontInfo(weight) \ -onvalue bold -offvalue normal -font FontControlPanelFont label $w.mid.opts.slantl -text [::msgcat::mc "Italic:"] \ -font FontControlPanelFont checkbutton $w.mid.opts.slant -variable FontInfo(slant) \ -onvalue italic -offvalue roman -font FontControlPanelFont label $w.mid.opts.ulinel -text [::msgcat::mc "Underline:"] \ -font FontControlPanelFont checkbutton $w.mid.opts.uline -variable FontInfo(underline) \ -onvalue 1 -offvalue 0 -font FontControlPanelFont label $w.mid.opts.strkovl -text [::msgcat::mc "Overstrike:"] \ -font FontControlPanelFont checkbutton $w.mid.opts.strkov -variable FontInfo(overstrike) \ -onvalue 1 -offvalue 0 -font FontControlPanelFont grid $w.mid.opts.lab -row 0 -column 0 -columnspan 2 -sticky ew grid $w.mid.opts.sizel -row 1 -column 0 -sticky w grid $w.mid.opts.size -row 1 -column 1 -sticky w grid $w.mid.opts.weightl -row 2 -column 0 -sticky w grid $w.mid.opts.weight -row 2 -column 1 -sticky w grid $w.mid.opts.slantl -row 3 -column 0 -sticky w grid $w.mid.opts.slant -row 3 -column 1 -sticky w grid $w.mid.opts.ulinel -row 4 -column 0 -sticky w grid $w.mid.opts.uline -row 4 -column 1 -sticky w grid $w.mid.opts.strkovl -row 5 -column 0 -sticky w grid $w.mid.opts.strkov -row 5 -column 1 -sticky w pack $w.mid.families -side left -expand 1 -fill both -padx 5 -pady 2 pack $w.mid.opts -side left -expand 1 -fill both -padx 5 -pady 2 eval $w.mid.families.lb insert 0 [lsort [font families]] bind $w.mid.families.lb {fontsel::SelectFontFamily %W %y} frame $w.cntls -relief ridge -border 3 button $w.cntls.sav -text [_ "Apply"] -command fontsel::FontSave \ -font FontControlPanelFont button $w.cntls.res -text [_ "Reset"] -command fontsel::ResetToDefaults \ -font FontControlPanelFont button $w.cntls.can -text [_ "Dismiss"] -command "wm withdraw $w" \ -font FontControlPanelFont button $w.cntls.cpanel -text [_ "Here Too?"] \ -command fontsel::CloneMainFontAsFontControlPanelFont \ -font FontControlPanelFont pack $w.cntls.cpanel -side left -expand 1 -fill both -padx 3 pack $w.cntls.can -side left -expand 1 -fill both -padx 3 pack $w.cntls.res -side left -expand 1 -fill both -padx 3 pack $w.cntls.sav -side right -expand 1 -fill both -padx 3 set msg [_ "Press this button to dismiss the popup."]; balloonhelp_for $w.cntls.can $msg set msg [_ "Press this button to reset the font to its defaults."]; balloonhelp_for $w.cntls.res $msg set msg [_ "Press this button to make the changes\nyou have made take effect."] balloonhelp_for $w.cntls.sav $msg set msg [format \ [_ "Press this button to set the fonts\nin this control panel to the %s font."] \ [_ $::FontInfo(MainFont,gloss)]] balloonhelp_for $w.cntls.cpanel $msg frame $w.curcan -relief ridge -border 1 set ATT [frame $w.curcan.att] set Row 0 foreach r {Header Current Candidate} { set Column 2 foreach p $FontPropertyList { set v $w.curcan.att.r${Row}c${Column}; label $v -font FontControlPanelFont incr Column; } incr Row; } font create CurrentFontExampleFont \ -family $FontInfo($::WhichFontToSet,family) \ -size $FontInfo($::WhichFontToSet,size) \ -weight $FontInfo($::WhichFontToSet,weight) \ -slant $FontInfo($::WhichFontToSet,slant) \ -underline $FontInfo($::WhichFontToSet,underline) \ -overstrike $FontInfo($::WhichFontToSet,overstrike); font create CandidateFontExampleFont \ -family $FontInfo($::WhichFontToSet,family) \ -size $FontInfo($::WhichFontToSet,size) \ -weight $FontInfo($::WhichFontToSet,weight) \ -slant $FontInfo($::WhichFontToSet,slant) \ -underline $FontInfo($::WhichFontToSet,underline) \ -overstrike $FontInfo($::WhichFontToSet,overstrike); label $w.curcan.att.r0c0 -font FontControlPanelFont label $w.curcan.att.r0c1 -font FontControlPanelFont label $w.curcan.att.r1c0 -text [_ "Current"] -font FontControlPanelFont entry $w.curcan.att.r1c1 -font CurrentFontExampleFont -relief flat -width $exwid $w.curcan.att.r1c1 insert 0 [_ "example"] label $w.curcan.att.r2c0 -text [_ "Candidate"] -font FontControlPanelFont entry $w.curcan.att.r2c1 -font CandidateFontExampleFont -relief flat -width $exwid $w.curcan.att.r2c1 insert 0 [_ "example"] #This is for use in conjunction with my character insertion library. #It arranges for the various character insertion widgets to insert #characters into the focussed window. if {[llength [info commands BindInsertionTarget]]} { BindInsertionTarget $w.curcan.att.r1c1; BindInsertionTarget $w.curcan.att.r2c1; } set CLR [frame $w.curcan.clr] set ln 60; set wd 10 set trc \#D4B8C1 scale $CLR.red -orient v -digit 1 -from 255 -to 0 -tickinterval 0 \ -variable FontRed -showvalue 0 -length $ln -width $wd\ -troughcolor $trc -activebackground \#F0AAAA \ -bg red -fg yellow -command fontsel::UpdateFontExampleColor scale $CLR.grn -orient v -digit 1 -from 255 -to 0 -tickinterval 0 \ -variable FontGreen -showvalue 0 -length $ln -width $wd\ -troughcolor $trc -activebackground \#AAF0AA \ -bg green -fg yellow -command fontsel::UpdateFontExampleColor scale $CLR.blu -orient v -digit 1 -from 255 -to 0 -tickinterval 0 \ -variable FontBlue -showvalue 0 -length $ln -width $wd\ -troughcolor $trc -activebackground \#AAAAF0 \ -bg blue -fg yellow -command fontsel::UpdateFontExampleColor set FSCColors(red,bg) 0x00 set FSCColors(green,bg) 0x00 set FSCColors(blue,bg) 0x00 set FSCColors(red,fg) 0x00 set FSCColors(green,fg) 0x00 set FSCColors(blue,fg) 0x00 bind $CLR.red <> "ScaleMoveBigIncrement $CLR.red -20 %x %y" bind $CLR.grn <> "ScaleMoveBigIncrement $CLR.grn -20 %x %y" bind $CLR.blu <> "ScaleMoveBigIncrement $CLR.blu -20 %x %y" set ::FontRed 255 set ::FontGreen 255 set ::FontBlue 255 set FontExampleColor \#FFFFFF label $CLR.rdt -textvariable FontExampleColor -width 7 -relief raised bind $CLR.rdt "pack forget $CLR" bind $ATT "pack $w.curcan.clr -before $ATT -side left -expand 1 -fill both" set msg [_ "Left click here to remove the color selector."] balloonhelp_for $CLR.rdt $msg; set msg [_ "Use this to set the colors in the example text boxes."] balloonhelp_for $CLR.red $msg; balloonhelp_for $CLR.grn $msg; balloonhelp_for $CLR.blu $msg; frame $CLR.whi set ::FontExampleColorConfigureWhich bg; radiobutton $CLR.whi.t -variable FontExampleColorConfigureWhich \ -value fg -command fontsel::RestoreCSColors -text [_ "fg"] \ -indicatoron 0 -activebackground gray -selectcolor gray \ -font FontControlPanelFont radiobutton $CLR.whi.b -variable FontExampleColorConfigureWhich \ -value bg -command fontsel::RestoreCSColors -text [_ "bg"] \ -indicatoron 0 -activebackground gray -selectcolor gray \ -font FontControlPanelFont pack $CLR.whi.t -side left -expand 1 -fill both pack $CLR.whi.b -side left -expand 1 -fill both pack $CLR.rdt -side top -expand 1 -fill both pack $CLR.whi -side bottom -expand 1 -fill both pack $CLR.red -side left -expand 1 -fill y pack $CLR.grn -side left -expand 1 -fill y pack $CLR.blu -side left -expand 1 -fill y set msg [_ "Choose the color for the sample text."] balloonhelp_for $CLR.whi.t $msg; set msg [_ "Choose the background color for the sample text."] balloonhelp_for $CLR.whi.b $msg; #Now grid them all set xp 5 set yp 3 set CLimit [expr [llength $FontPropertyList] + 2]; for {set r 0} {$r < 3} {incr r} { for {set c 0} {$c < $CLimit} {incr c} { set v $w.curcan.att.r${r}c${c}; grid $v -row $r -column $c -sticky w -padx $xp -pady $yp } } set xp 3 set yp 1 if {!$General} { $w.curcan.att.r0c0 configure -text [string totitle [_ $FontInfo($::WhichFontToSet,gloss)]] } pack $w.curcan.clr -side left -expand 1 -fill both -padx 9 -pady 5 pack $w.curcan.att -side left -expand 1 -fill both -padx 3 -pady 5 #Put it all together frame $w.botsep -height 4 pack $w.which -side top -expand 1 -fill x -padx 8 -pady 6 pack $w.curcan -side top -expand 1 -fill x -padx 8 -pady 6 pack $w.mid -side top -expand 1 -fill x -padx 8 -pady 1 pack $w.cntls -side top -expand 1 -fill x -padx 8 -pady 2 pack $w.botsep -side top -expand 1 -fill x -padx 8 -pady 2 if {$General} { $w.which.btns.f[lindex $FontList 0] invoke;# Default to first on list } foreach f $FontPropertyList { trace variable FontInfo($f) w fontsel::FontShow; } return $w; } #This resets the properties of the font specified by WhichFontToSet #to their default values, where "default" means whatever values #are stored in FontInfo(,,Default). The intention #is that these values will have been set by RecordDefaults at #a suitable point. A suitable point might be program startup or it #might be after init files have been read. #After resetting the attributes for the current font to their #default values, it configures the fonts for both the current and candidate #examples in the control panel to match. proc ResetToDefaults {} { global FontInfo; global WhichFontToSet variable FontPropertyList foreach prop $FontPropertyList { set FontInfo($::WhichFontToSet,$prop) $FontInfo($::WhichFontToSet,$prop,Default); set FontInfo($prop) $FontInfo($::WhichFontToSet,$prop,Default); } ConfigureFont $::WhichFontToSet; ConfigureCurrentExampleFont; ConfigureCandidateExampleFont; DescribeBothFonts; } #This is the procedure called from the control panel when the user decides #to apply and save the values set on the control panel. It sets the font-specific #attributes from the generic ones, configures the target font as well as the #current example font, and updates the description of the current font #in the control panel. proc FontSave {} { global FontInfo set f $::WhichFontToSet; FontSet $f; ConfigureFont $f ConfigureCurrentExampleFont; DescribeBothFonts; } #This procedure configures the font used to display the candidate example #in the control panel. It is intended to be called whenever a property #is changed in the control panel or when the target font is changed. proc ConfigureCandidateExampleFont {} { global FontInfo global WhichFontToSet variable FontPropertyList foreach prop $FontPropertyList { font configure CandidateFontExampleFont -$prop $FontInfo($prop) } } #This procedure configures the font used to display the current example #in the control panel. It is intended to be called when the user #applies new values or when the target font is changed. proc ConfigureCurrentExampleFont {} { global FontInfo global WhichFontToSet variable FontPropertyList foreach prop $FontPropertyList { font configure CurrentFontExampleFont -$prop $FontInfo($::WhichFontToSet,$prop) } } #This procedure configures the candidate example font#and updates the #description of the candidate font in the control panel. It is intended #to be called whenever a proprty of the candidate font is changed. proc FontShow {args} { ConfigureCandidateExampleFont; DescribeBothFonts; } #This procedure generates the descriptions of the current and candidate #fonts that are shown in the control panel. proc DescribeBothFonts {} { global FontInfo global WhichFontToSet; variable FontPropertyList set f $::WhichFontToSet; set c 2; foreach prop $FontPropertyList { .selectFont.curcan.att.r0c$c configure -text [string totitle [_ $prop]] set value $FontInfo($f,$prop) if {$value == 1} {set value [_ "Yes"]} else { if {$value == 0} {set value [_ "No"]}} .selectFont.curcan.att.r1c$c configure -text $value; set value $FontInfo($prop) if {$value == 1} {set value [_ "Yes"]} else { if {$value == 0} {set value [_ "No"]}} .selectFont.curcan.att.r2c$c configure -text $value; incr c; } } #This is to be called when we change font targets. #It resets the control panel to show the current #configuration for the newly targeted font. proc SetFontSelectionDefaults {} { global FontInfo; global WhichFontToSet; variable FontPropertyList foreach prop $FontPropertyList { set FontInfo($prop) $FontInfo($WhichFontToSet,$prop); } set FontChoices [.selectFont.mid.families.lb size]; set k 1; while {$k <= $FontChoices} { set Family [.selectFont.mid.families.lb get $k]; if {[string equal $Family [string tolower $FontInfo($WhichFontToSet,family)]]} { .selectFont.mid.families.lb selection clear 0 end; .selectFont.mid.families.lb see $k .selectFont.mid.families.lb selection set $k $k; .selectFont.mid.families.lb activate $k; set FontInfo(family) [.selectFont.mid.families.lb get $k] break } incr k; } ConfigureCandidateExampleFont ConfigureCurrentExampleFont; DescribeBothFonts; } #This is the callback that extracts a new font family #setting from the control panel. proc SelectFontFamily {w y} { global FontInfo set index [$w nearest $y] if {$index != ""} { set FontInfo(family) [$w get $index] } } #This is the callback that extracts a new font size #from the control panel. proc SelectFontSize {w} { global WhichFontToSet global FontInfo set size [$w get] if {[catch {expr round($size)} size] == 0} { if { ($size > 0) && ($size <= 60) } { set FontInfo(size) $size return ; } } $w delete 0 end $w insert 0 $FontInfo($WhichFontToSet,size) } #This is presently a stub. #It is intended to be called on an event, probably , #in the font family listbox in the control panel. #Its purpose is to provide the user with information about #the particular font. proc ProvideFontDescription {w y} { variable FontDescriptions set index [$w nearest $y] if {$index != ""} { FontDescriptions([$w get $index]) } } #Create a command for setting each combination of font and property. proc DefineFontSettingProcs {} { variable FontPropertyList variable FontPropertyClass global FontList; global FontProcList; foreach ft $FontList { foreach prop $fontsel::FontPropertyList { if {[string equal $FontPropertyClass($prop) boolean]} { set ProcName [format "::fontsel::Set%s%sP" $ft [string totitle $prop]]; lappend FontProcList $ProcName; set cmd [list "proc" $ProcName "\{v\}" \ "set ::FontInfo($ft,$prop) \[SlaveBoolean \$v\];\nConfigureFont $ft;"] } else { set ProcName [format "::fontsel::Set%s%s" $ft [string totitle $prop]]; lappend FontProcList $ProcName; set cmd [list "proc" $ProcName "\{v\}" \ "set ::FontInfo($ft,$prop) \$v;\nConfigureFont $ft;"] } eval $cmd; } } } #Create aliases in the named daughter interpreter for the font setting commands proc AliasFontSettings {interp} { variable FontPropertyList variable FontPropertyClass global FontList; foreach ft $FontList { foreach prop $FontPropertyList { set Tprop [string totitle $prop] set Tprop2 $Tprop; if {[string equal $FontPropertyClass($prop) boolean]} { set Tprop ${Tprop}P } eval [split [format "%s alias %s%s ::fontsel::Set%s%s" \ $interp $ft $Tprop $ft $Tprop2]] } } } #Returns a list of init file commands representing the current font settings. proc SaveFontSettings {} { variable FontPropertyList variable FontPropertyClass global FontInfo global FontList; set cl [list] foreach ft $FontList { foreach prop $FontPropertyList { set Tprop [string totitle $prop] if {[string equal $FontPropertyClass($prop) boolean]} { set Tprop ${Tprop}P } lappend cl [format "%s%s %s" $ft $Tprop [list $FontInfo($ft,$prop)]] } } return [lsort $cl]; } } # End of namespace fontsel # This is the stuff specific to this program. set FontList { \ MainFont\ HeaderFont\ BalloonHelpFont\ MenuFont\ UserPlainTextFont\ UserTechnicalTextFont\ CharacterEntryFont\ DiacriticFont\ AccentedLetterFont} set FontInfo(family) code2000 set FontInfo(BalloonHelpFont,family) lucida set FontInfo(BalloonHelpFont,gloss) "balloon help" set FontInfo(BalloonHelpFont,help) "This font is used in help balloons." set FontInfo(MainFont,family) "courier" set FontInfo(MainFont,gloss) [_ "general"] set FontInfo(MainFont,help) [_ "This font is used for most things."] set FontInfo(HeaderFont,family) "courier" set FontInfo(HeaderFont,size) 12 set FontInfo(HeaderFont,weight) bold set FontInfo(HeaderFont,gloss) [_ "headings"] set FontInfo(HeaderFont,help) [_ "This font is used for headings."] set FontInfo(UserPlainTextFont,gloss) [_ "plain user text"] set FontInfo(UserPlainTextFont,help) [_ "This font is used for ordinary text entered\nby the user, such as file names."] set FontInfo(UserPlainTextFont,family) bible set FontInfo(UserTechnicalTextFont,gloss) [_ "technical user text"] set FontInfo(UserTechnicalTextFont,help) [_ "This font is used for text entered by the\nuser that is likely to contain unusual\ncharacters, such as multigraph definitions."] set FontInfo(UserTechnicalTextFont,family) "sil doulos" set FontInfo(MenuFont,family) courier set FontInfo(MenuFont,gloss) [_ "menu"] set FontInfo(MenuFont,help) [_ "This font is used for menu labels."] set FontInfo(CharacterEntryFont,gloss) "character entry" set FontInfo(CharacterEntryFont,help) "This font is used on the labels of\nmost character insertion widgets." set FontInfo(AccentedLetterFont,gloss) "accented letters" set FontInfo(AccentedLetterFont,help) "This font is used on the labels of the\naccented character insertion widget." set FontInfo(DiacriticFont,gloss) "diacritics" set FontInfo(DiacriticFont,help) "This font is used on the labels of the\ndiacritic insertion widget." set FontInfo(SmallLabelFont,family) $FontInfo(MainFont,family); set FontInfo(SmallLabelFont,gloss) "small labels" set FontInfo(SmallLabelFont,help) "small labels" set FontInfo(CharacterEntryFont,size) 14 set FontInfo(AccentedLetterFont,size) 14 set FontInfo(DiacriticFont,size) [expr $FontInfo(CharacterEntryFont,size) + 40]; set FontInfo(SmallLabelFont,size) [expr $FontInfo(AccentedLetterFont,size) - 8]; if {$TkEightFivePlusOnX11P} { set FontInfo(BalloonHelpFont,size) 10 set FontInfo(MainFont,size) 10 set FontInfo(MenuFont,size) 10 set FontInfo(AccentedLetterFont,size) 11 set FontInfo(CharacterEntryLabelFont,size) 10 set FontInfo(CharacterEntryFont,size) 11 set FontInfo(RegexpFont,size) 11 set FontInfo(UserPlainTextFont,size) 12 set FontInfo(UserTechnicalTextFont,size) 11 set FontInfo(CharacterEntryFont,size) 11 } else { set FontInfo(BalloonHelpFont,size) 13 set FontInfo(MainFont,size) 12 set FontInfo(MenuFont,size) 12 set FontInfo(AccentedLetterFont,size) 14 set FontInfo(CharacterEntryLabelFont,size) 13 set FontInfo(CharacterEntryFont,size) 14 set FontInfo(RegexpFont,size) 13 set FontInfo(UserPlainTextFont,size) 14 set FontInfo(UserTechnicalTextFont,size) 13 set FontInfo(CharacterEntryFont,size) 14 } #Now call these two functions. fontsel::SetFontInfoDefaults; fontsel::CreateFonts; #End of font stuff option add *selectFont*Font MainFont 100 option add *Label.Font MainFont 100 option add *Menu.Font MenuFont 100 option add *Radiobutton.Font MainFont 100 proc AddKey {} { incr ::KeyCount; incr ::MaxKeyCount; set KeyName [format ".ks%1d" $::MaxKeyCount] set KeyPageSelectionButtonLabel [format "Key %d" $::KeyCount] #We start out with a simple correspondance of selection button name to page name. #If the button already exists, we increase the index until we find one that is free. set sbind $::KeyCount; set SelectionButtonName [format ".top.sel.ks%d" $sbind] while {[winfo exists $SelectionButtonName]} { incr sbind; set SelectionButtonName [format ".top.sel.ks%d" $sbind] } set ::SelectionButtonMap($::KeyCount) $SelectionButtonName; UpdateInverseSelectionButtonMap; set NewButton [radiobutton $SelectionButtonName \ -text $KeyPageSelectionButtonLabel \ -variable WhichKey -value $::KeyCount \ -width $::KeySelWidth -height $::KeySelHeight] $NewButton configure -bg $::ColorSpecs(PageChoice,Background) $NewButton configure -activebackground $::ColorSpecs(PageChoice,ActiveBackground) $NewButton configure -selectcolor $::ColorSpecs(PageChoice,Selected) $NewButton configure -indicatoron 0 pack $NewButton -side left set ::KeyMap($::KeyCount) $KeyName; UpdateInverseKeyMap; SetupKey $::KeyMap($::KeyCount); balloonhelp_for $NewButton [format [_ "Click on this button to switch to settings for key %d\nPress the right button, drag to another button,\nand release to swap keys."] $::KeyCount]; BindKeySelectionButton $NewButton; # dmsg "Added key $KeyName with button $SelectionButtonName" TellKeyMap; TellSelectionButtonMap; $NewButton invoke } proc SwapKeys {m n} { set temp $::KeyMap($m); set ::KeyMap($m) $::KeyMap($n) set ::KeyMap($n) $temp; UpdateInverseKeyMap; TellKeyMap; TellSelectionButtonMap; $::SelectionButtonMap($::WhichKey) invoke ShowMessage [format [_ "Swapped keys %d and %d"] $m $n] } proc UpdateInverseKeyMap {} { unset ::InverseKeyMap; foreach KeyNumber [array names ::KeyMap] { set KeyName $::KeyMap($KeyNumber); set ::InverseKeyMap($KeyName) $KeyNumber; } } proc UpdateInverseSelectionButtonMap {} { unset ::InverseSelectionButtonMap; foreach KeyNumber [array names ::SelectionButtonMap] { set KeyName $::SelectionButtonMap($KeyNumber); set ::InverseSelectionButtonMap($KeyName) $KeyNumber; } } proc BindKeySelectionButton {b} { bind $b <> {SetKeyButtonMoveSource %X %Y} bind $b <> {SwapKeysOnEvent %X %Y} } proc SetKeyButtonMoveSource {x y} { set EventWindow [winfo containing $x $y]; if {[info exists ::InverseSelectionButtonMap($EventWindow)] && $::InverseSelectionButtonMap($EventWindow)} { set ::KeyButtonMoveSource $::InverseSelectionButtonMap($EventWindow); } else { ShowMessage [_ "That wouldn't make sense. You can only swap key buttons."] } } proc SwapKeysOnEvent {x y} { set EventWindow [winfo containing $x $y]; if {[info exists ::InverseSelectionButtonMap($EventWindow)] && $::InverseSelectionButtonMap($EventWindow)} { SwapKeys $::KeyButtonMoveSource $::InverseSelectionButtonMap($EventWindow); } else { ShowMessage [_ "That wouldn't make sense. You can only swap key buttons."] } } proc UpdateKeySelectionButtonLabels {} { for {set KeyNumber 1} {$KeyNumber <= $::KeyCount} {incr KeyNumber} { set KeyPageName $::KeyMap($KeyNumber); set KeyPageSelectionButton [format ".top.sel.ks%d" $KeyNumber]; set KeyPageSelectionButtonLabel [format [_ "Key %d"] $KeyNumber] if {[winfo exists $KeyPageSelectionButton]} { $KeyPageSelectionButton configure -text $KeyPageSelectionButtonLabel; } } } proc RemoveKey {} { if {$::KeyCount == 1} { ShowMessage [_ "You can't sort anything without any keys."] return } set LastKeyNumber [lindex [lsort -integer -decreasing [array names ::KeyMap]] 0]; set LastKeyName $::KeyMap($LastKeyNumber); trace vdelete ::KeyInfo(KeySelection,$LastKeyName) w ChooseActiveKeySelection trace vdelete ::KeyInfo(ExclusionsP,$LastKeyName) w ToggleExclusionEntryActive trace vdelete ::KeyInfo(SubstitutionsP,$LastKeyName) w ToggleSubstitutionEntryActive trace vdelete ::KeyInfo(SortOrderSpecType,$LastKeyName) w ToggleCustomSortOrderEntryActive trace vdelete ::KeyInfo(SortType,$LastKeyName) w ToggleOnSortType trace vdelete ::KeyInfo(OptionalP,$LastKeyName) w ToggleOptComparisonActive destroy $LastKeyName; set LastKeyPageSelectionButton $::SelectionButtonMap($::KeyCount); destroy $LastKeyPageSelectionButton; incr ::KeyCount -1; unset ::KeyMap($LastKeyNumber); unset ::SelectionButtonMap($LastKeyNumber); UpdateInverseSelectionButtonMap; UpdateInverseKeyMap; TellKeyMap; TellSelectionButtonMap; set ::WhichKey 1; } proc TellKeyMap {} { if {$::DebugP} { puts -nonewline "Keymap: "; foreach n [array names ::KeyMap] { puts -nonewline "$n $::KeyMap($n) " } puts ""; puts -nonewline "Inverse Keymap: "; foreach n [array names ::InverseKeyMap] { puts -nonewline "$n $::InverseKeyMap($n) " } puts ""; } } proc TellSelectionButtonMap {} { if {$::DebugP} { puts -nonewline "Buttonmap: "; foreach n [array names ::SelectionButtonMap] { puts -nonewline "$n $::SelectionButtonMap($n) " } puts ""; puts -nonewline "Inverse Buttonmap: "; foreach n [array names ::InverseSelectionButtonMap] { puts -nonewline "$n $::InverseSelectionButtonMap($n) " } puts ""; } } proc ShowMessage {msg} { if {[winfo exists .top.msg]} { .top.msg configure -state normal; .top.msg delete 1.0 end; .top.msg insert 1.0 $msg; .top.msg configure -state disabled; } else { puts $msg; } } proc ClearMessageWindow {} { .top.msg configure -state normal .top.msg delete 1.0 end; .top.msg configure -state disabled } proc SpecifyExclusionFile {KeyName} { set ExclusionFile [tk_getOpenFile]; if {$ExclusionFile == ""} { ShowMessage [_ "File selection aborted."] return } else { $KeyName.exc.bot.ent delete 0 end; $KeyName.exc.bot.ent insert insert $ExclusionFile; } } proc SpecifySubstitutionFile {KeyName} { set SubstitutionFile [tk_getOpenFile]; if {[string equal $SubstitutionFile ""]} { ShowMessage [_ "File selection aborted."] return } else { $KeyName.sub.bot.ent delete 0 end; $KeyName.sub.bot.ent insert insert $ExclusionFile; } } proc GetFieldSeparator {} { return [.gen.ctr.wr.fsent get]; } proc GetRecordSeparator {} { return [.gen.ctr.rp.cent get]; } proc GetSortOrderSeparatorFile {KeyName} { return [$KeyName.sos.bot.ent get] } proc GetSortOrderFile {KeyName} { return [$KeyName.so.bot.ent get] } proc GetLocale {KeyName} { return [$KeyName.so.loc.ent get] } proc GetExclusionFile {KeyName} { return [$KeyName.exc.bot.ent get] } proc GetSubstitutionFile {KeyName} { return [$KeyName.sub.bot.ent get] } proc SpecifySortOrderFile {KeyName} { set SortOrderFile [tk_getOpenFile]; if {$SortOrderFile == ""} { ShowMessage [_ "File selection aborted."] return } else { $KeyName.so.bot.ent delete 0 end $KeyName.so.bot.ent insert insert $SortOrderFile; } } proc SpecifySortOrderSeparatorFile {KeyName} { set SortOrderSeparatorFile [tk_getOpenFile]; if {$SortOrderSeparatorFile == ""} { ShowMessage [_ "File selection aborted."] return } else { $KeyName.sos.bot.ent delete 0 end $KeyName.sos.bot.ent insert insert $SortOrderSeparatorFile; } } proc MsortAvailableP {} { if {[string length [auto_execok msort]]} { return 1; } return 0; } proc FindoutMsortVersion {} { catch {exec msort -v} vline return [lindex [split [lindex [split $vline "\n"] 0]] 1] } #Because of the strangeness needed in ExecuteMsort, this constructs everything #except for the diversion of stdout to the output file. proc ConstructCommandLine {} { global KeyMap; set cl [list msort]; #Global flags lappend cl "-q"; lappend cl "-a" switch -- $::SortAlgorithm { i { lappend cl "i" } m { lappend cl "m" } q { lappend cl "q" } s { lappend cl "s" } } if {$::GlobalInversionP == 1} { lappend cl "-I"; } if {$::BMPOnlyP == 1} { lappend cl "-B"; } if {$::ReservePrivateUseAreasP == 1} { lappend cl "-p"; } if {$::EOLCarriageReturnP} { lappend cl "-m"; } if {$::RecordParse == 0} { lappend cl "-l"; } elseif {$::RecordParse ==2} { set rs [GetRecordSeparator]; if {[string equal $rs ""] ==0} { lappend cl "-r" lappend cl $rs; } } elseif {$::RecordParse ==3} { lappend cl "-O" lappend cl [.gen.ctr.rp.fl.len get] } if {$::WholeRecordIsKeyP} { lappend cl "-w"; } else { set fs [GetFieldSeparator]; if {[string equal $fs ""] ==0} { lappend cl "-d" lappend cl $fs } } lappend cl "-u"; switch -- $::UnicodeNormalization { 0 { lappend cl "n"; } 1 { lappend cl "c"; } 2 { lappend cl "d"; } 3 { lappend cl "C"; } 4 { lappend cl "D"; } } if {[string length $::Opts(RandomSeed)] != 0} { lappend cl "-P" lappend cl $::Opts(RandomSeed) } #Key specific flags for {set i 1} {$i <= $::KeyCount} {incr i} { set hd $KeyMap($i); if {$::WholeRecordIsKeyP == 0} { if {$::KeyInfo(KeySelection,$hd) == 0} { set p1 [$hd.key.ki.pos.posent.fldent1 get] set p2 [$hd.key.ki.pos.posent.fldent2 get] set c1 [$hd.key.ki.pos.posent.chrent1 get] set c2 [$hd.key.ki.pos.posent.chrent2 get] if {[string equal $p1 ""]} { ShowMessage [format [_ "No start field has been specified for key %d"] $i]; return; } if {[string equal $p2 ""]} { ShowMessage [format [_ "No end field has been specified for key %d"] $i]; return; } lappend cl "-n" set keyrange $p1 if {![string equal $c1 ""]} { append keyrange .$c1 } if {$p1 != $p2} { append keyrange ,$p2 if {![string equal $c2 ""]} { append keyrange .$c2 } } lappend cl $keyrange } elseif {$::KeyInfo(KeySelection,$hd) == 1} { set t [$hd.key.ki.pos.tagent get]; if {[string equal $t ""] == 0} { lappend cl "-t" lappend cl $t } else { ShowMessage [format [_ "No tag has been specified for key %d"] $i]; return; } } else { set first [$hd.key.ki.pos.firstent get]; set last [$hd.key.ki.pos.lastent get]; if { ([string equal $first ""] == 0) && ([string equal $last "" ] == 0)} { lappend cl "-e" lappend cl [format "%d,%d" $first $last] } else { ShowMessage [format [_ "No character range has been specified for key %d"] $i]; return; } } } lappend cl "-c"; switch -- $::KeyInfo(SortType,$hd) { 1 { lappend cl "l"; } 2 { lappend cl "s"; } 3 { lappend cl "n"; lappend cl "-y" lappend cl $::KeyInfo(NumberSystem,$hd) } 4 { lappend cl "t"; } 5 { lappend cl "d"; lappend cl "-f"; lappend cl $::KeyInfo(DateFormat,$hd); } 6 { lappend cl "i"; } 7 { lappend cl "h"; } 8 { lappend cl "r"; } 9 { lappend cl "a"; } 10 { lappend cl "N"; } 11 { lappend cl "m"; } 12 { lappend cl "D"; } } if { ($::KeyInfo(StripDiacriticsP,$hd)) || \ ($::KeyInfo(ConvertEnclosuresP,$hd)) || \ ($::KeyInfo(ConvertStylisticP,$hd)) } { lappend cl "-T" set arg ""; if {$::KeyInfo(StripDiacriticsP,$hd)} { append arg d } if {$::KeyInfo(ConvertEnclosuresP,$hd)} { append arg e } if {$::KeyInfo(ConvertStylisticP,$hd)} { append arg s } lappend cl $arg } if {$::KeyInfo(FoldCaseP,$hd)} { set type $::KeyInfo(SortType,$hd) if { ($type == 1) || ($type == 2) || ($type ==7)} { lappend cl "-C" } else { ShowMessage [_ "Case-folding is not compatible with this comparison type."] } } if {$::KeyInfo(FirstCharOnlyP,$hd)} { set type $::KeyInfo(SortType,$hd) if {$type == 1} { lappend cl "-A" } else { ShowMessage [_ "Use of only the first character is not compatible with this comparison type."] } } if {$::KeyInfo(TurkicFoldCaseP,$hd)} { set type $::KeyInfo(SortType,$hd) if { ($type == 1) || ($type == 2) || ($type ==7)} { lappend cl "-z" } else { ShowMessage [_ "Case-folding is not compatible with this comparison type."] } } if {$::KeyInfo(ReverseKeyP,$hd)} { if {$::KeyInfo(SortType,$hd) == 1} { lappend cl "-R" } } if {$::KeyInfo(LocalInversionP,$hd)} { lappend cl "-i" } if {$::KeyInfo(OptionalP,$hd)} { lappend cl "-o"; switch -- $::KeyInfo(OptComp,$hd) { -1 {lappend cl "l"} 0 {lappend cl "e"} 1 {lappend cl "g"} } } set f [GetSortOrderSeparatorFile $hd]; if {[string equal $f ""] ==0} { lappend cl "-W" lappend cl $f; } set f [GetExclusionFile $hd]; if {[string equal $f ""] ==0} { lappend cl "-x" lappend cl $f; } set f [GetSubstitutionFile $hd]; if {[string equal $f ""] ==0} { lappend cl "-S" lappend cl $f; } switch -exact -- $::KeyInfo(SortOrderSpecType,$hd) { 1 { set l [GetLocale $hd]; lappend cl "-s" lappend cl $l; } 2 { set f [GetSortOrderFile $hd]; lappend cl "-s" lappend cl $f; } } } lappend cl "<"; set inf [.gen.ctr.if.ent get] if {[string equal $inf ""]} { ShowMessage [_ "No input file has been specified. You must supply one."] return "err"; } if {[file exists $inf] == 0} { ShowMessage [format [_ "Input file \`%s\' does not exist."] $inf] return "err"; } if {[file readable $inf] == 0} { ShowMessage [format [_ "Input file \`%s\' is not readable."] $inf] return "err"; } lappend cl $inf; set outf [.gen.ctr.of.ent get] if {[string equal $outf ""]} { ShowMessage [_ "No output file has been specified. You must supply one."] return "err"; } if {[file exists $outf]} { if {[file writable $outf] == 0} { ShowMessage [format [_ "Output file \`%s\' is not writable."] $outf] return "err"; } } return [join $cl]; } #Returns a list containing the record count and the number of comparisons. proc GetLogInfo {} { if {[catch {open "msort.log" "r"} mlh ] != 0} { ShowMessage [_ "Mysterious failure to open msort log file."]; return -1; } set LineCount 0; while { [gets $mlh line] >= 0} { incr LineCount; lappend log $line; } if {$LineCount < 1} { error; } set Penult [lindex $log [expr $LineCount -2]]; if {[scan $Penult "Records written:[ ]%s" Records] < 1} { ShowMessage [_ "Unable to obtain record count from msort log."] set Records -1; } set Antepenult [lindex $log [expr $LineCount -3]]; if {[scan $Antepenult "\tComparisons:[ ]%s" Comparisons] < 1} { ShowMessage [_ "Unable to obtain comparison count from msort log."] set Comparisons -1; } set Preantepenult [lindex $log [expr $LineCount -4]]; if {[scan $Preantepenult "\tRandom number generator seed:[ ]%s" RandomSeed] < 1} { ShowMessage [_ "Unable to obtain random number generator seed from msort log."] } else { set ::Opts(RandomSeed) $RandomSeed } close $mlh; return [list [string trim $Records] [string trim $Comparisons]]; } set ElapsedTime 0; set StdoutResult ""; proc MsortPipeEvent {PipeHandle Start} { global ElapsedTime global StdoutResult if {[eof $PipeHandle]} { set ElapsedTime [expr {[clock seconds] - $Start}] catch {[close $PipeHandle]}; } else { set StdoutResult [read $PipeHandle] } } set msortpid 0; proc ExecuteMsort {} { set ::SortAbortedP 0; ClearMessageWindow; file delete msort.log set cl [ConstructCommandLine] if {[string match msort* $cl] == 0} { if {[string equal $cl ""]} { ShowMessage [_ "Obligatory information is missing: cannot sort."]; } return ; } set cl [split $cl]; lappend cl "2>" lappend cl "/dev/null" set ::SortInProgressP 1; set StartTime [clock seconds] set ::LastExecutionTime $StartTime; catch {open "|$cl" "r"} PipeID; fileevent $PipeID readable [list MsortPipeEvent $PipeID $StartTime] set ::msortpid [lindex [pid $PipeID] 0] tkwait variable ::ElapsedTime; set ::SortInProgressP 0; if {$::SortAbortedP} {return} catch {GetLogInfo} LogInfo; if {[info exists LogInfo]} { set Records [lindex $LogInfo 0]; set Comparisons [lindex $LogInfo 1]; } else { set Records -1; set Comparisons -1; } set msg ""; if {$Records >= 0} { lappend msg [format [_ "Records: %s"] $Records]; if {$Comparisons >= 0} { lappend msg [format [_ " Comparisons: %s"] $Comparisons]; } } lappend msg [format [_ " Elapsed time: %d seconds"] $::ElapsedTime]; if {[string equal $::errorCode "NONE"] == 0} { set spec [split $::errorCode] switch -exact -- [lindex $spec 0] { CHILDSTATUS { set MsortErrorCode [lindex $spec 2]; lappend msg [_ $::MsortErrors($MsortErrorCode)]; } POSIX { lappend msg [lindex $spec 2] } } } ShowMessage [join $msg]; set OutputFile [.gen.ctr.of.ent get]; if {[catch {open $OutputFile "w"} OutputHandle ] != 0} { ShowMessage [format [_ "Unable to open file %s."] $OutputFile]; return ; } puts -nonewline $OutputHandle $::StdoutResult close $OutputHandle; } proc ExplicateErrorStatus {} { global FeatureTestDebugP; global FeatureTestLogHandle; switch -exact -- [lindex $::errorCode 0] { CHILDKILLED { foreach { - pid sigName msg } $::errorCode break if {$FeatureTestDebugP} { puts $FeatureTestLogHandle [format "Child process %d died on signal %s" $pid $sigName]; puts $FeatureTestLogHandle [format "Error message: %s" $msg]; } } CHILDSTATUS { foreach { - pid code } $::errorCode break if {$FeatureTestDebugP} { puts $FeatureTestLogHandle [format "Child process %d exited with error code %d" $pid $code]; } } CHILDSUSP { foreach { - pid sigName msg } $::errorCode break if {$FeatureTestDebugP} { puts $FeatureTestLogHandle [format "Child process %d has been suspended due to signal %d" $pid $sigName]; puts $FeatureTestLogHandle [format "Error message: %s" $msg]; } } POSIX { foreach { - errName msg } $::errorCode break if {$FeatureTestDebugP} { puts $FeatureTestLogHandle [format "One of the kernel calls to launch the command failed ith error code %d" $code]; puts $FeatureTestLogHandle [format "Error message: %s" $msg]; } } } } array set MsortErrors { 1 "Failed to open file"\ 2 "I/o error"\ 3 "Not really an error - provided information"\ 4 "Limit exceeded"\ 5 "Command line option not recognized"\ 6 "Invalid argument to command line option"\ 7 "Out of memory"\ 8 "Ill-formed record"\ 9 "Other error" } proc AbortSort {} { if {$::SortInProgressP} { if {[string equal $::System MSWindows] == 0} { catch {[exec kill -9 $::msortpid]} set ::SortAbortedP 1; ShowMessage [_ "Sort aborted."] } else { ShowMessage [_ "Sorry, this must be an MS Windows system."]; } } else { ShowMessage [_ "No sort is in progress."] } } proc SaveCommandLine {} { set cl [ConstructCommandLine]; if {[string match msort* $cl] == 0} { if {[string equal $cl ""]} { ShowMessage [_ "Failed to construct command line."] } return ; } set outf [.gen.ctr.of.ent get] set cl [split $cl]; lappend cl ">" lappend cl $outf set cl [join $cl]; set SaveFile [tk_getSaveFile -initialfile [_ "SavedMsortCommandLine"]]; if {$SaveFile == ""} { ShowMessage [_ "File selection cancelled."] return ; } if {[catch {open $SaveFile "w"} SaveHandle ] != 0} { ShowMessage [format [_ "Unable to open file %s."] $SaveFile]; return ; } puts $SaveHandle $cl; close $SaveHandle; set ::LastCommandLineSaveTime [clock seconds]; } proc ShowCommandLine {} { set cl [ConstructCommandLine]; if {[string match msort* $cl] == 0} { if {[string equal $cl ""]} { ShowMessage [_ "Failed to construct command line."] } return ; } else { set outf [.gen.ctr.of.ent get] set cl [split $cl]; lappend cl ">" lappend cl $outf ShowMessage [join $cl]; } } proc InsertClipboardContents {w} { set sel ""; if {[catch {set sel [selection get -selection CLIPBOARD -type UTF8_STRING]}]} { ShowMessage [_ "The clipboard is empty."]; return; } else { $w insert insert $sel; } } #If the filename passed as argument is a pathname #leading to a file in the current working directory, #return just the basename+extension. Otherwise #return the argument. proc MinimizeFileName {s} { set cwd [pwd]; set sdir [file dirname $s] if {[string equal $cwd $sdir]} { return [file tail $s] } else { return $s; } } proc SelectInputFile {} { set InputFile [tk_getOpenFile]; if {$InputFile == ""} { ShowMessage [_ "File selection aborted."] return } else { .gen.ctr.if.ent delete 0 end .gen.ctr.if.ent insert 0 [MinimizeFileName $InputFile] } } proc SelectOutputFile {} { set OutputFile [tk_getSaveFile -initialfile [_ "SortOutput"]]; if {$OutputFile == ""} { ShowMessage [_ "File selection aborted."] return } else { .gen.ctr.of.ent delete 0 end .gen.ctr.of.ent insert 0 [MinimizeFileName $OutputFile] } } array set DefaultKeyBindings { "" AbortSort "" ToggleIPAD "" ToggleBalloonHelp "" ToggleIPAC "" DescribeKeyBindings "" ToggleIPAV }; if {[string equal $tcl_platform(platform) "unix"]} { set DefaultKeyBindings() AbortSort; } proc SetCommandGlosses {} { global CommandGlosses; set Pairs [list\ AbortSort "[_ "Abort the currently running msort job"]"\ ToggleIPAC "[_ "Toggle the IPA consonant entry widget."]"\ ToggleIPAV "[_ "Toggle the IPA vowel entry widget."]"\ ToggleBalloonHelp "[_ "Toggle Balloon Help"]"\ DescribeKeyBindings "[_ "Toggle Key Binding Help"]"\ ToggleIPAD "[_ "Toggle the IPA diacritic entry widget."]"] array set CommandGlosses $Pairs; } proc BindKeys {w {bl DefaultKeyBindings}} { upvar \#0 $bl kb; foreach KeySeq [array names kb] { bind $w $KeySeq $kb($KeySeq); } } proc DescribeKeyBindings {{bl DefaultKeyBindings}} { global CommandGlosses; upvar \#0 $bl kb; if {[PopupDown KeyBindings] ==1} {return} set po [CreateTextDisplay [_ "Key Bindings"] 88 6] BindKeys $po; set ::PopupList(KeyBindings) $po; #Invert array and get maximum length of gloss while we are at it. set MaxGlossLength 0; foreach KeySeq [array names kb] { set Gloss $CommandGlosses($kb($KeySeq)); set GlossLength [string length $Gloss]; if {$MaxGlossLength < $GlossLength} {set MaxGlossLength $GlossLength} set GlossToKeySeq($Gloss) $KeySeq; } #Now generate entries in alphabetical order of command glosses foreach Gloss [lsort [array names GlossToKeySeq]] { AppendToTextDisplay $po [format "%-*s\t%s\n" $MaxGlossLength $Gloss $GlossToKeySeq($Gloss)]; } } set bhInfo(active) 1 proc balloonhelp_control {state} { global bhInfo if {$state} { set bhInfo(active) 1 } else { balloonhelp_cancel set bhInfo(active) 0 } } proc balloonhelp_for {win mesg} { global bhInfo set bhInfo($win) $mesg set ::bhOverlapP($win) 1; bind $win {+balloonhelp_pending %W} bind $win {+balloonhelp_cancel} } proc balloonhelpd_for {win mesg} { global bhInfo set ::bhOverlapP($win) 0; set bhInfo($win) $mesg bind $win {+balloonhelp_show %W} } proc balloonhelp_pending {win} { global bhInfo balloonhelp_cancel set bhInfo(pending) [after 1000 [list balloonhelp_show $win]] } proc balloonhelp_cancel {} { global bhInfo if { [info exists bhInfo(pending)]} { after cancel $bhInfo(pending) unset bhInfo(pending) } if {[winfo exists .balloonhelp]} { wm withdraw .balloonhelp } } proc balloonhelp_show {win} { global bhInfo; global bhOverlapP; if {$bhOverlapP($win)} { set Overlap 25; } else { set Overlap -10; } if {[winfo exists $win]} { if {$bhInfo(active)} { .balloonhelp.info configure -text $bhInfo($win) #Set abcissa set MaxStringWidth 0; foreach line [split $bhInfo($win) "\n"] { set StringWidth [font measure BalloonHelpFont -displayof .balloonhelp.info $line] if {$StringWidth > $MaxStringWidth} { set MaxStringWidth $StringWidth; } } set ScreenWidth [winfo screenwidth $win] set Width [winfo width $win]; set LeftEdge [winfo rootx $win]; set RightEdge [expr $LeftEdge + $Width]; if {$ScreenWidth - $RightEdge < $MaxStringWidth} { if {$LeftEdge > $MaxStringWidth} { set x [expr $LeftEdge - $MaxStringWidth + $Overlap]; } else { if {$ScreenWidth - $MaxStringWidth > 0} { set x [expr $RightEdge - $MaxStringWidth]; } else { set x [expr $ScreenWidth - $MaxStringWidth]; } } } else { set x [expr $RightEdge - $Overlap]; } #Set ordinate set Height [winfo height $win]; set TopEdge [winfo rooty $win]; set y [expr $TopEdge + ($Height/2)]; wm geometry .balloonhelp +$x+$y wm deiconify .balloonhelp raise .balloonhelp } } if {[info exist bhInfo(pending)]} { unset bhInfo(pending) } } proc ToggleBalloonHelp {} { global BalloonHelpP; global BalloonHelpIndex; global m; if {$BalloonHelpP} { set BalloonHelpP 0; balloonhelp_control 0 ShowMessage [_ "Irritating Balloon Help Disabled"]; $m.configure entryconfigure $BalloonHelpIndex -label [_ "Enable Balloon Help"]; } else { set BalloonHelpP 1; balloonhelp_control 1 ShowMessage [_ "Balloon Help Enabled"]; $m.configure entryconfigure $BalloonHelpIndex -label [_ "Disable Irritating Balloon Help"]; } } proc new_dialog_create {class {win "auto"}} { if {$win == "auto"} { set count 0 set win ".ndialog[incr count]" while {[winfo exists $win]} { set win ".ndialog[incr count]" } } toplevel $win -class $class; frame $win.info pack $win.info -expand yes -fill both -padx 4 -pady 4 wm title $win $class wm group $win . after idle [format { update idletasks wm minsize %s [winfo reqwidth %s] [winfo reqheight %s] } $win $win $win] return $win } # The following code is taken from the Efftcl library by Mark Harrison and # Michael McLennan, copyrighted by Mark Harrison and Lucent Technologies, available # from http://www.awprofessional.com/content/images/0201634740/sourcecode/efftcl.zip. # As the authors explicitly give permission to "steal the code for your own applications" # the relevant portions are included here so as not to require the user to install # to install the library. If you install the library, remove the following and # uncomment the line "#package require Efftcl" by deleting the crosshatch. # Effective Tcl/Tk Programming # Mark Harrison, DSC Communications Corp. # Michael McLennan, Bell Labs Innovations for Lucent Technologies # Addison-Wesley Professional Computing Series # ====================================================================== # Copyright (c) 1996-1997 Lucent Technologies Inc. and Mark Harrison # ====================================================================== proc dialog_create {class {win "auto"}} { if {$win == "auto"} { set count 0 set win ".dialog[incr count]" while {[winfo exists $win]} { set win ".dialog[incr count]" } } toplevel $win -class $class -background \#2200DD; frame $win.info pack $win.info -expand yes -fill both -padx 4 -pady 4 frame $win.sep -height 2 -borderwidth 1 -relief sunken pack $win.sep -fill x -pady 4 frame $win.controls pack $win.controls -fill x -padx 4 -pady 1 wm title $win $class wm group $win . after idle [format { update idletasks wm minsize %s [winfo reqwidth %s] [winfo reqheight %s] } $win $win $win] return $win } proc dialog_info {win} { return "$win.info" } proc dialog_controls {win} { return "$win.controls" } proc dialog_wait {win varName} { dialog_safeguard $win set x [expr [winfo rootx .]+50] set y [expr [winfo rooty .]+50] wm geometry $win "+$x+$y" wm deiconify $win grab set $win vwait $varName grab release $win wm withdraw $win } bind modalDialog { wm deiconify %W raise %W } proc dialog_safeguard {win} { if {[lsearch [bindtags $win] modalDialog] < 0} { bindtags $win [linsert [bindtags $win] 0 modalDialog] } } proc CreateTextDisplay {title width height {bg "\#96C4A3"} {fg "\#000000"} } { set top [new_dialog_create Textdisplay] wm title $top $title set info [dialog_info $top] scrollbar $info.sbar -command "$info.text yview" bind $info.sbar <> "ScrollbarMoveBigIncrement $info.sbar 0.20 %x %y" pack $info.sbar -side right -fill y text $info.text -height $height -width $width -font UserTechnicalTextFont \ -wrap word -yscrollcommand "$info.sbar set" \ -background $bg -foreground $fg -exportselection 1; pack $info.text -side left -expand yes -fill both $info.text configure -state disabled return $top } proc AppendToTextDisplay {top mesg} { set info [dialog_info $top] $info.text configure -state normal $info.text insert end $mesg $info.text configure -state disabled } set linkNum 0; proc AppendLinkToTextDisplay {top mesg LinkCode} { global linkNum set info [dialog_info $top] $info.text configure -state normal set tag "link[incr linkNum]" bind $info.text break $info.text insert end $mesg [list body $tag] $info.text tag configure $tag -foreground red -underline 1 $info.text tag bind $tag \ "$info.text tag configure $tag -foreground blue" $info.text tag bind $tag \ "$info.text tag configure $tag -foreground red" $info.text tag bind $tag \ "$LinkCode" $info.text configure -state disabled } proc About {} { global Version; global PackageVersion; if {[PopupDown About] ==1} {return} set po [CreateTextDisplay [_ "About"] 55 8]; BindKeys $po set ::PopupList(About) $po AppendToTextDisplay $po [format [_ "This is msg version %s."] $Version]; AppendToTextDisplay $po [format [_ " It is part of the msort package, version %s."] $PackageVersion]; AppendToTextDisplay $po " It is a graphical front end to Msort, a sophisticated sorting program. In order for it to be of any use, you must have Msort installed."; AppendToTextDisplay $po " You can obtain both Msort and Msg from:\n"; AppendLinkToTextDisplay $po "http://www.billposer.org/Software/msort.html" {ShowWebPage http://www.billposer.org/Software/msort.html}; AppendToTextDisplay $po "\n"; AppendToTextDisplay $po "Both programs were written by Bill Poser (billposer@alum.mit.edu)."; AppendToTextDisplay $po "\n"; } proc BugReports {} { global Version; global tcl_platform; if {[PopupDown BugReports] ==1} {return} set po [CreateTextDisplay [_ "Bug Reports"] 50 21]; BindKeys $po set ::PopupList(BugReports) $po AppendToTextDisplay $po [_ "Report bugs to: billposer@alum.mit.edu.\n"]; AppendToTextDisplay $po [_ "Please include the following information:\n\n"]; AppendToTextDisplay $po [_ "\tWhat version of the program are you using?\n"]; AppendToTextDisplay $po [format [_ "\t\t(This is version %s.)\n\n"] $Version]; AppendToTextDisplay $po [_ "\tWhat version of msort are you using?\n"]; AppendToTextDisplay $po [format [_ "\t\t(Version located: %s.)\n\n"] [FindoutMsortVersion]]; AppendToTextDisplay $po [_ "\tWhat operating system are you running?.\n"]; set OS $tcl_platform(os); if {$OS == "Linux"} {set OS "GNU/Linux"}; AppendToTextDisplay $po [format [_ "\t\t(This is %s %s.)\n\n"] $OS $tcl_platform(osVersion)]; AppendToTextDisplay $po [_ "\tWhat window system are you using?.\n"]; AppendToTextDisplay $po [format [_ "\t\t(This is %s.)\n\n"] $::WindowSystem] AppendToTextDisplay $po [_ "\tWhat version of tcl/tk are you using?.\n"]; AppendToTextDisplay $po [format [_ "\t\t(This is version %s.)\n\n"] [info patchlevel]]; AppendToTextDisplay $po [_ "Bug reports may be sent in any language that I can read without too much trouble or am trying to learn or improve. These include:\n\n"]; AppendLinkToTextDisplay $po [_ "\tCatalan"] {ShowWebPage http://www.ethnologue.com/show_language.asp?code=cat}; AppendToTextDisplay $po "\n"; AppendLinkToTextDisplay $po [_ "\tDakelh (Carrier)"] {ShowWebPage http://ydli.org} AppendToTextDisplay $po "\n"; AppendLinkToTextDisplay $po [_ "\tDutch"] {ShowWebPage http://www.ethnologue.com/show_language.asp?code=nld}; AppendToTextDisplay $po "\n"; AppendLinkToTextDisplay $po [_ "\tEnglish"] {ShowWebPage http://www.ethnologue.com/show_language.asp?code=eng}; AppendToTextDisplay $po "\n"; AppendLinkToTextDisplay $po [_ "\tEsperanto"] {ShowWebPage http://www.ethnologue.com/show_language.asp?code=epo}; AppendToTextDisplay $po "\n"; AppendLinkToTextDisplay $po [_ "\tFrench"] {ShowWebPage http://www.ethnologue.com/show_language.asp?code=fra}; AppendToTextDisplay $po "\n"; AppendLinkToTextDisplay $po [_ "\tGerman"] {ShowWebPage http://www.ethnologue.com/show_language.asp?code=deu}; AppendToTextDisplay $po "\n"; AppendLinkToTextDisplay $po [_ "\tItalian"] {ShowWebPage http://www.ethnologue.com/show_language.asp?code=ita}; AppendToTextDisplay $po "\n"; AppendLinkToTextDisplay $po [_ "\tJapanese"] {ShowWebPage http://www.ethnologue.com/show_language.asp?code=jpn}; AppendToTextDisplay $po "\n"; AppendLinkToTextDisplay $po [_ "\tKazakh"] {ShowWebPage http://www.ethnologue.com/show_language.asp?code=kaz}; AppendToTextDisplay $po "\n"; AppendLinkToTextDisplay $po [_ "\tKorean"] {ShowWebPage http://www.ethnologue.com/show_language.asp?code=kor}; AppendToTextDisplay $po "\n"; AppendLinkToTextDisplay $po [_ "\tLatin"] {ShowWebPage http://www.ethnologue.com/show_language.asp?code=lat}; AppendToTextDisplay $po "\n"; AppendLinkToTextDisplay $po [_ "\tPanjabi"] {ShowWebPage http://www.ethnologue.com/show_language.asp?code=pan}; AppendToTextDisplay $po "\n"; AppendLinkToTextDisplay $po [_ "\tPortuguese"] {ShowWebPage http://www.ethnologue.com/show_language.asp?code=por}; AppendToTextDisplay $po "\n"; AppendLinkToTextDisplay $po [_ "\tSpanish"] {ShowWebPage http://www.ethnologue.com/show_language.asp?code=spa}; AppendToTextDisplay $po "\n"; AppendLinkToTextDisplay $po [_ "\tTurkish"] {ShowWebPage http://www.ethnologue.com/show_language.asp?code=tur}; AppendToTextDisplay $po "\n"; AppendToTextDisplay $po "Please note that in many cases although I can understand the language my ability to respond in it may be limited.\n"; AppendToTextDisplay $po "\n"; } proc HowTo {} { if {[PopupDown HowTo] ==1} {return} set po [CreateTextDisplay [_ "HowTo"] 55 20]; BindKeys $po set ::PopupList(HowTo) $po AppendToTextDisplay $po "\n"; AppendToTextDisplay $po [_ "This program provides a graphical interface to msort, a sophisticated and flexible sorting program. It helps you to choose the right options to obtain the output that you desire. For full details, see the Msort Reference Manual, which provides a description of the sorting process as well as details of the program.\n"]; AppendToTextDisplay $po "\n"; AppendToTextDisplay $po [_ "The display consists of a number of regions. The first few are the same on every page. At the top (unless you are using a Macintosh) is the menubar. Next (or first, on a Macintosh) comes the Message REgion. This is where Msg prints messages to you. Immediately below the Message Region is a row of two or more buttons used to select the page to work on. What follows depends on whether you are working on the General page or on a key-specific page.\n"]; AppendToTextDisplay $po "\n"; AppendToTextDisplay $po [_ "Msg provides two kinds of pages. The first page that you see is for general settings, that is, settings that are not particular to a specific key. You can always get back to this page by clicking on the General button in the region just below the message region. The General button is always the leftmost button. Following the General button are one or more buttons labelled with key numbers, e.g. \`Key 1\'. When Msg starts up, one such button is already present since you cannot sort without at least one key. If you need to use more than one key, you can add key pages by clicking on the Add Key button in the menubar. If you decide that you don't need that many keys, you can remove keys by clicking on the Remove Last Key button. You can tell which key you are working on by looking at the label on the highlighted page selection button.\n"]; AppendToTextDisplay $po "\n"; AppendToTextDisplay $po [_ "The General page is used to set parameters that are not key-specific. You must provide the name of the input file (the file whose contents you wish to sort) and the name of the file in which to put the results of the sort. You must also decide how the input is to be divided into records and how each record is to be divided into fields. This page also provides the option of inverting the overall order of the output.\n"]; AppendToTextDisplay $po "\n"; AppendToTextDisplay $po [_ "The key-specific pages allow you to specify how to locate the field that contains the key and to determine various details of the sort, such as what sort order to use and whether to sort lexicographically or numerically. Msort provides a number of useful but unusual options, so you may wish to explore what it provides.\n"]; AppendToTextDisplay $po "\n"; AppendToTextDisplay $po [_ "Information about particular aspects of a page comes in two main forms. First, if you leave the mouse pointer over a region for a short time, a help balloon will pop up. Help balloons provide a short explanation of the function of the region. (Once you are familiar with the program, you may find help balloons irritating. You can disable them by means of a command on the Help menu.) Second, in many cases more detailed information is available by clicking the right mouse button. (On a MacIntosh, clicking while depressing the Control key should be equivalent.) Right-clicking again in the same region will remove the popup.\n"]; AppendToTextDisplay $po "\n"; AppendToTextDisplay $po [_ "When you have set the necessary parameters, you can execute the sort by pressing the sort button on the menubar. If you are familiar with the msort command line, you can see what command Msg will execute by selecting the command Show Command Line on the File menu. If you want to save the command line for future use, you can copy it to a file by selecting the command Save Command Line from the File Menu.\n"]; AppendToTextDisplay $po "\n"; } proc ShowGPL {} { if {[PopupDown ShowGPL] ==1} {return} set po [CreateTextDisplay [_ "License"] 70 24] set ::PopupList(ShowGPL) $po; BindKeys $po; AppendToTextDisplay $po [format "%s%s" [format "%s\n\t%s\n" [_ "For this license in your language see:"] [_ "http://www.gnu.org/copyleft/gpl.html"]] "\ \ GNU GENERAL PUBLIC LICENSE\ Version 3, 29 June 2007\ Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. \ Preamble \ The GNU General Public License is a free, copyleft license for software and other kinds of works. \ The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. \ When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. \ To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. \ For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. \ Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. \ For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. \ Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. \ Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. \ The precise terms and conditions for copying, distribution and modification follow. \ TERMS AND CONDITIONS \ 0. Definitions. \ \"This License\" refers to version 3 of the GNU General Public License. \ \"Copyright\" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. \ \"The Program\" refers to any copyrightable work licensed under this License. Each licensee is addressed as \"you\". \"Licensees\" and \"recipients\" may be individuals or organizations. \ To \"modify\" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a \"modified version\" of the earlier work or a work \"based on\" the earlier work. \ A \"covered work\" means either the unmodified Program or a work based on the Program. \ To \"propagate\" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. \ To \"convey\" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. \ An interactive user interface displays \"Appropriate Legal Notices\" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. \ 1. Source Code. \ The \"source code\" for a work means the preferred form of the work for making modifications to it. \"Object code\" means any non-source form of a work. \ A \"Standard Interface\" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. \ The \"System Libraries\" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A \"Major Component\", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. \ The \"Corresponding Source\" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. \ The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. \ The Corresponding Source for a work in source code form is that same work. \ 2. Basic Permissions. \ All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. \ You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. \ Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. \ 3. Protecting Users' Legal Rights From Anti-Circumvention Law. \ No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. \ When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. \ 4. Conveying Verbatim Copies. \ You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. \ You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. \ 5. Conveying Modified Source Versions. \ You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: \ a) The work must carry prominent notices stating that you modified it, and giving a relevant date. \ b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to \"keep intact all notices\". \ c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. \ d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. \ A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an \"aggregate\" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. \ 6. Conveying Non-Source Forms. \ You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: \ a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. \ b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. \ c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. \ d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. \ e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. \ A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. \ A \"User Product\" is either (1) a \"consumer product\", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, \"normally used\" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. \ \"Installation Information\" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. \ If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). \ The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. \ Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. \ 7. Additional Terms. \ \"Additional permissions\" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. \ When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. \ Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: \ a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or \ b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or \ c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or \ d) Limiting the use for publicity purposes of names of licensors or authors of the material; or \ e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or \ f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. \ All other non-permissive additional terms are considered \"further restrictions\" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. \ If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. \ Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. \ 8. Termination. \ You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). \ However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. \ Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. \ Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. \ 9. Acceptance Not Required for Having Copies. \ You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. \ 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. \ An \"entity transaction\" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. \ You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. \ 11. Patents. \ A \"contributor\" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's \"contributor version\". \ A contributor's \"essential patent claims\" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, \"control\" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. \ Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. \ In the following three paragraphs, a \"patent license\" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To \"grant\" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. \ If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. \"Knowingly relying\" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. \ If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. \ A patent license is \"discriminatory\" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. \ Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. \ 12. No Surrender of Others' Freedom. \ If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. \ 13. Use with the GNU Affero General Public License. \ Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. \ 14. Revised Versions of this License. \ The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. \ Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License \"or any later version\" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. \ If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. \ Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. \ 15. Disclaimer of Warranty. \ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. \ 16. Limitation of Liability. \ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. \ 17. Interpretation of Sections 15 and 16. \ If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. "] } set MainKeyFieldIdentBH [_ "How is the field used for this key identified? One possibility\nis by its position in the record. A second is by tag, that is,\na sequence of characters with which the field begins. The third\nis by a range of characters, that is, the characters in certain\npositions constitute the key."] set DisabledKeyFieldIdentBH [_ "This area is used to specify how to select the key field.\nIt is currently disabled since you have chosen\nto use the entire record as the sort key."] proc DisableKeyFieldID {hd} { $hd.key.ki.pos.rdb1 configure -state disabled $hd.key.ki.pos.rdb2 configure -state disabled $hd.key.ki.pos.rdb3 configure -state disabled $hd.key.ki.pos.posent.fldent1 configure -state disabled $hd.key.ki.pos.tagent configure -state disabled $hd.key.ki.pos.firstent configure -state disabled $hd.key.ki.pos.lastent configure -state disabled balloonhelp_for $hd.key.ki $::DisabledKeyFieldIdentBH; balloonhelp_for $hd.key.ki.pos.posent.fldent1 $::DisabledKeyFieldIdentBH; balloonhelp_for $hd.key.ki.pos.tagent $::DisabledKeyFieldIdentBH; balloonhelp_for $hd.key.ki.pos.firstent $::DisabledKeyFieldIdentBH; balloonhelp_for $hd.key.ki.pos.lastent $::DisabledKeyFieldIdentBH; } proc EnableKeyFieldID {hd} { $hd.key.ki.pos.rdb1 configure -state normal $hd.key.ki.pos.rdb2 configure -state normal $hd.key.ki.pos.rdb3 configure -state normal balloonhelp_for $hd.key.ki $::MainKeyFieldIdentBH; balloonhelp_for $hd.key.ki.pos.rdb1 [_ "A position specification consists of a single position or\na contiguous range of positions specified by their beginning\nand end. A position consists of a field number together with\na character offset. Field numbers, but not character offsets,\nmay be negative, in which case the count is from the right."] balloonhelp_for $hd.key.ki.pos.posent.fldent1 [_ "Enter the field number here."] balloonhelp_for $hd.key.ki.pos.posent.fldent2 [_ "Enter the field number here."] balloonhelp_for $hd.key.ki.pos.posent.chrent1 [_ "Enter the character offset here."] balloonhelp_for $hd.key.ki.pos.posent.chrent2 [_ "Enter the character offset here."] balloonhelp_for $hd.key.ki.pos.tagent [_ "Enter the tag regular expression here."] balloonhelp_for $hd.key.ki.pos.firstent [_ "Enter the index of the first character in the range\n(starting from 1) here. Negative numbers may be used\nto count from the end."] balloonhelp_for $hd.key.ki.pos.lastent [_ "Enter the index of the last character in the range\n(starting from 1) here. Negative numbers may be used\nto count from the end."] } proc PackGen {} { set genxpadl {12 8} set genxpadr {8 12} set genypadi 5 set genypadt {8 5} set genypadb {5 8} grid forget .gen.ctr.rp grid forget .gen.ctr.wr grid forget .gen.ctr.parckb grid forget .gen.ctr.gi grid forget .gen.ctr.eol grid forget .gen.ctr.miscckb grid forget .gen.ctr.bmp grid forget .gen.ctr.pua grid forget .gen.ctr.un grid forget .gen.ctr.unickb grid forget .gen.ctr.rns grid forget .gen.ctr.rnsckb grid forget .gen.ctr.al grid forget .gen.ctr.alckb grid forget .gen.ctr.if grid forget .gen.ctr.of grid forget .gen.ctr.parf grid forget .gen.ctr.miscf grid forget .gen.ctr.alf grid forget .gen.ctr.unif grid forget .gen.ctr.rnsf grid forget .gen.ctr.iff grid forget .gen.ctr.off set Row 0; if {$::RecordParseDisplayedP} { grid .gen.ctr.rp -row $Row -column 0 -sticky wens -pady $genypadt -padx $genxpadl grid .gen.ctr.wr -row $Row -column 1 -sticky wens -pady $genypadt -padx $genxpadr grid .gen.ctr.parckb -row $Row -column 2 -sticky e -pady $genypadb -padx $genxpadl } else { grid .gen.ctr.parf -row $Row -column 0 -sticky wens -pady $genypadb -padx $genxpadl \ -columnspan 3 } incr Row if {$::UnicodeDisplayedP} { grid .gen.ctr.bmp -row $Row -column 0 -sticky wens -pady $genypadi -padx $genxpadl grid .gen.ctr.pua -row $Row -column 1 -sticky wens -pady $genypadi -padx $genxpadr grid .gen.ctr.unickb -row $Row -column 2 -sticky e -pady $genypadb -padx $genxpadl } else { grid .gen.ctr.unif -row $Row -column 0 -sticky wens -pady $genypadb -padx $genxpadl \ -columnspan 3 } incr Row if {$::AlgorithmDisplayedP} { grid .gen.ctr.al -row $Row -column 0 -sticky wens -pady $genypadb -padx $genxpadl grid .gen.ctr.un -row $Row -column 1 -sticky wens -pady $genypadi -padx $genxpadr grid .gen.ctr.alckb -row $Row -column 2 -sticky e -pady $genypadb -padx $genxpadl } else { grid .gen.ctr.alf -row $Row -column 0 -sticky wens -pady $genypadb -padx $genxpadl \ -columnspan 3 } incr Row if {$::MiscOptionsDisplayedP} { grid .gen.ctr.gi -row $Row -column 0 -sticky wens -pady $genypadi -padx $genxpadl grid .gen.ctr.eol -row $Row -column 1 -sticky wens -pady $genypadi -padx $genxpadr grid .gen.ctr.miscckb -row $Row -column 2 -sticky e -pady $genypadb -padx $genxpadl } else { grid .gen.ctr.miscf -row $Row -column 0 -sticky wens -pady $genypadb -padx $genxpadl \ -columnspan 3 } incr Row if {$::RandomNumberSeedDisplayedP} { grid .gen.ctr.rns -row $Row -column 0 -sticky wens -pady $genypadi -padx $genxpadl grid .gen.ctr.rnsckb -row $Row -column 2 -sticky e -pady $genypadb -padx $genxpadl } else { grid .gen.ctr.rnsf -row $Row -column 0 -sticky wens -pady $genypadb -padx $genxpadl \ -columnspan 3 } incr Row if {$::InputFileDisplayedP} { grid .gen.ctr.if -row $Row -column 0 -sticky wens -pady $genypadb -padx $genxpadl \ -columnspan 3 } else { grid .gen.ctr.iff -row $Row -column 0 -sticky wens -pady $genypadb -padx $genxpadl \ -columnspan 3 } incr Row if {$::OutputFileDisplayedP} { grid .gen.ctr.of -row $Row -column 0 -sticky wens -pady $genypadb -padx $genxpadl \ -columnspan 3 } else { grid .gen.ctr.off -row $Row -column 0 -sticky wens -pady $genypadb -padx $genxpadl \ -columnspan 3 } pack .gen.ctr -side top -expand 1 -fill x -padx 6 ConfigureGenOne ConfigureGenTwo } proc OldPackGen {} { pack forget .gen.ctr pack forget .gen.sep3 pack .gen.ctr -side top -expand 1 -fill x -padx 6 pack .gen.sep3 -side top -expand 1 -fill x -padx 6 } proc PackKeyPage {hd} { set kpxpd 5 set kpypd 2 set kpfypd 4 pack forget $hd.misco pack forget $hd.exc pack forget $hd.sub pack forget $hd.sos pack forget $hd.so pack forget $hd.st pack forget $hd.key pack forget $hd.miscof pack forget $hd.excf pack forget $hd.subf pack forget $hd.sosf pack forget $hd.sof pack forget $hd.stf pack forget $hd.keyf if {$::KeyInfo(MiscellaneousOptionsDisplayedP,$hd)} { pack $hd.misco -side bottom -expand y -fill x -pady $kpypd -padx $kpxpd } else { pack $hd.miscof -side bottom -expand y -fill x -pady $kpfypd -padx $kpxpd } if {$::KeyInfo(SubstitutionsDisplayedP,$hd)} { pack $hd.sub -side bottom -expand 0 -fill x -pady $kpypd -padx $kpxpd } else { pack $hd.subf -side bottom -expand 0 -fill x -pady $kpfypd -padx $kpxpd } if {$::KeyInfo(ExclusionsDisplayedP,$hd)} { pack $hd.exc -side bottom -expand 0 -fill x -pady $kpypd -padx $kpxpd } else { pack $hd.excf -side bottom -expand 0 -fill x -pady $kpfypd -padx $kpxpd } if {$::KeyInfo(SortOrderSpecType,$hd) == 2} { if {$::KeyInfo(SortOrderDisplayedP,$hd)} { pack $hd.sos -expand y -fill x -side bottom -pady $kpypd -padx $kpxpd } } set SortType $::KeyInfo(SortType,$hd) if {$SortType == 1 || $SortType == 2 || $SortType == 7} { if {$::KeyInfo(SortOrderDisplayedP,$hd)} { pack $hd.so -side bottom -expand 0 -fill both -pady $kpypd -padx $kpxpd } else { pack $hd.sof -side bottom -expand 0 -fill both -pady $kpfypd -padx $kpxpd } } if {$::KeyInfo(SortTypeDisplayedP,$hd)} { pack $hd.st -side bottom -expand 0 -fill both -pady $kpypd -padx $kpxpd } else { pack $hd.stf -side bottom -expand 0 -fill both -pady $kpfypd -padx $kpxpd } if {$::KeyInfo(KeyFieldIdentificationDisplayedP,$hd)} { pack $hd.key -side bottom -expand 0 -fill both -pady $kpypd -padx $kpxpd } else { pack $hd.keyf -side bottom -expand 0 -fill both -pady $kpfypd -padx $kpxpd } } proc ValidatePositionField {w s type action} { if {$s == 0} { ShowMessage [_ "There is no field 0."] focus $w; return 0; } if {[string equal $type focusout]} { if {[string length $s] == 0} { ShowMessage [_ "You must specify a position."] focus $w; return 0; } if {![regexp {^-?[[:digit:]]+$} $s]} { ShowMessage [_ "The field number must be an integer."] focus $w; return 0 } } if {[string equal $type key]} { if {![regexp {^-?[[:digit:]]*$} $s]} { ShowMessage [_ "The field number must be an integer."] focus $w; return 0 } } ClearMessageWindow return 1; } proc ValidatePositionChar {w s type action} { if {$s == 0} { ShowMessage [_ "There is no character 0."] focus $w; return 0; } if {[string equal $type focusout]} { if {[string length $s] == 0} { ShowMessage [_ "You must specify a character offset."] focus $w; return 0; } if {![regexp {^-?[[:digit:]]+$} $s]} { ShowMessage [_ "The character offset must be a positive integer."] focus $w; return 0 } } if {[string equal $type key]} { if {![regexp {^-?[[:digit:]]*$} $s]} { ShowMessage [_ "The character offset must be a positive integer."] focus $w; return 0 } } ClearMessageWindow return 1; } proc ValidateRange {w s type action} { if {[string equal $type focusout]} { if {[string length $s] == 0} { ShowMessage [_ "You must specify a position."] focus $w; return 0; } if {![regexp {^-?[[:digit:]]+$} $s]} { ShowMessage [_ "The position must be an integer."] focus $w; return 0 } } if {[string equal $type key]} { if {![regexp {^-?[[:digit:]]*$} $s]} { ShowMessage [_ "The position must be an integer."] focus $w; return 0 } } ClearMessageWindow return 1; } proc ValidateRandomNumberSeed {w s type action} { if {[string equal $type focusout]} { if {[string length $s] == 0} { return 1; } if {![regexp {^[[:digit:]]+$} $s]} { ShowMessage [_ "The random number seed must be a non-negative integer."] focus $w; return 0 } } if {[string equal $type key]} { if {![regexp {^[[:digit:]]*$} $s]} { ShowMessage [_ "The random number seed must be a non-negative integer."] focus $w; return 0 } } ClearMessageWindow return 1; } proc SetupKey {hd} { set ::KeyInfo(SortOrderSpecType,$hd) 0; set ::KeyInfo(ExclusionsP,$hd) 0; set ::KeyInfo(SubstitutionsP,$hd) 0; set ::KeyInfo(KeySelection,$hd) 0; set ::KeyInfo(OptionalP,$hd) 0 set ::KeyInfo(LocalInversionP,$hd) 0 set ::KeyInfo(ReverseKeyP,$hd) 0; set ::KeyInfo(FoldCaseP,$hd) 0; set ::KeyInfo(TurkicFoldCaseP,$hd) 0; set ::KeyInfo(FirstCharOnlyP,$hd) 0; set ::KeyInfo(StripDiacriticsP,$hd) 0; set ::KeyInfo(ConvertEnclosuresP,$hd) 0; set ::KeyInfo(ConvertStylisticP,$hd) 0; set ::KeyInfo(SortType,$hd) 1; set ::KeyInfo(NumberSystem,$hd) "Ascii"; set ::KeyInfo(DateFormat,$hd) "y-m-d"; set ::KeyInfo(ExclusionsDisplayedP,$hd) $::ExclusionsDisplayedP; set ::KeyInfo(KeyFieldIdentificationDisplayedP,$hd) $::KeyFieldIdentificationDisplayedP; set ::KeyInfo(MiscellaneousOptionsDisplayedP,$hd) $::MiscellaneousOptionsDisplayedP; set ::KeyInfo(SortOrderDisplayedP,$hd) $::SortOrderDisplayedP; set ::KeyInfo(SortTypeDisplayedP,$hd) $::SortTypeDisplayedP; set ::KeyInfo(SubstitutionsDisplayedP,$hd) $::SubstitutionsDisplayedP; set FileNameEntryWidth 50 #How to identify the key field set mrelief solid set mborder 1 frame $hd -bg $::ColorSpecs(Backdrop,Background); if {$::UseCheckbuttonP} { frame $hd.keyf -relief $mrelief -border $mborder label $hd.keyf.lab -text [_ "How to Identify the Key Field"] -anchor w -font HeaderFont checkbutton $hd.keyf.ckb -variable KeyInfo(KeyFieldIdentificationDisplayedP,$hd) \ -onvalue 1 -offvalue 0 -command "PackKeyPage $hd;" pack $hd.keyf.lab -side left -expand 0 -fill y -anchor w pack $hd.keyf.ckb -side right -expand 1 -fill y -anchor e } else { frame $hd.keyf -relief $mrelief -border $mborder checkbutton $hd.keyf.ckb -variable KeyInfo(KeyFieldIdentificationDisplayedP,$hd) \ -onvalue 1 -offvalue 0 -command "PackKeyPage $hd;" \ -text [_ "How to Identify the Key Field"] -anchor w -font HeaderFont -indicatoron 0 \ -activeforeground red -activebackground navajowhite pack $hd.keyf.ckb -side right -expand 1 -fill both -anchor e } frame $hd.key -relief $mrelief -border $mborder -bg $::ColorSpecs(Default,Background); checkbutton $hd.key.ckb -variable KeyInfo(KeyFieldIdentificationDisplayedP,$hd) \ -onvalue 1 -offvalue 0 -command "PackKeyPage $hd;" -text [_ "roll up"] \ -activebackground $::ColorSpecs(RollUpButton,ActiveBackground) \ -activeforeground $::ColorSpecs(RollUpButton,ActiveForeground) frame $hd.key.ki frame $hd.key.ki.pos label $hd.key.ki.title -text [_ "How To Identify the Key Field"] -anchor w \ -font HeaderFont radiobutton $hd.key.ki.pos.rdb1 \ -variable KeyInfo(KeySelection,$hd) -value 0 \ -text [_ "position"] -anchor w radiobutton $hd.key.ki.pos.rdb2 \ -variable KeyInfo(KeySelection,$hd) -value 1 \ -text [_ "tag"] -anchor w radiobutton $hd.key.ki.pos.rdb3 \ -variable KeyInfo(KeySelection,$hd) -value 2 \ -text [_ "range"] -anchor w frame $hd.key.ki.pos.posent; entry $hd.key.ki.pos.posent.fldent1 -width 2 -font UserPlainTextFont -validate all \ -validatecommand {ValidatePositionField %W %P %V %d} entry $hd.key.ki.pos.posent.fldent2 -width 2 -font UserPlainTextFont -validate all \ -validatecommand {ValidatePositionField %W %P %V %d} entry $hd.key.ki.pos.posent.chrent1 -width 2 -font UserPlainTextFont -validate all \ -validatecommand {ValidatePositionChar %W %P %V %d} entry $hd.key.ki.pos.posent.chrent2 -width 2 -font UserPlainTextFont -validate all \ -validatecommand {ValidatePositionChar %W %P %V %d} pack $hd.key.ki.pos.posent.fldent1 -side left -padx {0 1} pack $hd.key.ki.pos.posent.chrent1 -side left -padx {2 6} pack $hd.key.ki.pos.posent.fldent2 -side left -padx {6 1} pack $hd.key.ki.pos.posent.chrent2 -side left -padx {2 3} entry $hd.key.ki.pos.tagent -width 8 -font UserTechnicalTextFont entry $hd.key.ki.pos.firstent -width 4 -font UserPlainTextFont -validate all \ -validatecommand {ValidateRange %W %P %V %d} entry $hd.key.ki.pos.lastent -width 4 -font UserPlainTextFont -validate all \ -validatecommand {ValidateRange %W %P %V %d} bind $hd.key.ki.pos.tagent "SetInsertionTargets $hd.key.ki.pos.tagent" $hd.key.ki.pos.posent.fldent1 insert end $::KeyCount; $hd.key.ki.pos.posent.fldent2 insert end $::KeyCount; bind $hd.key.ki.pos.rdb1 <> ExplainPositionID; bind $hd.key.ki.pos.rdb2 <> ExplainTagID; bind $hd.key.ki.pos.rdb3 <> ExplainRangeID; $hd.key.ki.pos.rdb1 select $hd.key.ki.pos.posent.fldent1 configure -state normal $hd.key.ki.pos.posent.fldent2 configure -state normal $hd.key.ki.pos.posent.chrent1 configure -state normal $hd.key.ki.pos.posent.chrent2 configure -state normal $hd.key.ki.pos.tagent configure -state disabled $hd.key.ki.pos.firstent configure -state disabled $hd.key.ki.pos.lastent configure -state disabled grid $hd.key.ki.pos.rdb1 -row 0 -column 0 -sticky w -pady 3 grid $hd.key.ki.pos.posent -row 0 -column 1 -columnspan 2 -sticky w -pady 3 -padx {14 0} grid $hd.key.ki.pos.rdb2 -row 1 -column 0 -sticky w -pady 3 grid $hd.key.ki.pos.tagent -row 1 -column 1 -sticky w -pady 3 -padx {14 0} grid $hd.key.ki.pos.rdb3 -row 2 -column 0 -sticky w -pady 3 grid $hd.key.ki.pos.firstent -row 2 -column 1 -sticky w -pady 3 -padx {14 0} grid $hd.key.ki.pos.lastent -row 2 -column 2 -sticky w -pady 3 pack $hd.key.ki.title -side top -anchor w -padx 5 pack $hd.key.ki.pos -side bottom -anchor w -padx 15 bind $hd.key.ki.pos.tagent {InsertClipboardContents %W} bind $hd.key.ki.title <> ExplainHowToIdentifyKey; bind $hd.keyf <> ExplainHowToIdentifyKey; $hd.key.ki.pos.rdb1 select #Optional field? frame $hd.key.opt label $hd.key.opt.title -text [_ "Is This Key Optional?"] -anchor w -font HeaderFont radiobutton $hd.key.opt.rdb1 -variable KeyInfo(OptionalP,$hd) -value -0 \ -text [_ "no"] -anchor w radiobutton $hd.key.opt.rdb2 -variable KeyInfo(OptionalP,$hd) -value -1 \ -text [_ "yes"] -anchor w $hd.key.opt.rdb1 select frame $hd.key.opt.oc label $hd.key.opt.oc.clab -text [_ "Comparison"] radiobutton $hd.key.opt.oc.rdb3 -variable KeyInfo(OptComp,$hd) \ -value -1 -text [_ "<"] -state disabled radiobutton $hd.key.opt.oc.rdb4 -variable KeyInfo(OptComp,$hd) \ -value 0 -text [_ "="] -state disabled radiobutton $hd.key.opt.oc.rdb5 -variable KeyInfo(OptComp,$hd) \ -value 1 -text [_ ">"] -state disabled $hd.key.opt.oc.rdb4 select pack $hd.key.opt.oc.clab -side top pack $hd.key.opt.oc.rdb3 -side left -expand 1 -padx 2 pack $hd.key.opt.oc.rdb5 -side right -expand 1 -padx 2 pack $hd.key.opt.oc.rdb4 -side right -expand 1 -padx 2 pack $hd.key.opt.title -side top -expand 1 -fill both -anchor w -pady {1 8} pack $hd.key.opt.rdb1 -side top -expand 1 -fill y -anchor w -padx {15 1} pack $hd.key.opt.rdb2 -side left -expand 0 -anchor w -padx {15 4} pack $hd.key.opt.oc -side left -expand 0 -anchor w -padx 5 -pady {1 18} bind $hd.key.opt.title <> ExplainOptional bind $hd.key.opt.oc <> ExplainOptional bind $hd.key.opt.rdb1 <> ExplainOptional bind $hd.key.opt.rdb2 <> ExplainOptional bind $hd.key.opt.oc.rdb3 <> ExplainComparison bind $hd.key.opt.oc.rdb4 <> ExplainComparison bind $hd.key.opt.oc.rdb5 <> ExplainComparison bind $hd.key.opt.oc.clab <> ExplainComparison pack $hd.key.ki -side left -expand 1 -fill both -pady 4 pack $hd.key.opt -side left -expand 1 -fill both -pady 4 pack $hd.key.ckb -side left -expand 0 -fill x -pady 4 -anchor ne #Sort type selection widget if {$::UseCheckbuttonP} { frame $hd.stf -relief $mrelief -border $mborder label $hd.stf.lab -text [_ "Sort Type"] -anchor w -font HeaderFont checkbutton $hd.stf.ckb -variable KeyInfo(SortTypeDisplayedP,$hd) \ -onvalue 1 -offvalue 0 -command "PackKeyPage $hd;" pack $hd.stf.lab -side left -expand 0 -fill y -anchor w pack $hd.stf.ckb -side right -expand 1 -fill y -anchor e } else { frame $hd.stf -relief $mrelief -border $mborder checkbutton $hd.stf.ckb -variable KeyInfo(SortTypeDisplayedP,$hd) \ -onvalue 1 -offvalue 0 -command "PackKeyPage $hd;" \ -text [_ "Sort Type"] -anchor w -font HeaderFont -indicatoron 0 \ -activeforeground red -activebackground navajowhite pack $hd.stf.ckb -side right -expand 1 -fill both -anchor e } frame $hd.st -relief $mrelief -border $mborder frame $hd.st.lab frame $hd.st.cnt frame $hd.st.buf label $hd.st.lab.title -text [_ "Sort Type"] -anchor w -font HeaderFont checkbutton $hd.st.lab.ckb -variable KeyInfo(SortTypeDisplayedP,$hd) \ -onvalue 1 -offvalue 0 -command "PackKeyPage $hd;" -text [_ "roll up"] \ -activebackground $::ColorSpecs(RollUpButton,ActiveBackground) \ -activeforeground $::ColorSpecs(RollUpButton,ActiveForeground) pack $hd.st.lab.title -side left -expand 1 -fill both -anchor w pack $hd.st.lab.ckb -side right -expand 0 -fill both -anchor e radiobutton $hd.st.cnt.rdbLex -variable KeyInfo(SortType,$hd) -value 1 -text [_ "lexicographic"] radiobutton $hd.st.cnt.rdbStrLen -variable KeyInfo(SortType,$hd) -value 2 -text [_ "string length"] radiobutton $hd.st.cnt.rdbNumeric -variable KeyInfo(SortType,$hd) -value 3 -text [_ "numeric"] radiobutton $hd.st.cnt.rdbISO8601 -variable KeyInfo(SortType,$hd) -value 6 -text [_ "iso8601"] radiobutton $hd.st.cnt.rdbHybrid -variable KeyInfo(SortType,$hd) -value 7 -text [_ "hybrid"] radiobutton $hd.st.cnt.rdbRandom -variable KeyInfo(SortType,$hd) -value 8 -text [_ "random"] radiobutton $hd.st.cnt.rdbAngle -variable KeyInfo(SortType,$hd) -value 9 -text [_ "angle"] radiobutton $hd.st.cnt.rdbNumStr -variable KeyInfo(SortType,$hd) -value 10 -text [_ "numeric\nstring"] radiobutton $hd.st.cnt.rdbTime -variable KeyInfo(SortType,$hd) -value 4 -text [_ "time"] radiobutton $hd.st.cnt.rdbDate -variable KeyInfo(SortType,$hd) -value 5 -text [_ "date"] radiobutton $hd.st.cnt.rdbMonth -variable KeyInfo(SortType,$hd) -value 11 -text [_ "month"] radiobutton $hd.st.cnt.rdbDomain -variable KeyInfo(SortType,$hd) -value 12 -text [_ "domain name"] button $hd.st.cnt.bDateFormat -text [_ "Date Format"] -state disabled \ -command [list PopupSetDateFormat $hd] button $hd.st.cnt.bNumSys -text [_ "Number System"] -state disabled \ -command [list PopupSetNumberSystem $hd] $hd.st.cnt.rdbLex select balloonhelp_for $hd.st.cnt.bDateFormat [_ "Press this button to set the date format\nfor this key. It is only available if you\nhave selected a date key."] frame $hd.st.cnt.bsep -height 6 set stxpd 10 # grid $hd.st.cnt.title -row 0 -column 0 -sticky w -pady 3 -columnspan 4 -padx 5 grid $hd.st.cnt.rdbLex -row 1 -column 0 -sticky w -pady 3 -padx {15 4} grid $hd.st.cnt.rdbHybrid -row 1 -column 1 -sticky w -pady 3 -padx $stxpd grid $hd.st.cnt.rdbAngle -row 1 -column 2 -sticky w -pady 3 -padx $stxpd grid $hd.st.cnt.rdbMonth -row 1 -column 3 -sticky w -pady 3 -padx $stxpd grid $hd.st.cnt.rdbStrLen -row 2 -column 0 -sticky w -pady 3 -padx {15 4} grid $hd.st.cnt.rdbISO8601 -row 2 -column 1 -sticky w -pady 3 -padx $stxpd grid $hd.st.cnt.rdbTime -row 2 -column 2 -sticky w -pady 3 -padx $stxpd grid $hd.st.cnt.rdbDate -row 2 -column 3 -sticky w -pady 3 -padx $stxpd grid $hd.st.cnt.bDateFormat -row 2 -column 4 -sticky w -pady 3 -padx $stxpd grid $hd.st.cnt.rdbDomain -row 3 -column 0 -sticky w -pady 3 -padx {15 4} grid $hd.st.cnt.rdbRandom -row 3 -column 1 -sticky w -pady 3 -padx $stxpd grid $hd.st.cnt.rdbNumStr -row 3 -column 2 -sticky w -pady 3 -padx $stxpd grid $hd.st.cnt.rdbNumeric -row 3 -column 3 -sticky w -pady 3 -padx $stxpd grid $hd.st.cnt.bNumSys -row 3 -column 4 -sticky w -pady 3 -padx $stxpd grid $hd.st.cnt.bsep -row 4 -column 0 -sticky w -pady 3 pack $hd.st.lab -side top -expand 1 -fill both -anchor w pack $hd.st.cnt -side left -expand 0 -fill none -anchor w pack $hd.st.buf -side left -expand 1 -fill none bind $hd.st.lab.title <> ExplainSortType bind $hd.st.cnt.rdbLex <> ExplainLexicographicComparison; bind $hd.st.cnt.rdbStrLen <> ExplainStringLength; bind $hd.st.cnt.rdbNumeric <> ExplainNumericComparison; bind $hd.st.cnt.rdbTime <> ExplainTimeComparison; bind $hd.st.cnt.rdbDate <> ExplainDateComparison; bind $hd.st.cnt.rdbISO8601 <> ExplainISO8601Comparison; bind $hd.st.cnt.rdbHybrid <> ExplainHybridComparison; bind $hd.st.cnt.rdbRandom <> ExplainRandomComparison; bind $hd.st.cnt.rdbAngle <> ExplainAngleComparison; bind $hd.st.cnt.rdbDomain <> ExplainDomainNameComparison; bind $hd.st.cnt.bNumSys <> ExplainNumberSystem; frame $hd.misco -relief $mrelief -border $mborder; frame $hd.misco.labf frame $hd.misco.bd pack $hd.misco.labf -side top -expand 1 -fill both pack $hd.misco.bd -side top -expand 1 -fill both label $hd.misco.labf.lab -text "Miscellaneous Options" -font HeaderFont checkbutton $hd.misco.labf.ckb -variable KeyInfo(MiscellaneousOptionsDisplayedP,$hd) \ -onvalue 1 -offvalue 0 -command "PackKeyPage $hd;" -text [_ "roll up"] \ -activebackground $::ColorSpecs(RollUpButton,ActiveBackground) \ -activeforeground $::ColorSpecs(RollUpButton,ActiveForeground) pack $hd.misco.labf.lab -side left -expand 0 -fill y -anchor w pack $hd.misco.labf.ckb -side right -expand 1 -fill y -anchor e if {$::UseCheckbuttonP} { frame $hd.miscof -relief $mrelief -border $mborder label $hd.miscof.lab -text [_ "Miscellaneous Options"] -anchor w -font HeaderFont checkbutton $hd.miscof.ckb -variable KeyInfo(MiscellaneousOptionsDisplayedP,$hd) \ -onvalue 1 -offvalue 0 -command "PackKeyPage $hd;" pack $hd.miscof.lab -side left -expand 0 -fill y -anchor w pack $hd.miscof.ckb -side right -expand 1 -fill y -anchor e } else { frame $hd.miscof -relief $mrelief -border $mborder checkbutton $hd.miscof.ckb -variable KeyInfo(MiscellaneousOptionsDisplayedP,$hd) \ -onvalue 1 -offvalue 0 -command "PackKeyPage $hd;" \ -text [_ "Miscellaneous Options"] -anchor w -font HeaderFont -indicatoron 0 \ -activeforeground red -activebackground navajowhite pack $hd.miscof.ckb -side right -expand 1 -fill both -anchor e } #Fold case? frame $hd.misco.bd.fc frame $hd.misco.bd.fc.left label $hd.misco.bd.fc.left.lab -text [_ "Fold Case?"] -anchor w -font HeaderFont label $hd.misco.bd.fc.img; frame $hd.misco.bd.fc.left.rbf radiobutton $hd.misco.bd.fc.left.rbf.rdb1 -variable KeyInfo(FoldCaseP,$hd) \ -value 0 -text [_ "no"] radiobutton $hd.misco.bd.fc.left.rbf.rdb2 -variable KeyInfo(FoldCaseP,$hd) \ -value 1 -text [_ "yes"] $hd.misco.bd.fc.left.rbf.rdb1 select pack $hd.misco.bd.fc.left.rbf.rdb1 -anchor w -side left -padx {15 3} pack $hd.misco.bd.fc.left.rbf.rdb2 -anchor w -side left pack $hd.misco.bd.fc.left.lab -side top -expand y -fill x -anchor w -padx 5 pack $hd.misco.bd.fc.left.rbf -side bottom -expand y -anchor w pack $hd.misco.bd.fc.left -side left pack $hd.misco.bd.fc.img -side right -expand 1; bind $hd.misco.bd.fc.img <> ExplainFoldCase; bind $hd.misco.bd.fc.left <> ExplainFoldCase; bind $hd.misco.bd.fc.left.lab <> ExplainFoldCase; bind $hd.misco.bd.fc.left.rbf <> ExplainFoldCase; bind $hd.misco.bd.fc.left.rbf.rdb1 <> ExplainFoldCase; bind $hd.misco.bd.fc.left.rbf.rdb2 <> ExplainFoldCase; set bhmsg [_ "Make comparisons insensitive to case?"] balloonhelp_for $hd.misco.bd.fc $bhmsg; balloonhelp_for $hd.misco.bd.fc.img $bhmsg; balloonhelp_for $hd.misco.bd.fc.left $bhmsg; balloonhelp_for $hd.misco.bd.fc.left.rbf $bhmsg; balloonhelp_for $hd.misco.bd.fc.left.rbf.rdb1 $bhmsg; balloonhelp_for $hd.misco.bd.fc.left.rbf.rdb2 $bhmsg; balloonhelp_for $hd.misco.bd.fc.left.lab $bhmsg; #Turkic fold case? frame $hd.misco.bd.tfc frame $hd.misco.bd.tfc.left label $hd.misco.bd.tfc.left.lab -text [_ "Turkic Fold Case?"] -anchor w -font HeaderFont label $hd.misco.bd.tfc.img; frame $hd.misco.bd.tfc.left.rbf radiobutton $hd.misco.bd.tfc.left.rbf.rdb1 -variable KeyInfo(TurkicFoldCaseP,$hd) \ -value 0 -text [_ "no"] radiobutton $hd.misco.bd.tfc.left.rbf.rdb2 -variable KeyInfo(TurkicFoldCaseP,$hd) \ -value 1 -text [_ "yes"] $hd.misco.bd.tfc.left.rbf.rdb1 select pack $hd.misco.bd.tfc.left.rbf.rdb1 -anchor w -side left -padx {15 3} pack $hd.misco.bd.tfc.left.rbf.rdb2 -anchor w -side left pack $hd.misco.bd.tfc.left.lab -side top -expand y -fill x -anchor w -padx 5 pack $hd.misco.bd.tfc.left.rbf -side bottom -expand y -anchor w pack $hd.misco.bd.tfc.left -side left pack $hd.misco.bd.tfc.img -side right -expand 1; bind $hd.misco.bd.tfc.img <> ExplainFoldCase; bind $hd.misco.bd.tfc.left <> ExplainFoldCase; bind $hd.misco.bd.tfc.left.lab <> ExplainFoldCase; bind $hd.misco.bd.tfc.left.rbf <> ExplainFoldCase; bind $hd.misco.bd.tfc.left.rbf.rdb1 <> ExplainFoldCase; bind $hd.misco.bd.tfc.left.rbf.rdb2 <> ExplainFoldCase; set bhmsg [_ "Make comparisons insensitive to case including Turkic\nfolding of \u0049 U+0049 to \u0131 U+0131 and \u0130 U+0130 to \u0069 U+0069 ?"] balloonhelp_for $hd.misco.bd.tfc $bhmsg; balloonhelp_for $hd.misco.bd.tfc.img $bhmsg; balloonhelp_for $hd.misco.bd.tfc.left $bhmsg; balloonhelp_for $hd.misco.bd.tfc.left.rbf $bhmsg; balloonhelp_for $hd.misco.bd.tfc.left.rbf.rdb1 $bhmsg; balloonhelp_for $hd.misco.bd.tfc.left.rbf.rdb2 $bhmsg; balloonhelp_for $hd.misco.bd.tfc.left.lab $bhmsg; #Reverse key? frame $hd.misco.bd.rk frame $hd.misco.bd.rk.left label $hd.misco.bd.rk.left.lab -text [_ "Reverse Key?"] -anchor w -font HeaderFont label $hd.misco.bd.rk.img; frame $hd.misco.bd.rk.left.rbf radiobutton $hd.misco.bd.rk.left.rbf.rdb1 -variable KeyInfo(ReverseKeyP,$hd) -value 0 -text [_ "no"] radiobutton $hd.misco.bd.rk.left.rbf.rdb2 -variable KeyInfo(ReverseKeyP,$hd) -value 1 -text [_ "yes"] $hd.misco.bd.rk.left.rbf.rdb1 select pack $hd.misco.bd.rk.left.rbf.rdb1 -anchor w -side left -padx {15 3} pack $hd.misco.bd.rk.left.rbf.rdb2 -anchor w -side left -expand 0 pack $hd.misco.bd.rk.left.lab -side top -expand y -fill x -anchor w pack $hd.misco.bd.rk.left.rbf -side bottom -expand y -anchor w pack $hd.misco.bd.rk.left -side left pack $hd.misco.bd.rk.img -side right -expand 1; bind $hd.misco.bd.rk.left <> ExplainReverseKey; bind $hd.misco.bd.rk.img <> ExplainReverseKey; bind $hd.misco.bd.rk.left.lab <> ExplainReverseKey; bind $hd.misco.bd.rk.left.rbf <> ExplainReverseKey; bind $hd.misco.bd.rk.left.rbf.rdb1 <> ExplainReverseKey; bind $hd.misco.bd.rk.left.rbf.rdb2 <> ExplainReverseKey; #Invert comparison? frame $hd.misco.bd.li label $hd.misco.bd.li.lab -text [_ "Invert Comparison?"] -anchor w -font HeaderFont frame $hd.misco.bd.li.rbf radiobutton $hd.misco.bd.li.rbf.rdb1 -variable KeyInfo(LocalInversionP,$hd) -value 0 -text [_ "no"] radiobutton $hd.misco.bd.li.rbf.rdb2 -variable KeyInfo(LocalInversionP,$hd) -value 1 -text [_ "yes"] $hd.misco.bd.li.rbf.rdb1 select pack $hd.misco.bd.li.rbf.rdb1 -anchor w -side left -padx {15 3} pack $hd.misco.bd.li.rbf.rdb2 -anchor w -side left -expand 0 pack $hd.misco.bd.li.lab -side top -expand y -fill x -anchor w pack $hd.misco.bd.li.rbf -side bottom -expand y -anchor w bind $hd.misco.bd.li.lab <> ExplainInvertComparison; bind $hd.misco.bd.li.rbf <> ExplainInvertComparison; bind $hd.misco.bd.li.rbf.rdb1 <> ExplainInvertComparison; bind $hd.misco.bd.li.rbf.rdb2 <> ExplainInvertComparison; #Strip diacritics frame $hd.misco.bd.sd frame $hd.misco.bd.sd.left label $hd.misco.bd.sd.left.lab -text [_ "Strip Diacritics?"] -anchor w -font HeaderFont label $hd.misco.bd.sd.img; frame $hd.misco.bd.sd.left.rbf radiobutton $hd.misco.bd.sd.left.rbf.rdb1 -variable KeyInfo(StripDiacriticsP,$hd) \ -value 0 -text [_ "no"] radiobutton $hd.misco.bd.sd.left.rbf.rdb2 -variable KeyInfo(StripDiacriticsP,$hd) \ -value 1 -text [_ "yes"] $hd.misco.bd.sd.left.rbf.rdb1 select pack $hd.misco.bd.sd.left.rbf.rdb1 -anchor w -side left -padx {15 3} pack $hd.misco.bd.sd.left.rbf.rdb2 -anchor w -side left pack $hd.misco.bd.sd.left.lab -side top -expand y -fill x -anchor w -padx 5 pack $hd.misco.bd.sd.left.rbf -side bottom -expand y -anchor w pack $hd.misco.bd.sd.left -side left pack $hd.misco.bd.sd.img -side right -expand 1; bind $hd.misco.bd.sd.img <> ExplainStripDiacritics; bind $hd.misco.bd.sd.left <> ExplainStripDiacritics; bind $hd.misco.bd.sd.left.lab <> ExplainStripDiacritics; bind $hd.misco.bd.sd.left.rbf <> ExplainStripDiacritics; bind $hd.misco.bd.sd.left.rbf.rdb1 <> ExplainStripDiacritics; bind $hd.misco.bd.sd.left.rbf.rdb2 <> ExplainStripDiacritics; set bhmsg [_ "Strip diacritics?"] balloonhelp_for $hd.misco.bd.sd $bhmsg; balloonhelp_for $hd.misco.bd.sd.img $bhmsg; balloonhelp_for $hd.misco.bd.sd.left $bhmsg; balloonhelp_for $hd.misco.bd.sd.left.rbf $bhmsg; balloonhelp_for $hd.misco.bd.sd.left.rbf.rdb1 $bhmsg; balloonhelp_for $hd.misco.bd.sd.left.rbf.rdb2 $bhmsg; balloonhelp_for $hd.misco.bd.sd.left.lab $bhmsg; #Convert enclosures frame $hd.misco.bd.ce frame $hd.misco.bd.ce.left label $hd.misco.bd.ce.left.lab -text [_ "Strip Enclosures?"] -anchor w -font HeaderFont label $hd.misco.bd.ce.img; frame $hd.misco.bd.ce.left.rbf radiobutton $hd.misco.bd.ce.left.rbf.rdb1 -variable KeyInfo(ConvertEnclosuresP,$hd) \ -value 0 -text [_ "no"] radiobutton $hd.misco.bd.ce.left.rbf.rdb2 -variable KeyInfo(ConvertEnclosuresP,$hd) \ -value 1 -text [_ "yes"] $hd.misco.bd.ce.left.rbf.rdb1 select pack $hd.misco.bd.ce.left.rbf.rdb1 -anchor w -side left -padx {15 3} pack $hd.misco.bd.ce.left.rbf.rdb2 -anchor w -side left pack $hd.misco.bd.ce.left.lab -side top -expand y -fill x -anchor w -padx 5 pack $hd.misco.bd.ce.left.rbf -side bottom -expand y -anchor w pack $hd.misco.bd.ce.left -side left pack $hd.misco.bd.ce.img -side right -expand 1; bind $hd.misco.bd.ce.img <> ExplainConvertEnclosures; bind $hd.misco.bd.ce.left <> ExplainConvertEnclosures; bind $hd.misco.bd.ce.left.lab <> ExplainConvertEnclosures; bind $hd.misco.bd.ce.left.rbf <> ExplainConvertEnclosures; bind $hd.misco.bd.ce.left.rbf.rdb1 <> ExplainConvertEnclosures; bind $hd.misco.bd.ce.left.rbf.rdb2 <> ExplainConvertEnclosures; set bhmsg [_ "Convert enclosures?"] balloonhelp_for $hd.misco.bd.ce $bhmsg; balloonhelp_for $hd.misco.bd.ce.img $bhmsg; balloonhelp_for $hd.misco.bd.ce.left $bhmsg; balloonhelp_for $hd.misco.bd.ce.left.rbf $bhmsg; balloonhelp_for $hd.misco.bd.ce.left.rbf.rdb1 $bhmsg; balloonhelp_for $hd.misco.bd.ce.left.rbf.rdb2 $bhmsg; balloonhelp_for $hd.misco.bd.ce.left.lab $bhmsg; #Convert stylistic frame $hd.misco.bd.cs frame $hd.misco.bd.cs.left label $hd.misco.bd.cs.left.lab -text [_ "Strip Style?"] -anchor w\ -font HeaderFont label $hd.misco.bd.cs.img; frame $hd.misco.bd.cs.left.rbf radiobutton $hd.misco.bd.cs.left.rbf.rdb1 -variable KeyInfo(ConvertStylisticP,$hd) \ -value 0 -text [_ "no"] radiobutton $hd.misco.bd.cs.left.rbf.rdb2 -variable KeyInfo(ConvertStylisticP,$hd) \ -value 1 -text [_ "yes"] $hd.misco.bd.cs.left.rbf.rdb1 select pack $hd.misco.bd.cs.left.rbf.rdb1 -anchor w -side left -padx {15 3} pack $hd.misco.bd.cs.left.rbf.rdb2 -anchor w -side left pack $hd.misco.bd.cs.left.lab -side top -expand y -fill x -anchor w -padx 5 pack $hd.misco.bd.cs.left.rbf -side bottom -expand y -anchor w pack $hd.misco.bd.cs.left -side left pack $hd.misco.bd.cs.img -side right -expand 1; bind $hd.misco.bd.cs.img <> ExplainConvertStylistic; bind $hd.misco.bd.cs.left <> ExplainConvertStylistic; bind $hd.misco.bd.cs.left.lab <> ExplainConvertStylistic; bind $hd.misco.bd.cs.left.rbf <> ExplainConvertStylistic; bind $hd.misco.bd.cs.left.rbf.rdb1 <> ExplainConvertStylistic; bind $hd.misco.bd.cs.left.rbf.rdb2 <> ExplainConvertStylistic; set bhmsg [_ "Convert stylistic equivalents?"] balloonhelp_for $hd.misco.bd.cs $bhmsg; balloonhelp_for $hd.misco.bd.cs.img $bhmsg; balloonhelp_for $hd.misco.bd.cs.left $bhmsg; balloonhelp_for $hd.misco.bd.cs.left.rbf $bhmsg; balloonhelp_for $hd.misco.bd.cs.left.rbf.rdb1 $bhmsg; balloonhelp_for $hd.misco.bd.cs.left.rbf.rdb2 $bhmsg; balloonhelp_for $hd.misco.bd.cs.left.lab $bhmsg; #First character only? frame $hd.misco.bd.of frame $hd.misco.bd.of.left label $hd.misco.bd.of.left.lab -text [_ "Use First Character Only?"] -anchor w\ -font HeaderFont label $hd.misco.bd.of.img; frame $hd.misco.bd.of.left.rbf radiobutton $hd.misco.bd.of.left.rbf.rdb1 -variable KeyInfo(FirstCharOnlyP,$hd) \ -value 0 -text [_ "no"] radiobutton $hd.misco.bd.of.left.rbf.rdb2 -variable KeyInfo(FirstCharOnlyP,$hd) \ -value 1 -text [_ "yes"] $hd.misco.bd.of.left.rbf.rdb1 select pack $hd.misco.bd.of.left.rbf.rdb1 -anchor w -side left -padx {15 3} pack $hd.misco.bd.of.left.rbf.rdb2 -anchor w -side left pack $hd.misco.bd.of.left.lab -side top -expand y -fill x -anchor w -padx 5 pack $hd.misco.bd.of.left.rbf -side bottom -expand y -anchor w pack $hd.misco.bd.of.left -side left pack $hd.misco.bd.of.img -side right -expand 1; bind $hd.misco.bd.of.img <> ExplainFirstCharOnly; bind $hd.misco.bd.of.left <> ExplainFirstCharOnly; bind $hd.misco.bd.of.left.lab <> ExplainFirstCharOnly; bind $hd.misco.bd.of.left.rbf <> ExplainFirstCharOnly; bind $hd.misco.bd.of.left.rbf.rdb1 <> ExplainFirstCharOnly; bind $hd.misco.bd.of.left.rbf.rdb2 <> ExplainFirstCharOnly; set bhmsg [_ "Only use first character of key?"] balloonhelp_for $hd.misco.bd.of $bhmsg; balloonhelp_for $hd.misco.bd.of.img $bhmsg; balloonhelp_for $hd.misco.bd.of.left $bhmsg; balloonhelp_for $hd.misco.bd.of.left.rbf $bhmsg; balloonhelp_for $hd.misco.bd.of.left.rbf.rdb1 $bhmsg; balloonhelp_for $hd.misco.bd.of.left.rbf.rdb2 $bhmsg; balloonhelp_for $hd.misco.bd.of.left.lab $bhmsg; set xp 5 grid $hd.misco.bd.rk -row 1 -column 1 -sticky w -pady {5 5} -padx {5 5} grid $hd.misco.bd.li -row 1 -column 2 -sticky w -pady {10 5} -padx $xp grid $hd.misco.bd.cs -row 1 -column 3 -sticky w -pady {10 5} -padx $xp grid $hd.misco.bd.of -row 1 -column 4 -sticky w -pady {10 5} -padx $xp grid $hd.misco.bd.ce -row 2 -column 1 -sticky w -pady {5 12} -padx {5 5} grid $hd.misco.bd.sd -row 2 -column 2 -sticky w -pady {5 12} -padx $xp grid $hd.misco.bd.fc -row 2 -column 3 -sticky w -pady {5 12} -padx $xp grid $hd.misco.bd.tfc -row 2 -column 4 -sticky w -pady {5 12} -padx $xp # Sort order/multigraphs frame $hd.so -relief $mrelief -border $mborder frame $hd.so.labf -relief $mrelief -border $mborder label $hd.so.labf.lab -text [_ "Sort Order"] -anchor w -font HeaderFont checkbutton $hd.so.labf.ckb -variable KeyInfo(SortOrderDisplayedP,$hd) \ -onvalue 1 -offvalue 0 -command "PackKeyPage $hd;" -text [_ "roll up"] \ -activebackground $::ColorSpecs(RollUpButton,ActiveBackground) \ -activeforeground $::ColorSpecs(RollUpButton,ActiveForeground) pack $hd.so.labf.lab -side left -expand 1 -fill both -anchor w pack $hd.so.labf.ckb -side right -expand 0 -fill both -anchor e radiobutton $hd.so.rdb0 -variable KeyInfo(SortOrderSpecType,$hd) \ -value 0 -text [_ "Unicode Order"] -anchor w if {$::UseCheckbuttonP} { frame $hd.sof -relief $mrelief -border $mborder label $hd.sof.lab -text [_ "Sort Order"] -anchor w -font HeaderFont checkbutton $hd.sof.ckb -variable KeyInfo(SortOrderDisplayedP,$hd) \ -onvalue 1 -offvalue 0 -command "PackKeyPage $hd;" pack $hd.sof.lab -side left -expand 0 -fill y -anchor w pack $hd.sof.ckb -side right -expand 1 -fill y -anchor e } else { frame $hd.sof -relief $mrelief -border $mborder checkbutton $hd.sof.ckb -variable KeyInfo(SortOrderDisplayedP,$hd) \ -onvalue 1 -offvalue 0 -command "PackKeyPage $hd;" \ -text [_ "Sort Order"] -anchor w -font HeaderFont -indicatoron 0 \ -activeforeground red -activebackground navajowhite pack $hd.sof.ckb -side right -expand 1 -fill both -anchor e } frame $hd.so.loc radiobutton $hd.so.loc.rdb1 -variable KeyInfo(SortOrderSpecType,$hd) \ -value 1 -text [_ "Locale Order"] -anchor w entry $hd.so.loc.ent -width $FileNameEntryWidth -font UserPlainTextFont $hd.so.loc.ent insert end "current" $hd.so.loc.ent configure -state disabled bind $hd.so.loc.ent "SetInsertionTargets $hd.so.loc.ent" frame $hd.so.bot radiobutton $hd.so.bot.rdb2 -variable KeyInfo(SortOrderSpecType,$hd) \ -value 2 -text [_ "Custom Order"] -anchor w $hd.so.rdb0 select button $hd.so.bot.b1 -text [_ "Specify File"] \ -state disabled -command [list SpecifySortOrderFile $hd] button $hd.so.bot.b2 -text [_ "Define"] -state disabled -command "EnterSortOrder $hd" entry $hd.so.bot.ent -width $FileNameEntryWidth -state disabled -font UserPlainTextFont bind $hd.so.bot.ent "SetInsertionTargets $hd.so.bot.ent" frame $hd.so.bsep -height 5 frame $hd.so.tsep -height 5 pack $hd.so.labf -side top -expand 1 -fill both -padx 5 pack $hd.so.bot.rdb2 -side left -expand 0 -fill x -anchor w -padx {0 4} pack $hd.so.bot.b2 -side left -expand 0 -anchor w -padx {2 4} pack $hd.so.bot.b1 -side left -expand 0 -anchor w pack $hd.so.bot.ent -expand 0 -fill none -anchor w -side left -padx 3 pack $hd.so.loc.rdb1 -side left -expand 0 -fill x -anchor w -padx {0 4} pack $hd.so.loc.ent -expand 0 -fill none -anchor w -side left -padx 3 pack $hd.so.bsep -side bottom -expand 0 -fill both pack $hd.so.bot -side bottom -expand 0 -fill x -anchor w -padx {15 4} pack $hd.so.tsep -side top -expand 0 -fill both pack $hd.so.rdb0 -side top -expand 0 -fill y -anchor w -padx {15 4} pack $hd.so.loc -side top -expand 0 -fill y -anchor w -padx {15 4} bind $hd.so.labf <> ExplainSortOrder; balloonhelp_for $hd.so.rdb0 [_ "Choose this option if you want to sort on this key using the order of\nUnicode codepoints as the sort order. For ASCII characters this is the\nsame as ASCII order."] balloonhelp_for $hd.so.bot.b1 [_ "The sort order definition will be read from the file shown\nin the entry box to the right. You can type the name of the\nfile in the entry box if you like, or you can press this button\nto bring up a file selection dialogue."] balloonhelp_for $hd.so.bot.b2 [_ "Press this button if you want to define a sort order interactively.\nThe result will be written out to a file,\nwhose name will appear in the entry box to the right."] balloonhelp_for $hd.so.loc.rdb1 [_ "Choose this option if you want to sort on this key using\nthe collation rules for a locale."] balloonhelp_for $hd.so.bot.rdb2 [_ "Choose this option if you want to use a custom sort order."] balloonhelp_for $hd.so.loc.ent [_ "The sort order will be determined by the collation rules for\nthe locale specified here. You may enter either a locale name\nor the word \"current\". In the latter case, your current locale\nwill be used. Note that this only works on systems using glibc\nand only if the locale you choose has been installed."] balloonhelp_for $hd.so.bot.ent [_ "The sort order will be read from the file whose name\nis shown in this entry box. You may select an\nexisting file by entering its name directly or by using\nthe file selection dialogue. You may also\ndefine the sort order interactively, after which\nit will be written to a file, whose name\nwill appear in the entry box."] #Sort order file separators frame $hd.sos -relief $mrelief -border $mborder label $hd.sos.tit -text [_ "Custom Sort Order File Separators?"] \ -anchor w -font HeaderFont radiobutton $hd.sos.rdb1 -variable KeyInfo(CustomSortOrderSeparatorsP,$hd) -value 0 -text [_ "no"] -anchor w frame $hd.sos.bot radiobutton $hd.sos.bot.rdb2 -variable KeyInfo(CustomSortOrderSeparatorsP,$hd) -value 1 -text [_ "yes"] -anchor w $hd.sos.rdb1 select button $hd.sos.bot.b1 -text [_ "Specify File"] -state disabled -command [list SpecifySortOrderSeparatorFile $hd] button $hd.sos.bot.b2 -text [_ "Define"] -state disabled -command "EnterSortOrderSeparators $hd" entry $hd.sos.bot.ent -width $FileNameEntryWidth -state disabled -font UserPlainTextFont bind $hd.sos.bot.ent "SetInsertionTargets $hd.sos.bot.ent" frame $hd.sos.bsep -height 5 frame $hd.sos.tsep -height 5 pack $hd.sos.bot.rdb2 -side left -expand 0 -fill x -anchor w -padx {0 4} pack $hd.sos.bot.b2 -side left -expand 0 -anchor w -padx {2 4} pack $hd.sos.bot.b1 -side left -expand 0 -anchor w pack $hd.sos.bot.ent -expand 0 -fill none -anchor w -side left -padx 3 pack $hd.sos.tsep -side top -expand 1 -fill both pack $hd.sos.tit -side top -expand 1 -fill both -padx 5 pack $hd.sos.bsep -side bottom -expand 1 -fill both pack $hd.sos.bot -side bottom -expand 1 -fill x -anchor w -padx {15 4} pack $hd.sos.rdb1 -side top -expand 1 -fill y -anchor w -padx {15 4} bind $hd.sos.tit <> ExplainSortOrderSeparators; set msg [_ "Redefine sort order separators so as to\ninclude whitespace in multigraphs?"]; balloonhelp_for $hd.sos $msg; balloonhelp_for $hd.sos.tit $msg; balloonhelp_for $hd.sos.bot $msg; balloonhelp_for $hd.sos.rdb1 $msg; balloonhelp_for $hd.sos.bot.rdb2 $msg; balloonhelp_for $hd.sos.bot.b1 [_ "The sort order separators will be read from the file shown\nin the entry box to the right. You can type the name of the\nfile in the entry box if you like, or you can press this button\nto bring up a file selection dialogue."] balloonhelp_for $hd.sos.bot.b2 [_ "Press this button if you want to enter the separators interactively.\nThe result will be written out to a file,\nwhose name will appear in the entry box to the right."] balloonhelp_for $hd.sos.bot.ent [_ "The sort order separators will be read from the file whose name\n is shown in this entry box. You may select an\nexisting file by entering its name directly or by using\nthe file selection dialogue. You may also\ndefine the sort order interactively, after which\nthey it will be written to a file, whose name\nwill appear in the entry box."] #Exclusions frame $hd.exc -relief $mrelief -border $mborder frame $hd.exc.labf -relief $mrelief -border $mborder label $hd.exc.labf.lab -text [_ "Exclusions"] -anchor w -font HeaderFont checkbutton $hd.exc.labf.ckb -variable KeyInfo(ExclusionsDisplayedP,$hd) \ -onvalue 1 -offvalue 0 -command "PackKeyPage $hd;" -text [_ "roll up"] \ -activebackground $::ColorSpecs(RollUpButton,ActiveBackground) \ -activeforeground $::ColorSpecs(RollUpButton,ActiveForeground) pack $hd.exc.labf.lab -side left -expand 1 -fill both -anchor w pack $hd.exc.labf.ckb -side right -expand 0 -fill both -anchor e radiobutton $hd.exc.rdb1 -variable KeyInfo(ExclusionsP,$hd) -value 0 -text [_ "no"] -anchor w frame $hd.exc.bot radiobutton $hd.exc.bot.rdb2 -variable KeyInfo(ExclusionsP,$hd) -value 1 -text [_ "yes"] -anchor w $hd.exc.rdb1 select button $hd.exc.bot.b1 -text [_ "Specify File"] -state disabled -command [list SpecifyExclusionFile $hd] button $hd.exc.bot.b2 -text [_ "Define"] -state disabled -command "EnterExclusions $hd" entry $hd.exc.bot.ent -width $FileNameEntryWidth -state disabled -font UserPlainTextFont bind $hd.exc.bot.ent "SetInsertionTargets $hd.exc.bot.ent" frame $hd.exc.bsep -height 5 frame $hd.exc.tsep -height 5 pack $hd.exc.bot.rdb2 -side left -expand 0 -fill x -anchor w -padx {0 4} pack $hd.exc.bot.b2 -side left -expand 0 -anchor w -padx {2 4} pack $hd.exc.bot.b1 -side left -expand 0 -anchor w pack $hd.exc.bot.ent -expand 0 -fill none -anchor w -side left -padx 3 pack $hd.exc.labf -side top -anchor w -expand 1 -fill both -padx 5 pack $hd.exc.bsep -side bottom -expand 1 -fill both pack $hd.exc.bot -side bottom -expand 1 -fill x -anchor w -padx {15 4} pack $hd.exc.tsep -side top -expand 1 -fill both pack $hd.exc.rdb1 -side top -expand 1 -fill y -anchor w -padx {15 4} if {$::UseCheckbuttonP} { frame $hd.excf -relief $mrelief -border $mborder label $hd.excf.lab -text [_ "Exclusions"] -anchor w -font HeaderFont checkbutton $hd.excf.ckb -variable KeyInfo(ExclusionsDisplayedP,$hd) \ -onvalue 1 -offvalue 0 -command "PackKeyPage $hd;" pack $hd.excf.lab -side left -expand 0 -fill y -anchor w pack $hd.excf.ckb -side right -expand 1 -fill y -anchor e } else { frame $hd.excf -relief $mrelief -border $mborder checkbutton $hd.excf.ckb -variable KeyInfo(ExclusionsDisplayedP,$hd) \ -onvalue 1 -offvalue 0 -command "PackKeyPage $hd;" \ -text [_ "Exclusions"] -anchor w -font HeaderFont -indicatoron 0 \ -activeforeground red -activebackground navajowhite pack $hd.excf.ckb -side right -expand 1 -fill both -anchor e } bind $hd.exc.labf <> ExplainExclusions bind $hd.excf.ckb <> ExplainExclusions bind $hd.exc.bot <> ExplainExclusions bind $hd.exc.rdb1 <> ExplainExclusions bind $hd.exc.bot.rdb2 <> ExplainExclusions bind $hd.exc.bot.b1 <> ExplainExclusions bind $hd.exc.bot.b2 <> ExplainExclusions bind $hd.exc.bot.ent <> ExplainExclusions balloonhelp_for $hd.exc.bot.b1 [_ "The exclusions will be read from the file shown\nin the entry box to the right. You can type the name of the\nfile in the entry box if you like, or you can press this button\nto bring up a file selection dialogue."] balloonhelp_for $hd.exc.bot.b2 [_ "Press this button if you want to define exclusions interactively.\nThe result will be written out to a file,\nwhose name will appear in the entry box to the right."] balloonhelp_for $hd.exc.bot.ent [_ "Exclusions will be read from the file whose name\n is shown in this entry box. You may select an\nexisting file by entering its name directly or by using\nthe file selection dialogue. You may also\ndefine exclusions interactively, after which\nthey will be written to a file, whose name\nwill appear in the entry box."] #Substitutions frame $hd.sub -relief $mrelief -border $mborder frame $hd.sub.labf -relief $mrelief -border $mborder label $hd.sub.labf.lab -text [_ "Substitutions"] -anchor w -font HeaderFont checkbutton $hd.sub.labf.ckb -variable KeyInfo(SubstitutionsDisplayedP,$hd) \ -onvalue 1 -offvalue 0 -command "PackKeyPage $hd;" -text [_ "roll up"] \ -activebackground $::ColorSpecs(RollUpButton,ActiveBackground) \ -activeforeground $::ColorSpecs(RollUpButton,ActiveForeground) pack $hd.sub.labf.lab -side left -expand 1 -fill both -anchor w pack $hd.sub.labf.ckb -side right -expand 0 -fill both -anchor e radiobutton $hd.sub.rdb1 -variable KeyInfo(SubstitutionsP,$hd) -value 0 \ -text [_ "no"] -anchor w frame $hd.sub.bot radiobutton $hd.sub.bot.rdb2 -variable KeyInfo(SubstitutionsP,$hd) \ -value 1 -text [_ "yes"] -anchor w $hd.sub.rdb1 select button $hd.sub.bot.b1 -text [_ "Specify File"] \ -state disabled -command [list SpecifySubstitutionFile $hd] button $hd.sub.bot.b2 -text [_ "Define"] -state disabled \ -command "EnterSubstitutions $hd" entry $hd.sub.bot.ent -width $FileNameEntryWidth -state disabled -font UserPlainTextFont bind $hd.sub.bot.ent "SetInsertionTargets $hd.sub.bot.ent" frame $hd.sub.bsep -height 5 frame $hd.sub.tsep -height 5 pack $hd.sub.bot.rdb2 -side left -expand 0 -fill x -anchor w -padx {0 4} pack $hd.sub.bot.b2 -side left -expand 0 -anchor w -padx {2 4} pack $hd.sub.bot.b1 -side left -expand 0 -anchor w pack $hd.sub.bot.ent -expand 0 -fill none -anchor w -side left -padx 3 pack $hd.sub.tsep -side top -expand 1 -fill both pack $hd.sub.labf -side top -anchor w -expand 1 -fill both -padx 5 pack $hd.sub.bsep -side bottom -expand 1 -fill both pack $hd.sub.bot -side bottom -expand 1 -fill x -anchor w -padx {15 4} pack $hd.sub.rdb1 -side top -expand 1 -fill y -anchor w -padx {15 4} if {$::UseCheckbuttonP} { frame $hd.subf -relief $mrelief -border $mborder label $hd.subf.lab -text [_ "Substitutions"] -anchor w -font HeaderFont checkbutton $hd.subf.ckb -variable KeyInfo(SubstitutionsDisplayedP,$hd) \ -onvalue 1 -offvalue 0 -command "PackKeyPage $hd;" pack $hd.subf.lab -side left -expand 0 -fill y -anchor w pack $hd.subf.ckb -side right -expand 1 -fill y -anchor e } else { frame $hd.subf -relief $mrelief -border $mborder checkbutton $hd.subf.ckb -variable KeyInfo(SubstitutionsDisplayedP,$hd) \ -onvalue 1 -offvalue 0 -command "PackKeyPage $hd;" \ -text [_ "Substitutions"] -anchor w -font HeaderFont -indicatoron 0 \ -activeforeground red -activebackground navajowhite pack $hd.subf.ckb -side right -expand 1 -fill both -anchor e } bind $hd.sub.labf <> ExplainSubstitutions bind $hd.sub.bot <> ExplainSubstitutions bind $hd.sub.rdb1 <> ExplainSubstitutions bind $hd.sub.bot.rdb2 <> ExplainSubstitutions bind $hd.sub.bot.b1 <> ExplainSubstitutions bind $hd.sub.bot.b2 <> ExplainSubstitutions bind $hd.sub.bot.ent <> ExplainSubstitutions balloonhelp_for $hd.sub.bot.b1 [_ "The substitutions will be read from the file shown\nin the entry box to the right. You can type the name of the\nfile in the entry box if you like, or you can press this button\nto bring up a file selection dialogue."] balloonhelp_for $hd.sub.bot.b2 [_ "Press this button if you want to define substitutions interactively.\nThe result will be written out to a file,\nwhose name will appear in the entry box to the right."] balloonhelp_for $hd.sub.bot.ent [_ "Substitutions will be read from the file whose name\n is shown in this entry box. You may select an\nexisting file by entering its name directly or by using\nthe file selection dialogue. You may also\ndefine substitutions interactively, after which\nthey will be written to a file, whose name\nwill appear in the entry box."] # Pack it all together PackKeyPage $hd; balloonhelp_for $hd.exc [_ "Should some characters in some positions\nbe ignored when comparing records on this key?"] balloonhelp_for $hd.sub [_ "Should some sequences be replaced with others?"] balloonhelp_for $hd.key.ki $::MainKeyFieldIdentBH; balloonhelp_for $hd.misco.bd.li [_ "Invert the sense of comparisons on this key?"] balloonhelp_for $hd.misco.bd.rk [_ "Reverse the order of the characters in the key?"] balloonhelp_for $hd.key.opt [_ "Is this key obligatory or may it be omitted?"] balloonhelp_for $hd.key.opt.oc [_ "How should a record with a missing optional key\ncompare with a record in which the same key is present?"] balloonhelp_for $hd.so [_ "What sort order do you wish to use for this key?"] balloonhelp_for $hd.st.cnt [_ "What sort of comparison should be done on this field?"] trace add variable ::KeyInfo(KeySelection,$hd) write ChooseActiveKeySelection trace add variable ::KeyInfo(ExclusionsP,$hd) write ToggleExclusionEntryActive trace add variable ::KeyInfo(SubstitutionsP,$hd) write ToggleSubstitutionEntryActive trace add variable ::KeyInfo(SortOrderSpecType,$hd) write ToggleCustomSortOrderEntryActive trace add variable ::KeyInfo(CustomSortOrderSeparatorsP,$hd) write ToggleCustomSortOrderSeparatorsEntryActive trace add variable ::KeyInfo(SortType,$hd) write ToggleOnSortType trace add variable ::KeyInfo(OptionalP,$hd) write ToggleOptComparisonActive BindKeys $hd; } proc ChangePage {n e o} { foreach i [array names ::KeyMap] { set w $::KeyMap($i); if {[winfo exists $w]} { $::SelectionButtonMap($i) configure -fg $::ColorSpecs(PageChoice,UnselectedPageForeground) pack forget $w; } else { dmsg "ChangePage: attempt to unpack non-existant window $w"; } } set w $::KeyMap($::WhichKey) if {[winfo exists $w] == 0} { dmsg "ChangePage: attempt to pack non-existant window $w"; return ; } pack $w -expand 1 -fill both -pady 0 $::SelectionButtonMap($::WhichKey) configure -fg $::ColorSpecs(PageChoice,ActiveForeground); if {$::WhichKey > 0} { if {$::WholeRecordIsKeyP} { DisableKeyFieldID $::KeyMap($::WhichKey); } else { EnableKeyFieldID $::KeyMap($::WhichKey); } } } proc ChooseActiveKeySelection {n e o} { set hd [lindex [split $e ","] 1] switch $::KeyInfo($e) { 0 { $hd.key.ki.pos.posent.fldent1 configure -state normal $hd.key.ki.pos.posent.fldent2 configure -state normal $hd.key.ki.pos.posent.chrent1 configure -state normal $hd.key.ki.pos.posent.chrent2 configure -state normal $hd.key.ki.pos.tagent configure -state disabled $hd.key.ki.pos.firstent configure -state disabled $hd.key.ki.pos.lastent configure -state disabled focus $hd.key.ki.pos.posent.fldent1; } 1 { $hd.key.ki.pos.posent.fldent1 configure -state disabled $hd.key.ki.pos.posent.fldent2 configure -state disabled $hd.key.ki.pos.posent.chrent1 configure -state disabled $hd.key.ki.pos.posent.chrent2 configure -state disabled $hd.key.ki.pos.tagent configure -state normal $hd.key.ki.pos.firstent configure -state disabled $hd.key.ki.pos.lastent configure -state disabled focus $hd.key.ki.pos.tagent; } 2 { $hd.key.ki.pos.posent.fldent1 configure -state disabled $hd.key.ki.pos.posent.fldent2 configure -state disabled $hd.key.ki.pos.posent.chrent1 configure -state disabled $hd.key.ki.pos.posent.chrent2 configure -state disabled $hd.key.ki.pos.tagent configure -state disabled $hd.key.ki.pos.firstent configure -state normal $hd.key.ki.pos.lastent configure -state normal focus $hd.key.ki.pos.firstent; } } } proc ToggleExclusionEntryActive {n e o} { set hd [lindex [split $e ","] 1] if {$::KeyInfo($e)} { $hd.exc.bot.b1 configure -state normal $hd.exc.bot.b2 configure -state normal $hd.exc.bot.ent configure -state normal } else { $hd.exc.bot.b1 configure -state disabled $hd.exc.bot.b2 configure -state disabled $hd.exc.bot.ent configure -state disabled } } proc ToggleSubstitutionEntryActive {n e o} { set hd [lindex [split $e ","] 1] if {$::KeyInfo($e)} { $hd.sub.bot.b1 configure -state normal $hd.sub.bot.b2 configure -state normal $hd.sub.bot.ent configure -state normal } else { $hd.sub.bot.b1 configure -state disabled $hd.sub.bot.b2 configure -state disabled $hd.sub.bot.ent configure -state disabled } } proc ToggleCustomSortOrderEntryActive {n e o} { set hd [lindex [split $e ","] 1] switch $::KeyInfo($e) { 2 { $hd.so.bot.b1 configure -state normal $hd.so.bot.b2 configure -state normal $hd.so.bot.ent configure -state normal $hd.so.loc.ent configure -state disabled } 1 { $hd.so.bot.b1 configure -state disabled $hd.so.bot.b2 configure -state disabled $hd.so.bot.ent configure -state disabled $hd.so.loc.ent configure -state normal } 0 { $hd.so.bot.b1 configure -state disabled $hd.so.bot.b2 configure -state disabled $hd.so.bot.ent configure -state disabled $hd.so.loc.ent configure -state disabled } } PackKeyPage $hd; } proc ToggleCustomSortOrderSeparatorsEntryActive {n e o} { set hd [lindex [split $e ","] 1] if {$::KeyInfo($e)} { $hd.sos.bot.b1 configure -state normal $hd.sos.bot.b2 configure -state normal $hd.sos.bot.ent configure -state normal } else { $hd.sos.bot.b1 configure -state disabled $hd.sos.bot.b2 configure -state disabled $hd.sos.bot.ent configure -state disabled } } proc ToggleOnSortType {n e o} { set hd [lindex [split $e ","] 1] set SortType $::KeyInfo($e) if {$SortType == 5} { $hd.st.cnt.bDateFormat configure -state normal $hd.st.cnt.bNumSys configure -state disabled } elseif {($SortType == 3) || ($SortType == 10)} { $hd.st.cnt.bNumSys configure -state normal $hd.st.cnt.bDateFormat configure -state disabled } else { $hd.st.cnt.bDateFormat configure -state disabled $hd.st.cnt.bNumSys configure -state disabled } PackKeyPage $hd } proc ToggleFieldSeparatorEntryActive {n e o} { if {$::WholeRecordIsKeyP} { .gen.ctr.wr.fsent configure -state disabled } else { .gen.ctr.wr.fsent configure -state normal focus .gen.ctr.wr.fsent } } proc ToggleRecordSeparatorEntryActive {n e o} { .gen.ctr.wr.fsent delete 0 end switch $::RecordParse { 0 { .gen.ctr.rp.cent configure -state disabled .gen.ctr.rp.fl.len configure -state disabled .gen.ctr.wr.fsent insert insert {\t\040} } 1 { if {$::EOLCarriageReturnP} { .gen.ctr.wr.fsent insert insert {\015} } else { .gen.ctr.wr.fsent insert insert {\n} } .gen.ctr.rp.fl.len configure -state disabled .gen.ctr.rp.cent configure -state disabled } 2 { .gen.ctr.rp.fl.len configure -state disabled .gen.ctr.rp.cent configure -state normal focus .gen.ctr.rp.cent; } 3 { .gen.ctr.rp.fl.len configure -state normal focus .gen.ctr.rp.fl.len .gen.ctr.rp.cent configure -state disabled } } } proc UpdateDefaultFieldSeparator {n e o} { if {$::RecordParse == 1} { .gen.ctr.wr.fsent delete 0 end; if {$::EOLCarriageReturnP} { .gen.ctr.wr.fsent insert insert {\015} } else { .gen.ctr.wr.fsent insert insert {\n} } } } proc ToggleOptComparisonActive {n e o} { set hd [lindex [split $e ","] 1] if {$::KeyInfo($e)} { $hd.key.opt.oc.rdb3 configure -state normal $hd.key.opt.oc.rdb4 configure -state normal $hd.key.opt.oc.rdb5 configure -state normal } else { $hd.key.opt.oc.rdb3 configure -state disabled $hd.key.opt.oc.rdb4 configure -state disabled $hd.key.opt.oc.rdb5 configure -state disabled } } #Character entry code begins here #Set this to the path to character entry menu set CEM .menubar.charentry #Set the default insertion target here. set InsertionTarget .gen.ctr.wr.fsent; set CharentryMenuItems 6; set IPAAIsDisplayedP 0; set IPACIsDisplayedP 0; set IPAVIsDisplayedP 0; set IPADIsDisplayedP 0; set CharEntryByCodeIsDisplayedP 0; set DisplayConsonantChartColumnLabelsP 1 set DisplayConsonantChartRowLabelsP 1 set DisplayVowelChartColumnLabelsP 1 set DisplayVowelChartRowLabelsP 1 option add *ipaec.Button.font CharacterEntryFont 100 option add *ipaec.Label.background $ColorSpecs(IPAEntry,Background) option add *ipaec.Button.background $ColorSpecs(IPAEntry,Background) option add *ipaec.Button.foreground $ColorSpecs(IPAEntry,Foreground) option add *ipaec.Label.relief raised option add *ipaev.Button.font CharacterEntryFont 100 option add *ipaev.Label.background $ColorSpecs(IPAEntry,Background) option add *ipaev.Button.background $ColorSpecs(IPAEntry,Background) option add *ipaev.Button.foreground $ColorSpecs(IPAEntry,Foreground) option add *ipaev.Label.relief raised option add *ipaea.Button.font AccentedLetterFont 100 option add *ipaea.Label.background "\#E0E0E0" option add *ipaea.Button.background "\#FFFFFF" option add *ipaea.Button.foreground "\#000000" option add *ipaea.Label.relief raised option add *ipaed.Button.font DiacriticFont 100 #option add *ipaed.Label.background $ColorSpecs(IPAEntry,Background) option add *ipaed.Button.background "\#E0E0FF" option add *ipaed.Label.background "\#E0E0E0" option add *ipaed.Button.foreground "\#000000" option add *ipaed.Label.relief raised proc SetInsertionTargets {tgt} { set ::InsertionTarget $tgt; set ::CharByCodeInsertionTarget $tgt; } #Insert character entry stuff here set CustomCEMEntries 0; option add *ipae*.*Label.font CharacterEntryLabelFont 100 option add *ipaec.*Button.font CharacterEntryFont 100 namespace eval ipaentry { variable IPAECColumnLabelList [list]; variable IPAECRowLabelList [list]; variable IPAEVColumnLabelList [list]; variable IPAEVRowLabelList [list]; set row 0; variable poa $row; incr row; variable vlstop $row; incr row; variable vdstop $row; incr row; variable vdimplosive $row; incr row; variable click $row; incr row; variable nasal $row; incr row; variable trill $row; incr row; variable tap $row; incr row; variable vlfric $row; incr row; variable vdfric $row; incr row; variable vlaffric $row; incr row; variable vdaffric $row; incr row; variable approx $row; incr row; variable latapprox $row; variable lastrow $row; set col 0; variable manner $col; incr col; variable labial $col; incr col; variable labiodental $col; incr col; variable dental $col; incr col; variable alveolar $col; incr col; variable postalveolar $col; incr col; variable retroflex $col; incr col; variable palatal $col; incr col; variable velar $col; incr col; variable uvular $col; incr col; variable pharyngeal $col; incr col; variable epiglottal $col; incr col; variable glottal $col; variable lastcolumn $col; proc cfesh {} { variable vlfric variable postalveolar eval [list [format ".ipaec.r%dc%d" $vlfric $postalveolar] configure -text "\u0161"]; } proc cresh {} { variable vlfric variable postalveolar eval [list [format ".ipaec.r%dc%d" $vlfric $postalveolar] configure -text "\u0283"]; } proc cfeshr {} { variable vlfric variable retroflex eval [list [format ".ipaec.r%dc%d" $vlfric $retroflex] configure -text "\u1E63"]; } proc creshr {} { variable vlfric variable retroflex eval [list [format ".ipaec.r%dc%d" $vlfric $retroflex] configure -text "\u0282"]; } proc cryod {} { variable approx variable palatal eval [list [format ".ipaec.r%dc%d" $approx $palatal] configure -text "j"]; } proc cfyod {} { variable approx variable palatal eval [list [format ".ipaec.r%dc%d" $approx $palatal] configure -text "y"]; } proc crny {} { variable nasal variable palatal eval [list [format ".ipaec.r%dc%d" $nasal $palatal] configure -text "\u0272"]; } proc cfny {} { variable nasal variable palatal eval [list [format ".ipaec.r%dc%d" $nasal $palatal] configure -text "\u00F1"]; } proc crch {} { variable vlaffric variable postalveolar eval [list [format ".ipaec.r%dc%d" $vlaffric $postalveolar] configure -text "t\u0283"]; } proc cfch {} { variable vlaffric variable postalveolar eval [list [format ".ipaec.r%dc%d" $vlaffric $postalveolar] configure -text "\u010D"]; } proc crchr {} { variable vlaffric variable retroflex eval [list [format ".ipaec.r%dc%d" $vlaffric $retroflex] configure -text "\u0288\u0282"]; } proc cfchr {} { variable vlaffric variable retroflex eval [list [format ".ipaec.r%dc%d" $vlaffric $retroflex] configure -text "\u1E6D\u1E63"]; } proc crdj {} { eval [list [format ".ipaec.r%dc%d" $ipaentry::vdaffric $ipaentry::postalveolar] configure -text "d\u0292"]; } proc cfdj {} { eval [list [format ".ipaec.r%dc%d" $ipaentry::vdaffric $ipaentry::postalveolar] configure -text "\u01C6"]; } proc crdjr {} { eval [list [format ".ipaec.r%dc%d" $ipaentry::vdaffric $ipaentry::retroflex] configure -text "\u0256\u0290"]; } proc cfdjr {} { eval [list [format ".ipaec.r%dc%d" $ipaentry::vdaffric $ipaentry::retroflex] configure -text "\u1E0D\u1E93"]; } proc crzh {} { variable vdfric variable postalveolar eval [list [format ".ipaec.r%dc%d" $vdfric $postalveolar] configure -text "\u0292"]; } proc cfzh {} { variable vdfric variable postalveolar eval [list [format ".ipaec.r%dc%d" $vdfric $postalveolar] configure -text "\u017E"]; } proc crtr {} { variable vlstop variable retroflex eval [list [format ".ipaec.r%dc%d" $vlstop $retroflex] configure -text "\u0288"]; } proc cftr {} { variable vlstop variable retroflex eval [list [format ".ipaec.r%dc%d" $vlstop $retroflex] configure -text "\u1E6D"]; } proc crdr {} { variable vdstop variable retroflex eval [list [format ".ipaec.r%dc%d" $vdstop $retroflex] configure -text "\u0256"]; } proc cfdr {} { variable vdstop variable retroflex eval [list [format ".ipaec.r%dc%d" $vdstop $retroflex] configure -text "\u1E0D"]; } proc crnr {} { variable nasal variable retroflex eval [list [format ".ipaec.r%dc%d" $nasal $retroflex] configure -text "\u0273"]; } proc cfnr {} { variable nasal variable retroflex eval [list [format ".ipaec.r%dc%d" $nasal $retroflex] configure -text "\u1E47"]; } proc crzhr {} { variable vdfric variable retroflex eval [list [format ".ipaec.r%dc%d" $vdfric $retroflex] configure -text "\u0290"]; } proc cfzhr {} { variable vdfric variable retroflex eval [list [format ".ipaec.r%dc%d" $vdfric $retroflex] configure -text "\u1E93"]; } proc crflapr {} { variable tap; variable retroflex eval [list [format ".ipaec.r%dc%d" $tap $retroflex] configure -text "\u027D"]; } proc cfflapr {} { variable tap; variable retroflex eval [list [format ".ipaec.r%dc%d" $tap $retroflex] configure -text "\u1E5B"]; } proc crlr {} { variable latapprox; variable retroflex eval [list [format ".ipaec.r%dc%d" $latapprox $retroflex] configure -text "\u026D"]; } proc cflr {} { variable latapprox; variable retroflex eval [list [format ".ipaec.r%dc%d" $latapprox $retroflex] configure -text "\u1E37"]; } proc crrr {} { variable approx; variable retroflex eval [list [format ".ipaec.r%dc%d" $approx $retroflex] configure -text "\u027B"]; } proc cfrr {} { variable approx; variable retroflex eval [list [format ".ipaec.r%dc%d" $approx $retroflex] configure -text "\u1E5B"]; } proc bhcham {w} { balloonhelp_for $w "The standard IPA character is shown by default. When the mouse\npointer is over the button, the \"North American\" variant is shown.\nRight click to insert the variant." } proc bhsp {w} { balloonhelp_for $w "The characters below and to the right are characters\nthat do not fit neatly into the chart." } proc UnpackConsonantColumnLabels {} { variable IPAECColumnLabelList; foreach l $IPAECColumnLabelList { grid forget $l; } } proc PackConsonantColumnLabels {} { destroy .ipaec PopupIPAEntryC; } proc UnpackConsonantRowLabels {} { variable IPAECRowLabelList; foreach l $IPAECRowLabelList { grid forget $l; } } proc PackConsonantRowLabels {} { destroy .ipaec; PopupIPAEntryC; } proc UnpackVowelColumnLabels {} { variable IPAEVColumnLabelList; foreach l $IPAEVColumnLabelList { grid forget $l; } } proc PackVowelColumnLabels {} { destroy .ipaev; PopupIPAEntryV; } proc UnpackVowelRowLabels {} { variable IPAEVRowLabelList; foreach l $IPAEVRowLabelList { grid forget $l; } } proc PackVowelRowLabels {} { destroy .ipaev; PopupIPAEntryV; } proc PopupIPAEntryC {} { variable poa variable vlstop variable vdstop variable vdimplosive variable click variable nasal variable trill variable tap variable vlfric variable vdfric variable vlaffric variable vdaffric variable approx variable latapprox variable lastrow variable manner variable labial variable labiodental variable dental variable alveolar variable postalveolar variable retroflex variable palatal variable velar variable uvular variable pharyngeal variable epiglottal variable glottal variable lastcolumn variable IPAECColumnLabelList; variable IPAECRowLabelList; global DisplayConsonantChartColumnLabelsP global DisplayConsonantChartRowLabelsP set IPAECColumnLabelList [list]; set IPAECRowLabelList [list]; set xp 2; set yp 3; set spcolor \#c46276; toplevel .ipaec -borderwidth 3 -class CharEntry wm title .ipaec [_ "Consonant Symbols"] BindKeys .ipaec; set DownMsg [_ "Display IPA Consonant Chart"]; set UpMsg [_ "Remove IPA Consonant Chart"]; bind .ipaec \ "set ::IPACIsDisplayedP 0;$::CEM entryconfigure $::ToggleIPACIndex -label \"$DownMsg\"" bind .ipaec \ "set ::IPACIsDisplayedP 0;$::CEM entryconfigure $::ToggleIPACIndex -label \"$DownMsg\"" bind .ipaec \ "set ::IPACIsDisplayedP 1;$::CEM entryconfigure $::ToggleIPACIndex -label \"$UpMsg\"" set tmp [label [format ".ipaec.r%dc%d" $manner $poa] \ -text [_ "IPA\nConsonants"] -padx 5 -pady $yp -bg $::ColorSpecs(IPAHeadings,Background)] lappend IPAECColumnLabelList $tmp; lappend IPAECRowLabelList $tmp; lappend IPAECColumnLabelList [label [format ".ipaec.r%dc%d" $manner $labial] \ -text [_ "labial"] -padx $xp -pady $yp -bg $::ColorSpecs(IPAHeadings,Background)] lappend IPAECColumnLabelList [label [format ".ipaec.r%dc%d" $manner $labiodental] \ -text [_ "labio\ndental"] -padx $xp -pady $yp -bg $::ColorSpecs(IPAHeadings,Background)] lappend IPAECColumnLabelList [label [format ".ipaec.r%dc%d" $manner $dental] \ -text [_ "dental"] -padx $xp -pady $yp -bg $::ColorSpecs(IPAHeadings,Background)] lappend IPAECColumnLabelList [label [format ".ipaec.r%dc%d" $manner $alveolar] \ -text [_ "alveolar"] -padx $xp -pady $yp -bg $::ColorSpecs(IPAHeadings,Background)] lappend IPAECColumnLabelList [label [format ".ipaec.r%dc%d" $manner $postalveolar] \ -text [_ "post\nalveolar"] -padx $xp -pady $yp -bg $::ColorSpecs(IPAHeadings,Background)] lappend IPAECColumnLabelList [label [format ".ipaec.r%dc%d" $manner $retroflex] \ -text [_ "retro\nflex"] -padx $xp -pady $yp -bg $::ColorSpecs(IPAHeadings,Background)] lappend IPAECColumnLabelList [label [format ".ipaec.r%dc%d" $manner $palatal] \ -text [_ "palatal"] -padx $xp -pady $yp -bg $::ColorSpecs(IPAHeadings,Background)] lappend IPAECColumnLabelList [label [format ".ipaec.r%dc%d" $manner $velar] \ -text [_ "velar"] -padx $xp -pady $yp -bg $::ColorSpecs(IPAHeadings,Background)] lappend IPAECColumnLabelList [label [format ".ipaec.r%dc%d" $manner $uvular] \ -text [_ "uvular"] -padx $xp -pady $yp -bg $::ColorSpecs(IPAHeadings,Background)] lappend IPAECColumnLabelList [label [format ".ipaec.r%dc%d" $manner $pharyngeal] \ -text [_ "pharyn\ngeal"] -padx $xp -pady $yp -bg $::ColorSpecs(IPAHeadings,Background)] lappend IPAECColumnLabelList [label [format ".ipaec.r%dc%d" $manner $epiglottal] \ -text [_ "epi\nglottal"] -padx $xp -pady $yp -bg $::ColorSpecs(IPAHeadings,Background)] lappend IPAECColumnLabelList [label [format ".ipaec.r%dc%d" $manner $glottal] \ -text [_ "glottal"] -padx $xp -pady $yp -bg $::ColorSpecs(IPAHeadings,Background)] #Voiceless oral stops lappend IPAECRowLabelList [label [format ".ipaec.r%dc%d" $vlstop $poa] \ -text [_ "voiceless stops"] -anchor w -padx $xp -pady $yp \ -bg $::ColorSpecs(IPAHeadings,Background)] set cmd {$::InsertionTarget insert insert [list p]} set bn [format ".ipaec.r%dc%d" $vlstop $labial] button $bn -text "p" -padx $xp -pady $yp -command $cmd \ -fg $::ColorSpecs(UserTextEntry,Foreground); #debug balloonhelpd_for $bn [_ "voiceless labial stop"] label [format ".ipaec.r%dc%d" $vlstop $labiodental] \ -text " " -padx $xp -pady $yp set cmd {$::InsertionTarget insert insert [list t\u032A]} set bn [format ".ipaec.r%dc%d" $vlstop $dental] button $bn -text "t\u032A" -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "voiceless dental stop"] set cmd {$::InsertionTarget insert insert [list t]} set bn [format ".ipaec.r%dc%d" $vlstop $alveolar] button $bn -text "t" -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "voiceless alveolar stop"] label [format ".ipaec.r%dc%d" $vlstop $postalveolar] -text " " -padx $xp -pady $yp set cmd {$::InsertionTarget insert insert [list \u0288]} set bn [format ".ipaec.r%dc%d" $vlstop $retroflex] button $bn -text \u0288 -padx $xp -pady $yp -command $cmd bind $bn <> {$::InsertionTarget insert insert [list \u1E6D]} bind $bn {ipaentry::cftr} bind $bn {ipaentry::crtr} bhcham $bn; balloonhelpd_for $bn [_ "voiceless retroflex stop"] set cmd {$::InsertionTarget insert insert [list c]} set bn [format ".ipaec.r%dc%d" $vlstop $palatal] button $bn -text "c" -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "voiceless palatal stop"] set cmd {$::InsertionTarget insert insert [list k]} set bn [format ".ipaec.r%dc%d" $vlstop $velar] button $bn -text "k" -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "voiceless velar stop"] set cmd {$::InsertionTarget insert insert [list q]} set bn [format ".ipaec.r%dc%d" $vlstop $uvular] button $bn -text "q" -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "voiceless uvular stop"] label [format ".ipaec.r%dc%d" $vlstop $pharyngeal] -text " " -padx $xp -pady $yp label [format ".ipaec.r%dc%d" $vlstop $epiglottal] -text " " -padx $xp -pady $yp set cmd {$::InsertionTarget insert insert [list \u0294]} set bn [format ".ipaec.r%dc%d" $vlstop $glottal] button $bn -text \u0294 -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "voiceless glottal stop"] #Voiced oral stops lappend IPAECRowLabelList [label [format ".ipaec.r%dc%d" $vdstop $poa] \ -text [_ "voiced stops"] -anchor w -padx $xp -pady $yp \ -bg $::ColorSpecs(IPAHeadings,Background)] set cmd {$::InsertionTarget insert insert [list b]} set bn [format ".ipaec.r%dc%d" $vdstop $labial] button $bn -text "b" -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "voiced bilabial stop"] label [format ".ipaec.r%dc%d" $vdstop $labiodental] -text " " -padx $xp -pady $yp set cmd {$::InsertionTarget insert insert [list d\u032A]} set bn [format ".ipaec.r%dc%d" $vdstop $dental] button $bn -text "d\u032A" -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "voiced dental stop"] set cmd {$::InsertionTarget insert insert [list d]} set bn [format ".ipaec.r%dc%d" $vdstop $alveolar] button $bn -text "d" -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "voiced alveolar stop"] label [format ".ipaec.r%dc%d" $vdstop $postalveolar] -text " " -padx $xp -pady $yp set cmd {$::InsertionTarget insert insert [list \u0256]} set bn [format ".ipaec.r%dc%d" $vdstop $retroflex] button $bn -text \u0256 -padx $xp -pady $yp -command $cmd bind $bn <> {$::InsertionTarget insert insert [list \u1E0D]} bind $bn {ipaentry::cfdr} bind $bn {ipaentry::crdr} bhcham $bn; balloonhelpd_for $bn [_ "voiced retroflex stop"] set cmd {$::InsertionTarget insert insert [list \u025F]} set bn [format ".ipaec.r%dc%d" $vdstop $palatal] button $bn -text \u025F -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "voiced palatal stop"] set cmd {$::InsertionTarget insert insert [list g]} set bn [format ".ipaec.r%dc%d" $vdstop $velar] button $bn -text "g" -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "voiced velar stop"] set cmd {$::InsertionTarget insert insert [list \u0262]} set bn [format ".ipaec.r%dc%d" $vdstop $uvular] button $bn -text \u0262 -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "voiced uvular stop"] label [format ".ipaec.r%dc%d" $vdstop $pharyngeal] -text " " -padx $xp -pady $yp set cmd {$::InsertionTarget insert insert [list \u02A1]} set bn [format ".ipaec.r%dc%d" $vdstop $epiglottal] button $bn -text \u02A1 -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "voiced epiglottal stop"] label [format ".ipaec.r%dc%d" $vdstop $glottal] -text " " -padx $xp -pady $yp #Nasals lappend IPAECRowLabelList [label [format ".ipaec.r%dc%d" $nasal $poa] \ -text [_ "nasals"] -anchor w -padx $xp -pady $yp \ -bg $::ColorSpecs(IPAHeadings,Background)] set cmd {$::InsertionTarget insert insert [list m]} set bn [format ".ipaec.r%dc%d" $nasal $labial] button $bn -text "m" -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "bilabial nasal"] set cmd {$::InsertionTarget insert insert [list \u0271]} set bn [format ".ipaec.r%dc%d" $nasal $labiodental] button $bn -text \u0271 -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "labiodental nasal"] set cmd {$::InsertionTarget insert insert [list n\u032A]} set bn [format ".ipaec.r%dc%d" $nasal $dental] button $bn -text n\u032A -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "dental nasal"] set cmd {$::InsertionTarget insert insert [list n]} set bn [format ".ipaec.r%dc%d" $nasal $alveolar] button $bn -text "n" -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "alveolar nasal"] label [format ".ipaec.r%dc%d" $nasal $postalveolar] -text " " -padx $xp -pady $yp set cmd {$::InsertionTarget insert insert [list \u0273]} set bn [format ".ipaec.r%dc%d" $nasal $retroflex] button $bn -text \u0273 -padx $xp -pady $yp -command $cmd bind $bn <> {$::InsertionTarget insert insert [list \u1E47]} bind $bn {ipaentry::cfnr} bind $bn {ipaentry::crnr} bhcham $bn; balloonhelpd_for $bn [_ "retroflex nasal"] set cmd {$::InsertionTarget insert insert [list \u0272]} set bn [format ".ipaec.r%dc%d" $nasal $palatal] button $bn -text \u0272 -padx $xp -pady $yp -command $cmd bind $bn <> {$::InsertionTarget insert insert [list \u00F1]} bind $bn {ipaentry::cfny} bind $bn {ipaentry::crny} bhcham $bn; balloonhelpd_for $bn [_ "palatal nasal"] set cmd {$::InsertionTarget insert insert [list \u014B]} set bn [format ".ipaec.r%dc%d" $nasal $velar] button $bn -text \u014B -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "velar nasal"] set cmd {$::InsertionTarget insert insert [list \u0274]} set bn [format ".ipaec.r%dc%d" $nasal $uvular] button $bn -text \u0274 -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "uvular nasal"] label [format ".ipaec.r%dc%d" $nasal $pharyngeal] -text " " -padx $xp -pady $yp label [format ".ipaec.r%dc%d" $nasal $epiglottal] -text " " -padx $xp -pady $yp label [format ".ipaec.r%dc%d" $nasal $glottal] -text " " -padx $xp -pady $yp #Voiceless fricatives lappend IPAECRowLabelList [label [format ".ipaec.r%dc%d" $vlfric $poa] \ -text [_ "voiceless fricatives"] -anchor w -padx $xp -pady $yp \ -bg $::ColorSpecs(IPAHeadings,Background)] set cmd {$::InsertionTarget insert insert [list \u03C6]} set bn [format ".ipaec.r%dc%d" $vlfric $labial] button $bn -text \u03C6 -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "voiceless bilabial fricative"] set cmd {$::InsertionTarget insert insert [list f]} set bn [format ".ipaec.r%dc%d" $vlfric $labiodental] button $bn -text "f" -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "voiceless labiodental fricative"] set cmd {$::InsertionTarget insert insert [list \u03B8]} set bn [format ".ipaec.r%dc%d" $vlfric $dental] button $bn -text \u03B8 -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "voiceless dental fricative"] set cmd {$::InsertionTarget insert insert [list "s"]} set bn [format ".ipaec.r%dc%d" $vlfric $alveolar] button $bn -text "s" -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "voiceless alveolar fricative"] set cmd {$::InsertionTarget insert insert [list \u0283]} set bn [format ".ipaec.r%dc%d" $vlfric $postalveolar]; button $bn -text \u0283 -padx $xp -pady $yp -command $cmd bind $bn <> {$::InsertionTarget insert insert [list \u0161]} bind $bn {ipaentry::cfesh} bind $bn {ipaentry::cresh} bhcham $bn; balloonhelpd_for $bn [_ "voiceless postalveolar fricative"] set cmd {$::InsertionTarget insert insert [list \u0282]} set bn [format ".ipaec.r%dc%d" $vlfric $retroflex]; button $bn -text \u0282 -padx $xp -pady $yp -command $cmd bind $bn <> {$::InsertionTarget insert insert [list \u1E63]} bind $bn {ipaentry::cfeshr} bind $bn {ipaentry::creshr} bhcham $bn; balloonhelpd_for $bn [_ "voiceless retroflex fricative"] set cmd {$::InsertionTarget insert insert [list \u0255]} set bn [format ".ipaec.r%dc%d" $vlfric $palatal] button $bn -text \u0255 -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "voiceless palatal fricative"] set cmd {$::InsertionTarget insert insert [list "x"]} set bn [format ".ipaec.r%dc%d" $vlfric $velar] button $bn -text "x" -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "voiceless velar fricative"] set cmd {$::InsertionTarget insert insert [list "\u03C7"]} set bn [format ".ipaec.r%dc%d" $vlfric $uvular] button $bn -text "\u03C7" -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "voiceless uvular fricative"] set cmd {$::InsertionTarget insert insert [list \u0127]} set bn [format ".ipaec.r%dc%d" $vlfric $pharyngeal] button $bn -text \u0127 -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "voiceless pharyngeal fricative"] set cmd {$::InsertionTarget insert insert [list \u029C]} set bn [format ".ipaec.r%dc%d" $vlfric $epiglottal] button $bn -text \u029C -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "voiceless epiglottal fricative"] set cmd {$::InsertionTarget insert insert [list "h"]} set bn [format ".ipaec.r%dc%d" $vlfric $glottal] button $bn -text "h" -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "voiceless glottal fricative"] #Voiced fricatives lappend IPAECRowLabelList [label [format ".ipaec.r%dc%d" $vdfric $poa] \ -text [_ "voiced fricatives"] -anchor w \ -padx $xp -pady $yp -bg $::ColorSpecs(IPAHeadings,Background)] set cmd {$::InsertionTarget insert insert [list \u03B2]} set bn [format ".ipaec.r%dc%d" $vdfric $labial] button $bn -text \u03B2 -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "voiced bilabial fricative"] set cmd {$::InsertionTarget insert insert [list v]} set bn [format ".ipaec.r%dc%d" $vdfric $labiodental] button $bn -text "v" -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "voiced labiodental fricative"] set cmd {$::InsertionTarget insert insert [list "\u00F0"]} set bn [format ".ipaec.r%dc%d" $vdfric $dental] button $bn -text "\u00F0" -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "voiced dental fricative"] set cmd {$::InsertionTarget insert insert [list "z"]} set bn [format ".ipaec.r%dc%d" $vdfric $alveolar] button $bn -text "z" -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "voiced alveolar fricative"] set cmd {$::InsertionTarget insert insert [list \u0292]} set bn [format ".ipaec.r%dc%d" $vdfric $postalveolar] button $bn -text \u0292 -padx $xp -pady $yp -command $cmd bind $bn <> {$::InsertionTarget insert insert [list \u017E]} bind $bn {ipaentry::cfzh} bind $bn {ipaentry::crzh} bhcham $bn; balloonhelpd_for $bn [_ "voiced postalveolar fricative"] set cmd {$::InsertionTarget insert insert [list \u0290]} set bn [format ".ipaec.r%dc%d" $vdfric $retroflex] button $bn -text \u0290 -padx $xp -pady $yp -command $cmd bind $bn <> {$::InsertionTarget insert insert [list \u1E93]} bind $bn {ipaentry::cfzhr} bind $bn {ipaentry::crzhr} bhcham $bn; balloonhelpd_for $bn [_ "voiced retroflex fricative"] set cmd {$::InsertionTarget insert insert [list \u029D]} set bn [format ".ipaec.r%dc%d" $vdfric $palatal] button $bn -text \u029D -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "voiced palatal fricative"] set cmd {$::InsertionTarget insert insert [list \u0263]} set bn [format ".ipaec.r%dc%d" $vdfric $velar] button $bn -text \u0263 -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "voiced velar fricative"] set cmd {$::InsertionTarget insert insert [list "\u0281"]} set bn [format ".ipaec.r%dc%d" $vdfric $uvular] button $bn -text "\u0281" -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "voiced uvular fricative"] set cmd {$::InsertionTarget insert insert [list \u0295]} set bn [format ".ipaec.r%dc%d" $vdfric $pharyngeal] button $bn -text \u0295 -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "voiced pharyngeal fricative"] set cmd {$::InsertionTarget insert insert [list \u02A2]} set bn [format ".ipaec.r%dc%d" $vdfric $epiglottal] button $bn -text \u02A2 -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "voiced epiglottal fricative"] set cmd {$::InsertionTarget insert insert [list \u0266]} set bn [format ".ipaec.r%dc%d" $vdfric $glottal] button $bn -text \u0266 -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "voiced glottal fricative"] #trills lappend IPAECRowLabelList [label [format ".ipaec.r%dc%d" $trill $poa] \ -text [_ "trills"] -anchor w -padx $xp -pady $yp -bg $::ColorSpecs(IPAHeadings,Background)] set cmd {$::InsertionTarget insert insert [list \u0299]} set bn [format ".ipaec.r%dc%d" $trill $labial] button $bn -text \u0299 -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "bilabial trill"] label [format ".ipaec.r%dc%d" $trill $labiodental] -text " " -padx $xp -pady $yp label [format ".ipaec.r%dc%d" $trill $dental] -text " " -padx $xp -pady $yp set cmd {$::InsertionTarget insert insert [list r]} set bn [format ".ipaec.r%dc%d" $trill $alveolar] button $bn -text "r" -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "alveolar trill"] label [format ".ipaec.r%dc%d" $trill $postalveolar] -text " " -padx $xp -pady $yp label [format ".ipaec.r%dc%d" $trill $retroflex] -text " " -padx $xp -pady $yp label [format ".ipaec.r%dc%d" $trill $palatal] -text " " -padx $xp -pady $yp label [format ".ipaec.r%dc%d" $trill $velar] -text " " -padx $xp -pady $yp set cmd {$::InsertionTarget insert insert [list \u0280]} set bn [format ".ipaec.r%dc%d" $trill $uvular] button $bn -text \u0280 -padx $xp -pady $yp balloonhelpd_for $bn [_ "uvular trill"] -command $cmd label [format ".ipaec.r%dc%d" $trill $pharyngeal] -text " " -padx $xp -pady $yp label [format ".ipaec.r%dc%d" $trill $epiglottal] -text " " -padx $xp -pady $yp label [format ".ipaec.r%dc%d" $trill $glottal] -text " " -padx $xp -pady $yp #taps and flaps lappend IPAECRowLabelList [label [format ".ipaec.r%dc%d" $tap $poa] \ -text [_ "taps/flaps"] -anchor w -padx $xp -pady $yp -bg $::ColorSpecs(IPAHeadings,Background)] label [format ".ipaec.r%dc%d" $tap $labial] -text " " -padx $xp -pady $yp label [format ".ipaec.r%dc%d" $tap $labiodental] -text " " -padx $xp -pady $yp label [format ".ipaec.r%dc%d" $tap $dental] -text " " -padx $xp -pady $yp set cmd {$::InsertionTarget insert insert [list \u027E]} set bn [format ".ipaec.r%dc%d" $tap $alveolar] button $bn -text \u027E -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "uvular trill"] label [format ".ipaec.r%dc%d" $tap $postalveolar] -text " " -padx $xp -pady $yp set cmd {$::InsertionTarget insert insert [list \u027D]} set bn [format ".ipaec.r%dc%d" $tap $retroflex]; button $bn -text \u027D -padx $xp -pady $yp -command $cmd bind $bn <> {$::InsertionTarget insert insert [list \u1E5B]} bind $bn {ipaentry::cfflapr} bind $bn {ipaentry::crflapr} bhcham $bn; balloonhelpd_for $bn [_ "retroflex tap"] label [format ".ipaec.r%dc%d" $tap $palatal] -text " " -padx $xp -pady $yp label [format ".ipaec.r%dc%d" $tap $velar] -text " " -padx $xp -pady $yp label [format ".ipaec.r%dc%d" $tap $uvular] -text " " -padx $xp -pady $yp label [format ".ipaec.r%dc%d" $tap $pharyngeal] -text " " -padx $xp -pady $yp label [format ".ipaec.r%dc%d" $tap $epiglottal] -text " " -padx $xp -pady $yp label [format ".ipaec.r%dc%d" $tap $glottal] -text " " -padx $xp -pady $yp #approximants lappend IPAECRowLabelList [label [format ".ipaec.r%dc%d" $approx $poa] \ -text [_ "approximants"] -anchor w \ -padx $xp -pady $yp -bg $::ColorSpecs(IPAHeadings,Background)] label [format ".ipaec.r%dc%d" $approx $labial] -text " " -padx $xp -pady $yp set cmd {$::InsertionTarget insert insert [list \u028B]} set bn [format ".ipaec.r%dc%d" $approx $labiodental] button $bn -text \u028B -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "labiodental approximant"] label [format ".ipaec.r%dc%d" $approx $dental] -text " " -padx $xp -pady $yp set cmd {$::InsertionTarget insert insert [list \u0279]} set bn [format ".ipaec.r%dc%d" $approx $alveolar] button $bn -text \u0279 -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "alveolar approximant"] label [format ".ipaec.r%dc%d" $approx $postalveolar] -text " " -padx $xp -pady $yp set cmd {$::InsertionTarget insert insert [list \u027B]} set bn [format ".ipaec.r%dc%d" $approx $retroflex] button $bn -text \u027B -padx $xp -pady $yp -command $cmd bind $bn <> {$::InsertionTarget insert insert [list \u1E5B]} bind $bn {ipaentry::cfrr} bind $bn {ipaentry::crrr} bhcham $bn; balloonhelpd_for $bn [_ "retroflex approximant"] set cmd {$::InsertionTarget insert insert [list "j"]} set bn [format ".ipaec.r%dc%d" $approx $palatal] button $bn -text "j" -padx $xp -pady $yp -command $cmd bind $bn <> {$::InsertionTarget insert insert [list "y"]} bind $bn {ipaentry::cfyod} bind $bn {ipaentry::cryod} bhcham $bn; balloonhelpd_for $bn [_ "palatal approximant"] set cmd {$::InsertionTarget insert insert [list \u0270]} set bn [format ".ipaec.r%dc%d" $approx $velar] button $bn -text \u0270 -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "velar approximant"] label [format ".ipaec.r%dc%d" $approx $uvular] -text " " \ -padx $xp -pady $yp -bg $spcolor label [format ".ipaec.r%dc%d" $approx $pharyngeal] -text " " \ -padx $xp -pady $yp -bg $spcolor #label [format ".ipaec.r%dc%d" $approx $epiglottal] -text " " \ -padx $xp -pady $yp -bg $spcolor #label [format ".ipaec.r%dc%d" $approx $glottal] -text " " \ -padx $xp -pady $yp -bg $spcolor #lateral approximants lappend IPAECRowLabelList [label [format ".ipaec.r%dc%d" $latapprox $poa] \ -text [_ "lateral approximants"] -anchor w \ -padx $xp -pady $yp -bg $::ColorSpecs(IPAHeadings,Background)] label [format ".ipaec.r%dc%d" $latapprox $labial] -text " " -padx $xp -pady $yp label [format ".ipaec.r%dc%d" $latapprox $labiodental] -text " " -padx $xp -pady $yp label [format ".ipaec.r%dc%d" $latapprox $dental] -text " " -padx $xp -pady $yp set cmd {$::InsertionTarget insert insert [list "l"]} set bn [format ".ipaec.r%dc%d" $latapprox $alveolar] button $bn -text "l" -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "alveolar lateral approximant"] label [format ".ipaec.r%dc%d" $latapprox $postalveolar] -text " " -padx $xp -pady $yp set cmd {$::InsertionTarget insert insert [list \u026D]} set bn [format ".ipaec.r%dc%d" $latapprox $retroflex] button $bn -text \u026D -padx $xp -pady $yp -command $cmd bind $bn <> {$::InsertionTarget insert insert [list \u1E37]} bind $bn {ipaentry::cflr} bind $bn {ipaentry::crlr} bhcham $bn; balloonhelpd_for $bn [_ "retroflex lateral approximant"] set cmd {$::InsertionTarget insert insert [list \u028E]} set bn [format ".ipaec.r%dc%d" $latapprox $palatal] button $bn -text \u028E -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "palatal lateral approximant"] set cmd {$::InsertionTarget insert insert [list \u029F]} set bn [format ".ipaec.r%dc%d" $latapprox $velar] button $bn -text \u029F -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "velar lateral approximant"] label [format ".ipaec.r%dc%d" $latapprox $uvular] -text " " \ -padx $xp -pady $yp -bg $spcolor #label [format ".ipaec.r%dc%d" $latapprox $pharyngeal] -text " " \ -padx $xp -pady $yp -bg $spcolor #label [format ".ipaec.r%dc%d" $latapprox $epiglottal] -text " " \ -padx $xp -pady $yp #label [format ".ipaec.r%dc%d" $latapprox $glottal] -text " " \ -padx $xp -pady $yp #voiced implosives lappend IPAECRowLabelList [label [format ".ipaec.r%dc%d" $vdimplosive $poa] \ -text [_ "voiced implosives"] -anchor w \ -padx $xp -pady $yp -bg $::ColorSpecs(IPAHeadings,Background)] set cmd {$::InsertionTarget insert insert [list \u0253]} set bn [format ".ipaec.r%dc%d" $vdimplosive $labial] button $bn -text \u0253 -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "voiced bilabial implosive"] label [format ".ipaec.r%dc%d" $vdimplosive $labiodental] -text " " \ -padx $xp -pady $yp label [format ".ipaec.r%dc%d" $vdimplosive $dental] -text " " \ -padx $xp -pady $yp set cmd {$::InsertionTarget insert insert [list \u0257]} set bn [format ".ipaec.r%dc%d" $vdimplosive $alveolar] button $bn -text \u0257 -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "voiced alveolar implosive"] label [format ".ipaec.r%dc%d" $vdimplosive $postalveolar] -text " " \ -padx $xp -pady $yp #Not officially recognized by IPA yet. set cmd {$::InsertionTarget insert insert [list \u1D91]} set bn [format ".ipaec.r%dc%d" $vdimplosive $retroflex] button $bn -text \u1D91 -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "voiced retroflex implosive"] set cmd {$::InsertionTarget insert insert [list \u0284]} set bn [format ".ipaec.r%dc%d" $vdimplosive $palatal] button $bn -text \u0284 -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "voiced palatal implosive"] set cmd {$::InsertionTarget insert insert [list \u0260]} set bn [format ".ipaec.r%dc%d" $vdimplosive $velar] button $bn -text \u0260 -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "voiced velar implosive"] set cmd {$::InsertionTarget insert insert [list \u029B]} set bn [format ".ipaec.r%dc%d" $vdimplosive $uvular] button $bn -text \u029B -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "voiced uvular implosive"] label [format ".ipaec.r%dc%d" $vdimplosive $pharyngeal] -text " " -padx $xp -pady $yp label [format ".ipaec.r%dc%d" $vdimplosive $epiglottal] -text " " -padx $xp -pady $yp label [format ".ipaec.r%dc%d" $vdimplosive $glottal] -text " " -padx $xp -pady $yp #clicks lappend IPAECRowLabelList [label [format ".ipaec.r%dc%d" $click $poa] \ -text [_ "clicks"] -anchor w -padx $xp -pady $yp -bg $::ColorSpecs(IPAHeadings,Background)] set cmd {$::InsertionTarget insert insert [list \u0298]} set bn [format ".ipaec.r%dc%d" $click $labial] button $bn -text \u0298 -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "labial click"] label [format ".ipaec.r%dc%d" $click $labiodental] -text " " -padx $xp -pady $yp set cmd {$::InsertionTarget insert insert [list \u01C0]} set bn [format ".ipaec.r%dc%d" $click $dental] button $bn -text \u01C0 -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "dental click"] set cmd {$::InsertionTarget insert insert [list \u01C2]} set bn [format ".ipaec.r%dc%d" $click $alveolar] button $bn -text \u01C2 -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "alveolar click"] set cmd {$::InsertionTarget insert insert [list \u01C3]} set bn [format ".ipaec.r%dc%d" $click $postalveolar] button $bn -text \u01C3 \ -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "postalveolar click"] label [format ".ipaec.r%dc%d" $click $retroflex] -text " " -padx $xp -pady $yp label [format ".ipaec.r%dc%d" $click $palatal] -text " " -padx $xp -pady $yp label [format ".ipaec.r%dc%d" $click $velar] -text " " -padx $xp -pady $yp label [format ".ipaec.r%dc%d" $click $uvular] -text " " -padx $xp -pady $yp label [format ".ipaec.r%dc%d" $click $pharyngeal] -text " " -padx $xp -pady $yp label [format ".ipaec.r%dc%d" $click $epiglottal] -text " " -padx $xp -pady $yp set cmd {BackDelete $::InsertionTarget} set bn [format ".ipaec.r%dc%d" $click $glottal]; button $bn -text [_ "Delete"] -padx $xp -pady $yp -command $cmd -background "\#E0D0FF"; set DeleteButton $bn; #Voiceless affricates lappend IPAECRowLabelList [label [format ".ipaec.r%dc%d" $vlaffric $poa] \ -text [_ "voiceless affricates"] -anchor w -padx $xp -pady $yp \ -bg $::ColorSpecs(IPAHeadings,Background)] set cmd {$::InsertionTarget insert insert [list p\u03C6]} set bn [format ".ipaec.r%dc%d" $vlaffric $labial] button $bn -text "p\u03C6" -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "voiceless bilabial affricate"] label [format ".ipaec.r%dc%d" $vlaffric $labiodental] -text "" -padx $xp -pady $yp set cmd {$::InsertionTarget insert insert [list t\u03B8]} set bn [format ".ipaec.r%dc%d" $vlaffric $dental] button $bn -text "t\u03B8" -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "voiceless dental affricate"] set cmd {$::InsertionTarget insert insert [list "ts"]} set bn [format ".ipaec.r%dc%d" $vlaffric $alveolar] button $bn -text "ts" -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "voiceless alveolar affricate"] set cmd {$::InsertionTarget insert insert [list t\u0283]} set bn [format ".ipaec.r%dc%d" $vlaffric $postalveolar] button $bn -text "t\u0283" -padx $xp -pady $yp -command $cmd bind $bn <> {$::InsertionTarget insert insert [list \u010D]} bind $bn {ipaentry::cfch} bind $bn {ipaentry::crch} bhcham $bn; balloonhelpd_for $bn [_ "voiceless postalveolar affricate"] set cmd {$::InsertionTarget insert insert [list \u0288\u0282]} set bn [format ".ipaec.r%dc%d" $vlaffric $retroflex] button $bn -text \u0288\u0282 -padx $xp -pady $yp -command $cmd bind $bn <> {$::InsertionTarget insert insert [list \u1E6D\u1E63]} bind $bn {ipaentry::cfchr} bind $bn {ipaentry::crchr} bhcham $bn; balloonhelpd_for $bn [_ "voiceless retroflex affricate"] set cmd {$::InsertionTarget insert insert [list t\u0255]} set bn [format ".ipaec.r%dc%d" $vlaffric $palatal] button $bn -text t\u0255 -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "voiceless palatal affricate"] set cmd {$::InsertionTarget insert insert [list "kx"]} set bn [format ".ipaec.r%dc%d" $vlaffric $velar] button $bn -text "kx" -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "voiceless velar affricate"] set cmd {$::InsertionTarget insert insert [list "q\u03C7"]} set bn [format ".ipaec.r%dc%d" $vlaffric $uvular] button $bn -text "q\u03C7" -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "voiceless uvular affricate"] label [format ".ipaec.r%dc%d" $vlaffric $pharyngeal] -text "" \ -padx $xp -pady $yp -bg $spcolor label [format ".ipaec.r%dc%d" $vlaffric $epiglottal] -text "" \ -padx $xp -pady $yp -bg $spcolor label [format ".ipaec.r%dc%d" $vlaffric $glottal] -text "" \ -padx $xp -pady $yp -bg $spcolor #Voiced affricate lappend IPAECRowLabelList [label [format ".ipaec.r%dc%d" $vdaffric $poa] \ -text [_ "voiced affricates"] -anchor w -padx $xp -pady $yp \ -bg $::ColorSpecs(IPAHeadings,Background)] set cmd {$::InsertionTarget insert insert [list b\u03B2]} set bn [format ".ipaec.r%dc%d" $vdaffric $labial] button $bn -text b\u03B2 -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "voiced bilabial affricate"] label [format ".ipaec.r%dc%d" $vdaffric $labiodental] -text "" -padx $xp -pady $yp set cmd {$::InsertionTarget insert insert [list "d\u00F0"]} set bn [format ".ipaec.r%dc%d" $vdaffric $dental] button $bn -text "d\u00F0" -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "voiced dental affricate"] set cmd {$::InsertionTarget insert insert [list "dz"]} set bn [format ".ipaec.r%dc%d" $vdaffric $alveolar] button $bn -text "dz" -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "voiced alveolar affricate"] set cmd {$::InsertionTarget insert insert [list d\u0292]} set bn [format ".ipaec.r%dc%d" $vdaffric $postalveolar] button $bn -text d\u0292 -padx $xp -pady $yp -command $cmd bind $bn <> {$::InsertionTarget insert insert [list \u01C6]} bind $bn {ipaentry::cfdj} bind $bn {ipaentry::crdj} bhcham $bn; balloonhelpd_for $bn [_ "voiced postalveolar affricate"] set cmd {$::InsertionTarget insert insert [list \u0256\u0290]} set bn [format ".ipaec.r%dc%d" $vdaffric $retroflex] button $bn -text \u0256\u0290 -padx $xp -pady $yp -command $cmd bind $bn <> {$::InsertionTarget insert insert [list \u1E0D\u1E93]} bind $bn {ipaentry::cfdjr} bind $bn {ipaentry::crdjr} bhcham $bn; balloonhelpd_for $bn [_ "voiced retroflex affricate"] set cmd {$::InsertionTarget insert insert [list d\u029D]} set bn [format ".ipaec.r%dc%d" $vdaffric $palatal] button $bn -text d\u029D -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "voiced palatal affricate"] set cmd {$::InsertionTarget insert insert [list g\u0263]} set bn [format ".ipaec.r%dc%d" $vdaffric $velar] button $bn -text g\u0263 -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "voiced velar affricate"] set cmd {$::InsertionTarget insert insert [list "\u0262\u0281"]} set bn [format ".ipaec.r%dc%d" $vdaffric $uvular] button $bn -text "\u0262\u0281" -padx $xp -pady $yp -command $cmd balloonhelpd_for $bn [_ "voiced uvular affricate"] label [format ".ipaec.r%dc%d" $vdaffric $pharyngeal] -text "" \ -padx $xp -pady $yp -bg $spcolor #label [format ".ipaec.r%dc%d" $vdaffric $epiglottal] -text "" \ -padx $xp -pady $yp -bg $spcolor #label [format ".ipaec.r%dc%d" $vdaffric $glottal] -text "" \ -padx $xp -pady $yp -bg $spcolor set cmd {$::InsertionTarget insert insert [list "\u028D"]} button .ipaec.r13c10 -text \u028D -padx $xp -pady $yp -command $cmd balloonhelpd_for .ipaec.r13c10 [_ "Voiceless labio-velar fricative"] set cmd {$::InsertionTarget insert insert [list "\u0265"]} button .ipaec.r11c11 -text \u0265 -padx $xp -pady $yp -command $cmd balloonhelpd_for .ipaec.r11c11 [_ "Voiced labio-palatal approximant"] set cmd {$::InsertionTarget insert insert [list "\u0077"]} button .ipaec.r11c12 -text \u0077 -padx $xp -pady $yp -command $cmd balloonhelpd_for .ipaec.r11c12 [_ "Voiced labio-velar approximant"] set cmd {$::InsertionTarget insert insert [list "\u01C1"]} button .ipaec.r12c11 -text \u01C1 -padx $xp -pady $yp -command $cmd set cmd {$::InsertionTarget insert insert [list "\u02A0"]} button .ipaec.r12c12 -text \u02A0 -padx $xp -pady $yp -command $cmd set cmd {$::InsertionTarget insert insert [list "\u026C"]} button .ipaec.r13c11 -text \u026C -padx $xp -pady $yp -command $cmd set cmd {$::InsertionTarget insert insert [list "\u026E"]} button .ipaec.r13c12 -text \u026E -padx $xp -pady $yp -command $cmd for {set row 0} {$row <= $lastrow} {incr row} { set line [list]; for {set col 0} {$col <= $lastcolumn} {incr col} { set cell [format ".ipaec.r%dc%d" $row $col] lappend line $cell if {[string equal [winfo class $cell] "Label"]} { balloonhelp_for $cell [_ "Left click to insert standard characters.\nRight click to insert alternative characters."] } } eval grid $line -sticky news; } balloonhelpd_for .ipaec.r12c11 [_ "Lateral click"] balloonhelpd_for .ipaec.r12c12 [_ "Voiceless uvular implosive"] balloonhelpd_for .ipaec.r13c11 [_ "Voiceless lateral fricative"] balloonhelpd_for .ipaec.r13c12 [_ "Voiced lateral fricative"] bhsp [format ".ipaec.r%dc%d" $latapprox $uvular] bhsp [format ".ipaec.r%dc%d" $approx $uvular] bhsp [format ".ipaec.r%dc%d" $approx $pharyngeal] bhsp [format ".ipaec.r%dc%d" $vlaffric $pharyngeal] bhsp [format ".ipaec.r%dc%d" $vlaffric $epiglottal] bhsp [format ".ipaec.r%dc%d" $vlaffric $glottal] bhsp [format ".ipaec.r%dc%d" $vdaffric $pharyngeal] balloonhelpd_for $DeleteButton [_ "No, there isn't a glottal click called \"Delete\".\nThis is so that you can correct mistakes while using\nthe mouse, without having to go back to the keyboard."] after idle { update idletasks raise .ipaec; } if {!$DisplayConsonantChartColumnLabelsP} {UnpackConsonantColumnLabels} if {!$DisplayConsonantChartRowLabelsP} {UnpackConsonantRowLabels} } set row 0; variable frontness $row; incr row; variable close $row; incr row; variable closeclosemid $row; incr row; variable closemid $row; incr row; variable midmid $row; incr row; variable openmid $row; incr row; variable openopenmid $row; incr row; variable open $row; variable lastvrow $row; set col 0; variable height $col; incr col; variable fronturd $col; incr col; variable frontrnd $col; incr col; variable centurd $col; incr col; variable centrnd $col; incr col; variable backurd $col; incr col; variable backrnd $col; variable lastvcolumn $col; proc vry {} { variable close variable frontrnd eval [list [format ".ipaev.r%dc%d" $close $frontrnd] configure -text "y"]; } proc vfy {} { variable close variable frontrnd eval [list [format ".ipaev.r%dc%d" $close $frontrnd] configure -text "\u00FC"]; } proc vrphi {} { variable frontrnd; variable closemid eval [list [format ".ipaev.r%dc%d" $closemid $frontrnd] configure -text "\u00F8"]; } proc vfphi {} { variable frontrnd; variable closemid eval [list [format ".ipaev.r%dc%d" $closemid $frontrnd] configure -text "o\u0308"]; } proc vroe {} { variable frontrnd; variable openmid eval [list [format ".ipaev.r%dc%d" $openmid $frontrnd] configure -text "\u0153"]; } proc vfoe {} { variable frontrnd; variable openmid eval [list [format ".ipaev.r%dc%d" $openmid $frontrnd] configure -text "\u0254\0308"]; } proc PopupIPAEntryV {} { variable frontness variable close variable closeclosemid variable closemid variable openmid variable midmid variable openopenmid variable open variable lastvrow variable height variable fronturd variable frontrnd variable centurd variable centrnd variable backurd variable backrnd variable lastvcolumn variable IPAEVColumnLabelList variable IPAEVRowLabelList global DisplayVowelChartColumnLabelsP global DisplayVowelChartRowLabelsP set xp 2; set yp 3; toplevel .ipaev -borderwidth 3 wm title .ipaev [_ "Vowel Symbols"] BindKeys .ipaev; set DownMsg [_ "Display IPA Vowel Chart"]; set UpMsg [_ "Remove IPA Vowel Chart"]; bind .ipaev \ "set ::IPAVIsDisplayedP 0;$::CEM entryconfigure $::ToggleIPAVIndex -label \"$DownMsg\"" bind .ipaev \ "set ::IPAVIsDisplayedP 0;$::CEM entryconfigure $::ToggleIPAVIndex -label \"$DownMsg\"" bind .ipaev \ "set ::IPAVIsDisplayedP 1;$::CEM entryconfigure $::ToggleIPAVIndex -label \"$UpMsg\"" #Column headers set tmp [label [format ".ipaev.r%dc%d" $height $frontness] \ -text [_ "IPA\nVowels"] -padx $xp -pady $yp -bg $::ColorSpecs(IPAHeadings,Background)] lappend IPAEVColumnLabelList $tmp; lappend IPAEVRowLabelList $tmp; lappend IPAEVColumnLabelList [label [format ".ipaev.r%dc%d" $height $fronturd] \ -text [_ "Front\nUnrounded"] -padx $xp -pady $yp \ -bg $::ColorSpecs(IPAHeadings,Background)] lappend IPAEVColumnLabelList [label [format ".ipaev.r%dc%d" $height $frontrnd] \ -text [_ "Front\nRounded"] -padx $xp -pady $yp \ -bg $::ColorSpecs(IPAHeadings,Background)] lappend IPAEVColumnLabelList [label [format ".ipaev.r%dc%d" $height $centurd] \ -text [_ "Central\nUnrounded"] -padx $xp -pady $yp \ -bg $::ColorSpecs(IPAHeadings,Background)] lappend IPAEVColumnLabelList [label [format ".ipaev.r%dc%d" $height $centrnd] \ -text [_ "Central\nRounded"] -padx $xp -pady $yp \ -bg $::ColorSpecs(IPAHeadings,Background)] lappend IPAEVColumnLabelList [label [format ".ipaev.r%dc%d" $height $backurd] \ -text [_ "Back\nUnrounded"] -padx $xp -pady $yp \ -bg $::ColorSpecs(IPAHeadings,Background)] lappend IPAEVColumnLabelList [label [format ".ipaev.r%dc%d" $height $backrnd] \ -text [_ "Back\nRounded"] -padx $xp -pady $yp \ -bg $::ColorSpecs(IPAHeadings,Background)] #Close vowels lappend IPAEVRowLabelList [label [format ".ipaev.r%dc%d" $close $frontness] \ -text [_ "Close"] -anchor w -padx $xp -pady $yp \ -bg $::ColorSpecs(IPAHeadings,Background)] set cmd {$::InsertionTarget insert insert [list i]} button [format ".ipaev.r%dc%d" $close $fronturd] \ -text "i" -padx $xp -pady $yp -command $cmd set cmd {$::InsertionTarget insert insert [list y]} set bn [format ".ipaev.r%dc%d" $close $frontrnd] button $bn -text "y" -padx $xp -pady $yp -command $cmd bind $bn <> {$::InsertionTarget insert insert [list \u00FC]} bind $bn {ipaentry::vfy} bind $bn {ipaentry::vry} bhcham $bn; set cmd {$::InsertionTarget insert insert [list \u0268]} button [format ".ipaev.r%dc%d" $close $centurd] \ -text "\u0268" -padx $xp -pady $yp -command $cmd set cmd {$::InsertionTarget insert insert [list \u0289]} button [format ".ipaev.r%dc%d" $close $centrnd] \ -text "\u0289" -padx $xp -pady $yp -command $cmd set cmd {$::InsertionTarget insert insert [list \u0268]} button [format ".ipaev.r%dc%d" $close $backurd] \ -text "\u0268" -padx $xp -pady $yp -command $cmd set cmd {$::InsertionTarget insert insert [list u]} button [format ".ipaev.r%dc%d" $close $backrnd] \ -text "u" -padx $xp -pady $yp -command $cmd # Close close mid vowels lappend IPAEVRowLabelList [label [format ".ipaev.r%dc%d" $closeclosemid $frontness] \ -text [_ "Close Close Mid"] -anchor w -padx $xp -pady $yp \ -bg $::ColorSpecs(IPAHeadings,Background)] set cmd {$::InsertionTarget insert insert [list I]} button [format ".ipaev.r%dc%d" $closeclosemid $fronturd] \ -text "I" -padx $xp -pady $yp -command $cmd set cmd {$::InsertionTarget insert insert [list Y]} button [format ".ipaev.r%dc%d" $closeclosemid $frontrnd] \ -text "Y" -padx $xp -pady $yp -command $cmd label [format ".ipaev.r%dc%d" $closeclosemid $centurd] \ -text "" -padx $xp -pady $yp set cmd {$::InsertionTarget insert insert [list \u028A]} button [format ".ipaev.r%dc%d" $closeclosemid $centrnd] \ -text "\u028A" -padx $xp -pady $yp -command $cmd label [format ".ipaev.r%dc%d" $closeclosemid $backurd] \ -text "" -padx $xp -pady $yp label [format ".ipaev.r%dc%d" $closeclosemid $backrnd] \ -text "" -padx $xp -pady $yp # Close mid vowels lappend IPAEVRowLabelList [label [format ".ipaev.r%dc%d" $closemid $frontness] \ -text [_ "Close Mid"] -anchor w -padx $xp -pady $yp \ -bg $::ColorSpecs(IPAHeadings,Background)] set cmd {$::InsertionTarget insert insert [list e]} button [format ".ipaev.r%dc%d" $closemid $fronturd] \ -text "e" -padx $xp -pady $yp -command $cmd set cmd {$::InsertionTarget insert insert [list \u00F8]} set bn [format ".ipaev.r%dc%d" $closemid $frontrnd] button $bn -text "\u00F8" -padx $xp -pady $yp -command $cmd bind $bn <> {$::InsertionTarget insert insert [list o\u0308]} bind $bn {ipaentry::vfphi} bind $bn {ipaentry::vrphi} bhcham $bn; set cmd {$::InsertionTarget insert insert [list \u0258]} button [format ".ipaev.r%dc%d" $closemid $centurd] \ -text "\u0258" -padx $xp -pady $yp -command $cmd set cmd {$::InsertionTarget insert insert [list \u0275]} button [format ".ipaev.r%dc%d" $closemid $centrnd] \ -text "\u0275" -padx $xp -pady $yp -command $cmd set cmd {$::InsertionTarget insert insert [list \u0264]} button [format ".ipaev.r%dc%d" $closemid $backurd] \ -text "\u0264" -padx $xp -pady $yp -command $cmd set cmd {$::InsertionTarget insert insert [list o]} button [format ".ipaev.r%dc%d" $closemid $backrnd] \ -text "o" -padx $xp -pady $yp -command $cmd # Mid mid vowels lappend IPAEVRowLabelList [label [format ".ipaev.r%dc%d" $midmid $frontness] \ -text [_ "Mid Mid"] -anchor w -padx $xp -pady $yp \ -bg $::ColorSpecs(IPAHeadings,Background)] label [format ".ipaev.r%dc%d" $midmid $fronturd] \ -text "" -padx $xp -pady $yp label [format ".ipaev.r%dc%d" $midmid $frontrnd] \ -text "" -padx $xp -pady $yp set cmd {$::InsertionTarget insert insert [list \u0259]} button [format ".ipaev.r%dc%d" $midmid $centurd] \ -text "\u0259" -padx $xp -pady $yp -command $cmd set cmd {BackDelete $::InsertionTarget} set bn [format ".ipaev.r%dc%d" $midmid $centrnd]; button $bn -text [_ "Delete"] \ -padx $xp -pady $yp -command $cmd -background "\#E0D0FF"; set DeleteButton $bn; label [format ".ipaev.r%dc%d" $midmid $backurd] -text "" -padx $xp -pady $yp label [format ".ipaev.r%dc%d" $midmid $backrnd] -text "" -padx $xp -pady $yp # Open mid vowels lappend IPAEVRowLabelList [label [format ".ipaev.r%dc%d" $openmid $frontness] \ -text [_ "Open Mid"] -anchor w -padx $xp -pady $yp \ -bg $::ColorSpecs(IPAHeadings,Background)] set cmd {$::InsertionTarget insert insert [list \u025B]} button [format ".ipaev.r%dc%d" $openmid $fronturd] \ -text \u025B -padx $xp -pady $yp -command $cmd set cmd {$::InsertionTarget insert insert [list \u0153]} set bn [format ".ipaev.r%dc%d" $openmid $frontrnd] button $bn -text "\u0153" -padx $xp -pady $yp -command $cmd bind $bn <> {$::InsertionTarget insert insert [list \u0254\u0308]} bind $bn {ipaentry::vfoe} bind $bn {ipaentry::vroe} bhcham $bn; set cmd {$::InsertionTarget insert insert [list \u025C]} button [format ".ipaev.r%dc%d" $openmid $centurd] \ -text "\u025C" -padx $xp -pady $yp -command $cmd set cmd {$::InsertionTarget insert insert [list \u025E]} button [format ".ipaev.r%dc%d" $openmid $centrnd] \ -text "\u025E" -padx $xp -pady $yp -command $cmd set cmd {$::InsertionTarget insert insert [list \u028C]} button [format ".ipaev.r%dc%d" $openmid $backurd] \ -text "\u028C" -padx $xp -pady $yp -command $cmd set cmd {$::InsertionTarget insert insert [list \u0254]} button [format ".ipaev.r%dc%d" $openmid $backrnd] \ -text "\u0254" -padx $xp -pady $yp -command $cmd # Open open mid vowels lappend IPAEVRowLabelList [label [format ".ipaev.r%dc%d" $openopenmid $frontness] \ -text [_ "Open Open Mid"] -anchor w -padx $xp -pady $yp \ -bg $::ColorSpecs(IPAHeadings,Background)] set cmd {$::InsertionTarget insert insert [list \u00E6]} button [format ".ipaev.r%dc%d" $openopenmid $fronturd] \ -text \u00E6 -padx $xp -pady $yp -command $cmd label [format ".ipaev.r%dc%d" $openopenmid $frontrnd] -text "" -padx $xp -pady $yp set cmd {$::InsertionTarget insert insert [list \u0250]} button [format ".ipaev.r%dc%d" $openopenmid $centurd] \ -text "\u0250" -padx $xp -pady $yp -command $cmd label [format ".ipaev.r%dc%d" $openopenmid $centrnd] \ -text "" -padx $xp -pady $yp label [format ".ipaev.r%dc%d" $openopenmid $backurd] \ -text "" -padx $xp -pady $yp label [format ".ipaev.r%dc%d" $openopenmid $backrnd] \ -text "" -padx $xp -pady $yp # Open vowels lappend IPAEVRowLabelList [label [format ".ipaev.r%dc%d" $open $frontness] \ -text [_ "Open"] -anchor w -padx $xp -pady $yp \ -bg $::ColorSpecs(IPAHeadings,Background)] set cmd {$::InsertionTarget insert insert [list a]} button [format ".ipaev.r%dc%d" $open $fronturd] \ -text "a" -padx $xp -pady $yp -command $cmd set cmd {$::InsertionTarget insert insert [list \u0276]} button [format ".ipaev.r%dc%d" $open $frontrnd] \ -text "\u0276" -padx $xp -pady $yp -command $cmd label [format ".ipaev.r%dc%d" $open $centurd] \ -text "" -padx $xp -pady $yp label [format ".ipaev.r%dc%d" $open $centrnd] \ -text "" -padx $xp -pady $yp set cmd {$::InsertionTarget insert insert [list \u0251]} button [format ".ipaev.r%dc%d" $open $backurd] \ -text "\u0251" -padx $xp -pady $yp -command $cmd set cmd {$::InsertionTarget insert insert [list \u0252]} button [format ".ipaev.r%dc%d" $open $backrnd] \ -text "\u0252" -padx $xp -pady $yp -command $cmd for {set row 0} {$row <= $lastvrow} {incr row} { set line [list]; for {set col 0} {$col <= $lastvcolumn} {incr col} { set cell [format ".ipaev.r%dc%d" $row $col] lappend line $cell balloonhelp_for $cell \ [_ "Left click to insert standard characters.\n\ Right click to insert alternative characters."] } eval grid $line -sticky news; } balloonhelpd_for $DeleteButton [_ "No, there isn't a mid-mid central rounded vowel called \"Delete\".\nThis is so that you can correct mistakes while using\nthe mouse, without having to go back to the keyboard."] if {!$DisplayVowelChartColumnLabelsP} {UnpackVowelColumnLabels} if {!$DisplayVowelChartRowLabelsP} {UnpackVowelRowLabels} } #Rearrange into functional groups, e.g. tone marks, vowel quality marks, #etc. Separate IPA and non-IPA. proc PopupIPAEntryD {} { set PerRow 10; set BaseChar "o"; set xp 2; set yp 3; toplevel .ipaed -borderwidth 3 wm title .ipaed [_ "Phonetic Diacritics"] BindKeys .ipaed set DownMsg [_ "Display IPA Diacritic Chart"]; set UpMsg [_ "Remove IPA Diacritic Chart"]; bind .ipaed \ "set ::IPADIsDisplayedP 0;$::CEM entryconfigure $::ToggleIPADIndex -label \"$DownMsg\"" bind .ipaed \ "set ::IPADIsDisplayedP 0;$::CEM entryconfigure $::ToggleIPADIndex -label \"$DownMsg\"" bind .ipaed \ "set ::IPADIsDisplayedP 1;$::CEM entryconfigure $::ToggleIPADIndex -label \"$UpMsg\"" array set Diacritics [list\ 0 {"\u02D0" "long"}\ 1 {"\u02D1" "half long"}\ 2 {"\u0303" "nasalized"}\ 3 {"\u0324" "breathy voice"}\ 4 {"\u0325" "voiceless"}\ 5 {"\u032C" "voiced"}\ 6 {"\u031A" "unreleased"}\ 7 {"\u031C" "lower/open variety of vowel"}\ 8 {"\u031D" "raised/closed variety of vowel"}\ 9 {"\u031E" "lower/open variety of vowel"}\ 10 {"\u031F" "advanced/fronted"}\ 11 {"\u0320" "retracted/backed"}\ 12 {"\u0321" "palatalized"}\ 13 {"\u0322" "retroflex"}\ 14 {"\u0323" "closer variety of vowel/retroflex"}\ 15 {"\u0329" "syllabic"}\ 16 {"\u032A" "dental"}\ 17 {"\u032B" "labialized"}\ 18 {"\u0330" "creaky voice"}\ 19 {"\u0334" "velarized/pharyngealized"}\ 20 {"\u0346" "dentolabial"}\ 21 {"\u0347" "alveolar"}\ 22 {"\u0348" "strong articulation"}\ 23 {"\u0349" "weak articulation"}\ 24 {"\u02CA" "high tone"}\ 25 {"\u02CB" "low tone"}\ 26 {"\u0302" "falling tone"}\ 27 {"\u0304" "long"}\ 28 {"\u0306" "short"}\ 29 {"\u0308" "non-canonical backness"}\ 30 {"\u02CC" "secondary stress"}\ 31 {"\u02C8" "primary stress/downstep"}\ 32 {"\u02B8" "palatalized"}\ 33 {"\u02DE" "rhotacized"}\ 34 {"\u0328" "nasalized"}\ 35 {"\u034A" "denasal"}\ 36 {"\u034B" "nasal escape"}\ 37 {"\u034C" "velopharyngeal friction"}\ 38 {"\u034D" "labial spreading"}\ 39 {"\u034E" "whistled"} ]; set DiacriticCnt [llength [array names Diacritics]]; set Rows [expr ceil(double($DiacriticCnt)/double($PerRow))] set Total [expr $PerRow * $Rows] #Generate buttons with blank labels for empty padding slots for {set k 0} {$k < $Total} {incr k} { set row [expr $k/$PerRow] set col [expr $k%$PerRow] if {[info exist Diacritics($k)]} { button .ipaed.r${row}c${col} -text "$BaseChar[lindex $Diacritics($k) 0]"\ -padx $xp -pady $yp\ -command "\$::InsertionTarget insert insert [lindex $Diacritics($k) 0]" balloonhelpd_for .ipaed.r${row}c${col} [_ [lindex $Diacritics($k) 1]] } else { label .ipaed.r${row}c${col} -text ""; } set LastRow $row; set LastCol $col; } #Lay the buttons and labels out in a grid. for {set row 0} {$row <= $LastRow} {incr row} { set line [list]; for {set col 0} {$col <= $LastCol} {incr col} { set cell [format ".ipaed.r%dc%d" $row $col] lappend line $cell } eval grid $line -sticky news; } } #Accented letters proc PopupIPAEntryA {} { set PerRow 12; set xp 3; set yp 3; toplevel .ipaea -borderwidth 4 wm title .ipaea [_ "Accented Letters"] BindKeys .ipaea set DownMsg [_ "Display Accented Letter Chart"] set UpMsg [_ "Display Accented Letter Chart"] bind .ipaea \ "set ::IPAAIsDisplayedP 0;$::CEM entryconfigure $::ToggleIPAAIndex -label \"$DownMsg\"" bind .ipaea \ "set ::IPAAIsDisplayedP 0;$::CEM entryconfigure $::ToggleIPAAIndex -label \"$DownMsg\"" bind .ipaea \ "set ::IPAAIsDisplayedP 0;$::CEM entryconfigure $::ToggleIPAAIndex -label \"$UpMsg\"" set AccentedLetters [list \ {"\u00E0" "a with grave"}\ {"\u00E1" "a with acute"}\ {"\u00E2" "a with circumflex"}\ {"\u00E3" "a with tilde"}\ {"\u00E4" "a with diaresis"}\ {"\u00E5" "a with ring above"}\ {"\u0101" "a with macron"}\ {"\u0103" "a with breve"}\ {"\u0105" "a with ogonek"}\ {"\u01CE" "a with caron"}\ {"\u0201" "a with double grave"}\ {"\u0203" "a with inverted breve"}\ {"\u01DF" "a with diaresis and macron"}\ {"\u01E1" "a with dot above and macron"}\ {"\u01FB" "a with ring above"}\ {"\u0227" "a with dot above"}\ {"\u1EA1" "a with dot below"}\ {"\u01E3" "ae with macron"}\ {"\u01FD" "ash with acute"}\ {"\u0180" "b with stroke"}\ {"\u0183" "b with topbar"}\ {"\u1E03" "b with dot above"}\ {"\u1E05" "b with dot below"}\ {"\u1E07" "b with line below"}\ {"\u0188" "c with hook"}\ {"\u0107" "c with acute"}\ {"\u0109" "c with circumflex"}\ {"\u010B" "c with dot above"}\ {"\u00E7" "c with cedilla"}\ {"\u1E09" "c with cedilla and acute"}\ {"\u010D" "c with caron"}\ {"\u018c" "d with topbar"}\ {"\u010F" "d with caron"}\ {"\u0111" "d with stroke"}\ {"\u0221" "d with curl"}\ {"\u1E0B" "d with dot above"}\ {"\u1E0D" "d with dot below"}\ {"\u1E0F" "d with line below"}\ {"\u021F" "h with caron"}\ {"\u00E8" "e with grave"}\ {"\u00E9" "e with acute"}\ {"\u00EA" "e with circumflex"}\ {"\u00EB" "e with diaresis"}\ {"\u0113" "e with macron"}\ {"\u0115" "e with breve"}\ {"\u0117" "e with dot above"}\ {"\u1EB9" "e with dot below"}\ {"\u0119" "e with ogonek"}\ {"\u011B" "e with caron"}\ {"\u0229" "e with cedilla"}\ {"\u0205" "e with double grave"}\ {"\u0207" "e with inverted breve"}\ {"\u01F5" "g with acute"}\ {"\u011D" "g with circumflex"}\ {"\u011F" "g with breve"}\ {"\u0121" "g with dot above"}\ {"\u0123" "g with cedilla"}\ {"\u01E5" "g with stroke"}\ {"\u01E7" "g with caron"}\ {"\u0125" "h with circumflex"}\ {"\u0127" "h with stroke"}\ {"\u1E25" "h with dot below"}\ {"\u00EC" "i with grave"}\ {"\u00ED" "i with acute"}\ {"\u00EE" "i with circumflex"}\ {"\u00EF" "i with diaresis"}\ {"\u0129" "i with tilde"}\ {"\u012B" "i with macron"}\ {"\u012D" "i with breve"}\ {"\u012F" "i with ogonek"}\ {"\u01D0" "i with caron"}\ {"\u0209" "i with double grave"}\ {"\u020B" "i with inverted breve"}\ {"\u1ECB" "i with dot below"}\ {"\u0131" "dotless i"}\ {"\u0135" "j with circumflex"}\ {"\u01F0" "j with caron"}\ {"\u01E9" "k with caron"}\ {"\u0199" "k with hook"}\ {"\u0137" "k with cedilla "}\ {"\u1E33" "k with dot below"}\ {"\u013A" "l with acute"}\ {"\u013C" "l with cedilla"}\ {"\u013E" "l with caron"}\ {"\u0140" "l with middle dot"}\ {"\u0142" "l with stroke"}\ {"\u019A" "l with bar"}\ {"\u0234" "l with curl"}\ {"\u1E37" "l with dot below"}\ {"\u1E39" "l with dot below and macron"}\ {"\u1E3B" "l with line below"}\ {"\u019B" "lambda with stroke"}\ {"\u0235" "n with a curl"}\ {"\u0146" "n with cedilla"}\ {"\u0148" "n with caron"}\ {"\u01F9" "n with grave"}\ {"\u00F1" "n with tilde"}\ {"\u019E" "n with long right leg"}\ {"\u0144" "n with acute"}\ {"\u1E43" "m with dot below"}\ {"\u1E45" "n with dot above"}\ {"\u1E47" "n with dot below"}\ {"\u1E49" "n with line below"}\ {"\u00F2" "o with grave"}\ {"\u00F3" "o with acute"}\ {"\u00F4" "o with circumflex"}\ {"\u00F5" "o with tilde"}\ {"\u00F6" "o with diaresis"}\ {"\u00F8" "o with stroke"}\ {"\u014D" "o with macron"}\ {"\u014F" "o with breve"}\ {"\u0151" "o with double acute"}\ {"\u01A1" "o with horn"}\ {"\u01EB" "o with ogonek"}\ {"\u01ED" "o with ogonek and macron"}\ {"\u01D2" "o with caron"}\ {"\u022B" "o with diaresis and macron"}\ {"\u022D" "o with tilde and macron"}\ {"\u022F" "o with dot above"}\ {"\u01FF" "o with stroke and acute"}\ {"\u020D" "o with double grave"}\ {"\u020F" "o with inverted breve"}\ {"\u0231" "o with dot above and macron"}\ {"\u1ECD" "o with dot below"}\ {"\u0223" "ou"}\ {"\u01A5" "p with hook"}\ {"\u0155" "r with acute"}\ {"\u0157" "r with cedilla"}\ {"\u0159" "r with caron"}\ {"\u0211" "r with double grave"}\ {"\u0213" "r with inverted breve"}\ {"\u1E5B" "r with dot below"}\ {"\u027F" "reversed r with fishhook"}\ {"\u015B" "s with acute"}\ {"\u015D" "s with circumflex"}\ {"\u015F" "s with cedilla"}\ {"\u0161" "s with caron"}\ {"\u0219" "s with comma below"}\ {"\u1E63" "s with dot below"}\ {"\u021B" "t with comma below"}\ {"\u01AB" "t with palatal hook"}\ {"\u01AD" "t with hook"}\ {"\u0163" "t wwith cedilla"}\ {"\u0165" "t with caron"}\ {"\u0167" "t with stroke"}\ {"\u0236" "t with curl"}\ {"\u00F9" "u with grave"}\ {"\u00FA" "u with acute"}\ {"\u00FB" "u with circumflex"}\ {"\u00FC" "u with diaresis"}\ {"\u01D4" "u with caron"}\ {"\u01D6" "u with diaresis and macron"}\ {"\u01D8" "u with diaresis and acute"}\ {"\u01DA" "u with diaresis and caron"}\ {"\u01DC" "u with diaresis and grave"}\ {"\u01B0" "u with horn"}\ {"\u0169" "u with tilde"}\ {"\u016B" "u with macron"}\ {"\u016D" "u with breve"}\ {"\u016F" "u with ring above"}\ {"\u0171" "u with double acute"}\ {"\u0173" "u with ogonek"}\ {"\u0215" "u with double grave"}\ {"\u0217" "u with inverted breve"}\ {"\u1EE5" "u with dot below"}\ {"\u01B4" "y with hook"}\ {"\u00FD" "y with acute"}\ {"\u00FF" "y with diaresis"}\ {"\u0233" "y with macron"}\ {"\u0175" "w with circumflex"}\ {"\u0177" "y with circumflex"}\ {"\u017A" "z with acute"}\ {"\u017C" "z with dot above"}\ {"\u017E" "z with caron"}\ {"\u01B6" "z with stroke"}\ {"\u0225" "z with hook"}\ {"\u01EF" "ezh with caron"}\ ]; #Done through 0236 {"\u" ""}\ set AccentedLetterCnt [llength $AccentedLetters]; set Rows [expr ceil(double($AccentedLetterCnt)/double($PerRow))] set Total [expr $PerRow * $Rows] #Generate buttons with blank labels for empty padding slots for {set k 0} {$k < $Total} {incr k} { set row [expr $k/$PerRow] set col [expr $k%$PerRow] if {$k < $AccentedLetterCnt} { button .ipaea.r${row}c${col} -text "[lindex [lindex $AccentedLetters $k] 0]"\ -padx $xp -pady $yp\ -command "\$::InsertionTarget insert insert [lindex [lindex $AccentedLetters $k] 0]" balloonhelpd_for .ipaea.r${row}c${col} [_ [lindex [lindex $AccentedLetters $k] 1] ] } else { label .ipaea.r${row}c${col} -text ""; } } set LastRow $row; set LastCol $col; set LastCell .ipaea.r${row}c${col} destroy $LastCell button $LastCell -image $::LeftArrowImage -command {BackDelete $::InsertionTarget} balloonhelpd_for $LastCell [_ "Delete, so that you can correct mistakes while using\nthe mouse, without having to go back to the keyboard."] #Lay the buttons and labels out in a grid. for {set row 0} {$row <= $LastRow} {incr row} { set line [list]; for {set col 0} {$col <= $LastCol} {incr col} { set cell [format ".ipaea.r%dc%d" $row $col] lappend line $cell } eval grid $line -sticky news; } } } set LeftArrowImage [image create photo -data { R0lGODlhFAAUAIAAAAAAAL+/vyH5BAEAAAEALAAAAAAUABQAAAIqjI+py43gGIAxTVrNxXVz 54WTIopWGZ7oRq7X4o4wm2lvbX+ZjGv9/ysAADs= }] proc BackDelete {w} { if {[string equal [winfo class $w] "Text"]} { set Insert [$w index insert] set FirstHalf [$w get 1.0 $Insert-1chars] set SecondHalf [string trimright [$w get insert end]] $w delete 1.0 end; $w insert 1.0 $FirstHalf$SecondHalf; } else { set delind [expr [$w index insert] -1]; $w delete $delind; } } proc PopupCharEntryByCode {} { toplevel .charent -borderwidth 4 -relief raised BindKeys .charent; wm title .charent "Entry By Codepoint"; after idle { update idletasks set xmax [winfo screenwidth .charent] set ymax [winfo screenheight .charent] set x0 [expr 1 * ($xmax -[winfo reqwidth .charent])/3]; set y0 [expr 1 * ($ymax -[winfo reqheight .charent])/3]; wm geometry .charent "+$x0+$y0"; } label .charent.title -text [_ "Insert Character by Numerical Code"] frame .charent.ef; entry .charent.ef.ent -width 8 -font MainFont -relief flat -bg \#E0EEFF; label .charent.ef.prefix -text "0x" -font MainFont pack .charent.ef.prefix -side left -expand 1 -fill x -anchor e pack .charent.ef.ent -side right -expand 1 -fill x -anchor w button .charent.d -text [_ "Dismiss"] -command {destroy .charent} button .charent.x -text [_ "Delete"] -command [list BackDelete $::CharByCodeInsertionTarget] button .charent.i -text [_ "Insert"] -command {InsertUnicode} pack .charent.title -side top pack .charent.ef -side top pack .charent.d -side left -expand 1 -fill both pack .charent.x -side left -expand 1 -fill both pack .charent.i -side right -expand 1 -fill both focus .charent.ef.ent; set DownMsg [_ "Display Widget for Entering Characters by Unicode Code"]; set UpMsg [_ "Remove Widget for Entering Characters by Unicode Code"]; bind .charent \ "set ::CharEntryByCodeIsDisplayedP 0;$::CEM entryconfigure $::ToggleCharEntryByCodeIndex -label \"$DownMsg\"" bind .charent \ "set ::CharEntryByCodeIsDisplayedP 0;$::CEM entryconfigure $::ToggleCharEntryByCodeIndex -label \"$DownMsg\"" bind .charent \ "set ::CharEntryByCodeIsDisplayedP 1;$::CEM entryconfigure $::ToggleCharEntryByCodeIndex -label \"$UpMsg\"" bind .charent.ef.ent {set ::InsertionTarget [focus -lastfor .gen]} bind .charent.ef.ent {InsertUnicode} bind .charent.ef.ent {.charent.ef.ent delete 0 end;break} set charentbh [_ "Enter a character by its Unicode code, as a sequence of four hexadecimal digits.\nFor example, you may specify \'\u0298\', the International Phonetic Alphabet\nsymbol for the bilabial click, as 0298, and the Chinese character \'\u4E39\' \"egg\" as 4E39.\nDo not type the prefix 0x shown to the left of the entry box.\nIt is entered for you automatically. Return inserts the current character.\nControl-k erases the current character code."] balloonhelp_for .charent $charentbh balloonhelp_for .charent.title $charentbh balloonhelp_for .charent.ef.ent $charentbh balloonhelp_for .charent.i $charentbh balloonhelp_for .charent.d $charentbh balloonhelp_for .charent.x $charentbh set ::CharEntryByCodeIsDisplayedP 1; } #Get entry from popup, validate it, and insert it into the insertion target. proc InsertUnicode {} { ClearMessageWindow; set str [.charent.ef.ent get]; if {[string length $str] == 0} { ShowMessage [_ "The empty string is not a valid Unicode codepoint"] return ; } #Validate set BadValueP 0; #Make sure all digits are hex and that prefix is appropriate. if {[regexp {[[:xdigit:]]{4,4}} $str] == 0} { ShowMessage [_ "$str is not a well-formed hexadecimal Unicode value"] return; } set str [format "0x%s" $str] if {[scan $str "%x" num] < 1} { ShowMessage [format [_ "Ill-formed code %s"] $str] return; } #Reject illegal codepoints. if {$num > 65535} { ShowMessage [_ "Tcl/Tk may not support codepoints outside the BMP (Plane 0)."] } set BadValueP 0; set BadRanges [list\ 0x0750 0x077F\ 0x07C0 0x08FF\ 0x1380 0x139F\ 0x18B0 0x18FF\ 0x1980 0x19DF\ 0x1A00 0x1CFF\ 0x1D80 0x1DFF\ 0x2C00 0x2E7F\ 0x2FE0 0x2FEF\ 0x31C0 0x31EF\ 0x9FB0 0x9FFF\ 0xA4D0 0xABFF\ 0xD7B0 0xD7FF\ 0xD800 0xDBFF\ 0xDC00 0xDFFF\ 0xFE10 0xFE1F\ 0x10140 0x102FF\ 0x104B0 0x107FF\ 0x10840 0x1CFFF\ 0x1D200 0x1D2FF\ 0x1D360 0x1D3FF\ 0x1D800 0x1FFFF\ 0x2A6E0 0x2F7FF\ 0x2FAB0 0x2FFFF\ 0xE0080 0xE00FF\ 0xE01F0 0xEFFFF\ 0xFFFFE 0xFFFFF]; for {set k 0} {$k < [llength $BadRanges]} {incr k} { if { ($num >= [lindex $BadRanges [expr 2 * $k]]) &&\ ($num <= [lindex $BadRanges [expr (2 * $k) + 1]])} { set BadValueP 1; break; } } if {$BadValueP} { ShowMessage [format [_ "%s is not a valid Unicode codepoint"] $str] return; } if {$num >= 1114110} { ShowMessage [_ "Warning: codepoints above 0x10FFFD have not been assigned as of version 4.0."] } #Insert $::CharByCodeInsertionTarget insert insert [format "%c" $num] } proc IndicateIPACUp {} { $::CEM entryconfigure $::ToggleIPACIndex \ -label [_ "Remove IPA Consonant Chart"]; set ::IPACIsDisplayedP 1; } proc IndicateIPACDown {} { $::CEM entryconfigure $::ToggleIPACIndex \ -label [_ "Display IPA Consonant Chart"]; set ::IPACIsDisplayedP 0; } proc ToggleIPAC {} { global IPACIsDisplayedP; global m; if { $IPACIsDisplayedP == 0} { if {[winfo exists .ipaec]} { wm deiconify .ipaec; } else { ipaentry::PopupIPAEntryC; } IndicateIPACUp; } else { wm iconify .ipaec; IndicateIPACDown; } } proc IndicateIPAVUp {} { $::CEM entryconfigure $::ToggleIPAVIndex \ -label [_ "Remove IPA Vowel Chart"]; set ::IPAVIsDisplayedP 1; } proc IndicateIPAVDown {} { $::CEM entryconfigure $::ToggleIPAVIndex \ -label [_ "Display IPA Vowel Chart"]; set ::IPAVIsDisplayedP 0; } proc ToggleIPAV {} { global IPAVIsDisplayedP; global m; if { $IPAVIsDisplayedP == 0} { if {[winfo exists .ipaev]} { wm deiconify .ipaev; } else { ipaentry::PopupIPAEntryV; } $::CEM entryconfigure $::ToggleIPAVIndex -label [_ "Remove IPA Vowel Chart"]; set IPAVIsDisplayedP 1; } else { wm iconify .ipaev; $::CEM entryconfigure $::ToggleIPAVIndex -label [_ "Display IPA Vowel Chart"]; set IPAVIsDisplayedP 0; } } proc IndicateIPADUp {} { $::CEM entryconfigure $::ToggleIPADIndex \ -label [_ "Remove IPA Diacritic Chart"]; set ::IPADIsDisplayedP 1; } proc IndicateIPADDown {} { $::CEM entryconfigure $::ToggleIPADIndex \ -label [_ "Display IPA Diacritic Chart"]; set ::IPADIsDisplayedP 0; } proc ToggleIPAD {} { global IPADIsDisplayedP; global m; if { $IPADIsDisplayedP == 0} { if {[winfo exists .ipaed]} { wm deiconify .ipaed; } else { ipaentry::PopupIPAEntryD; } IndicateIPADUp } else { wm iconify .ipaed; IndicateIPADDown; } } proc IndicateIPAAUp {} { $::CEM entryconfigure $::ToggleIPAAIndex \ -label [_ "Remove Accented Letter Chart"]; set ::IPAAIsDisplayedP 1; } proc IndicateIPAADown {} { $::CEM entryconfigure $::ToggleIPAAIndex \ -label [_ "Display Accented Letter Chart"]; set ::IPAAIsDisplayedP 0; } proc ToggleIPAA {} { global m; if { $::IPAAIsDisplayedP == 0} { if {[winfo exists .ipaea]} { wm deiconify .ipaea; } else { ipaentry::PopupIPAEntryA; } IndicateIPAAUp; } else { wm iconify .ipaea; IndicateIPAADown; } } proc IndicateCharEntryByCodeUp {} { $::CEM entryconfigure $::ToggleCharEntryByCodeIndex \ -label [_ "Remove Widget for Entering Characters by Unicode Code"]; set ::CharEntryByCodeIsDisplayedP 1; } proc IndicateCharEntryByCodeDown {} { $::CEM entryconfigure $::ToggleCharEntryByCodeIndex \ -label [_ "Display Widget for Entering Characters by Unicode Code"]; set ::CharEntryByCodeIsDisplayedP 0; } proc ToggleCharEntryByCode {} { global CharEntryByCodeIsDisplayedP; global m; if { $CharEntryByCodeIsDisplayedP == 0} { if {[winfo exists .charent]} { wm deiconify .charent; raise .charent; } else { PopupCharEntryByCode; } IndicateCharEntryByCodeUp; } else { wm iconify .charent; IndicateCharEntryByCodeDown; } } proc SetUseCheckbuttonP {b} { set ::UseCheckbuttonP [Boolean $b]; } proc SetExclusionsDisplayedP {b} { set ::ExclusionsDisplayedP [Boolean $b] } proc SetKeyFieldIdentificationDisplayedP {b} { set ::KeyFieldIdentificationDisplayedP [Boolean $b] } proc SetMiscellaneousOptionsDisplayedP {b} { set ::MiscellaneousOptionsDisplayedP [Boolean $b] } proc SetSortOrderDisplayedP {b} { set ::SortOrderDisplayedP [Boolean $b] } proc SetSortTypeDisplayedP {b} { set ::SortTypeDisplayedP [Boolean $b] } proc SetSubstitutionsDisplayedP {b} { set ::SubstitutionsDisplayedP [Boolean $b] } proc SetRecordParseDisplayedP {b} { set ::RecordParseDisplayedP [Boolean $b]; } proc SetMiscOptionsDisplayedP {b} { set ::MiscOptionsDisplayedP [Boolean $b]; } proc SetUnicodeDisplayedP {b} { set ::UnicodeDisplayedP [Boolean $b]; } proc SetOutputFileDisplayedP {b} { set ::OutputFileDisplayedP [Boolean $b]; } proc SetAlgorithmDisplayedP {b} { set ::AlgorithmDisplayedP [Boolean $b]; } proc SetInputFileDisplayedP {b} { set ::InputFileDisplayedP [Boolean $b]; } proc SetSortAlgorithm {s} { set ::SortAlgorithm $s; } proc SetDisplayConsonantChartColumnLabelsP {b} { global DisplayConsonantChartColumnLabelsP set DisplayConsonantChartColumnLabelsP [Boolean $b]; } proc SetDisplayConsonantChartRowLabelsP {b} { global DisplayConsonantChartRowLabelsP set DisplayConsonantChartRowLabelsP [Boolean $b]; } proc SetDisplayVowelChartColumnLabelsP {b} { global DisplayVowelChartColumnLabelsP set DisplayVowelChartColumnLabelsP [Boolean $b] } proc SetDisplayVowelChartRowLabelsP {b} { global DisplayVowelChartRowLabelsP set DisplayVowelChartRowLabelsP [Boolean $b] } proc ControlDisplayConsonantChartColumnLabels {} { if {$::DisplayConsonantChartColumnLabelsP} { ipaentry::PackConsonantColumnLabels; } else { ipaentry::UnpackConsonantColumnLabels; } } proc ControlDisplayConsonantChartRowLabels {} { if {$::DisplayConsonantChartRowLabelsP} { ipaentry::PackConsonantRowLabels; } else { ipaentry::UnpackConsonantRowLabels; } } proc ControlDisplayVowelChartColumnLabels {} { if {$::DisplayVowelChartColumnLabelsP} { ipaentry::PackVowelColumnLabels; } else { ipaentry::UnpackVowelColumnLabels; } } proc ControlDisplayVowelChartRowLabels {} { if {$::DisplayVowelChartRowLabelsP} { ipaentry::PackVowelRowLabels; } else { ipaentry::UnpackVowelRowLabels; } } #################################################### #File -> LineList LoadCustomCharacterChart #LineList -> CDEF DefineCustomCharacterChart #CDEF -> Popup PopupSpecialPalette proc ReadCustomCharacterChartPopup {args} { if {[llength $args]} { set dl [LoadCustomCharacterChart [lindex $args 0]] } else { set dl [LoadCustomCharacterChart]; } PopupSpecialPalette [DefineCustomCharacterChart $dl] } proc DefineCustomCharacterChartPopup {ll} { PopupSpecialPalette [DefineCustomCharacterChart $ll]; } #Returns a linelist. proc LoadCustomCharacterChart {args} { if {[llength $args]} { set fn [lindex $args 0] } else { set fn [tk_getOpenFile -title [_ "Load Custom Character Chart"]]; if {[string equal $fn ""]} { ShowMessage [_ "File selection cancelled."]; return ; } } if { [catch {open $fn "r"} fhd ] != 0} { ShowMessage [format [_ "Unable to open character chart definition file %s."] $fn]; return ; } set LineCnt 0 while { [gets $fhd line] > 0} { lappend Lines $line; incr LineCnt } close $fhd; if {$LineCnt < 1} { ShowMessage [_ "File %s is empty" $fn] return ""; } ShowMessage [format [_ "Loaded custom character chart definition from %s."] $fn] return $Lines; } #This procedure takes a list of lines defining a custom #character entry chart, which may have been read from a #standalone file or may be an instant list in an #init file, and generates an internal character chart #definition, which it stores. It does not actualy #create a display proc DefineCustomCharacterChart {LineList {fn NONE}} { #The first line is special. It contains meta-information: #the title, the desired number of buttons per row, #and the proposed font family and size. Only the #title is obligatory. set line [lindex $LineList 0] set flds [split $line "|"] set FieldCnt [llength $flds]; set Title [lindex $flds 0]; #The remaining lines contain pairs of code sequences and glosses. set cd [list]; set LineList [lrange $LineList 1 end] foreach line $LineList { set f [split $line "|"]; set gloss [lindex $f 1]; set c [string trim [lindex $f 0] \"]; set cf [split $c]; set str "\{\""; foreach n $cf { append str [format "%s" $n] } append str "\"" append str [format " \"%s\"\}" $gloss] lappend cd $str; } set info [list [join $cd]] if {$FieldCnt > 1} { lappend info [lindex $flds 1]; # Columns } if {$FieldCnt > 2} { lappend info [lindex $flds 2]; # Font family } if {$FieldCnt > 3} { lappend info [lindex $flds 3]; # Font size } if {![string equal $fn NONE]} { # File name lappend info $fn; } set ::SpecialCharacterPalette($Title) $info; $::CEM add command -label $Title -command "PopupSpecialPalette $Title"; incr ::CustomCEMEntries; return $Title; } #Creates a popup chart from a stored definition. set SccCnt 0; proc PopupSpecialPalette {Title} { set name [format ".scc%d" $::SccCnt] if {[info exists ::SpecialCharacterPalette($Title,WidgetName)]} { set w $::SpecialCharacterPalette($Title,WidgetName); if {[winfo exists $w]} { wm deiconify $w; raise $w; return ; } } set cdefs [lindex $::SpecialCharacterPalette($Title) 0]; set Items [llength $::SpecialCharacterPalette($Title)]; if {$Items > 1} { set PerRow [lindex $::SpecialCharacterPalette($Title) 1]; } else { set PerRow 5; } if {$Items > 2} { set FontFamily [lindex $::SpecialCharacterPalette($Title) 2]; } else { set FontFamily $::FontInfo(CharacterEntryFont,family) } if {$Items > 3} { set FontSize [lindex $::SpecialCharacterPalette($Title) 3]; } else { set FontSize $::FontInfo(CharacterEntryFont,size); } incr ::SccCnt; set xp 3; set yp 3; toplevel $name -borderwidth 4 set ::SpecialCharacterPalette($Title,WidgetName) $name; wm title $name $Title iwidgets::scrolledframe $name.sf -vscrollmode dynamic -hscrollmode dynamic \ -height 180 -width 250 set tf [$name.sf childsite] pack $name.sf -expand 1 -fill both BindKeys $name bind [$name.sf component vertsb] <> \ "ScrollbarMoveBigIncrement [$name.sf component vertsb] 0.20 %x %y" set CdefCnt [llength $cdefs]; set Rows [expr int(ceil(double($CdefCnt)/double($PerRow)))] set Total [expr $PerRow * $Rows] if {$CdefCnt == $Total} { incr Rows; set Total [expr $PerRow * $Rows] } set fontname [string trimleft $name .]Font font create $fontname -family $FontFamily -size $FontSize for {set k 0} {$k < $Total} {incr k} { set row [expr $k/$PerRow] set col [expr $k%$PerRow] if {$k < $CdefCnt} { set csalt ""; set entry [lindex $cdefs $k]; set chstr [lindex $entry 0]; set gloss [lindex $entry 1]; set chstrParts [split $chstr ":"]; if {[llength $chstrParts] > 1} { set cs [lindex $chstrParts 0]; set csalt [lindex $chstrParts 1]; } else { set cs [lindex $chstr 0]; } button $tf.r${row}c${col} -text $cs\ -padx $xp -pady $yp -font $fontname\ -command "\$::InsertionTarget insert insert $cs" if {![string equal $csalt ""]} { bind $tf.r${row}c${col} <> "\$::InsertionTarget insert insert $csalt" } balloonhelpd_for $tf.r${row}c${col} $gloss; } else { set ln $tf.r${row}c${col}; #Generate buttons with blank labels for empty padding slots label $ln -text ""; balloonhelp_for $ln [_ "This space for rent."] } } set LastRow $row; set LastCol $col; set LastCell $tf.r${row}c${col} destroy $LastCell button $LastCell -image $::LeftArrowImage -command {BackDelete $::InsertionTarget} balloonhelpd_for $LastCell [_ "Delete, so that you can correct mistakes while using\nthe mouse, without having to go back to the keyboard."] #Lay the buttons and labels out in a grid. for {set row 0} {$row <= $LastRow} {incr row} { set line [list]; for {set col 0} {$col <= $LastCol} {incr col} { set cell [format "%s.r%dc%d" $tf $row $col] lappend line $cell } eval grid $line -sticky news; } return $name; } proc ExplainStringLength {} { global HPWidth; global HPLines; global PopupList; if {[info exists PopupList(StringLength)]} { if {[winfo exists $PopupList(StringLength)]} { destroy $PopupList(StringLength); return; } } set po [CreateTextDisplay [_ "String Length Comparison"] $HPWidth 12] BindKeys $po; set PopupList(StringLength) $po; AppendToTextDisplay $po [_ "If this option is chosen, records are compared on this key on the basis of the length of the key string in characters. Length is measured after preprocessing, including multigraph compression and deletion of excluded characters. Keys compared for size are treated exactly like lexicographic keys except that when comparisons are finally done on them, the comparison is a numeric comparison of the length of the key rather than a lexicographic comparison of the key as a string."]; AppendToTextDisplay $po [_ "\n\n"] AppendToTextDisplay $po [_ "If you use string length as the primary key with a data set of any size, you will probably find that the sort takes a long time. This is because the number of different word-lengths in most data sets is very small in comparison to the number of distinct words. This means that on the primary key most words are ranked the same as many other words. The result is that the sort routine does many comparisons in a largely futile effort to break ties."] AppendToTextDisplay $po [_ "\n\n"] AppendToTextDisplay $po [_ "In this situation, you can speed up the sort considerably by adding a subsidiary key that can be used to break ties. For example, a straight lexicographic sort of a list of 254,817 English words required 6,852,774 comparisons and took 10 seconds on my desktop machine.Sorting the same list purely on string length required 3,173,191,623 comparisons, more than 12,000 times as many, and took almost 25 minutes, 1500 times as long. This is because this file contains only 25 different word lengths, of which nine comprise over 92% of the list. Sorting the list with string length as the primary key and a lexicographic secondary key required 6,671,259 comparisons, slightly fewer than the pure lexicographic sort, and took about 10 seconds. Much of the time you probably want to do this anyway as you won't want the results to be ordered randomly so long as they are of the same length, but even if you really don't care about anything other than string length, it will probably be to your advantage to add a tie-breaking key."] } proc ExplainNumericComparison {} { global HPWidth; global HPLines; global PopupList; if {[info exists PopupList(Numeric)]} { if {[winfo exists $PopupList(Numeric)]} { destroy $PopupList(Numeric); return; } } set po [CreateTextDisplay [_ "Numeric Comparison"] $HPWidth $HPLines] BindKeys $po; set PopupList(Numeric) $po; AppendToTextDisplay $po [_ "If this option is chosen, records are compared on this key on the basis of the numerical value of the keys. Each string is converted to a floating point number. Consider, for example, the strings \`9\' and \`10\' . If these are compared lexicographically, \`10\' will be ordered before \`9\' because the character \`1\' precedes \`9\'. If they are compared numerically, \`9\' is ordered before \`10\' because 9 is less than 10."];} proc ExplainNumberSystem {} { global HPWidth; global HPLines; global PopupList; if {[info exists PopupList(NumberSystem)]} { if {[winfo exists $PopupList(NumberSystem)]} { destroy $PopupList(NumberSystem); return; } } set po [CreateTextDisplay [_ "Number System"] $HPWidth $HPLines] BindKeys $po; set PopupList(NumberSystem) $po; AppendToTextDisplay $po [_ "By default numbers are written in the usual Indo-Arabic numbers. Msort can handle a variety of other number systems. You may specify a number system or one of two special values. The value \'all\' means that any supported number system may be used. Different records may make use of different number systems. Msort will detect the number system used by each key. The value \'any\' means that any supported number system may be used but that all records must use the same one. Msort will determine the number system on the basis of the first record and assume that subsequent records use the same number system for that field.\n"];} proc ExplainTimeComparison {} { global HPWidth; global HPLines; global PopupList; if {[info exists PopupList(Time)]} { if {[winfo exists $PopupList(Time)]} { destroy $PopupList(Time); return; } } set po [CreateTextDisplay [_ "Time Comparison"] $HPWidth $HPLines] BindKeys $po; set PopupList(Time) $po; AppendToTextDisplay $po [_ "If this option is chosen, records are compared on this key on the basis of the key interpreted as a time. Each string is parsed as a time and converted to a purely numerical form. The strings are then compared numerically."]; AppendToTextDisplay $po [_ "A time is expected to be of the form \`HH:MM(.SS)\'or \'HH:MM:SS(.sss)\'. In the first case, an integer specifying the hour followed by a colon followed by an integer specifying the minute is expected, with an integer specifying the second, separated from the minute by a period, optional. In the second case, an integer specifying the hour followed by a colon specifying the mintute followed by an integer specifying the second is expected, with an integer specying fractional seconds separated from the second by a period optional."]; AppendToTextDisplay $po [_ "Msort detects and reports inappropriate values such as minutes greater than 59."]; AppendToTextDisplay $po [_ "Examples of well-formed times are: 23:11:08, 23:11:08.5, 11:10.55, and 14:11"]; } proc ExplainAngleComparison {} { global HPWidth; global HPLines; global PopupList; if {[info exists PopupList(Angle)]} { if {[winfo exists $PopupList(Angle)]} { destroy $PopupList(Angle); return; } } set po [CreateTextDisplay [_ "Angle Comparison"] $HPWidth $HPLines] BindKeys $po; set PopupList(Angle) $po; AppendToTextDisplay $po [_ "If this option is chosen, the key is treated as an angle in sexagesimal degree format. The angle is expected to be in the format DD:MM:SS(.sss), that is to say, degrees, minutes, and seconds separated by colons, with an optional fractional part for seconds. The key is converted to a value with dimensions of seconds and compared numerically. Msort detects and reports invalid values such as seconds greater than or equal to 60."];} proc ExplainDateComparison {} { global HPWidth; global HPLines; global PopupList; if {[info exists PopupList(Date)]} { if {[winfo exists $PopupList(Date)]} { destroy $PopupList(Date); return; } } set po [CreateTextDisplay [_ "Date Comparison"] $HPWidth $HPLines] BindKeys $po; set PopupList(Date) $po; AppendToTextDisplay $po [_ "If this option is chosen, records are compared on this key on the basis of the key interpreted as a date. Each string is parsed as a date and converted to a purely numerical form. The strings are then compared numerically."]; AppendToTextDisplay $po [_ "For example, a date in the"]; AppendLinkToTextDisplay $po [_ "International Date Format"] {ShowWebPage http://www.saqqara.demon.co.uk/datefmt.htm}; AppendToTextDisplay $po [_ "consists of the year followed by the month followed by the day separated by dashes, e.g. 2005-04-24 for April 4, 2005. The format for such a date is: y-m-d."]; AppendToTextDisplay $po [_ "The same date in the format usual in Europe has the format d/m/y, i.e. 24/04/2005."]; AppendToTextDisplay $po [_ "The same date in the format usual in the United States has the format m/d/y, i.e. 4/24/2005."]; AppendToTextDisplay $po [_ "The punctuation used to separate the components of dates also varies. In many countries periods are used instead of slashes, e.g. 24.04.2005, for which the format specification is: d.m.y"]; } proc ExplainDomainNameComparison {} { global HPWidth; global HPLines; global PopupList; if {[info exists PopupList(DomainName)]} { if {[winfo exists $PopupList(DomainName)]} { destroy $PopupList(DomainName); return; } } set po [CreateTextDisplay [_ "Domain Name Comparison"] $HPWidth $HPLines] BindKeys $po; set PopupList(DomainName) $po; AppendToTextDisplay $po [_ "If this option is chosen, the key is parsed into components separated by periods and the order of the components is reversed. For example, directory.fsf.org is treated as if it were org.fsf.directory. Using this type of comparison results in output in which subdomains of the same domain are grouped together."]; AppendToTextDisplay $po "\n\n" AppendToTextDisplay $po [_ "Instead of"]; AppendToTextDisplay $po "\n\n" AppendToTextDisplay $po [_ "directory.fsf.org\nfreshmeat.net\nsourceforge.net\nwww.fsf.org\nwww.gnu.org"]; AppendToTextDisplay $po "\n\n" AppendToTextDisplay $po [_ "the order will be:\n\n"] AppendToTextDisplay $po [_ "freshmeat.net\nsourceforge.net\ndirectory.fsf.org\nwww.fsf.org\nwww.gnu.org"]; AppendToTextDisplay $po "\n\n" AppendToTextDisplay $po "Email addresses are also handled. They are treated just like domain names save for the fact that if the string contains an @-sign, the substring preceding the @-sign is treated as an additional component." } proc ExplainISO8601Comparison {} { global HPWidth; global HPLines; global PopupList; if {[info exists PopupList(ISO8601)]} { if {[winfo exists $PopupList(ISO8601)]} { destroy $PopupList(ISO8601); return; } } set po [CreateTextDisplay [_ "ISO8601 Date/Time Comparison"] $HPWidth $HPLines] BindKeys $po; set PopupList(ISO8601) $po; AppendToTextDisplay $po [_ "If this option is chosen, records are compared on this key on the basis of the assumption that the key consists of a combined date and time in the format standardized by International Standards Organization standard 8601. Such combined dates and times consist of a date in ISO8601 format, the upper case letter , and a time in international format. An ISO8601 date consists of a year number followed by month number followed by day number, separated by hyphens. A time in international format is a 24-hour time with hours preceding minutes separated by a colon. Seconds optionally follow, separated from minutes by a period."]; AppendToTextDisplay $po [_ "For example, 2005-04-25T14:11.33 represents 33 seconds past 2:11 p.m. on April 25th, 2005."]; } proc ExplainLexicographicComparison {} { global HPWidth; global HPLines; global PopupList; if {[info exists PopupList(Lexicographic)]} { if {[winfo exists $PopupList(Lexicographic)]} { destroy $PopupList(Lexicographic); return; } } set po [CreateTextDisplay [_ "Lexicographic Comparison"] $HPWidth $HPLines] BindKeys $po; set PopupList(Lexicographic) $po; AppendToTextDisplay $po [_ "If this option is chosen, records are compared on this key by \'dictionary ordering\'. If the first letters of the two words have different sort ranks, that determines the ordering of the two words. If not, we consider the next letter of each word. Again, if they have different sort ranks, we are done, but if they do not, we move on to the next letter. If one string comes to an end before the other, the shorter string ranks first."]; AppendToTextDisplay $po "\n\n" AppendToTextDisplay $po [_ "It is important to be careful about the use of terms like \"lexicographic\" and \"dictonary\" order because they are used inconsistently. Here I am using the term \"lexicographic\" only to mean that the ordering is based on the ranking of the individual letters and not on interpretation of the string in some fashion, as it is when we sort numerically. At least three other meanings of this term exist. First, some people consider \"dictionary\" order to be case-insensitive. With Msort, if you want case-insensitive behavior you can get it, but it is controlled by a separate option. Secondly, some people use this term for sorting in which sequences of digits are treated as integers and compared numerically. If you want this behavior in Msort, you want \"hybrid\" sorting. Third, the term may imply that non-alphanumeric characters are ignored. Again, this behavior is available in Msort if you want it, but it is not implicit in either \"lexicographic\" or \"hybrid\" comparison. If you want to ignore certain characters, use the exclusion facilities."] AppendToTextDisplay $po [_ "As examples of the other usages, the --dictionary option in GNU sort has the effect of making the comparison case-insensitive and of making it ignore non-alphanumeric characters. The -dict option to Tcl's lsort command has the effect of treating sequences of digits as integers and comparing them numerically."] } proc ExplainHybridComparison {} { global HPWidth; global HPLines; global PopupList; if {[info exists PopupList(Hybrid)]} { if {[winfo exists $PopupList(Hybrid)]} { destroy $PopupList(Hybrid); return; } } set po [CreateTextDisplay [_ "Hybrid Comparison"] $HPWidth $HPLines] BindKeys $po; set PopupList(Hybrid) $po; AppendToTextDisplay $po [_ "This type of comparison is the same as lexicographic comparison except for the treatment of numerals."]; AppendToTextDisplay $po [_ "In lexicographic comparison, numerals are treated like any other characters."] AppendToTextDisplay $po [_ "For example, A12 sorts before A3 because 1 precedes 3."] AppendToTextDisplay $po [_ "In hybrid comparison, each uninterrupted string of numerals is converted to the number that it represents. "]; AppendToTextDisplay $po [_ "These numbers are then compared numerically."] AppendToTextDisplay $po [_ "In a hybrid sort, A3 sorts before A12 because the number 3 is less than the number 12."]; } proc ExplainRandomComparison {} { global HPWidth; global HPLines; global PopupList; if {[info exists PopupList(Random)]} { if {[winfo exists $PopupList(Random)]} { destroy $PopupList(Random); return; } } set po [CreateTextDisplay [_ "Random Comparison"] $HPWidth $HPLines] BindKeys $po; set PopupList(Random) $po; AppendToTextDisplay $po [_ "This option is used for randomizing files, not actually for sorting them. Its effect is that, each time two records are compared on the specified key, the result of the comparison is determined by a random number generator rather than by the contents of the key fields. The records will be reported as comparing less-than, equal, or greater-than with equal probability."]; } proc ExplainPositionID {} { global HPWidth; global HPLines; global PopupList; if {[info exists PopupList(PositionID)]} { if {[winfo exists $PopupList(PositionID)]} { destroy $PopupList(PositionID); return; } } set po [CreateTextDisplay [_ "Identifying Keys by Position"] $HPWidth $HPLines] BindKeys $po; set PopupList(PositionID) $po; AppendToTextDisplay $po [_ "A key is identified by position by specifying a contiguous range of positions, where a position consists of a field number and a character offset into the field. Fields may be counted from the end of the record by using negative numbers. The first field is numbered 1, the last field -1. Character offsets must be positive and begin at 1. The beginning and end of a range may be the same. For example, the range 1.2,1.2 specifies the key as consisting of the second character of the first field. The range 1.1,-1.2 specifies the key as the first field through the last field, with only the first character of the last field in the key."]; } proc ExplainTagID {} { global HPWidth; global HPLines; global PopupList; if {[info exists PopupList(TagID)]} { if {[winfo exists $PopupList(TagID)]} { destroy $PopupList(TagID); return; } } set po [CreateTextDisplay [_ "Identifying Key Fields By Tag"] $HPWidth $HPLines] BindKeys $po; set PopupList(TagID) $po; AppendToTextDisplay $po [_ "When key fields are identified by tags, each field must begin with a string that indicates what field it is. For example, in an address list one tag might be \`Postal Code\', which would indicate that the remainder of the field contains a postal code. Tags do not have to be fixed strings; Msort allows tags to be specified by regular expressions. The regular expression notation used is that of the "]; AppendLinkToTextDisplay $po [_ "TRE library."] {ShowWebPage http://laurikari.net/tre/}; AppendToTextDisplay $po [_ " Details may be found in the "]; AppendLinkToTextDisplay $po [_ "TRE Syntax Manual."] {ShowWebPage http://laurikari.net/tre/syntax.html}; } proc ExplainRangeID {} { global HPWidth; global HPLines; global PopupList; if {[info exists PopupList(RangeID)]} { if {[winfo exists $PopupList(RangeID)]} { destroy $PopupList(RangeID); return; } } set po [CreateTextDisplay [_ "Identifying Key Fields By Character Range"] $HPWidth $HPLines] BindKeys $po; set PopupList(RangeID) $po; AppendToTextDisplay $po [_ "A range of characters may be specified as a key. A range\ consists of the characters M through N. The first character in the record has index 1.\ Negative indices indicate position with respect to the end of the record. For\ example, the range 1 through 3 contains the first three characters of the record. The range 3 through -2 contains the third character through the next-to-last character."]; } proc ExplainReverseKey {} { global HPWidth; global HPLines; global PopupList; if {[info exists PopupList(ReverseKey)]} { if {[winfo exists $PopupList(ReverseKey)]} { destroy $PopupList(ReverseKey); return; } } set po [CreateTextDisplay [_ "Key Reversal"] $HPWidth $HPLines] BindKeys $po; set PopupList(ReverseKey) $po; AppendToTextDisplay $po [_ "Key reversal means reversing the order of characters in the key. For example, reversing \'spelling\' yields \'gnilleps\'. Reversing the order of characters in a key gives priority to the end of a string rather than to its beginning. Among other things, this option allows the generation of reverse dictionaries. Note that reversal is done following multigraph compression. For example, if \`lh\' is declared in the sort order specification as a multigraph, \`bilh\' will sort as if it were \`lhib\', not as if it were \`hlib\'. Key reversal is only applicable to lexicographic keys."] } proc ExplainInvertComparison {} { global HPWidth; global HPLines; global PopupList; if {[info exists PopupList(InvertComparison)]} { if {[winfo exists $PopupList(InvertComparison)]} { destroy $PopupList(InvertComparison); return; } } set po [CreateTextDisplay [_ "Inversion of Comparison"] $HPWidth 20] BindKeys $po; set PopupList(InvertComparison) $po; AppendToTextDisplay $po [_ "Sorting ultimately comes down to pairwise comparisons of records, where it is decided whether one record is greater than the other, less than it, or equal to it. Inverting comparison means making the opposite decision for comparisons on this key. For instance, if we are comparing numerical values and record A's key is 100 and record B's key is 200, the usual comparison will order A before B. If comparisons on this key are inverted, A will be ordered after B."] AppendToTextDisplay $po [_ "If there is only a single key, inverting comparisons has the same effect as a global inversion of the sort order. If there is more than one key, however, the effect of inverting comparisons on invidual keys is not the same as that of a global inversion of the sort order. Suppose, for example, that you have a list of names and dates, such as this:\n\n"]; AppendToTextDisplay $po [_ " 2004/01/17 Smith\n"] AppendToTextDisplay $po [_ " 2004/03/15 Khaled\n"] AppendToTextDisplay $po [_ " 2004/03/15 Gomez\n"] AppendToTextDisplay $po [_ " 1999/01/28 Yamamoto\n"] AppendToTextDisplay $po [_ " 2003/02/03 Maurois\n"] AppendToTextDisplay $po [_ " 1999/01/28 Burger\n"] AppendToTextDisplay $po [_ "\n"] AppendToTextDisplay $po [_ "Here is the result of sorting first by date, then by name, in both cases in the usual ascending order:\n\n"] AppendToTextDisplay $po [_ " 1999/01/28 Burger\n"] AppendToTextDisplay $po [_ " 1999/01/28 Yamamoto\n"] AppendToTextDisplay $po [_ " 2003/02/03 Maurois\n"] AppendToTextDisplay $po [_ " 2004/01/17 Smith\n"] AppendToTextDisplay $po [_ " 2004/03/15 Gomez\n"] AppendToTextDisplay $po [_ " 2004/03/15 Khaled\n"] AppendToTextDisplay $po [_ "\n"] AppendToTextDisplay $po [_ "Now suppose that you decide that you would like the most recent dates first. If you invert the order globally, the result is this:\n"] AppendToTextDisplay $po [_ "\n"] AppendToTextDisplay $po [_ " 2004/03/15 Khaled\n"] AppendToTextDisplay $po [_ " 2004/03/15 Gomez\n"] AppendToTextDisplay $po [_ " 2004/01/17 Smith\n"] AppendToTextDisplay $po [_ " 2003/02/03 Maurois\n"] AppendToTextDisplay $po [_ " 1999/01/28 Yamamoto\n"] AppendToTextDisplay $po [_ " 1999/01/28 Burger\n"] AppendToTextDisplay $po [_ "\n"] AppendToTextDisplay $po [_ "This is probably not what you want. The dates are now descending, but the names are in reverse alphabetical order. What you want is more likely this:\n"] AppendToTextDisplay $po [_ "\n"] AppendToTextDisplay $po [_ " 2004/03/15 Gomez\n"] AppendToTextDisplay $po [_ " 2004/03/15 Khaled\n"] AppendToTextDisplay $po [_ " 2004/01/17 Smith\n"] AppendToTextDisplay $po [_ " 2003/02/03 Maurois\n"] AppendToTextDisplay $po [_ " 1999/01/28 Burger\n"] AppendToTextDisplay $po [_ " 1999/01/28 Yamamoto\n"] AppendToTextDisplay $po [_ "\n"] AppendToTextDisplay $po [_ "This is the result of inverting comparisons on dates but not on names.\n"] } proc ExplainFoldCase {} { global HPWidth; global HPLines; global PopupList; if {[info exists PopupList(FoldCase)]} { if {[winfo exists $PopupList(FoldCase)]} { destroy $PopupList(FoldCase); return; } } set po [CreateTextDisplay [_ "Case Folding"] $HPWidth $HPLines] BindKeys $po; set PopupList(FoldCase) $po; AppendToTextDisplay $po [_ "It is often the case that upper- and lower-case letters should be treated the same for sorting purposes. Setting case folding on makes comparisons insensitive to case.This can be done by the use of a suitable sort order definition, but it is common enough that msort, like other sorting programs, provides a separate option for it."] } proc ExplainUnicodeNormalization {} { global HPWidth; global HPLines; global PopupList; if {[info exists PopupList(UnicodeNormalization)]} { if {[winfo exists $PopupList(UnicodeNormalization)]} { destroy $PopupList(UnicodeNormalization); return; } } set po [CreateTextDisplay [_ "Unicode Normalization"] $HPWidth $HPLines] BindKeys $po; set PopupList(UnicodeNormalization) $po; AppendToTextDisplay $po [_ "There are quite a few composite characters, such as letters with accents, that may be represented in Unicode in more than one way depending on whether the composite character consists of a single codepoint or more than one codepoint. For example, the letter é \"lower case e with acute accent\", may be encoded as a single unit at U+00E9 or as the sequence of lower case e with no accent, U+0085 followed by the combining acute accent U+0301. In the first case we have canonically composed encoding. In the second case we have the canonically decomposed encoding. Normalization to normalization format NFC converts sequences like U+0085 U+0301 to U+00E9. Normalization to Normalization Form NFD converts single codepoints like U+00E9 to U+0085 U+0301. If neither normalization form is used a string containing U+00E9 will not,in general, be treated the same way as a string containing, in the same position, U+0065 U+0301. As this is generally desirable, msort by default converts keys to normalization format C.\n\n"] AppendToTextDisplay $po [_ "Normalization forms NFKC and NFKD are similar but involve additional decompositions known as compatibility decompositions. Compatibility decompositions decompose characters into sequences of characters that are not exactly equivalent typographically but are equivalent for some purposes. For example, the character U+2161 \u2161 represents the roman numeral for 2. It has the compatibility decomposition U+0049 U+0049 consisting of two instances of the letter I. Stylistic variants have the plain form as their compatibility decomposition. For example, U+24C0 \u24C0 CIRCLED LATIN CAPITAL LETTER K has as its compatibility decomposition U+004B, LATIN CAPITAL LETTER K.\n"] } proc ExplainConvertStylistic {} { global HPWidth; global HPLines; global PopupList; if {[PopupDown ConvertStylistic] ==1} {return} set po [CreateTextDisplay [_ "Convert Stylistic Variants"] $HPWidth $HPLines] set PopupList(ConvertStylistic) $po; BindKeys $po; AppendToTextDisplay $po [_ "This option specifies that characters in special styles are to be replaced with the corresponding plain character. The special styles include: small capitals (e.g. \u1D04 U+1D04), script forms (e.g. \u2131 U+2131), black letter forms (e.g. \u2128 U+2128), Arabic presentation forms (e.g. \uFE81 U+FE81), Hebrew presentation forms (e.g. \uFB1D U+FB1D), fullwidth forms (e.g. \uFF21 U+FF21), halfwidth forms (e.g. \uFF7B U+FF7B), and the mathematical alphanumeric symbols (e.g. U+1D400)."] } proc ExplainConvertEnclosures {} { global HPWidth; global HPLines; global PopupList; if {[PopupDown ConvertEnclosures] ==1} {return} set po [CreateTextDisplay [_ "Convert Enclosures"] $HPWidth $HPLines] set PopupList(ConvertEnclosures) $po; BindKeys $po; AppendToTextDisplay $po [_ "This option causes characters enclosed in circles or parentheses, e.g. \u249C U+249C and \u24B6 U+24B6, to be converted to their plain equivalents.\n"]; } proc ExplainStripDiacritics {} { global HPWidth; global HPLines; global PopupList; if {[PopupDown StripDiacritics] ==1} {return} set po [CreateTextDisplay [_ "Strip Diacritics"] $HPWidth $HPLines] set PopupList(StripDiacritics) $po; BindKeys $po; AppendToTextDisplay $po [_ "If this option is chosen, combining diacritics such as the acute accent U+0301 are deleted and characters with intrinsic diacritics such as \u00E9 U+00E9 are replaced with their plain equivalents."]; } proc ExplainSortOrder {} { global HPWidth; global HPLines; global PopupList; if {[info exists PopupList(SortOrder)]} { if {[winfo exists $PopupList(SortOrder)]} { destroy $PopupList(SortOrder); return; } } set po [CreateTextDisplay [_ "Sort Order"] $HPWidth $HPLines] BindKeys $po; set PopupList(SortOrder) $po; AppendToTextDisplay $po [_ "Msort allows arbitrary sort orders to be defined for each key. By default Unicode order is used. That is, there are no collating sequences and the rank of a character is determined by its Unicode codepoint. For the ASCII characters, Unicode order is the same as ASCII order. You may specify other orders in two ways: by explicitly describing the order or by indicating that the collation rules of a specified locale should be used.\n\n"]; AppendToTextDisplay $po [_ "A sort order definition consists of a file in which each line represents a sort rank. The first line of the file has the highest rank, the last line the lowest rank. Items on the same line are assigned the same rank. "] AppendToTextDisplay $po [_ "Not infrequently sequences of characters must be treated as if they were single characters and given their own place in the sort order. For example, in Spanish a sequence of two s represents a single sound, a palatal lateral, and is conventionally ordered after plain . Thus, follows words such ; if were not given special treatment would precede since precedes . Such sequences of characters that must be treated as if they were single characters are known as multigraphs.\n"] AppendToTextDisplay $po [_ "Msort provides for multigraphs by allowing sequences of characters to be listed in the sort order definition along with single characters. For example, to obtain the conventional Spanish alphabetical order, the relevant portion of the sort order file would look like this:\n"] AppendToTextDisplay $po [_ "\n"] AppendToTextDisplay $po [_ "l\n"] AppendToTextDisplay $po [_ "ll\n"] AppendToTextDisplay $po [_ "m\n"] AppendToTextDisplay $po [_ "\n"] AppendToTextDisplay $po [_ "Msort permits virtually unlimited numbers of multigraphs of virtually unlimited length.\n\n"] AppendToTextDisplay $po [_ "A locale is a specification of various pieces of information that vary with language and culture, including language, character set, character encoding, number format, and sort order. On systems conforming to the POSIX standard, the locale known as \"C\" or \"POSIX\" is always available. In this default locale, everything is as it was on traditional American English Unix systems. The character set and encoding is ASCII, the sort order is the order of the ASCII characters, and so forth. Most other locale names consist of a language abbreviation followed by a country abbreviation, connected by an underscore.\nExamples are:\n"] AppendToTextDisplay $po [_ " en_US American English\n"] AppendToTextDisplay $po [_ " en_CA Canadian English\n"] AppendToTextDisplay $po [_ " fr_CA Canadian French\n"] AppendToTextDisplay $po [_ " ca_ES Catalan as used in Spain\n"] AppendToTextDisplay $po [_ " de_DE German as used in Germany\n"] AppendToTextDisplay $po [_ " ja_JP Japanese as used in Japan\n"] AppendToTextDisplay $po [_ " pt_BR Brazilian Portuguese\n"] AppendToTextDisplay $po [_ " zh_CN Chinese as used in China\n"] AppendToTextDisplay $po [_ " zh_HK Chinese as used in Hong Kong\n"] AppendToTextDisplay $po [_ "\nIf your system uses glibc or an equivalent localization system, msort can be told to use the collating rules for a specified locale. This saves you the work of creating a sort order definition and defining any necessary exclusions and substitutions. The locale whose collating rules you wish to use must be installed on your system. On GNU systems, the command \"locale -a\" will give you a list of the available locales. You may also enter \"current\" or \"locale\", in which case the collating rules of the current locale will be used."] } proc ExplainSortOrderSeparators {} { global HPWidth; global HPLines; global PopupList; if {[info exists PopupList(SortSeparators)]} { if {[winfo exists $PopupList(SortSeparators)]} { destroy $PopupList(SortSeparators); return; } } set po [CreateTextDisplay [_ "Sort Order File Separators"] $HPWidth $HPLines] BindKeys $po; set PopupList(SortSeparators) $po; AppendToTextDisplay $po [_ "In a sort order definition file entries on the same line are assigned the same sort rank."] AppendToTextDisplay $po [_ "A sequence of two or more characters not containing any separator characters is treated as a multigraph."] AppendToTextDisplay $po [_ "Sequences of characters separated by separators are treated as distinct characters or multigraphs assigned the same sort rank."] AppendToTextDisplay $po "\n\n" AppendToTextDisplay $po [_ "By default, all Unicode characters that fall into the broad class of \'whitespace\', including tab (0x0009), space (0x0020), and ideographic space (0x3000), are treated as separators."] AppendToTextDisplay $po [_ "In some circumstances, however, it is desirable to include whitespace characters in multigraphs."]; AppendToTextDisplay $po [_ "For example, if a unique ordering consisting of names is defined, it may be desirable to treat names with components separated by spaces as multigraphs."]; AppendToTextDisplay $po [_ "In order to allow for this, you may change the definition of separator character used in parsing sort order definitions."]; AppendToTextDisplay $po [_ "For instance, if your list of names looks like this:"]; AppendToTextDisplay $po "\n"; AppendToTextDisplay $po "Smith, Mary\n"; AppendToTextDisplay $po "Yamamoto, Sachiko\n"; AppendToTextDisplay $po "Klein, Joel\n"; AppendToTextDisplay $po "Sanchez, Marta\n"; AppendToTextDisplay $po "\n"; AppendToTextDisplay $po [_ "you would want to omit space from the list of separators."]; AppendToTextDisplay $po [_ "The characters that you enter here will replace the default list of separator characters for this key."]; } proc ExplainSortType {} { global HPWidth; global HPLines; global PopupList; if {[info exists PopupList(SortType)]} { if {[winfo exists $PopupList(SortType)]} { destroy $PopupList(SortType); return; } } set po [CreateTextDisplay [_ "Sort Type"] $HPWidth $HPLines] BindKeys $po; set PopupList(SortType) $po; AppendToTextDisplay $po [_ "Text is usually sorted lexicographically, but some kinds of text require special treatment. In most cases numbers should be sorted by numerical value rather than lexicographically. Msort provides several specialized types of comparison in addition to the two conventional ones. Msort understands dates and times in certain formats. Msort also allows the length of the character string to be used as the basis for sorting.\n"];} proc ExplainHowToIdentifyKey {} { global HPWidth; global HPLines; global PopupList; if {[info exists PopupList(HowToIdentifyKey)]} { if {[winfo exists $PopupList(HowToIdentifyKey)]} { destroy $PopupList(HowToIdentifyKey); return; } } set po [CreateTextDisplay [_ "How To Identify the Key"] $HPWidth $HPLines] BindKeys $po; set PopupList(HowToIdentifyKey) $po; AppendToTextDisplay $po [_ "Msort provides three ways to identify the portion of the record to be used as a key. The conventional approach is based on the order of fields within the record. This is sufficient for simple databases, but has the disadvantage that every record must contain all fields always in the same order. More sophisticated databases therefore often make use of tags, strings of characters that identify the remainder of the field. Msort allows key fields to be identified by matching regular expressions to tags. The third way of identifying the key is by specifying a certain range of characters, for example, the fourth through eighth characters in the record. This method is useful in dealing with packed binary data and old-fashioned databases using records with fixed-length fields."]} proc ExplainExclusions {} { global HPWidth; global HPLines; global PopupList; if {[info exists PopupList(Exclusions)]} { if {[winfo exists $PopupList(Exclusions)]} { destroy $PopupList(Exclusions); return; } } set po [CreateTextDisplay [_ "Exclusions"] $HPWidth $HPLines] BindKeys $po; set PopupList(Exclusions) $po; AppendToTextDisplay $po [_ "It is sometimes desirable to ignore certain characters in certain positions when sorting. For example, when sorting credit card numbers it may be desirable to ignore spaces or hyphens separating groups of numbers. To take another example, some dictionaries list bound forms (words that require a prefix or suffix) with leading or trailing hyphens to show where something must attach. In alphabetizing such a dictionary, these hyphens should be ignored except when necessary to break a tie. This is accomplished by using the same key twice, the first time ignoring the hyphens, the second time taking them into account. Msort allows specified characters to be ignored. Since in some cases a character should only be ignored in certain positions, msort allows the user to specify whether a character should ignored in string-initial, -medial, or -final position, or any combination thereof."]} proc ExplainSubstitutions {} { global HPWidth; global PopupList; if {[info exists PopupList(Substitutions)]} { if {[winfo exists $PopupList(Substitutions)]} { destroy $PopupList(Substitutions); return; } } set po [CreateTextDisplay [_ "Substitutions"] $HPWidth 10] BindKeys $po; set PopupList(Substitutions) $po; AppendToTextDisplay $po [_ "The substitution mechanism allows you to define more-or-less arbitrary transformations of keys. Each set of substitutions is specific to a particular key. Each individual substitution consists of two parts: a regular expression and a fixed string. Each portion of the original key that matches the regular expression is replaced by the fixed string. In the simplest case a regular expression is itself a fixed string, so if you are not familiar with regular expressions you can still use this mechanism to replace one fixed string with another. The regular expression notation is the same as that used for matching tags. A link to a description of the notation will be found on the Help menu."]; AppendToTextDisplay $po "\n\n"; AppendToTextDisplay $po [_ "This device has several uses. It provides a way to handle cases in which certain components of names are alphabetized as if they were written differently. For example, in English the prefix Mc is supposed to sort as if it were spelled Mac (as it sometimes is). \"McArthur\" should precede \"MacCawley\", as if it were spelled \"MacArthur\". Similarly, it can be used to disregard components of names that are supposed to be ignored in alphabetization, such as \"de\" and \"van\"."]; AppendToTextDisplay $po "\n\n"; AppendToTextDisplay $po [_ "This device can also be used to handle the rare cases in which a character is supposed to sort as if it were a sequence of characters. An example is the German letter \u00DF, (0x00DF)\"eszet \", which is treated as if it were \"ss\" for purposes of sorting."]; AppendToTextDisplay $po "\n"; } proc ExplainOptional {} { global HPWidth; global HPLines; global PopupList; if {[info exists PopupList(Optional)]} { if {[winfo exists $PopupList(Optional)]} { destroy $PopupList(Optional); return; } } set po [CreateTextDisplay [_ "Optional Keys"] $HPWidth $HPLines] BindKeys $po; set PopupList(Optional) $po; AppendToTextDisplay $po [_ "It is sometimes desirable to sort on the basis of a field that is not always present. By default all keys are obligatory, but msort allows keys to be declared optional. If a field is declared optional, it is not an error for it to be absent from a record."] } proc ExplainComparison {} { global HPWidth; global HPLines; global PopupList; if {[info exists PopupList(Comparison)]} { if {[winfo exists $PopupList(Comparison)]} { destroy $PopupList(Comparison); return; } } set po [CreateTextDisplay [_ "Comparison"] $HPWidth $HPLines] BindKeys $po; set PopupList(Comparison) $po; AppendToTextDisplay $po [_ "If a key field is missing from a record, the question arises as to how it should compare with records in which it is present. Msort requires this to be specified when a key is declared optional. Absent keys may be ranked before, after, or equal to present keys."] } proc ExplainHowToParseIntoRecords {} { global HPWidth; global HPLines; global PopupList; if {[info exists PopupList(HowToParseIntoRecords)]} { if {[winfo exists $PopupList(HowToParseIntoRecords)]} { destroy $PopupList(HowToParseIntoRecords); return; } } set po [CreateTextDisplay [_ "How To Parse Into Records"] $HPWidth $HPLines] BindKeys $po; set PopupList(HowToParseIntoRecords) $po; AppendToTextDisplay $po [_ "Material to be sorted must be divided into records since these are the units that are ordered by sorting. In most cases, an initial parse into records is also necessary so as to locate key fields. Msort provides several ways of delimiting records."] } proc ExplainBlock {} { global HPWidth; global HPLines; global PopupList; if {[info exists PopupList(Block)]} { if {[winfo exists $PopupList(Block)]} { destroy $PopupList(Block); return; } } set po [CreateTextDisplay [_ "Blocks"] $HPWidth $HPLines] BindKeys $po; set PopupList(Block) $po; AppendToTextDisplay $po [_ "Many flat-file databases keep records separate by one or more blank lines. Although very common and important, this format cannot be handled by parsers that look for a single delimiter character, so msort makes a separate provision for it."] } proc ExplainLine {} { global HPWidth; global HPLines; global PopupList; if {[info exists PopupList(Line)]} { if {[winfo exists $PopupList(Line)]} { destroy $PopupList(Line); return; } } set po [CreateTextDisplay [_ "Line"] $HPWidth $HPLines] BindKeys $po; set PopupList(Line) $po; AppendToTextDisplay $po [_ "In this case each line constitutes a record."] } proc ExplainFieldSeparatorCharacter {} { global HPWidth; global HPLines; global PopupList; if {[info exists PopupList(FieldSeparatorCharacter)]} { if {[winfo exists $PopupList(FieldSeparatorCharacter)]} { destroy $PopupList(FieldSeparatorCharacter); return; } } set po [CreateTextDisplay [_ "Field Separator Characters"] $HPWidth $HPLines] BindKeys $po; set PopupList(FieldSeparatorCharacter) $po; AppendToTextDisplay $po [_ "In many cases different parts of a record play different roles in sorting. Some must be ignored, some must given priority over others, and some must be ranked according to different criteria. The parts into which a record is divided are called fields. Msort divides records into fields on the basis of seperator characters. In the case of text, whitespace often serves as the field delimiter, but a variety of other field delimiters are found. Examples include the the Unix password file, which uses a colon, the common spreadsheet export format, which uses a comma, and formats for telephone numbers, which in the United States usually use a hyphen to separate components. You may specify the field delimiters by entering them in the entry box provided."]} proc ExplainRecordSeparatorCharacter {} { global HPWidth; global HPLines; global PopupList; if {[info exists PopupList(RecordSeparatorCharacter)]} { if {[winfo exists $PopupList(RecordSeparatorCharacter)]} { destroy $PopupList(RecordSeparatorCharacter); return; } } set po [CreateTextDisplay [_ "Record Separator Character"] $HPWidth $HPLines] BindKeys $po; set PopupList(RecordSeparatorCharacter) $po; AppendToTextDisplay $po [_ "One way in which records may be delimited is by a separator character, that is, a character that appears between records. If this option is selected, you must enter the separator character in the entry box provided."] } proc ExplainEntireRecordAsKey {} { global HPWidth; global HPLines; global PopupList; if {[info exists PopupList(EntireRecordAsKey)]} { if {[winfo exists $PopupList(EntireRecordAsKey)]} { destroy $PopupList(EntireRecordAsKey); return; } } set po [CreateTextDisplay [_ "Entire Record As Key"] $HPWidth $HPLines] BindKeys $po; set PopupList(EntireRecordAsKey) $po; AppendToTextDisplay $po [_ "Much of the time sorting is based on only a subset of the information in a record, so it is necessary to parse the record into fields and extract specified keys. In some cases, however, the entire record is relevant and no parse is necessary. If selected, this option uses the entire content of each record as the sole sort key."] } proc ExplainBMPOnly {} { global HPWidth; global HPLines; global PopupList; if {[info exists PopupList(BMPOnly)]} { if {[winfo exists $PopupList(BMPOnly)]} { destroy $PopupList(BMPOnly); return; } } set po [CreateTextDisplay [_ "BMP Only"] $HPWidth $HPLines] BindKeys $po; set PopupList(BMPOnly) $po; AppendToTextDisplay $po [_ "If the input is known to be restricted to the Basic Multilingual Plane (codepoints not exceeding 0xFFFF), the program may be informed of this fact. This permits a signficant reduction in memory usage. The characters of virtually all writing systems in current use are located within the BMP. Only ancient and exotic writing systems and some special symbols require the use of characters beyond the BMP."] } proc ExplainReservePrivateUseAreas {} { global HPWidth; global HPLines; global PopupList; if {[info exists PopupList(ReservePrivateUseAreas)]} { if {[winfo exists $PopupList(ReservePrivateUseAreas)]} { destroy $PopupList(ReservePrivateUseAreas); return; } } set po [CreateTextDisplay [_ "Reserve Private Use Areas"] $HPWidth $HPLines] BindKeys $po; set PopupList(ReservePrivateUseAreas) $po; AppendToTextDisplay $po [_ "Msort internally assigns multigraphs to codepoints in regions that are not normally used. By default it uses the Supplementary Private Use Areas, or, if informed that input is restricted to the Basic Multilingual Plane, the Private Use Area. If the input text contains character codes in the Private Use areas, a conflict will result. It is therefore possible to tell Msort not to use the Private Use areas. In this case, Msort will assign multigraphs to codepoints in the Low and High Surrogate ranges, which are guaranteed to be unused."] AppendToTextDisplay $po "\n\n"; AppendToTextDisplay $po [_ "The disadvantage of using the Surrogate areas for multigraphs is that this limits the number of multigraphs to 2,048. This is of course more than enough for most purposes."]; AppendToTextDisplay $po "\n\n"; AppendToTextDisplay $po [_ "Note that Msort will not use the Private Use Area unless told that input is restricted to the BMP. It is therefore only necessary to use this option if your input makes use of codepoints in the Private Use Area and you wish to obtain the reduction in memory usage permitted by informing Msort that input is restricted to the BMP."]; } proc ExplainInvertOrderGlobally {} { global HPWidth; global HPLines; global PopupList; if {[info exists PopupList(InvertOrderGlobally)]} { if {[winfo exists $PopupList(InvertOrderGlobally)]} { destroy $PopupList(InvertOrderGlobally); return; } } set po [CreateTextDisplay [_ "Invert Order Globally"] $HPWidth $HPLines] BindKeys $po; set PopupList(InvertOrderGlobally) $po; AppendToTextDisplay $po [_ "If set, records are written out in the order opposite to what would otherwise be the case. If the basic order is alphabetical, the result will be reverse alphabetical. If the basic order is increasing numerical order, the result will be decreasing numerical order."] AppendToTextDisplay $po [_ "For the difference between global inversion of order and key-specific inversion of comparison, see the help text for Invert Comparison."] } proc ExplainEndOfLineMarker {} { global HPWidth; global PopupList; if {[info exists PopupList(EndOfLineMarker)]} { if {[winfo exists $PopupList(EndOfLineMarker)]} { destroy $PopupList(EndOfLineMarker); return; } } set po [CreateTextDisplay [_ "End-of-line Marker"] $HPWidth 10] BindKeys $po; set PopupList(EndOfLineMarker) $po; AppendToTextDisplay $po [_ "Once upon a time, to move to the beginning of the next \ line on teletype machines, it was necessary to send two control characters: a Carriage \ Return, to move the printer carriage back to the beginning of the line, and a Line Feed, \ to move to the next line. DOS and Microsoft Windows continue this practice of using a \ CRLF sequence to mark end-of-line.\n\n"]; AppendToTextDisplay $po [_ "On more modern operating systems end-of-line is marked \ by a single character. On Unix systems end-of-line is normally marked by a Line Feed \ character (0x0A). On Macintoshen, end-of-line is normally marked by a Carriage Return \ character (0x0D).\n\n"]; AppendToTextDisplay $po [_ "By default, Msort assumes that end-of-line is marked \ by a single Line Feed character. However, in order to facilitate the use of files in \ Macintosh format, it is possible to specify that end-of-line is marked by Carriage \ Return. This setting affects both the reading of records consisting of a single line and the reading of records separated by two or more end-of-line characters.\n"]; } proc ExplainSetRandomSeed {} { global HPWidth; global HPLines; global PopupList; if {[info exists PopupList(SetRandomSeed)]} { if {[winfo exists $PopupList(SetRandomSeed)]} { destroy $PopupList(SetRandomSeed); return; } } set po [CreateTextDisplay [_ "Set Random Number Generator Seed"] $HPWidth $HPLines] BindKeys $po; set PopupList(SetRandomNumberSeed) $po; AppendToTextDisplay $po [_ "."] AppendToTextDisplay $po "\n\n"; } set RightArrowImage [image create photo -data { R0lGODlhGAAYAPMPAAAAAAQEBAgICAwMDCAgICMjIysrK0BAQKurq7+/v8PDw8fHx8/Pz+/v 7////wAAACH5BAEAAA8ALAAAAAAYABgAAAT+8L333nvvvefeg++999577733Hnzvveecc+69 9+B777333nvvvQefc80599577z343nvvvffec85A5Zx777333nsPvvfee885MpRz0L333nvv vffeg+895wgYyjn3Hnzvvfecc84556AjAAzlnHvvvQefc84555xzBAAIhnLOvffec47Bc845 5wgAABgKOufee8+5BAAAEAAAAAAADOWcg+895xIAAAAAAAQAAACGcs6956BLAAAAAAAAAAAB AGM5955zCQAIAAAAAAAAAGDA5dx7ziUAAAAAAgAAAAAM5Zx78DmXAAAAAAAAgACAoZxz7z3n FiSEEEJIAACAoaCFc+6995xzzjkHnXMEABCUc+49+N57zjnnnHOOQAACcs699957D7733nvP OQICctC5995777333oPvPedIQM659x5877333nvvveegI8g59957770H33vvvfeec8w56N57 77333nvvwffee8455957D7733nvvvffee/A959x777333oPvRQA7 }] set NumberSystems { {"All" "All"} {"Any" "Any"} {"Arabic (Western \u0664 \u0665 \u0666)" "Arabic"} {"Armenian Alphabetic" "Armenian"} {"Balinese" "Balinese"} {"Bengali" "Bengali"} {"Burmese" "Burmese"} {"Chinese" "Chinese"} {"Chinese Counting Rod" "Counting_Rod"} {"Cyrillic Alphabetic" "Cyrillic"} {"Devanagari" "Devanagari"} {"Egyptian" "Egyptian"} {"Ethiopic" "Ethiopic"} {"Glagolitic Alphabetic" "Glagolitic"} {"Greek Alphabetic" "Greek"} {"Gujarati" "Gujarati"} {"Gurmukhi" "Gurmukhi"} {"Hebrew" "Hebrew"} {"Hexadecimal" "Hexadecimal"} {"Indo-Arabic" "Western"} {"Kannada" "Kannada"} {"Kharoshthi" "Kharoshthi"} {"Khmer" "Khmer"} {"Klingon" "Klingon"} {"Lao" "Lao"} {"Limbu" "Limbu"} {"Malayalam" "Malayalam"} {"Mongolian" "Mongolian"} {"Mxedruli" "Mxedruli"} {"New Tail Lue" "New_Tai_Lue"} {"Nko" "Nko"} {"Old Italic" "Old_Italic"} {"Old Persian" "Old_Persian"} {"Oriya" "Oriya"} {"Osmanya" "Osmanya"} {"Perso-Arabic (\u06F4 \u06F5 \u06F6)" "Arabic"} {"Phoenician" "Phoenician"} {"Roman Numerals" "Roman"} {"Sinhala" "Sinhala"} {"Tamil" "Tamil"} {"Telugu" "Telugu"} {"Tengwar" "Tengwar"} {"Thai" "Thai"} {"Tibetan" "Tibetan"} {"Western" "Western"} {"Xucuri Lower" "Xucuri_Lower"} {"Xucuri Upper" "Xucuri_Upper"} } proc PopupSetNumberSystem {KeyName} { if {[winfo exists .ws]} { raise .ws; return } toplevel .ws -borderwidth 4 -relief raised wm title .ws "Number System"; after idle { update idletasks set xmax [winfo screenwidth .ws] set ymax [winfo screenheight .ws] set x0 [expr 1 * ($xmax -[winfo reqwidth .ws])/3]; set y0 [expr 1 * ($ymax -[winfo reqheight .ws])/3]; wm geometry .ws "+$x0+$y0"; } frame .ws.top label .ws.title -text [format [_ "Select Number System for Key %d"] $::InverseKeyMap($KeyName)]; frame .ws.bot -borderwidth 2 listbox .ws.bot.lb -height 12 -width 30 foreach e $::NumberSystems { .ws.bot.lb insert end [lindex $e 0] } button .ws.bot.b1 -text [_ "Cancel"] -command {destroy .ws} button .ws.bot.b3 -text [_ "Save"] -command [list WSSave $KeyName] pack .ws.title -side top -expand 1 pack .ws.bot.lb -side top -expand 1 -fill both pack .ws.bot.b1 -side left -padx {6 12} pack .ws.bot.b3 -side right -padx {12 6} pack .ws.top -side top -pady 3 pack .ws.bot -side bottom -pady 3 } proc WSSave {KeyName} { set index [lindex [.ws.bot.lb curselection] 0] set ws [lindex [lindex $::NumberSystems $index] 1] set ::KeyInfo(NumberSystem,$KeyName) $ws destroy .ws } proc EnterExclusions {KeyName} { if {[winfo exists .xdf]} { raise .xdf; return } toplevel .xdf -borderwidth 4 -relief raised wm title .xdf ""; after idle { update idletasks set xmax [winfo screenwidth .xdf] set ymax [winfo screenheight .xdf] set x0 [expr 1 * ($xmax -[winfo reqwidth .xdf])/3]; set y0 [expr 1 * ($ymax -[winfo reqheight .xdf])/3]; wm geometry .xdf "+$x0+$y0"; } label .xdf.title -text [_ "Define Exclusions"] frame .xdf.boxes; #Listbox and entry box frame .xdf.opbs; #Buttons for operations frame .xdf.finalbs; #Buttons for finalizing - cancel and proceed listbox .xdf.boxes.lb -width 12 -height 6 -font UserTechnicalTextFont InsertStoredExclusionsIntoListbox $KeyName; frame .xdf.boxes.ce -relief sunken -borderwidth 3 entry .xdf.boxes.ce.ent -width 1 -state disabled -font UserTechnicalTextFont checkbutton .xdf.boxes.ce.cbi -variable ExcInitialP \ -onvalue 1 -offvalue 0 -text [_ "Initial"] -state disabled checkbutton .xdf.boxes.ce.cbm -variable ExcMedialP \ -onvalue 1 -offvalue 0 -text [_ "Medial"] -state disabled checkbutton .xdf.boxes.ce.cbf -variable ExcFinalP \ -onvalue 1 -offvalue 0 -text [_ "Final"] -state disabled button .xdf.boxes.ins -image $::RightArrowImage -command InsertExclusionEntry bind .xdf.boxes.ce.ent {SetInsertionTargets .xdf.boxes.ce.ent} pack .xdf.boxes.ce.cbi -side top -expand 1 -anchor w pack .xdf.boxes.ce.cbm -side top -expand 1 -anchor w pack .xdf.boxes.ce.cbf -side top -expand 1 -anchor w pack .xdf.boxes.ce.ent -side top -expand 1 -anchor w pack .xdf.boxes.ce -side left -anchor w -padx 6 -expand 1 pack .xdf.boxes.ins -side left -padx 6 -expand 1 -fill x pack .xdf.boxes.lb -side right -padx 6 -expand 1 -fill x frame .xdf.arbut button .xdf.arbut.add -text [_ "Add"] -command AddExclusionEntry button .xdf.arbut.rem -text [_ "Remove"] -command RemoveExclusionEntry label .xdf.arbut.ins -text "" -width 12; pack .xdf.arbut.ins -side left -expand 1 -anchor w -padx 4 -pady 4 -fill x pack .xdf.arbut.add -side left -expand 1 -anchor e -padx 4 -pady 4 pack .xdf.arbut.rem -side left -expand 1 -anchor e -padx 1 -pady 4 button .xdf.finalbs.p -text [_ "Save"] -command [ list SaveExclusionDefinitions $KeyName] button .xdf.finalbs.c -text [_ "Cancel"] -command {destroy .xdf} -anchor w pack .xdf.finalbs.c -side left -expand 1 -anchor w pack .xdf.finalbs.p -side right -expand 1 -anchor e #Put it all together pack .xdf.title -side top -anchor w -expand 1 pack .xdf.finalbs -side bottom -expand 1 -fill x frame .xdf.fbsep -height 6 -borderwidth 0 -relief flat pack .xdf.fbsep -side bottom -expand 1 -fill x pack .xdf.boxes -side top -expand 1 pack .xdf.arbut -side top -expand 1 pack .xdf.opbs -side top -expand 1 bind .xdf.boxes.ce.ent {InsertClipboardContents %W} set bhmsg [_ "Change the exclusions for this key.\nTo delete an entry, elect it, then\npress Remove. To add an entry, press\nAdd, then enter the character in the entry\nbox and select the position or positions\nin which it is to be excluded."] balloonhelp_for .xdf $bhmsg; balloonhelp_for .xdf.fbsep $bhmsg; balloonhelp_for .xdf.arbut $bhmsg; balloonhelp_for .xdf.arbut.ins $bhmsg; balloonhelp_for .xdf.finalbs $bhmsg; balloonhelp_for .xdf.opbs $bhmsg; balloonhelp_for .xdf.boxes [_ "Define a new exclusion by entering the character\nto be excluded and selecting the position or\npositions in which it is to be excluded."] balloonhelp_for .xdf.finalbs.p [_ "Store the exclusions you have defined and exit\n this dialogue. You will be asked to specify the name\nof the file into which they will be written."] balloonhelp_for .xdf.finalbs.c [_ "Exit this dialogue without changing anything."] balloonhelp_for .xdf.arbut.rem [_ "Delete the selected entry from the exclusion list."] balloonhelp_for .xdf.arbut.add [_ "Prepare to add a new exclusion definition to the list.\nThe character entry box and position\nselection buttons will be activated."] balloonhelp_for .xdf.boxes.ins [_ "Add the new definition to the exclusion list."] balloonhelp_for .xdf.boxes.lb [_ "This is the working list of exclusions.\nIt initially contains whatever exclusions\nwere previously defined for this key.\nYou may not edit it directly. Instead, use\nthe Remove button to delete an entry and the\nAdd button to add a new one."] balloonhelp_for .xdf.boxes.ce.ent [_ "Enter the character you wish to exclude."] balloonhelp_for .xdf.boxes.ce.cbi [_ "Press this button to exclude the character you\nhave entered in field-initial position."] balloonhelp_for .xdf.boxes.ce.cbm [_ "Press this button to exclude the character you\nhave entered in field-medial position."] balloonhelp_for .xdf.boxes.ce.cbf [_ "Press this button to exclude the character you\nhave entered in field-final position."] balloonhelp_for .xdf.boxes.ce [_ "Define a new exclusion by entering the character\nto be excluded and selecting the position or\npositions in which it is to be excluded."] } proc AddExclusionEntry {} { .xdf.boxes.ce.ent configure -state normal .xdf.boxes.ce.cbi configure -state normal .xdf.boxes.ce.cbm configure -state normal .xdf.boxes.ce.cbf configure -state normal focus .xdf.boxes.ce.ent } proc RemoveExclusionEntry {} { .xdf.boxes.lb delete [.xdf.boxes.lb index active] } # Put the entries in the listbox into storage # and write them to a file. Insert the name of the file into the exclusion file # entry field. proc SaveExclusionDefinitions {KeyName} { set cnt [.xdf.boxes.lb size]; set xf [tk_getSaveFile -initialfile [format [_ "ExclusionDefinitionsForKey%d"] $::InverseKeyMap($KeyName)]]; if {[string equal $xf ""]} { ShowMessage [_ "File selection aborted."] return } if {[catch {open $xf "w"} xfh ] != 0} { ShowMessage [format [_ "Unable to open file %s."] $xf]; return ; } for {set i 0} {$i < $cnt} {incr i} { set entry [string trimright [.xdf.boxes.lb get $i]] if {[scan $entry "%s%s" chr pos] == 2} { lappend stlist [list $chr $pos] puts $xfh $entry; } } close $xfh; set ::KeyInfo(ExclusionList,$KeyName) $stlist; $KeyName.exc.bot.ent delete 0 end; $KeyName.exc.bot.ent insert 0 $xf; destroy .xdf; } #Transfer the new entry from the entry widgets to the listbox. proc InsertExclusionEntry {} { set pl ""; if {[expr $::ExcInitialP + $::ExcMedialP + $::ExcFinalP] == 0} { ShowMessage [_ "No position is specified."] return } if {$::ExcInitialP} {lappend pl "i"} if {$::ExcMedialP} {lappend pl "m"} if {$::ExcFinalP} {lappend pl "f"} .xdf.boxes.lb insert end [format "%-*s%s" $::xcwidth [.xdf.boxes.ce.ent get] [join $pl ""]] .xdf.boxes.ce.ent delete 0 end; .xdf.boxes.ce.cbi deselect .xdf.boxes.ce.cbm deselect .xdf.boxes.ce.cbf deselect .xdf.boxes.ce.ent configure -state disabled .xdf.boxes.ce.cbi configure -state disabled .xdf.boxes.ce.cbm configure -state disabled .xdf.boxes.ce.cbf configure -state disabled } proc InsertStoredExclusionsIntoListbox {KeyName} { if {[info exists ::KeyInfo(ExclusionList,$KeyName)]} { foreach i $::KeyInfo(ExclusionList,$KeyName) { set chr [lindex $i 0]; set pos [lindex $i 1]; .xdf.boxes.lb insert end [format "%-*s%s" $::xcwidth $chr $pos] } } } proc InsertStoredSortOrderIntoTextWidget {KeyName} { if {[info exists ::KeyInfo(SortOrder,$KeyName)]} { .sod.tf.txt insert 1.0 $::KeyInfo(SortOrder,$KeyName); } } proc InsertStoredSubstitutionsIntoTextWidget {KeyName} { if {[info exists ::KeyInfo(Substitutions,$KeyName)]} { .subd.tf.txt insert 1.0 [lindex $::KeyInfo(Substitutions,$KeyName) 0]; .subd.tf.txt2 insert 1.0 [lindex $::KeyInfo(Substitutions,$KeyName) 1]; } } proc InsertStoredSortOrderSeparatorsIntoTextWidget {KeyName} { if {[info exists ::KeyInfo(SortOrderSeparators,$KeyName)]} { .sos.tf.txt insert 1.0 $::KeyInfo(SortOrderSeparators,$KeyName); } } proc PopupSetDateFormat {KeyName} { if {[winfo exists .ymd]} { raise .ymd; return } toplevel .ymd -borderwidth 4 -relief raised wm title .ymd ""; after idle { update idletasks set xmax [winfo screenwidth .ymd] set ymax [winfo screenheight .ymd] set x0 [expr 1 * ($xmax -[winfo reqwidth .ymd])/3]; set y0 [expr 1 * ($ymax -[winfo reqheight .ymd])/3]; wm geometry .ymd "+$x0+$y0"; } frame .ymd.top label .ymd.title -text [format [_ "Enter Date Format for Key %d"] $::InverseKeyMap($KeyName)]; frame .ymd.bot -borderwidth 2 radiobutton .ymd.top.c1rb1 -text [_ "y"] -variable ::ymdc1 -value 1 -bg $::ColorSpecs(PageChoice,Background) radiobutton .ymd.top.c1rb2 -text [_ "m"] -variable ::ymdc1 -value 2 -bg $::ColorSpecs(PageChoice,Background) radiobutton .ymd.top.c1rb3 -text [_ "d"] -variable ::ymdc1 -value 3 -bg $::ColorSpecs(PageChoice,Background) radiobutton .ymd.top.c2rb1 -text [_ "y"] -variable ::ymdc2 -value 1 -bg $::ColorSpecs(PageChoice,Background) radiobutton .ymd.top.c2rb2 -text [_ "m"] -variable ::ymdc2 -value 2 -bg $::ColorSpecs(PageChoice,Background) radiobutton .ymd.top.c2rb3 -text [_ "d"] -variable ::ymdc2 -value 3 -bg $::ColorSpecs(PageChoice,Background) radiobutton .ymd.top.c3rb1 -text [_ "y"] -variable ::ymdc3 -value 1 -bg $::ColorSpecs(PageChoice,Background) radiobutton .ymd.top.c3rb2 -text [_ "m"] -variable ::ymdc3 -value 2 -bg $::ColorSpecs(PageChoice,Background) radiobutton .ymd.top.c3rb3 -text [_ "d"] -variable ::ymdc3 -value 3 -bg $::ColorSpecs(PageChoice,Background) entry .ymd.top.de1 -width 1 entry .ymd.top.de2 -width 1 bind .ymd.top.de1 {InsertClipboardContents %W} bind .ymd.top.de2 {InsertClipboardContents %W} .ymd.top.de1 insert 0 [string index $::KeyInfo(DateFormat,$KeyName) 1] .ymd.top.de2 insert 0 [string index $::KeyInfo(DateFormat,$KeyName) 3] for {set c 1} {$c <= 3} {incr c} { for {set r 1} {$r <= 3} {incr r} { grid .ymd.top.c${c}rb$r -row [expr $r -1] -column [expr 2*($c-1)] .ymd.top.c${c}rb$r deselect } } grid .ymd.top.de1 -row 1 -column 1 grid .ymd.top.de2 -row 1 -column 3 grid columnconfigure .ymd.top 1 -pad 20 grid columnconfigure .ymd.top 3 -pad 20 grid columnconfigure .ymd.top 5 -pad 20 button .ymd.bot.b1 -text [_ "Cancel"] -command {destroy .ymd} button .ymd.bot.b2 -text [_ "Reset"] -command YMDReset button .ymd.bot.b3 -text [_ "Save"] -command [list YMDSave $KeyName] pack .ymd.title -side top -expand 1 pack .ymd.bot.b1 .ymd.bot.b2 .ymd.bot.b3 -side left -padx 6 pack .ymd.top -side top -pady 3 pack .ymd.bot -side bottom -pady 3 trace variable ::ymdc1 w ymdc1Action trace variable ::ymdc2 w ymdc2Action trace variable ::ymdc3 w ymdc3Action set bhmsg [_ "Set the format used for dates."] balloonhelp_for .ymd $bhmsg balloonhelp_for .ymd.title $bhmsg balloonhelp_for .ymd.top $bhmsg balloonhelp_for .ymd.bot $bhmsg balloonhelp_for .ymd.top.de1 [_ "Enter the first delimiter character here."] balloonhelp_for .ymd.top.de2 [_ "Enter the second delimiter character here."] balloonhelp_for .ymd.top.c1rb1 [_ "Click to make this the first field of a date."] balloonhelp_for .ymd.top.c1rb2 [_ "Click to make this the first field of a date."] balloonhelp_for .ymd.top.c1rb3 [_ "Click to make this the first field of a date."] balloonhelp_for .ymd.top.c2rb1 [_ "Click to make this the second field of a date."] balloonhelp_for .ymd.top.c2rb2 [_ "Click to make this the second field of a date."] balloonhelp_for .ymd.top.c2rb3 [_ "Click to make this the second field of a date."] balloonhelp_for .ymd.top.c3rb1 [_ "Click to make this the third field of a date."] balloonhelp_for .ymd.top.c3rb2 [_ "Click to make this the third field of a date."] balloonhelp_for .ymd.top.c3rb3 [_ "Click to make this the third field of a date."] balloonhelp_for .ymd.bot.b1 [_ "Cancel resetting the date format.\nNothing will be changed."] balloonhelp_for .ymd.bot.b2 [_ "Deselect all selections and clear the delimiters."] balloonhelp_for .ymd.bot.b3 [_ "Store the current settings and close the window."] } proc YMDReset {} { trace vdelete ::ymdc1 w ymdc1Action trace vdelete ::ymdc2 w ymdc2Action trace vdelete ::ymdc3 w ymdc3Action for {set c 1} {$c <= 3} {incr c} { for {set r 1} {$r <= 3} {incr r} { .ymd.top.c${c}rb$r configure -state normal .ymd.top.c${c}rb$r deselect } } .ymd.top.de1 delete 0 end .ymd.top.de2 delete 0 end trace variable ::ymdc1 w ymdc1Action trace variable ::ymdc2 w ymdc2Action trace variable ::ymdc3 w ymdc3Action } proc ymdc1Action {n e o} { .ymd.top.c2rb$::ymdc1 configure -state disabled .ymd.top.c3rb$::ymdc1 configure -state disabled } proc ymdc2Action {n e o} { .ymd.top.c1rb$::ymdc2 configure -state disabled .ymd.top.c3rb$::ymdc2 configure -state disabled } proc ymdc3Action {n e o} { .ymd.top.c1rb$::ymdc3 configure -state disabled .ymd.top.c2rb$::ymdc3 configure -state disabled } proc YMDSave {KeyName} { set ic [list y m d]; set df [format "%s%s%s%s%s"\ [lindex $ic [expr $::ymdc1 -1]]\ [.ymd.top.de1 get]\ [lindex $ic [expr $::ymdc2 -1]]\ [.ymd.top.de2 get]\ [lindex $ic [expr $::ymdc3 -1]]] set ::KeyInfo(DateFormat,$KeyName) $df; trace vdelete ::ymdc1 w ymdc1Action trace vdelete ::ymdc2 w ymdc2Action trace vdelete ::ymdc3 w ymdc3Action destroy .ymd; } # Put the entries in the listbox into storage # and write them to a file. Insert the name of the file into the sort order file # entry field. proc SaveSortOrder {KeyName} { set xf [tk_getSaveFile -initialfile [format [_ "SortOrderDefinitionsForKey%d"] $::InverseKeyMap($KeyName)]]; if {[string equal $xf ""]} { ShowMessage [_ "File selection aborted."] return } if {[catch {open $xf "w"} xfh ] != 0} { ShowMessage [format [_ "Unable to open file %s."] $xf]; return ; } set contents [string trimright [.sod.tf.txt get 1.0 end]] puts $xfh $contents; close $xfh; set ::KeyInfo(SortOrderDef,$KeyName) $contents; $KeyName.so.bot.ent delete 0 end; $KeyName.so.bot.ent insert 0 $xf; destroy .sod; } proc InsertSepChar {c} { .sos.tf.txt insert insert $c; } set SepChars [list \ {\u0009 "tab"} \ {\u0020 "space"} \ {\u1361 "ethiopic wordspace"} \ {\u1680 "ogham space mark"} \ {\u3000 "ideographic space"} ]; # Other space characters we could insert if desired. # {\u2000 "en quad"} \ # {\u2001 "em quad"} \ # {\u2002 "en space"} \ # {\u2003 "em space"} \ # {\u2004 "three-per-em space"} \ # {\u2005 "four-per-em space"} \ # {\u2006 "six-per-em space"} \ # {\u2007 "figure space"} \ # {\u2008 "punctuation space"} \ # {\u2009 "thin space"} \ # {\u200A "hair space"} \ # {\u200B "zero width space"} \ # {\u205F "medium mathematical space"} \ proc EnterSortOrderSeparators {KeyName} { if {[winfo exists .sos]} { raise .sos; return } set kn $::InverseKeyMap($KeyName); toplevel .sos -borderwidth 4 -relief raised after idle { update idletasks set xmax [winfo screenwidth .sos] set ymax [winfo screenheight .sos] set x0 [expr 1 * ($xmax -[winfo reqwidth .sos])/3]; set y0 [expr 1 * ($ymax -[winfo reqheight .sos])/3]; wm geometry .sos "+$x0+$y0"; } label .sos.title -text [format [_ "Specify Separators for Key %d"] $kn]; frame .sos.tf text .soso.tf.txt -width 20 -height 15 -yscrollcommand {.sos.tf.sbar set}\ -bg $::ColorSpecs(SortOrderSeparator,Background) -font UserTechnicalTextFont scrollbar .sos.tf.sbar -command {.sos.tf.txt yview} -troughcolor $::ColorSpecs(SortOrderSeparator,Background)\ -bg $::ColorSpecs(SortOrderSeparator,Background) -activebackground $::ColorSpecs(SortOrderSeparator,Background); InsertStoredSortOrderSeparatorsIntoTextWidget $kn; frame .sos.tf.clist set cnt 0; set code 0; set msg [_ "Press this button to enter the specified character into\nthe text box and make it one of the separator\ncharacters for this key's sort order definition file."] foreach k $::SepChars { incr cnt; scan [lindex $k 0] "%c" code set bn .sos.tf.clist.b$cnt; button $bn \ -text [format "0x%04x %s" $code [lindex $k 1]] -anchor w\ -command [list InsertSepChar [lindex $k 0]] pack $bn -side top -expand 1 -fill both balloonhelp_for $bn $msg; } pack .sos.tf.txt -side left -expand 1 -fill both pack .sos.tf.sbar -side left -expand 1 -fill y pack .sos.tf.clist -side right -expand 1 -fill y frame .sos.finalbs; #Buttons for finalizing - cancel and proceed button .sos.finalbs.p -text [_ "Save"] -command "SaveSortOrderSeparators $KeyName" button .sos.finalbs.c -text [_ "Cancel"] -command {destroy .sos} -anchor w pack .sos.finalbs.c -side left -expand 1 -anchor w pack .sos.finalbs.p -side right -expand 1 -anchor e #Put it all together pack .sos.title -side top -anchor w -expand 1 pack .sos.finalbs -side bottom -expand 1 -fill x frame .sos.fbsep -height 6 -borderwidth 0 -relief flat pack .sos.fbsep -side bottom -expand 1 -fill x pack .sos.tf -side top -expand 1 -fill both focus .sos.tf.txt BindKeys .sos; bind .sos {SetInsertionTargets .sos.tf.txt} bind .sos.tf.txt {InsertClipboardContents %W} balloonhelp_for .sos.tf.txt \ [_ "Enter here the characters that should be treated\nas separators in this key's sort order file."]; set msg [_ "Enter the characters that you want to be treated as\nseparators into the text box. You may enter them\ndirectly or press the buttons on the right. "]; balloonhelp_for .sos $msg; balloonhelp_for .sos.title $msg; balloonhelp_for .sos.tf $msg; balloonhelp_for .sos.finalbs $msg; balloonhelp_for .sos.fbsep $msg; set msg [_ "Press this button to store the separators that you have entered."]; balloonhelp_for .sos.finalbs.p $msg; set msg [_ "Press this button to dismiss this control panel without making\nany change in the sort order file separators for this key."]; balloonhelp_for .sos.finalbs.c $msg; } proc ConfigureGenOne {} { set rpwid [lindex [grid bbox .gen.ctr 0 0] 2] grid columnconfigure .gen.ctr 1 -minsize $rpwid } proc ConfigureGenTwo {} { set wrwid [lindex [grid bbox .gen.ctr 1 0] 2] grid columnconfigure .gen.ctr 0 -minsize $wrwid } proc SetBalloonHelpShowP {b} { set v [Boolean $b] set ::BalloonHelpP $v; balloonhelp_control $v; } proc SetBMPOnlyP {b} { set ::BMPOnlyP [Boolean $b]; } proc SetEOLCarriageReturnP {b} { set ::EOLCarriageReturnP [Boolean $b]; } proc SetInvertOrderGloballyP {b} { set ::GlobalInversionP [Boolean $b]; } proc SetReservePrivateUseAreasP {b} { set ::ReservePrivateUseAreasP [Boolean $b]; } proc SetWholeRecordIsKeyP {b} { set ::WholeRecordIsKeyP [Boolean $b]; } proc SelectBrowser {s} { set ::DefaultBrowser $s; } proc SetFieldSeparators {s} { set ::FieldSeparator $s; } proc SetRecordSeparator {s} { set ::RecordSeparator $s; } proc SetRecordParse {s} { set ::RecordParse $s; } set CustomCharacterChartFileNameList ""; proc StoreCustomCharacterChartFileName {fn} { lappend ::CustomCharacterChartFileNameList $fn; } set CustomCharacterChartDataList ""; proc StoreCustomCharacterChartInPlace {dl} { lappend ::CustomCharacterChartDataList $dl; } #Initialization file stuff #This creates a procedure for setting the color of each combination of #object and feature. The procedure validates the color specification, so #invalid color specifications are trapped in the slave interpreter. proc DefineColorSettingProcs {} { global ColorProcList; foreach cs [array names ::ColorSpecs] { set csl [split $cs ","] set obj [lindex $csl 0] set which [lindex $csl 1] set procname [format "Set%s%sColor" $obj $which] lappend ColorProcList $procname eval [list "proc" $procname \ \ "\{cs\}" \ "if \{!\[::validcolor::IsColorSpecQ \$cs\]\} \{ puts \[format \[_ \"\\\"%s\\\" is not a valid color specification.\"\] \$cs\] return; \} set ::ColorSpecs($obj,$which) \$cs"] } } #Returns a list of init file commands representing the current color settings. proc SaveColorSettings {} { set cl [list] foreach cs [array names ::ColorSpecs] { set csl [split $cs ","] set obj [lindex $csl 0] set which [lindex $csl 1] set ps $::ColorSpecs($cs) if {[string index $ps 0] == "\#"} { set ps \\$::ColorSpecs($cs) } else { set ps [list $ps]; } lappend cl [format "%s%sColor %s" $obj $which $ps] } return [lsort $cl]; } #Check whether the argument represents a Boolean value #and interpret it if it is. proc Boolean {s} { switch -regexp $s { 1 {return 1} T.* {return 1} t.* {return 1} Y.* {return 1} y.* {return 1} ok {return 1} on {return 1} 0 {return 0} F.* {return 0} f.* {return 0} N.* {return 0} n.* {return 0} off {return 0} default {error} } } proc GetInitCommands {} { # We want a fresh interpreter so that we don't # list any commands defined in a user's init file. if { [interp exists init]} { interp delete init } InitFileSetup; set n 0 #We rely on the fact that all builtin commands have lower-case #case names to separate the commands we provide from the builtins. return [interp eval init {lsort [info commands \[A-Z\]*]}] } proc SaveInitCommands {} { set SaveFile [tk_getSaveFile -initialfile [_ "InitFileCommands"]]; if {[string equal $SaveFile ""]} { return ; } else { if { [catch {open $SaveFile "w+"} fh] != 0} { ShowMessage [format \ [_ "Unable to open file %s in which to save class definitions."] \ $SaveFile]; return ; } } set n 0; foreach l [GetInitCommands] { incr n; puts $fh [format "\[%03d\] %s" $n $l] } close $fh; } proc PopupInitCommandList {} { if {[PopupDown InitCommandList] ==1} {return} set po [CreateTextDisplay [_ "Initialization File Commands"] 65 10]; BindKeys $po; set ::PopupList(InitCommandList) $po; set n 0; foreach l [GetInitCommands] { incr n; AppendToTextDisplay $po [format "\[%03d\] %s\n" $n $l]; } } proc SaveMiscellaneousSettings {} { set MiscellaneousInitCommandList \ [list \ [SlaveName SetUseCheckbuttonP] $::UseCheckbuttonP\ [SlaveName SetRecordParseDisplayedP] $::RecordParseDisplayedP\ [SlaveName SetMiscOptionsDisplayedP] $::MiscOptionsDisplayedP\ [SlaveName SetUnicodeDisplayedP] $::UnicodeDisplayedP\ [SlaveName SetAlgorithmDisplayedP] $::AlgorithmDisplayedP\ [SlaveName SetInputFileDisplayedP] $::InputFileDisplayedP\ [SlaveName SetOutputFileDisplayedP] $::OutputFileDisplayedP\ [SlaveName SetExclusionsDisplayedP] $::ExclusionsDisplayedP\ [SlaveName SetKeyFieldIdentificationDisplayedP] $::KeyFieldIdentificationDisplayedP\ [SlaveName SetMiscellaneousOptionsDisplayedP] $::MiscellaneousOptionsDisplayedP\ [SlaveName SetSortOrderDisplayedP] $::SortOrderDisplayedP\ [SlaveName SetSortType DisplayedP] $::SortType DisplayedP\ [SlaveName SetSubstitutionsDisplayedP] $::SubstitutionsDisplayedP\ [SlaveName SetSortAlgorithm] $::SortAlgorithm\ [SlaveName SelectBrowser] $::DefaultBrowser\ [SlaveName SetBalloonHelpShowP] $::BalloonHelpP \ [SlaveName SetBMPOnlyP] $::BMPOnlyP \ [SlaveName SetDisplayConsonantChartColumnLabelsP] $::DisplayConsonantChartColumnLabelsP \ [SlaveName SetDisplayConsonantChartRowLabelsP] $::DisplayConsonantChartRowLabelsP \ [SlaveName SetDisplayVowelChartColumnLabelsP] $::DisplayVowelChartColumnLabelsP \ [SlaveName SetDisplayVowelChartRowLabelsP] $::DisplayVowelChartRowLabelsP \ [SlaveName SetEOLCarriageReturnP] $::EOLCarriageReturnP \ [SlaveName SetFieldSeparators] [list $::FieldSeparator] \ [SlaveName SetInvertOrderGloballyP] $::GlobalInversionP \ [SlaveName SetRecordSeparator] [list $::RecordSeparator] \ [SlaveName SetRecordParse] $::RecordParse \ [SlaveName SetReservePrivateUseAreasP] $::ReservePrivateUseAreasP\ [SlaveName SetWholeRecordIsKeyP] $::WholeRecordIsKeyP] set cl [list] foreach {command value} $MiscellaneousInitCommandList { lappend cl [format "%s %s" $command $value] } foreach title [array names ::SpecialCharacterPalette] { if {[string match "*WidgetName" $title]} {continue} set info $::SpecialCharacterPalette($title); if {[llength $info] > 2} { lappend cl [list ReadCharacterChart [lindex $info 2]]; } else { lappend cl [ReconstructCharacterChartDefinition $title]; } } return $cl; } proc ReconstructCharacterChartDefinition {Title} { set info $::SpecialCharacterPalette($Title); set txt DefineCharacterChart; append txt " \{\n" append txt [format "%s" [Quote $Title]] set flds [llength $info]; if {$flds > 1} { append txt [format "|%d" [lindex $info 1]];# Number of columns } if {$flds > 2} { append txt [format "|%s" [lindex $info 2]];# Font family } if {$flds > 3} { append txt [format "|%s" [lindex $info 3]];# Font size } append txt "\n" #Each entry consists of a unicode string and a gloss foreach x [lindex $info 0] { set string [lindex $x 0] set gloss [lindex $x 1] append txt [format "%s|%s\n" [UnicodeStringToHex $string] [Quote $gloss]]; } append txt "\}" return $txt; } proc PopupDown {n} { global PopupList; if {[info exists PopupList($n)]} { if {[winfo exists $PopupList($n)]} { destroy $PopupList($n); return 1; } } return 0; } proc ExplainInsertionSort {} { global HPWidth; global HPLines; global PopupList; if {[PopupDown InsertionSort] ==1} {return} set po [CreateTextDisplay [_ "Insertion Sort"] $HPWidth $HPLines] set PopupList(InsertionSort) $po; BindKeys $po; AppendToTextDisplay $po [_ "Insertion sort is a stable sorting algorithm.\n"]; AppendToTextDisplay $po [_ "That is, if two items compare as equal, their order in the output will be the same as in the input.\n"]; AppendToTextDisplay $po [_ "It tends to be slower than than the other algorithms for large numbers of items, but tends to be fast when the input is already in order or nearly so."]; AppendToTextDisplay $po [_ "For more information, consult the Wikipedia entry:"]; AppendLinkToTextDisplay $po "http://en.wikipedia.org/wiki/Insertion_sort" {ShowWebPage http://en.wikipedia.org/wiki/Insertion_sort}; AppendToTextDisplay $po [_ "\nFor comparison of sorting algorithms see:"]; AppendLinkToTextDisplay $po "http://en.wikipedia.org/wiki/Sorting_algorithm" {ShowWebPage http://en.wikipedia.org/wiki/Sorting_algorithm}; } proc ExplainMergeSort {} { global HPWidth; global HPLines; global PopupList; if {[PopupDown MergeSort] ==1} {return} set po [CreateTextDisplay [_ "Merge Sort"] $HPWidth $HPLines] set PopupList(MergeSort) $po; BindKeys $po; AppendToTextDisplay $po [_ "Merge sort is a stable sorting algorithm.\n"]; AppendToTextDisplay $po [_ "That is, if two items compare as equal, their order in the output will be the same as in the input.\n"]; AppendToTextDisplay $po [_ "It scales well for large numbers of items."]; AppendToTextDisplay $po [_ "For more information, consult the Wikipedia entry:"]; AppendLinkToTextDisplay $po "http://en.wikipedia.org/wiki/Merge_sort" {ShowWebPage http://en.wikipedia.org/wiki/Merge_sort}; AppendToTextDisplay $po [_ "\nFor comparison of sorting algorithms see:"]; AppendLinkToTextDisplay $po "http://en.wikipedia.org/wiki/Sorting_algorithm" {ShowWebPage http://en.wikipedia.org/wiki/Sorting_algorithm}; } proc ExplainQuickSort {} { global HPWidth; global HPLines; global PopupList; if {[PopupDown QuickSort] ==1} {return} set po [CreateTextDisplay [_ "Quick Sort"] $HPWidth $HPLines] set PopupList(QuickSort) $po; BindKeys $po; AppendToTextDisplay $po [_ "Quick Sort is an unstable sorting algorithm.\n"]; AppendToTextDisplay $po [_ "That is, if two items compare as equal, their order in the output may not be the same as in the input.\n"]; AppendToTextDisplay $po [_ "It performs well with large numbers of items."]; AppendToTextDisplay $po [_ "For more information, consult the Wikipedia entry:"]; AppendLinkToTextDisplay $po "http://en.wikipedia.org/wiki/Quick_sort" {ShowWebPage http://en.wikipedia.org/wiki/Quick_sort}; AppendToTextDisplay $po [_ "\nFor comparison of sorting algorithms see:"]; AppendLinkToTextDisplay $po "http://en.wikipedia.org/wiki/Sorting_algorithm" {ShowWebPage http://en.wikipedia.org/wiki/Sorting_algorithm}; } proc ExplainShellSort {} { global HPWidth; global HPLines; global PopupList; if {[PopupDown ShellSort] ==1} {return} set po [CreateTextDisplay [_ "Shell Sort"] $HPWidth $HPLines] set PopupList(ShellSort) $po; BindKeys $po; AppendToTextDisplay $po [_ "Shell Sort is an unstable sorting algorithm.\n"]; AppendToTextDisplay $po [_ "That is, if two items compare as equal, their order in the output may not be the same as in the input.\n"]; AppendToTextDisplay $po [_ "For small numbers of items (say less than 1,000) it may be faster than the other algorithms. For large numbers of items it will probably be slower."]; AppendToTextDisplay $po [_ "For more information, consult the Wikipedia entry:"]; AppendLinkToTextDisplay $po "http://en.wikipedia.org/wiki/Shell_sort" {ShowWebPage http://en.wikipedia.org/wiki/Shell_sort}; AppendToTextDisplay $po [_ "\nFor comparison of sorting algorithms see:"]; AppendLinkToTextDisplay $po "http://en.wikipedia.org/wiki/Sorting_algorithm" {ShowWebPage http://en.wikipedia.org/wiki/Sorting_algorithm}; } #This is a kludge but I encountered quoting hell trying to use (\\s) -> \\ \\1 #e.g. regsub -all "\\s" $s {\ } r #Escape spaces and tabs proc Quote {s} { regsub -all "\u0020" $s {\ } r regsub -all "\t" $r {\ } ret return $ret } proc UnicodeStringToHex {s} { set rv ""; foreach c [split $s ""] { scan $c "%c" t if {$t <= 0xFF} { append rv $c; } else { append rv [format "\\u%04X" $t]; } } return $rv; } #This package defines a routine IsColorSpecQ that validates X11 color specifications. #It returns 1 if its argument is either a recognized X11 color name or #a well formed hexadecimal RGB specification. If so desired, the two routines on #which it is based, IsColorNameQ and IsColorNumericQ can also be exported. namespace eval validcolor { namespace export IsColorSpecQ; variable CN; set CN([list ghost white]) 1 set CN([list white smoke]) 1 set CN([list floral white]) 1 set CN([list antique white]) 1 set CN([list old lace]) 1 set CN([list papaya whip]) 1 set CN([list blanched almond]) 1 set CN([list peach puff]) 1 set CN([list navajo white]) 1 set CN([list lemon chiffon]) 1 set CN([list mint cream]) 1 set CN([list alice blue]) 1 set CN([list lavender blush]) 1 set CN([list misty rose]) 1 set CN([list dark slate gray]) 1 set CN([list dark slate grey]) 1 set CN([list dim gray]) 1 set CN([list dim grey]) 1 set CN([list slate gray]) 1 set CN([list slate grey]) 1 set CN([list light slate gray]) 1 set CN([list light slate grey]) 1 set CN([list light grey]) 1 set CN([list light gray]) 1 set CN([list midnight blue]) 1 set CN([list navy blue]) 1 set CN([list cornflower blue]) 1 set CN([list dark slate blue]) 1 set CN([list slate blue]) 1 set CN([list medium slate blue]) 1 set CN([list light slate blue]) 1 set CN([list medium blue]) 1 set CN([list royal blue]) 1 set CN([list dodger blue]) 1 set CN([list deep sky blue]) 1 set CN([list sky blue]) 1 set CN([list light sky blue]) 1 set CN([list steel blue]) 1 set CN([list light steel blue]) 1 set CN([list light blue]) 1 set CN([list powder blue]) 1 set CN([list pale turquoise]) 1 set CN([list dark turquoise]) 1 set CN([list medium turquoise]) 1 set CN([list light cyan]) 1 set CN([list cadet blue]) 1 set CN([list medium aquamarine]) 1 set CN([list dark green]) 1 set CN([list dark olive green]) 1 set CN([list dark sea green]) 1 set CN([list sea green]) 1 set CN([list medium sea green]) 1 set CN([list light sea green]) 1 set CN([list pale green]) 1 set CN([list spring green]) 1 set CN([list lawn green]) 1 set CN([list medium spring green]) 1 set CN([list green yellow]) 1 set CN([list lime green]) 1 set CN([list yellow green]) 1 set CN([list forest green]) 1 set CN([list olive drab]) 1 set CN([list dark khaki]) 1 set CN([list pale goldenrod]) 1 set CN([list light goldenrod yellow]) 1 set CN([list light yellow]) 1 set CN([list light goldenrod]) 1 set CN([list dark goldenrod]) 1 set CN([list rosy brown]) 1 set CN([list indian red]) 1 set CN([list saddle brown]) 1 set CN([list sandy brown]) 1 set CN([list dark salmon]) 1 set CN([list light salmon]) 1 set CN([list dark orange]) 1 set CN([list light coral]) 1 set CN([list orange red]) 1 set CN([list hot pink]) 1 set CN([list deep pink]) 1 set CN([list light pink]) 1 set CN([list pale violet red]) 1 set CN([list medium violet red]) 1 set CN([list violet red]) 1 set CN([list medium orchid]) 1 set CN([list dark orchid]) 1 set CN([list dark violet]) 1 set CN([list blue violet]) 1 set CN([list medium purple]) 1 set CN(snow) 1 set CN(GhostWhite) 1 set CN(WhiteSmoke) 1 set CN(gainsboro) 1 set CN(FloralWhite) 1 set CN(OldLace) 1 set CN(linen) 1 set CN(AntiqueWhite) 1 set CN(PapayaWhip) 1 set CN(BlanchedAlmond) 1 set CN(bisque) 1 set CN(PeachPuff) 1 set CN(NavajoWhite) 1 set CN(moccasin) 1 set CN(cornsilk) 1 set CN(ivory) 1 set CN(LemonChiffon) 1 set CN(seashell) 1 set CN(honeydew) 1 set CN(MintCream) 1 set CN(azure) 1 set CN(AliceBlue) 1 set CN(lavender) 1 set CN(LavenderBlush) 1 set CN(MistyRose) 1 set CN(white) 1 set CN(black) 1 set CN(DarkSlateGray) 1 set CN(DarkSlateGrey) 1 set CN(DimGray) 1 set CN(DimGrey) 1 set CN(SlateGray) 1 set CN(SlateGrey) 1 set CN(LightSlateGray) 1 set CN(LightSlateGrey) 1 set CN(gray) 1 set CN(grey) 1 set CN(LightGrey) 1 set CN(LightGray) 1 set CN(MidnightBlue) 1 set CN(navy) 1 set CN(NavyBlue) 1 set CN(CornflowerBlue) 1 set CN(DarkSlateBlue) 1 set CN(SlateBlue) 1 set CN(MediumSlateBlue) 1 set CN(LightSlateBlue) 1 set CN(MediumBlue) 1 set CN(RoyalBlue) 1 set CN(blue) 1 set CN(DodgerBlue) 1 set CN(DeepSkyBlue) 1 set CN(SkyBlue) 1 set CN(LightSkyBlue) 1 set CN(SteelBlue) 1 set CN(LightSteelBlue) 1 set CN(LightBlue) 1 set CN(PowderBlue) 1 set CN(PaleTurquoise) 1 set CN(DarkTurquoise) 1 set CN(MediumTurquoise) 1 set CN(turquoise) 1 set CN(cyan) 1 set CN(LightCyan) 1 set CN(CadetBlue) 1 set CN(MediumAquamarine) 1 set CN(aquamarine) 1 set CN(DarkGreen) 1 set CN(DarkOliveGreen) 1 set CN(DarkSeaGreen) 1 set CN(SeaGreen) 1 set CN(MediumSeaGreen) 1 set CN(LightSeaGreen) 1 set CN(PaleGreen) 1 set CN(SpringGreen) 1 set CN(LawnGreen) 1 set CN(green) 1 set CN(chartreuse) 1 set CN(MediumSpringGreen) 1 set CN(GreenYellow) 1 set CN(LimeGreen) 1 set CN(YellowGreen) 1 set CN(ForestGreen) 1 set CN(OliveDrab) 1 set CN(DarkKhaki) 1 set CN(khaki) 1 set CN(PaleGoldenrod) 1 set CN(LightGoldenrodYellow) 1 set CN(LightYellow) 1 set CN(yellow) 1 set CN(gold) 1 set CN(LightGoldenrod) 1 set CN(goldenrod) 1 set CN(DarkGoldenrod) 1 set CN(RosyBrown) 1 set CN(IndianRed) 1 set CN(SaddleBrown) 1 set CN(sienna) 1 set CN(peru) 1 set CN(burlywood) 1 set CN(beige) 1 set CN(wheat) 1 set CN(SandyBrown) 1 set CN(tan) 1 set CN(chocolate) 1 set CN(firebrick) 1 set CN(brown) 1 set CN(DarkSalmon) 1 set CN(salmon) 1 set CN(LightSalmon) 1 set CN(orange) 1 set CN(DarkOrange) 1 set CN(coral) 1 set CN(LightCoral) 1 set CN(tomato) 1 set CN(OrangeRed) 1 set CN(red) 1 set CN(HotPink) 1 set CN(DeepPink) 1 set CN(pink) 1 set CN(LightPink) 1 set CN(PaleVioletRed) 1 set CN(maroon) 1 set CN(MediumVioletRed) 1 set CN(VioletRed) 1 set CN(magenta) 1 set CN(violet) 1 set CN(plum) 1 set CN(orchid) 1 set CN(MediumOrchid) 1 set CN(DarkOrchid) 1 set CN(DarkViolet) 1 set CN(BlueViolet) 1 set CN(purple) 1 set CN(MediumPurple) 1 set CN(thistle) 1 set CN(snow1) 1 set CN(snow2) 1 set CN(snow3) 1 set CN(snow4) 1 set CN(seashell1) 1 set CN(seashell2) 1 set CN(seashell3) 1 set CN(seashell4) 1 set CN(AntiqueWhite1) 1 set CN(AntiqueWhite2) 1 set CN(AntiqueWhite3) 1 set CN(AntiqueWhite4) 1 set CN(bisque1) 1 set CN(bisque2) 1 set CN(bisque3) 1 set CN(bisque4) 1 set CN(PeachPuff1) 1 set CN(PeachPuff2) 1 set CN(PeachPuff3) 1 set CN(PeachPuff4) 1 set CN(NavajoWhite1) 1 set CN(NavajoWhite2) 1 set CN(NavajoWhite3) 1 set CN(NavajoWhite4) 1 set CN(LemonChiffon1) 1 set CN(LemonChiffon2) 1 set CN(LemonChiffon3) 1 set CN(LemonChiffon4) 1 set CN(cornsilk1) 1 set CN(cornsilk2) 1 set CN(cornsilk3) 1 set CN(cornsilk4) 1 set CN(ivory1) 1 set CN(ivory2) 1 set CN(ivory3) 1 set CN(ivory4) 1 set CN(honeydew1) 1 set CN(honeydew2) 1 set CN(honeydew3) 1 set CN(honeydew4) 1 set CN(LavenderBlush1) 1 set CN(LavenderBlush2) 1 set CN(LavenderBlush3) 1 set CN(LavenderBlush4) 1 set CN(MistyRose1) 1 set CN(MistyRose2) 1 set CN(MistyRose3) 1 set CN(MistyRose4) 1 set CN(azure1) 1 set CN(azure2) 1 set CN(azure3) 1 set CN(azure4) 1 set CN(SlateBlue1) 1 set CN(SlateBlue2) 1 set CN(SlateBlue3) 1 set CN(SlateBlue4) 1 set CN(RoyalBlue1) 1 set CN(RoyalBlue2) 1 set CN(RoyalBlue3) 1 set CN(RoyalBlue4) 1 set CN(blue1) 1 set CN(blue2) 1 set CN(blue3) 1 set CN(blue4) 1 set CN(DodgerBlue1) 1 set CN(DodgerBlue2) 1 set CN(DodgerBlue3) 1 set CN(DodgerBlue4) 1 set CN(SteelBlue1) 1 set CN(SteelBlue2) 1 set CN(SteelBlue3) 1 set CN(SteelBlue4) 1 set CN(DeepSkyBlue1) 1 set CN(DeepSkyBlue2) 1 set CN(DeepSkyBlue3) 1 set CN(DeepSkyBlue4) 1 set CN(SkyBlue1) 1 set CN(SkyBlue2) 1 set CN(SkyBlue3) 1 set CN(SkyBlue4) 1 set CN(LightSkyBlue1) 1 set CN(LightSkyBlue2) 1 set CN(LightSkyBlue3) 1 set CN(LightSkyBlue4) 1 set CN(SlateGray1) 1 set CN(SlateGray2) 1 set CN(SlateGray3) 1 set CN(SlateGray4) 1 set CN(LightSteelBlue1) 1 set CN(LightSteelBlue2) 1 set CN(LightSteelBlue3) 1 set CN(LightSteelBlue4) 1 set CN(LightBlue1) 1 set CN(LightBlue2) 1 set CN(LightBlue3) 1 set CN(LightBlue4) 1 set CN(LightCyan1) 1 set CN(LightCyan2) 1 set CN(LightCyan3) 1 set CN(LightCyan4) 1 set CN(PaleTurquoise1) 1 set CN(PaleTurquoise2) 1 set CN(PaleTurquoise3) 1 set CN(PaleTurquoise4) 1 set CN(CadetBlue1) 1 set CN(CadetBlue2) 1 set CN(CadetBlue3) 1 set CN(CadetBlue4) 1 set CN(turquoise1) 1 set CN(turquoise2) 1 set CN(turquoise3) 1 set CN(turquoise4) 1 set CN(cyan1) 1 set CN(cyan2) 1 set CN(cyan3) 1 set CN(cyan4) 1 set CN(DarkSlateGray1) 1 set CN(DarkSlateGray2) 1 set CN(DarkSlateGray3) 1 set CN(DarkSlateGray4) 1 set CN(aquamarine1) 1 set CN(aquamarine2) 1 set CN(aquamarine3) 1 set CN(aquamarine4) 1 set CN(DarkSeaGreen1) 1 set CN(DarkSeaGreen2) 1 set CN(DarkSeaGreen3) 1 set CN(DarkSeaGreen4) 1 set CN(SeaGreen1) 1 set CN(SeaGreen2) 1 set CN(SeaGreen3) 1 set CN(SeaGreen4) 1 set CN(PaleGreen1) 1 set CN(PaleGreen2) 1 set CN(PaleGreen3) 1 set CN(PaleGreen4) 1 set CN(SpringGreen1) 1 set CN(SpringGreen2) 1 set CN(SpringGreen3) 1 set CN(SpringGreen4) 1 set CN(green1) 1 set CN(green2) 1 set CN(green3) 1 set CN(green4) 1 set CN(chartreuse1) 1 set CN(chartreuse2) 1 set CN(chartreuse3) 1 set CN(chartreuse4) 1 set CN(OliveDrab1) 1 set CN(OliveDrab2) 1 set CN(OliveDrab3) 1 set CN(OliveDrab4) 1 set CN(DarkOliveGreen1) 1 set CN(DarkOliveGreen2) 1 set CN(DarkOliveGreen3) 1 set CN(DarkOliveGreen4) 1 set CN(khaki1) 1 set CN(khaki2) 1 set CN(khaki3) 1 set CN(khaki4) 1 set CN(LightGoldenrod1) 1 set CN(LightGoldenrod2) 1 set CN(LightGoldenrod3) 1 set CN(LightGoldenrod4) 1 set CN(LightYellow1) 1 set CN(LightYellow2) 1 set CN(LightYellow3) 1 set CN(LightYellow4) 1 set CN(yellow1) 1 set CN(yellow2) 1 set CN(yellow3) 1 set CN(yellow4) 1 set CN(gold1) 1 set CN(gold2) 1 set CN(gold3) 1 set CN(gold4) 1 set CN(goldenrod1) 1 set CN(goldenrod2) 1 set CN(goldenrod3) 1 set CN(goldenrod4) 1 set CN(DarkGoldenrod1) 1 set CN(DarkGoldenrod2) 1 set CN(DarkGoldenrod3) 1 set CN(DarkGoldenrod4) 1 set CN(RosyBrown1) 1 set CN(RosyBrown2) 1 set CN(RosyBrown3) 1 set CN(RosyBrown4) 1 set CN(IndianRed1) 1 set CN(IndianRed2) 1 set CN(IndianRed3) 1 set CN(IndianRed4) 1 set CN(sienna1) 1 set CN(sienna2) 1 set CN(sienna3) 1 set CN(sienna4) 1 set CN(burlywood1) 1 set CN(burlywood2) 1 set CN(burlywood3) 1 set CN(burlywood4) 1 set CN(wheat1) 1 set CN(wheat2) 1 set CN(wheat3) 1 set CN(wheat4) 1 set CN(tan1) 1 set CN(tan2) 1 set CN(tan3) 1 set CN(tan4) 1 set CN(chocolate1) 1 set CN(chocolate2) 1 set CN(chocolate3) 1 set CN(chocolate4) 1 set CN(firebrick1) 1 set CN(firebrick2) 1 set CN(firebrick3) 1 set CN(firebrick4) 1 set CN(brown1) 1 set CN(brown2) 1 set CN(brown3) 1 set CN(brown4) 1 set CN(salmon1) 1 set CN(salmon2) 1 set CN(salmon3) 1 set CN(salmon4) 1 set CN(LightSalmon1) 1 set CN(LightSalmon2) 1 set CN(LightSalmon3) 1 set CN(LightSalmon4) 1 set CN(orange1) 1 set CN(orange2) 1 set CN(orange3) 1 set CN(orange4) 1 set CN(DarkOrange1) 1 set CN(DarkOrange2) 1 set CN(DarkOrange3) 1 set CN(DarkOrange4) 1 set CN(coral1) 1 set CN(coral2) 1 set CN(coral3) 1 set CN(coral4) 1 set CN(tomato1) 1 set CN(tomato2) 1 set CN(tomato3) 1 set CN(tomato4) 1 set CN(OrangeRed1) 1 set CN(OrangeRed2) 1 set CN(OrangeRed3) 1 set CN(OrangeRed4) 1 set CN(red1) 1 set CN(red2) 1 set CN(red3) 1 set CN(red4) 1 set CN(DeepPink1) 1 set CN(DeepPink2) 1 set CN(DeepPink3) 1 set CN(DeepPink4) 1 set CN(HotPink1) 1 set CN(HotPink2) 1 set CN(HotPink3) 1 set CN(HotPink4) 1 set CN(pink1) 1 set CN(pink2) 1 set CN(pink3) 1 set CN(pink4) 1 set CN(LightPink1) 1 set CN(LightPink2) 1 set CN(LightPink3) 1 set CN(LightPink4) 1 set CN(PaleVioletRed1) 1 set CN(PaleVioletRed2) 1 set CN(PaleVioletRed3) 1 set CN(PaleVioletRed4) 1 set CN(maroon1) 1 set CN(maroon2) 1 set CN(maroon3) 1 set CN(maroon4) 1 set CN(VioletRed1) 1 set CN(VioletRed2) 1 set CN(VioletRed3) 1 set CN(VioletRed4) 1 set CN(magenta1) 1 set CN(magenta2) 1 set CN(magenta3) 1 set CN(magenta4) 1 set CN(orchid1) 1 set CN(orchid2) 1 set CN(orchid3) 1 set CN(orchid4) 1 set CN(plum1) 1 set CN(plum2) 1 set CN(plum3) 1 set CN(plum4) 1 set CN(MediumOrchid1) 1 set CN(MediumOrchid2) 1 set CN(MediumOrchid3) 1 set CN(MediumOrchid4) 1 set CN(DarkOrchid1) 1 set CN(DarkOrchid2) 1 set CN(DarkOrchid3) 1 set CN(DarkOrchid4) 1 set CN(purple1) 1 set CN(purple2) 1 set CN(purple3) 1 set CN(purple4) 1 set CN(MediumPurple1) 1 set CN(MediumPurple2) 1 set CN(MediumPurple3) 1 set CN(MediumPurple4) 1 set CN(thistle1) 1 set CN(thistle2) 1 set CN(thistle3) 1 set CN(thistle4) 1 set CN(gray0) 1 set CN(grey0) 1 set CN(gray1) 1 set CN(grey1) 1 set CN(gray2) 1 set CN(grey2) 1 set CN(gray3) 1 set CN(grey3) 1 set CN(gray4) 1 set CN(grey4) 1 set CN(gray5) 1 set CN(grey5) 1 set CN(gray6) 1 set CN(grey6) 1 set CN(gray7) 1 set CN(grey7) 1 set CN(gray8) 1 set CN(grey8) 1 set CN(gray9) 1 set CN(grey9) 1 set CN(gray10) 1 set CN(grey10) 1 set CN(gray11) 1 set CN(grey11) 1 set CN(gray12) 1 set CN(grey12) 1 set CN(gray13) 1 set CN(grey13) 1 set CN(gray14) 1 set CN(grey14) 1 set CN(gray15) 1 set CN(grey15) 1 set CN(gray16) 1 set CN(grey16) 1 set CN(gray17) 1 set CN(grey17) 1 set CN(gray18) 1 set CN(grey18) 1 set CN(gray19) 1 set CN(grey19) 1 set CN(gray20) 1 set CN(grey20) 1 set CN(gray21) 1 set CN(grey21) 1 set CN(gray22) 1 set CN(grey22) 1 set CN(gray23) 1 set CN(grey23) 1 set CN(gray24) 1 set CN(grey24) 1 set CN(gray25) 1 set CN(grey25) 1 set CN(gray26) 1 set CN(grey26) 1 set CN(gray27) 1 set CN(grey27) 1 set CN(gray28) 1 set CN(grey28) 1 set CN(gray29) 1 set CN(grey29) 1 set CN(gray30) 1 set CN(grey30) 1 set CN(gray31) 1 set CN(grey31) 1 set CN(gray32) 1 set CN(grey32) 1 set CN(gray33) 1 set CN(grey33) 1 set CN(gray34) 1 set CN(grey34) 1 set CN(gray35) 1 set CN(grey35) 1 set CN(gray36) 1 set CN(grey36) 1 set CN(gray37) 1 set CN(grey37) 1 set CN(gray38) 1 set CN(grey38) 1 set CN(gray39) 1 set CN(grey39) 1 set CN(gray40) 1 set CN(grey40) 1 set CN(gray41) 1 set CN(grey41) 1 set CN(gray42) 1 set CN(grey42) 1 set CN(gray43) 1 set CN(grey43) 1 set CN(gray44) 1 set CN(grey44) 1 set CN(gray45) 1 set CN(grey45) 1 set CN(gray46) 1 set CN(grey46) 1 set CN(gray47) 1 set CN(grey47) 1 set CN(gray48) 1 set CN(grey48) 1 set CN(gray49) 1 set CN(grey49) 1 set CN(gray50) 1 set CN(grey50) 1 set CN(gray51) 1 set CN(grey51) 1 set CN(gray52) 1 set CN(grey52) 1 set CN(gray53) 1 set CN(grey53) 1 set CN(gray54) 1 set CN(grey54) 1 set CN(gray55) 1 set CN(grey55) 1 set CN(gray56) 1 set CN(grey56) 1 set CN(gray57) 1 set CN(grey57) 1 set CN(gray58) 1 set CN(grey58) 1 set CN(gray59) 1 set CN(grey59) 1 set CN(gray60) 1 set CN(grey60) 1 set CN(gray61) 1 set CN(grey61) 1 set CN(gray62) 1 set CN(grey62) 1 set CN(gray63) 1 set CN(grey63) 1 set CN(gray64) 1 set CN(grey64) 1 set CN(gray65) 1 set CN(grey65) 1 set CN(gray66) 1 set CN(grey66) 1 set CN(gray67) 1 set CN(grey67) 1 set CN(gray68) 1 set CN(grey68) 1 set CN(gray69) 1 set CN(grey69) 1 set CN(gray70) 1 set CN(grey70) 1 set CN(gray71) 1 set CN(grey71) 1 set CN(gray72) 1 set CN(grey72) 1 set CN(gray73) 1 set CN(grey73) 1 set CN(gray74) 1 set CN(grey74) 1 set CN(gray75) 1 set CN(grey75) 1 set CN(gray76) 1 set CN(grey76) 1 set CN(gray77) 1 set CN(grey77) 1 set CN(gray78) 1 set CN(grey78) 1 set CN(gray79) 1 set CN(grey79) 1 set CN(gray80) 1 set CN(grey80) 1 set CN(gray81) 1 set CN(grey81) 1 set CN(gray82) 1 set CN(grey82) 1 set CN(gray83) 1 set CN(grey83) 1 set CN(gray84) 1 set CN(grey84) 1 set CN(gray85) 1 set CN(grey85) 1 set CN(gray86) 1 set CN(grey86) 1 set CN(gray87) 1 set CN(grey87) 1 set CN(gray88) 1 set CN(grey88) 1 set CN(gray89) 1 set CN(grey89) 1 set CN(gray90) 1 set CN(grey90) 1 set CN(gray91) 1 set CN(grey91) 1 set CN(gray92) 1 set CN(grey92) 1 set CN(gray93) 1 set CN(grey93) 1 set CN(gray94) 1 set CN(grey94) 1 set CN(gray95) 1 set CN(grey95) 1 set CN(gray96) 1 set CN(grey96) 1 set CN(gray97) 1 set CN(grey97) 1 set CN(gray98) 1 set CN(grey98) 1 set CN(gray99) 1 set CN(grey99) 1 set CN(gray100) 1 set CN(grey100) 1 proc IsColorNameQ {s} { variable CN if {[info exists CN($s)]} { return 1; } else { return 0; } } proc IsColorNumericQ {s} { return [regexp \ {^\#([[:xdigit:]]{6}|[[:xdigit:]]{3}|[[:xdigit:]]{9}|[[:xdigit:]]{12})$} $s] } proc IsColorSpecQ {s} { if {[IsColorNameQ $s]} { return 1; } elseif {[IsColorNumericQ $s]} { return 1; } else { return 0; } } } #End of namespace validcolor #Ths procedure takes as its sole argument the name #of an existing procedure in the same interpreter #and creates a new master level procedure that #wraps the other procedure with a test for the #correct argument count. proc WrapMaster {pn} { regsub "^::fontsel::" $pn "" Stem set WrappedName Wrapped${Stem}; set sp [format "proc $WrappedName \{args\} \{\n"]; set ArgsNeeded [llength [info args $pn]]; append sp [format "\tif \{\[llength \$args\] != %d\} \{\n" $ArgsNeeded] if {$ArgsNeeded == 1} { set emsg [format [_ "The command %s in the file %%s expects one argument"] \ [SlaveName $WrappedName]] set cmd [format "\t\tputs \"$emsg\"\n" \$::InitFile] append sp $cmd } else { set emsg [format [_ "The command %s in the file %%s expects %d arguments\n"] \ [SlaveName $WrappedName] $ArgsNeeded] set cmd [format "\t\tputs \"$emsg\"\n" \$::InitFile]; append sp $cmd; } append sp "\t\treturn;\n\t\}\n\t" append sp $pn for {set i 0} {$i < $ArgsNeeded} {incr i} { append sp " \[lindex \$args $i\]" } append sp "\n\}" eval $sp; return $WrappedName; } proc ReadInitFile {name} { if { [catch {interp invoke init source $name} msg] } { puts [format [_ "Error on reading init file %s: %s"] $name $msg] } else { ShowMessage [format [_ "Executed init file %s"] $name] } interp delete init } proc SlavePuts {msg} { puts $msg; } proc SlaveMsgcat {} { package require msgcat ::msgcat::mcload [file join [file dirname [info script]] msgs]; } #This is the list of the master interpreter commands #other than those generated from data structures (currently #color- and font-setting) that we wish to expose for use in #the init file slave interpreter. set MiscellaneousSlaveCommandList { SelectBrowser SetUseCheckbuttonP SetRecordParseDisplayedP SetMiscOptionsDisplayedP SetUnicodeDisplayedP SetAlgorithmDisplayedP SetInputFileDisplayedP SetOutputFileDisplayedP SetExclusionsDisplayedP SetKeyFieldIdentificationDisplayedP SetMiscellaneousOptionsDisplayedP SetSortOrderDisplayedP SetSortTypeDisplayedP SetSubstitutionsDisplayedP SetBMPOnlyP SetBalloonHelpShowP SetDisplayConsonantChartColumnLabelsP SetDisplayConsonantChartRowLabelsP SetDisplayVowelChartColumnLabelsP SetDisplayVowelChartRowLabelsP SetEOLCarriageReturnP SetFieldSeparators SetInvertOrderGloballyP SetRecordParse SetRecordSeparator SetReservePrivateUseAreasP SetSortAlgorithm SetWholeRecordIsKeyP SlavePuts StoreCustomCharacterChartFileName StoreCustomCharacterChartInPlace } #This procedure creates the master procedures that will be exposed #in the slave interpreter. It takes care of creating the base procedures #where, as in the case of color and font setting, these are created #programmatically, then wraps these as well as the manually #written procedures that are to be exposed. proc CreateInitProcs {} { set ::FontProcList ""; fontsel::DefineFontSettingProcs DefineColorSettingProcs; #This is the complete list of commands that we want to expose #in the slave init file interpreter. These are the raw, unwrapped, master #level commands. set ::MasterCommandsToBeExposedInInitList [concat \ [lsort $::ColorProcList] \ [lsort $::FontProcList] \ [lsort $::MiscellaneousSlaveCommandList]]; #Now we wrap them all so as to trap valence errors set ::WrappedMasterCommandList [list] foreach c $::MasterCommandsToBeExposedInInitList { lappend ::WrappedMasterCommandList [WrapMaster $c] } } #This procedure takes the list of wrapped master #procedures and exposes them in a specified, already #created, slave interpreter. proc ExposeInitProcs {Interpreter} { foreach c $::WrappedMasterCommandList { set sl [SlaveName $c]; $Interpreter alias $sl $c; } } set MasterToSlaveName(SetDisplayConsonantChartColumnLabelsP) ShowConsonantChartColumnLabelsP set MasterToSlaveName(SetDisplayConsonantChartRowLabelsP) ShowConsonantChartRowLabelsP set MasterToSlaveName(SetDisplayVowelChartColumnLabelsP) ShowVowelChartColumnLabelsP set MasterToSlaveName(SetDisplayVowelChartRowLabelsP) ShowVowelChartRowLabelsP set MasterToSlaveName(SelectBrowser) Browser; set MasterToSlaveName(SlavePuts) Puts; set MasterToSlaveName(StoreCustomCharacterChartInPlace) DefineCharacterChart set MasterToSlaveName(StoreCustomCharacterChartFileName) ReadCharacterChart #Given the name of a wrapped command in the master interpreter, #returns the name that the command is to have when #exposed in the slave interpreter. In most cases the alias #is computed from the master name, but in some cases #the relationship is irregular. proc SlaveName {command} { regsub "^Wrapped" $command "" Unwrapped if {[info exists ::MasterToSlaveName($Unwrapped)]} { set EnglishSlaveName $::MasterToSlaveName($Unwrapped); } else { regsub "^Set" $Unwrapped "" EnglishSlaveName } return [_ $EnglishSlaveName] } proc InitFileSetup {} { interp create -safe -- init #We use slaveMsgcat rather than SlaveMsgcat so that the name does not #appear in the list that the user sees. init alias slaveMsgcat SlaveMsgcat init eval slaveMsgcat init alias mc ::msgcat::mc ExposeInitProcs init #This takes care of errors in the name of commands while still in the #slave interpreter, without aborting, and using the user-name in the error-message. init eval { proc unknown {args} { set cmd [lindex $args 0] Puts [format [mc "Unknown command %s in script file %s."] $cmd [info script]]; # Puts [format [mc "Unknown command %1\$s in script file %2\$s."] $cmd [info script]]; return ; } } } proc SlaveBoolean {s} { switch -regexp $s { 1 {return 1} T.* {return 1} t.* {return 1} Y.* {return 1} y.* {return 1} ok {return 1} on {return 1} 0 {return 0} F.* {return 0} f.* {return 0} N.* {return 0} n.* {return 0} off {return 0} default { puts [format [msgcat::mc "%s is not a Boolean argument."] $s] return -1; } } } #Write out a list of init file commands that will reconstruct #the current configuration proc SaveState {{SaveFile Ask}} { if {[string equal $SaveFile Ask]} { set SaveFile [tk_getSaveFile -initialfile [_ "SavedState"]]; if {$SaveFile == ""} { ShowMessage [_ "File selection cancelled."] return ; } } if {[catch {open $SaveFile "w"} fh ] != 0} { ShowMessage [format [_ "Unable to open file %s."] $SaveFile]; return ; } set cl [concat \ [list [format "\#%s" [clock format [clock seconds]]]] \ [list [format "\#%s" [_ Fonts]]] \ [fontsel::SaveFontSettings] \ [list [format "\#%s" [_ Colors]]] \ [SaveColorSettings] \ [list [format "\#%s" [_ Miscellaneous]]] \ [SaveMiscellaneousSettings]]; foreach x $cl { puts $fh $x; } close $fh; } proc Usage {} { puts {Usage: msg [options]}; puts [_ " -d set debug flag"]; puts [_ " -h help"]; puts [_ " -i do not read init file"]; puts [_ " -v version"]; } proc argshift {k} { set ::argv [lrange $::argv $k end]; } set Locale [::msgcat::mclocale]; LoadMessageCatalog; #Handle command line arguments if {$DebugP} { puts "About to handle command line arguments" } while {[string match -* [lindex $argv 0]]} { switch -glob -- [lindex $argv 0] { -d* { set DebugP 1; argshift 1; } -h* { Usage; exit 0; } -i* { set ReadInitFileP 0; argshift 1; } -v* { puts "msg $Version"; puts "msort package version $PackageVersion"; exit 0; } default { puts [format [::msgcat::mc "Command line option %s not recognized."] [lindex $argv 0]]; Usage; exit 0; } } }; proc PopupSelectionHandler {w} { clipboard append [$w get sel.first sel.last]; } puts "msg $Version"; puts "Copyright \u00A9 2005-2009 William J. Poser."; puts [_ "This program is free software; you can redistribute it and/or modify it under the terms of version 3 of the GNU General Public License as published by the Free Software Foundation.\n"]; wm withdraw [fontsel::CreateFontControlPanel] CreateInitProcs; if {$ReadInitFileP} { InitFileSetup; #Look first in current directory, then in home directory. if { [file exists $InitFile] } { ReadInitFile $InitFile; } else { set cwd [pwd]; cd; if {[file exists $InitFile] } { ReadInitFile $InitFile; } cd $cwd; } } fontsel::SetFontSelectionDefaults fontsel::RecordDefaults option add *Background $ColorSpecs(Default,Background) 60; option add *ipaec.Button.font CharacterEntryFont 100 option add *ipaec.Label.background $ColorSpecs(IPAEntry,Background) option add *ipaec.Button.background $ColorSpecs(IPAEntry,Background) option add *ipaec.Button.foreground $ColorSpecs(IPAEntry,Foreground) option add *ipaec.Label.relief raised option add *ipaev.Button.font CharacterEntryFont 100 option add *ipaev.Label.background $ColorSpecs(IPAEntry,Background) option add *ipaev.Button.background $ColorSpecs(IPAEntry,Background) option add *ipaev.Button.foreground $ColorSpecs(IPAEntry,Foreground) option add *ipaev.Label.relief raised option add *ipaea.Button.font AccentedLetterFont 100 option add *ipaea.Label.background "\#E0E0E0" option add *ipaea.Button.background "\#FFFFFF" option add *ipaea.Button.foreground "\#000000" option add *ipaea.Label.relief raised option add *ipaed.Button.font DiacriticFont 100 option add *ipaed.Button.background "\#E0E0FF" option add *ipaed.Label.background "\#E0E0E0" option add *ipaed.Button.foreground "\#000000" option add *ipaed.Label.relief raised option add *Entry.Background $::ColorSpecs(Entry,Background) 100; option add *DisabledBackground "\#949CD2" 60; option add *Button.activeBackground "\#FF0044" 60; option add *Radiobutton.activeBackground $::ColorSpecs(RadioButton,ActiveBackground) 100; option add *Radiobutton.selectColor $::ColorSpecs(RadioButton,SelectedBackground) 100; option add *Menu.Background $ColorSpecs(Menu,Background) 100 option add *Menu.Foreground $ColorSpecs(Menu,Foreground) 100 option add *Menu*selectColor $ColorSpecs(Menu,Select) 100 option add *Menu.activeBackground $ColorSpecs(Menu,ActiveBackground) 100 option add *Menu.activeForeground $ColorSpecs(Menu,ActiveForeground) 100 option add *Balloonhelp*background $ColorSpecs(BalloonHelp,Background) 100 option add *Balloonhelp*foreground $ColorSpecs(BalloonHelp,Foreground) 100 option add *Balloonhelpinfo.wrapLength 3i 100 option add *Balloonhelp.info.justify left 100 #Set up balloon help toplevel .balloonhelp -class Balloonhelp -borderwidth 1 -relief flat label .balloonhelp.info -font BalloonHelpFont; pack .balloonhelp.info -side left -fill y wm overrideredirect .balloonhelp 1 wm withdraw .balloonhelp #Construct the user interface set m [menu .menubar -tearoff 0 \ -bg $ColorSpecs(Menubar,Background) \ -fg $ColorSpecs(Menubar,Foreground) \ -activebackground $ColorSpecs(Menubar,ActiveBackground) \ -activeforeground $ColorSpecs(Menubar,Background)] $m add cascade -label [_ "File"] -menu [menu $m.file] $m.file add command -label [_ "Save Command Line"] -command SaveCommandLine $m.file add command -label [_ "Show Command Line"] -command ShowCommandLine $m.file add command -label [_ "Quit"] -command ShutDown if {!$AquaP} { $m add command -label [_ "Sort"] -command ExecuteMsort if {[string equal $tcl_platform(platform) "unix"]} { $m add command -label [_ "Abort Sort"] -command AbortSort } $m add command -label [_ "Add Key"] -command AddKey $m add command -label [_ "Remove Key"] -command RemoveKey } $m add cascade -label [_ "Character Entry"] -menu [menu $m.charentry]; set ind 0; incr ind; set ::CustomCharacterChartIndex $ind; $m.charentry add command -label \ [_ "Load Custom Character Chart Definition"] -command ReadCustomCharacterChartPopup; incr ind; set ::ToggleIPAAIndex $ind; $m.charentry add command -label \ [_ "Display Accented Letter Chart"] -command ToggleIPAA; incr ind; set ::ToggleIPACIndex $ind; $m.charentry add command -label \ [_ "Display IPA Consonants"] -command ToggleIPAC; incr ind; set ::ToggleIPAVIndex $ind; $m.charentry add command -label \ [_ "Display IPA Vowel Chart"] -command ToggleIPAV; incr ind; set ::ToggleIPADIndex $ind; $m.charentry add command -label \ [_ "Display IPA Diacritics"] -command ToggleIPAD; incr ind; set ::ToggleCharEntryByCodeIndex $ind; $m.charentry add command -label \ [_ "Display Widget for Entering Characters by Unicode Code"] -command ToggleCharEntryByCode; $m add cascade -label [_ "Configure"] -menu [menu $m.configure]; set ind 1; destroy $m.configure.charentry $m.configure add cascade -label [_ "Character Entry"] -menu [menu $m.configure.charentry] incr ind; $m.configure.charentry delete 1 4 $m.configure.charentry add checkbutton -label [_ "Display Consonant Chart Column Labels"] \ -variable DisplayConsonantChartColumnLabelsP -onvalue 1 -offvalue 0 \ -command ControlDisplayConsonantChartColumnLabels $m.configure.charentry add checkbutton -label [_ "Display Consonant Chart Row Labels"] \ -variable DisplayConsonantChartRowLabelsP -onvalue 1 -offvalue 0 \ -command ControlDisplayConsonantChartRowLabels $m.configure.charentry add checkbutton -label [_ "Display Vowel Chart Column Labels"] \ -variable DisplayVowelChartColumnLabelsP -onvalue 1 -offvalue 0 \ -command ControlDisplayVowelChartColumnLabels $m.configure.charentry add checkbutton -label [_ "Display Vowel Chart Row Labels"] \ -variable DisplayVowelChartRowLabelsP -onvalue 1 -offvalue 0 \ -command ControlDisplayVowelChartRowLabels incr ind; $m.configure add command -label [_ "Save Configuration"] -command {SaveState}; incr ind; $m.configure add command -label [_ "Select Font"] -command fontsel::CreateFontControlPanel; incr ind; set BalloonHelpIndex $ind; if {$::BalloonHelpP} { set lab [_ "Disable Irritating Balloon Help"] } else { set lab [_ "Enable Balloon Help"] } $m.configure add command -label $lab -command ToggleBalloonHelp; $m add cascade -label [_ "Help"] -menu [menu $m.help]; set ind 0; $m.help add command -label [_ "About"] -command About; incr ind; $m.help add command -label [_ "Bug Reports"] -command BugReports; incr ind; $m.help add command -label [_ "How To Use This Program"] -command HowTo; incr ind; $m.help add command -label [_ "Key Bindings"] -command DescribeKeyBindings; incr ind; $m.help add cascade -label [_ "Initialization File Commands"] -menu [menu $m.help.ifc]; $m.help.ifc add command -label [_ "Popup List"] -command PopupInitCommandList; $m.help.ifc add command -label [_ "Save to File"] -command SaveInitCommands; incr ind; $m.help add command -label [_ "License"] -command ShowGPL; incr ind; $m.help add command -label [_ "Regular Expression Sytax"] -command {ShowWebPage http://laurikari.net/tre/syntax.html} incr ind; . configure -menu .menubar if {$AquaP} { frame .cmnd button .cmnd.sort -text [_ "Sort"] -anchor w -command ExecuteMsort \ -bg $::ColorSpecs(Menubar,Background) -fg $::ColorSpecs(Menubar,Foreground); button .cmnd.abort -text [_ "Abort Sort"] -anchor w -command AbortSort \ -bg $::ColorSpecs(Menubar,Background) -fg $::ColorSpecs(Menubar,Foreground); button .cmnd.addkey -text [_ "Add Key"] -anchor w -command AddKey \ -bg $::ColorSpecs(Menubar,Background) -fg $::ColorSpecs(Menubar,Foreground); button .cmnd.removekey -text [_ "Remove Key"] -anchor w -command RemoveKey \ -bg $::ColorSpecs(Menubar,Background) -fg $::ColorSpecs(Menubar,Foreground); pack .cmnd.sort -side left -expand 1 -fill both pack .cmnd.abort -side left -expand 1 -fill both pack .cmnd.addkey -side left -expand 1 -fill both pack .cmnd.removekey -side left -expand 1 -fill both pack .cmnd -side top -expand y -fill x frame .cmndsep6 -height 4 -borderwidth 1 -relief raised pack .cmndsep6 -side top -expand 1 -fill x } frame .top -bg $::ColorSpecs(Backdrop,Background) -border 2 -relief ridge text .top.msg -bg $ColorSpecs(Messages,Background) \ -fg $ColorSpecs(Messages,Foreground) -height 1 -relief flat \ -font MainFont -exportselection 1 balloonhelp_for .top.msg [_ "Messages from the program appear here."] bind .top.msg {PopupSelectionHandler %W} frame .top.sel -border 1 -relief solid radiobutton .top.sel.gen -text [_ "General"] -variable WhichKey -value 0\ -bg $ColorSpecs(PageChoice,Background) \ -activebackground $::ColorSpecs(PageChoice,ActiveBackground)\ -selectcolor $::ColorSpecs(PageChoice,Selected) -indicatoron 0 \ -height $KeySelHeight -width [expr $KeySelWidth + 2] pack .top.sel.gen -side left pack .top.msg -side top -expand 1 -fill x -padx 6; pack .top.sel -side top -expand 1 -fill x -padx 6 frame .tsep -height 4 -borderwidth 1 -relief raised pack .top -side top -expand 1 -fill x -pady 0 pack .tsep -side top -expand 0 -fill x -pady 0 balloonhelp_for .top.sel [_ "Use these buttons to switch between general\n\ and key-specific settings and among settings\nfor different keys."] balloonhelp_for .top.sel.gen [_ "Click on this button to switch to\n\ the non-key-specific settings."]; if {[MsortAvailableP]} { set ::MsortVersion [FindoutMsortVersion]; ShowMessage [format [_ "Msort version %s"] $::MsortVersion]; } else { ShowMessage [_ "Msort is not available on this machine or is not in your path."] if {!$DebugP} { after 3500 { ShowMessage [_ "Exiting."]; after 3500 { exit 1 } } } } wm title . [format "msg %s msort %s" $Version $::MsortVersion]; set genrelief solid set genborder 1 frame .gen -bg $::ColorSpecs(Backdrop,Background); frame .gen.ctr -bg $::ColorSpecs(Default,Background); if {$UseCheckbuttonP} { frame .gen.ctr.parf label .gen.ctr.parf.lab -text [_ "Record Parse Options"] -anchor w -font HeaderFont checkbutton .gen.ctr.parf.ckb -variable RecordParseDisplayedP \ -onvalue 1 -offvalue 0 -command PackGen pack .gen.ctr.parf.lab -side left -expand 0 -fill y -anchor w pack .gen.ctr.parf.ckb -side right -expand 1 -fill y -anchor e } else { frame .gen.ctr.parf -relief $grelief -border $gborder checkbutton .gen.ctr.parf.ckb -variable RecordParseDisplayedP \ -onvalue 1 -offvalue 0 -command PackGen \ -text [_ "Record Parse Options"] -anchor w -font HeaderFont -indicatoron 0 \ -activeforeground red -activebackground navajowhite pack .gen.ctr.parf.ckb -side right -expand 1 -fill both -anchor e } checkbutton .gen.ctr.parckb -variable RecordParseDisplayedP \ -onvalue 1 -offvalue 0 -command PackGen -text [_ "roll up"] \ -activebackground $::ColorSpecs(RollUpButton,ActiveBackground) \ -activeforeground $::ColorSpecs(RollUpButton,ActiveForeground) #How to parse input into records frame .gen.ctr.rp -relief $genrelief -border $genborder label .gen.ctr.rp.lab -text [_ "How to Parse Into Records"] -font HeaderFont radiobutton .gen.ctr.rp.rdb1 -variable RecordParse -value 0 -text [_ "line"] radiobutton .gen.ctr.rp.rdb2 -variable RecordParse -value 1 -text [_ "block"] radiobutton .gen.ctr.rp.rdb3 -variable RecordParse -value 2 -text [_ "separator"] frame .gen.ctr.rp.fl radiobutton .gen.ctr.rp.fl.rdb4 -variable RecordParse -value 3 -text [_ "fixed length (bytes)"] iwidgets::spinint .gen.ctr.rp.fl.len\ -labelpos e \ -width 3 \ -range {0 200} \ -wrap 0 \ -labeltext ""\ -textbackground $::ColorSpecs(Entry,Background)\ -increment {.gen.ctr.rp.fl.len up} \ -decrement {.gen.ctr.rp.fl.len down} \ -invalid {};# Prevents irritating flashing or ringing of bell .gen.ctr.rp.fl.len clear .gen.ctr.rp.fl.len insert 0 $::FixedRecordLength; .gen.ctr.rp.fl.len configure -state disabled pack .gen.ctr.rp.fl.rdb4 -side left -expand 1 -fill both -anchor w pack .gen.ctr.rp.fl.len -side left -expand 1 -fill both -anchor w -padx 3 .gen.ctr.rp.rdb2 select label .gen.ctr.rp.sclab -text [_ "character:"] entry .gen.ctr.rp.cent -width 2 -state disabled -relief flat \ -font UserTechnicalTextFont \ -foreground $::ColorSpecs(UserText,Foreground) \ -disabledbackground $::ColorSpecs(Entry,DisabledBackground) bind .gen.ctr.rp.cent {SetInsertionTargets .gen.ctr.rp.cent} bind .gen.ctr.rp.cent {InsertClipboardContents %W} pack .gen.ctr.rp.lab -side top -anchor w -padx 4 pack .gen.ctr.rp.rdb2 -side top -anchor w -padx 15 -pady {5 3} pack .gen.ctr.rp.rdb1 -side top -anchor w -padx 15 -pady {3 3} pack .gen.ctr.rp.fl -side bottom -anchor w -padx 15 -pady {3 5} pack .gen.ctr.rp.rdb3 -side left -anchor w -padx {15 2} -pady {3 7} pack .gen.ctr.rp.sclab -side left -anchor w -pady {3 7} pack .gen.ctr.rp.cent -side left -padx 3 -anchor w -pady {3 7} bind .gen.ctr.rp <> ExplainHowToParseIntoRecords; bind .gen.ctr.rp.lab <> ExplainHowToParseIntoRecords; bind .gen.ctr.rp.rdb1 <> ExplainLine; bind .gen.ctr.rp.rdb2 <> ExplainBlock bind .gen.ctr.rp.rdb3 <> ExplainRecordSeparatorCharacter bind .gen.ctr.rp.sclab <> ExplainRecordSeparatorCharacter bind .gen.ctr.rp.cent <> ExplainRecordSeparatorCharacter balloonhelp_for .gen.ctr.rp.fl.len [_ "Enter the length of a record in bytes."]; balloonhelp_for .gen.ctr.rp.cent [_ "Enter the character that separates one record from another here."]; #Parsing into keys frame .gen.ctr.wr -relief $genrelief -border $genborder label .gen.ctr.wr.lab -text [_ "Use Entire Record as Key?"] -anchor nw -font HeaderFont radiobutton .gen.ctr.wr.rdb1 -variable WholeRecordIsKeyP -value 0 -text [_ "no"] radiobutton .gen.ctr.wr.rdb2 -variable WholeRecordIsKeyP -value 1 -text [_ "yes"] .gen.ctr.wr.rdb1 select label .gen.ctr.wr.fslab -text [_ " field separators:"] entry .gen.ctr.wr.fsent -width 6 -relief flat -font UserTechnicalTextFont\ -disabledbackground $::ColorSpecs(Entry,DisabledBackground) .gen.ctr.wr.fsent insert insert {\n} bind .gen.ctr.wr.fsent {InsertClipboardContents %W} bind .gen.ctr.wr.fsent {SetInsertionTargets .gen.ctr.wr.fsent} pack .gen.ctr.wr.lab -side top -expand y -fill y -anchor w -padx 4 -pady {5 3} pack .gen.ctr.wr.rdb2 -side top -anchor w -padx 15 -pady 3 pack .gen.ctr.wr.rdb1 -side left -anchor w -padx 15 -pady 3 pack .gen.ctr.wr.fslab -side left -padx {15 2} -pady {3 7} pack .gen.ctr.wr.fsent -side left -padx {4 15} -anchor w -pady {3 7} bind .gen.ctr.wr <> ExplainEntireRecordAsKey; bind .gen.ctr.wr.lab <> ExplainEntireRecordAsKey; bind .gen.ctr.wr.rdb1 <> ExplainEntireRecordAsKey; bind .gen.ctr.wr.rdb2 <> ExplainEntireRecordAsKey; bind .gen.ctr.wr.fslab <> ExplainFieldSeparatorCharacter bind .gen.ctr.wr.fsent <> ExplainFieldSeparatorCharacter balloonhelp_for .gen.ctr.wr.fsent [_ "Enter the characters that separate one field from another other here."]; if {$UseCheckbuttonP} { frame .gen.ctr.miscf label .gen.ctr.miscf.lab -text [_ "Miscellaneous Options"] -anchor w -font HeaderFont checkbutton .gen.ctr.miscf.ckb -variable MiscOptionsDisplayedP \ -onvalue 1 -offvalue 0 -command PackGen pack .gen.ctr.miscf.lab -side left -expand 0 -fill y -anchor w pack .gen.ctr.miscf.ckb -side right -expand 1 -fill y -anchor e } else { frame .gen.ctr.miscf -relief $grelief -border $gborder checkbutton .gen.ctr.miscf.ckb -variable MiscOptionsDisplayedP \ -onvalue 1 -offvalue 0 -command PackGen \ -text [_ "Miscellaneous Options"] -anchor w -font HeaderFont -indicatoron 0 \ -activeforeground red -activebackground navajowhite pack .gen.ctr.miscf.ckb -side right -expand 1 -fill both -anchor e } checkbutton .gen.ctr.miscckb -variable MiscOptionsDisplayedP \ -onvalue 1 -offvalue 0 -command PackGen -text [_ "roll up"] \ -activebackground $::ColorSpecs(RollUpButton,ActiveBackground) \ -activeforeground $::ColorSpecs(RollUpButton,ActiveForeground) #Invert order globally? frame .gen.ctr.gi -relief $genrelief -border $genborder label .gen.ctr.gi.lab -text [_ "Invert Order Globally?"] -anchor w -font HeaderFont radiobutton .gen.ctr.gi.rdb1 -variable GlobalInversionP -value 0 -text [_ "no"] -anchor w radiobutton .gen.ctr.gi.rdb2 -variable GlobalInversionP -value 1 -text [_ "yes"] -anchor w .gen.ctr.gi.rdb1 select pack .gen.ctr.gi.lab -side top -expand y -fill x -anchor w -padx 4 pack .gen.ctr.gi.rdb1 -expand 1 -fill y -anchor w -padx 15 -pady {5 3} pack .gen.ctr.gi.rdb2 -expand 1 -fill y -anchor w -padx 15 -pady {3 7} bind .gen.ctr.gi <> ExplainInvertOrderGlobally; bind .gen.ctr.gi.lab <> ExplainInvertOrderGlobally; bind .gen.ctr.gi.rdb1 <> ExplainInvertOrderGlobally; bind .gen.ctr.gi.rdb2 <> ExplainInvertOrderGlobally; #End of line marker in input frame .gen.ctr.eol -relief $genrelief -border $genborder label .gen.ctr.eol.lab -text [_ "End of line marker in input"] -anchor w -font HeaderFont radiobutton .gen.ctr.eol.rdb1 -variable EOLCarriageReturnP -value 0 -anchor w \ -text [_ "Line Feed (0x0A = \\012)"] radiobutton .gen.ctr.eol.rdb2 -variable EOLCarriageReturnP -value 1 -anchor w \ -text [_ "Carriage Return (0x0D = \\015)"] .gen.ctr.eol.rdb1 select pack .gen.ctr.eol.lab -side top -expand y -fill x -anchor w -padx 4 pack .gen.ctr.eol.rdb1 -expand 1 -fill y -anchor w -padx 15 -pady {5 3} pack .gen.ctr.eol.rdb2 -expand 1 -fill y -anchor w -padx 15 -pady {3 7} bind .gen.ctr.eol <> ExplainEndOfLineMarker bind .gen.ctr.eol.lab <> ExplainEndOfLineMarker bind .gen.ctr.eol.rdb1 <> ExplainEndOfLineMarker bind .gen.ctr.eol.rdb2 <> ExplainEndOfLineMarker checkbutton .gen.ctr.unickb -variable UnicodeDisplayedP \ -onvalue 1 -offvalue 0 -command PackGen -text [_ "roll up"] \ -activebackground $::ColorSpecs(RollUpButton,ActiveBackground) \ -activeforeground $::ColorSpecs(RollUpButton,ActiveForeground) if {$UseCheckbuttonP} { frame .gen.ctr.unif label .gen.ctr.unif.lab -text [_ "Unicode Range Options"] -anchor w -font HeaderFont checkbutton .gen.ctr.unif.ckb -variable UnicodeDisplayedP \ -onvalue 1 -offvalue 0 -command PackGen pack .gen.ctr.unif.lab -side left -expand 0 -fill y -anchor w pack .gen.ctr.unif.ckb -side right -expand 1 -fill y -anchor e } else { frame .gen.ctr.unif -relief $grelief -border $gborder checkbutton .gen.ctr.unif.ckb -variable UnicodeDisplayedP \ -onvalue 1 -offvalue 0 -command PackGen \ -text [_ "Unicode Range Options"] -anchor w -font HeaderFont -indicatoron 0 \ -activeforeground red -activebackground navajowhite pack .gen.ctr.unif.ckb -side right -expand 1 -fill both -anchor e } #Input restricted to BMP? frame .gen.ctr.bmp -relief $genrelief -border $genborder label .gen.ctr.bmp.lab -text [_ "Input Limited to BMP?"] -anchor w -font HeaderFont radiobutton .gen.ctr.bmp.rdb1 -variable BMPOnlyP -value 0 -text [_ "no"] -anchor w radiobutton .gen.ctr.bmp.rdb2 -variable BMPOnlyP -value 1 -text [_ "yes"] -anchor w pack .gen.ctr.bmp.lab -side top -expand y -fill x -anchor w -padx 4 pack .gen.ctr.bmp.rdb1 -expand 1 -fill y -anchor w -padx 15 -pady {5 3} pack .gen.ctr.bmp.rdb2 -expand 1 -fill y -anchor w -padx 15 -pady {3 7} bind .gen.ctr.bmp <> ExplainBMPOnly bind .gen.ctr.bmp.lab <> ExplainBMPOnly bind .gen.ctr.bmp.rdb1 <> ExplainBMPOnly bind .gen.ctr.bmp.rdb2 <> ExplainBMPOnly set msg \ [_ "Do all the character codes in the material\nthat you are sorting fall within the BMP?"]; balloonhelp_for .gen.ctr.bmp $msg balloonhelp_for .gen.ctr.bmp.lab $msg balloonhelp_for .gen.ctr.bmp.rdb1 $msg balloonhelp_for .gen.ctr.bmp.rdb2 $msg #Reserve Private Use Areas? frame .gen.ctr.pua -relief $genrelief -border $genborder label .gen.ctr.pua.lab -text [_ "Reserve Private Use Areas?"] -anchor w \ -font HeaderFont radiobutton .gen.ctr.pua.rdb1 -variable ReservePrivateUseAreasP -value 0 -text [_ "no"] -anchor w radiobutton .gen.ctr.pua.rdb2 -variable ReservePrivateUseAreasP -value 1 -text [_ "yes"] -anchor w pack .gen.ctr.pua.lab -side top -expand y -fill x -anchor w -padx 4 pack .gen.ctr.pua.rdb1 -expand 1 -fill y -anchor w -padx 15 -pady {5 3} pack .gen.ctr.pua.rdb2 -expand 1 -fill y -anchor w -padx 15 -pady {3 7} bind .gen.ctr.pua <> ExplainReservePrivateUseAreas bind .gen.ctr.pua.lab <> ExplainReservePrivateUseAreas bind .gen.ctr.pua.rdb1 <> ExplainReservePrivateUseAreas bind .gen.ctr.pua.rdb2 <> ExplainReservePrivateUseAreas set msg [_ "Does the material you are sorting make use\nof codepoints in the Private Use Areas?"]; balloonhelp_for .gen.ctr.pua $msg balloonhelp_for .gen.ctr.pua.lab $msg balloonhelp_for .gen.ctr.pua.rdb1 $msg balloonhelp_for .gen.ctr.pua.rdb2 $msg #Unicode normalization frame .gen.ctr.un -relief $genrelief -border $genborder label .gen.ctr.un.lab -text [_ "Unicode Normalization"] -anchor nw -font HeaderFont frame .gen.ctr.un.rbf radiobutton .gen.ctr.un.rbf.rdb1 -variable UnicodeNormalization -value 0 -text [_ "None"] radiobutton .gen.ctr.un.rbf.rdb2 -variable UnicodeNormalization -value 1 -text [_ "NFC"] radiobutton .gen.ctr.un.rbf.rdb3 -variable UnicodeNormalization -value 2 -text [_ "NFD"] radiobutton .gen.ctr.un.rbf.rdb4 -variable UnicodeNormalization -value 3 -text [_ "NFKC"] radiobutton .gen.ctr.un.rbf.rdb5 -variable UnicodeNormalization -value 4 -text [_ "NFKD"] .gen.ctr.un.rbf.rdb2 select grid .gen.ctr.un.rbf.rdb2 -row 0 -column 0 -sticky w -padx 0 -pady {5 3} grid .gen.ctr.un.rbf.rdb3 -row 1 -column 0 -sticky w -padx 0 -pady {3 3} grid .gen.ctr.un.rbf.rdb4 -row 0 -column 1 -sticky w -padx {10 0} -pady {3 3} grid .gen.ctr.un.rbf.rdb5 -row 1 -column 1 -sticky w -padx {10 0} -pady {3 3} grid .gen.ctr.un.rbf.rdb1 -row 0 -column 2 -sticky w -padx {12 5} -pady {5 3} pack .gen.ctr.un.lab -side top -expand 1 -fill both -anchor w -padx 4 -pady {3 2} pack .gen.ctr.un.rbf -side top -expand 1 -fill none -anchor w -padx 15 -pady {3 5} bind .gen.ctr.un <> ExplainUnicodeNormalization; bind .gen.ctr.un.lab <> ExplainUnicodeNormalization; bind .gen.ctr.un.rbf <> ExplainUnicodeNormalization; bind .gen.ctr.un.rbf.rdb1 <> ExplainUnicodeNormalization; bind .gen.ctr.un.rbf.rdb2 <> ExplainUnicodeNormalization; bind .gen.ctr.un.rbf.rdb3 <> ExplainUnicodeNormalization; bind .gen.ctr.un.rbf.rdb4 <> ExplainUnicodeNormalization; bind .gen.ctr.un.rbf.rdb5 <> ExplainUnicodeNormalization; set bhmsg [_ "Whether and how to normalize Unicode"] balloonhelp_for .gen.ctr.un $bhmsg; balloonhelp_for .gen.ctr.un.lab $bhmsg; balloonhelp_for .gen.ctr.un.rbf $bhmsg; balloonhelp_for .gen.ctr.un.rbf.rdb1 $bhmsg; balloonhelp_for .gen.ctr.un.rbf.rdb2 " \u00E9" balloonhelp_for .gen.ctr.un.rbf.rdb3 " \u0065 \u0020\u0301" balloonhelp_for .gen.ctr.un.rbf.rdb4 " \u00E9 \u24C0" balloonhelp_for .gen.ctr.un.rbf.rdb5 " \u0065 \u0020\u0301 \u004B" #Choice of algorithm frame .gen.ctr.al -relief $genrelief -border $genborder label .gen.ctr.al.lab -text [_ "Which Sort Algorithm to Use"] -anchor nw -font HeaderFont frame .gen.ctr.al.opt label .gen.ctr.al.opt.sta -text [_ "stable"] label .gen.ctr.al.opt.ust -text [_ "unstable"] radiobutton .gen.ctr.al.opt.rdb0 -variable SortAlgorithm -value i -text [_ "Insertionsort"] radiobutton .gen.ctr.al.opt.rdb1 -variable SortAlgorithm -value m -text [_ "Mergesort"] radiobutton .gen.ctr.al.opt.rdb2 -variable SortAlgorithm -value q -text [_ "Quicksort"] radiobutton .gen.ctr.al.opt.rdb3 -variable SortAlgorithm -value s -text [_ "Shellsort"] grid .gen.ctr.al.opt.sta -row 0 -column 0 -sticky ew -padx 0 -pady {3 3} grid .gen.ctr.al.opt.ust -row 0 -column 1 -sticky ew -padx 0 -pady {3 3} grid .gen.ctr.al.opt.rdb0 -row 1 -column 0 -sticky w -padx 0 -pady {5 3} grid .gen.ctr.al.opt.rdb1 -row 2 -column 0 -sticky w -padx 0 -pady {3 3} grid .gen.ctr.al.opt.rdb2 -row 1 -column 1 -sticky w -padx {25 5} -pady {5 3} grid .gen.ctr.al.opt.rdb3 -row 2 -column 1 -sticky w -padx {25 5} -pady {3 3} pack .gen.ctr.al.lab -side top -expand 1 -fill both -anchor w -padx 4 -pady {3 2} pack .gen.ctr.al.opt -side top -expand 1 -fill none -anchor w -padx 15 -pady {3 5} bind .gen.ctr.al.opt.rdb0 <> ExplainInsertionSort bind .gen.ctr.al.opt.rdb1 <> ExplainMergeSort bind .gen.ctr.al.opt.rdb2 <> ExplainQuickSort bind .gen.ctr.al.opt.rdb3 <> ExplainShellSort if {$UseCheckbuttonP} { frame .gen.ctr.alf label .gen.ctr.alf.lab -text [_ "Algorithm and Normalization Choices"] \ -anchor w -font HeaderFont checkbutton .gen.ctr.alf.ckb -variable AlgorithmDisplayedP \ -onvalue 1 -offvalue 0 -command PackGen pack .gen.ctr.alf.lab -side left -expand 0 -fill y -anchor w pack .gen.ctr.alf.ckb -side right -expand 1 -fill y -anchor e } else { frame .gen.ctr.alf -relief $grelief -border $gborder checkbutton .gen.ctr.alf.ckb -variable AlgorithmDisplayedP \ -onvalue 1 -offvalue 0 -command PackGen \ -text [_ "Algorithm Choices"] -anchor w -font HeaderFont -indicatoron 0 \ -activeforeground red -activebackground navajowhite pack .gen.ctr.alf.ckb -side right -expand 1 -fill both -anchor e } checkbutton .gen.ctr.alckb -variable AlgorithmDisplayedP \ -onvalue 1 -offvalue 0 -command PackGen -text [_ "roll up"] \ -activebackground $::ColorSpecs(RollUpButton,ActiveBackground) \ -activeforeground $::ColorSpecs(RollUpButton,ActiveForeground) #Set random number generator seed. frame .gen.ctr.rns -relief $genrelief -border $genborder label .gen.ctr.rns.lab -text [_ "Random Number Seed"] -anchor w -font HeaderFont entry .gen.ctr.rns.ent -textvariable Opts(RandomSeed) -justify right -validate all \ -validatecommand {ValidateRandomNumberSeed %W %P %V %d} pack .gen.ctr.rns.lab -side top -expand y -fill x -anchor w -padx 4 pack .gen.ctr.rns.ent -expand 1 -fill y -anchor w -padx 5 -pady {5 3} bind .gen.ctr.rns <> ExplainSetRandomSeed; bind .gen.ctr.rns.lab <> ExplainSetRandomSeed; bind .gen.ctr.rns.ent <> ExplainSetRandomSeed; set msg \ [_ "Set the seed for the random number generator."]; balloonhelp_for .gen.ctr.rns $msg balloonhelp_for .gen.ctr.rns.lab $msg balloonhelp_for .gen.ctr.rns.ent $msg checkbutton .gen.ctr.rnsckb -variable RandomNumberSeedDisplayedP \ -onvalue 1 -offvalue 0 -command PackGen -text [_ "roll up"] \ -activebackground $::ColorSpecs(RollUpButton,ActiveBackground) \ -activeforeground $::ColorSpecs(RollUpButton,ActiveForeground) if {$UseCheckbuttonP} { frame .gen.ctr.rnsf label .gen.ctr.rnsf.lab -text [_ "Random Number Generator / Skip First Record"] -anchor w -font HeaderFont checkbutton .gen.ctr.rnsf.ckb -variable RandomNumberSeedDisplayedP \ -onvalue 1 -offvalue 0 -command PackGen pack .gen.ctr.rnsf.lab -side left -expand 0 -fill y -anchor w pack .gen.ctr.rnsf.ckb -side right -expand 1 -fill y -anchor e } else { frame .gen.ctr.rnsf -relief $grelief -border $gborder checkbutton .gen.ctr.rnsf.ckb -variable RandomNumberSeedDisplayedP \ -onvalue 1 -offvalue 0 -command PackGen \ -text [_ "Random Number Generator Seed"] -anchor w -font HeaderFont -indicatoron 0 \ -activeforeground red -activebackground navajowhite pack .gen.ctr.rnsf.ckb -side right -expand 1 -fill both -anchor e } proc ExplainSkipFirstRecord {} { } #Skip first record? frame .gen.ctr.rns.skp -relief $genrelief -border $genborder label .gen.ctr.rns.skp.lab -text [_ "Skip First Record"] -anchor w -font HeaderFont checkbutton .gen.ctr.rns.skp.ckb -variable SkipFirstRecordP pack .gen.ctr.rns.skp.lab -side left -expand y -fill x -anchor w -padx 4 pack .gen.ctr.rns.skp.ckb -side right -expand 1 -fill y -anchor w -padx 5 -pady {5 3} bind .gen.ctr.rns.skp <> ExplainSkipFirstRecord bind .gen.ctr.rns.skp.lab <> ExplainSkipFirstRecord bind .gen.ctr.rns.skp.ckb <> ExplainSkipFirstRecord set msg \ [_ "Exclude the first record (header) from sorting?"]; balloonhelp_for .gen.ctr.rns.skp $msg balloonhelp_for .gen.ctr.rns.skp.lab $msg balloonhelp_for .gen.ctr.rns.skp.ckb $msg pack .gen.ctr.rns.skp -side right -expand 1 -fill both -anchor w -padx 5 -pady {5 3} #Name of input file frame .gen.ctr.if frame .gen.ctr.if.labf label .gen.ctr.if.labf.lab -text [_ "Specify Input File"] -anchor w -font HeaderFont checkbutton .gen.ctr.if.labf.ckb -variable InputFileDisplayedP \ -onvalue 1 -offvalue 0 -command PackGen -text [_ "roll up"] \ -activebackground $::ColorSpecs(RollUpButton,ActiveBackground) \ -activeforeground $::ColorSpecs(RollUpButton,ActiveForeground) pack .gen.ctr.if.labf.lab -side left -expand 1 -fill both -anchor w pack .gen.ctr.if.labf.ckb -side right -expand 0 -fill both -anchor e set btxt [_ "Browse"] set blen [string length $btxt]; button .gen.ctr.if.brb -text $btxt -width $blen -anchor w -command SelectInputFile entry .gen.ctr.if.ent -font UserPlainTextFont bind .gen.ctr.if.ent {SetInsertionTargets .gen.ctr.if.ent} .gen.ctr.if.ent insert 0 [_ "TestInput"] pack .gen.ctr.if.labf -side top -expand y -fill x -anchor w -pady {9 5} -padx {5 3} pack .gen.ctr.if.brb -expand 0 -anchor w -side left -padx {8 3} -pady {5 9} pack .gen.ctr.if.ent -expand 1 -fill x -anchor w -side left -padx {3 8} -pady {5 9} if {$UseCheckbuttonP} { frame .gen.ctr.iff label .gen.ctr.iff.lab -text [_ "Specify Input File"] -anchor w -font HeaderFont checkbutton .gen.ctr.iff.ckb -variable InputFileDisplayedP \ -onvalue 1 -offvalue 0 -command PackGen pack .gen.ctr.iff.lab -side left -expand 0 -fill y -anchor w pack .gen.ctr.iff.ckb -side right -expand 1 -fill y -anchor e } else { frame .gen.ctr.iff -relief $grelief -border $gborder checkbutton .gen.ctr.iff.ckb -variable InputFileDisplayedP \ -onvalue 1 -offvalue 0 -command PackGen \ -text [_ "Specify Input File"] -anchor w -font HeaderFont -indicatoron 0 \ -activeforeground red -activebackground navajowhite pack .gen.ctr.iff.ckb -side right -expand 1 -fill both -anchor e } set bhmsg [_ "Specify the name of the input file."]; balloonhelp_for .gen.ctr.if $bhmsg; balloonhelp_for .gen.ctr.if.labf $bhmsg; balloonhelp_for .gen.ctr.if.ent [_ "Input will be read from the file whose\nname is shown in this entry box. You may\nenter its name directly or by using the\nfile selection dialogue."]; balloonhelp_for .gen.ctr.if.brb [_ "Press this button to select the name of the input file."] #Name of output file frame .gen.ctr.of frame .gen.ctr.of.labf label .gen.ctr.of.labf.lab -text [_ "Specify Output File"] -anchor w -font HeaderFont checkbutton .gen.ctr.of.labf.ckb -variable OutputFileDisplayedP \ -onvalue 1 -offvalue 0 -command PackGen -text [_ "roll up"] \ -activebackground $::ColorSpecs(RollUpButton,ActiveBackground) \ -activeforeground $::ColorSpecs(RollUpButton,ActiveForeground) pack .gen.ctr.of.labf.lab -side left -expand 1 -fill both -anchor w pack .gen.ctr.of.labf.ckb -side right -expand 0 -fill both -anchor e button .gen.ctr.of.brb -text $btxt -width $blen -anchor w -command SelectOutputFile entry .gen.ctr.of.ent -font UserPlainTextFont bind .gen.ctr.of.ent {SetInsertionTargets .gen.ctr.of.ent} .gen.ctr.of.ent insert 0 [_ "TestOutput"] pack .gen.ctr.of.labf -side top -expand y -fill x -anchor w -pady {9 5} -padx {5 3} pack .gen.ctr.of.brb -expand 0 -anchor w -side left -padx {8 3} -pady {5 9} pack .gen.ctr.of.ent -expand 1 -fill x -anchor w -side left -padx {3 8} -pady {5 9} if {$UseCheckbuttonP} { frame .gen.ctr.off label .gen.ctr.off.lab -text [_ "Specify Output File"] -anchor w -font HeaderFont checkbutton .gen.ctr.off.ckb -variable OutputFileDisplayedP \ -onvalue 1 -offvalue 0 -command PackGen pack .gen.ctr.off.lab -side left -expand 0 -fill y -anchor w pack .gen.ctr.off.ckb -side right -expand 1 -fill y -anchor e } else { frame .gen.ctr.off -relief $grelief -border $gborder checkbutton .gen.ctr.off.ckb -variable OutputFileDisplayedP \ -onvalue 1 -offvalue 0 -command PackGen \ -text [_ "Specify Output File"] -anchor w -font HeaderFont -indicatoron 0 \ -activeforeground red -activebackground navajowhite pack .gen.ctr.off.ckb -side right -expand 1 -fill both -anchor e } set bhmsg [_ "Specify the name of the output file."]; balloonhelp_for .gen.ctr.of $bhmsg; balloonhelp_for .gen.ctr.of.labf $bhmsg; balloonhelp_for .gen.ctr.of.ent [_ "Output will be written to the file whose\nname is shown in this entry box. You may\nenter its name directly or by using the file\nselection dialogue."]; balloonhelp_for .gen.ctr.of.brb [_ "Press this button to select the name of the output file."] balloonhelp_for .gen.ctr.rp [_ "How is the input to be divided into records?\nOne option is to treat each line as a record.\nA second option is to treat a sequence of\none or more blank lines as the record separator.\nThe third option is to consider a record to end\nwhen the character you specify is encountered.\nThe fourth option is for each record to consist of\nthe same fixed number of bytes. "] balloonhelp_for .gen.ctr.wr [_ "Use the entire record as the sole sort\nkey? If not, you must specify how the\nrecord is divided into fields"] balloonhelp_for .gen.ctr.gi [_ "Invert the ordering of the entire\nresult of the sort?"] balloonhelp_for .gen.ctr.eol [_ "Is end-of-line marked by Line Feed\nor Carriage Return?"] trace variable RecordParse w ToggleRecordSeparatorEntryActive trace variable WhichKey w ChangePage trace variable WholeRecordIsKeyP w ToggleFieldSeparatorEntryActive trace variable EOLCarriageReturnP w UpdateDefaultFieldSeparator #If the default browser is on the list, remove it. set di [lsearch -exact $BrowserList $DefaultBrowser] if {$di >= 0} { set BrowserList [lreplace $BrowserList $di $di] } #Add the default browser to the beginning of the list. set BrowserList [linsert $BrowserList 0 $DefaultBrowser]; foreach fn $CustomCharacterChartFileNameList { wm withdraw [ReadCustomCharacterChartPopup $fn] } foreach dl $CustomCharacterChartDataList { wm withdraw [DefineCustomCharacterChartPopup $dl] } set KeyMap(0) .gen; set SelectionButtonMap(0) ".top.sel.gen"; AddKey; # Create key 1 UpdateInverseKeyMap; UpdateInverseSelectionButtonMap; BindKeys . SetCommandGlosses; .top.sel.gen invoke set SavedRecordParseDisplayedP $RecordParseDisplayedP set RecordParseDisplayedP 1; PackGen after idle { update idletasks ConfigureGenOne; ConfigureGenTwo; } tk_focusFollowsMouse; SetInsertionTargets .gen.ctr.if.ent after 500 { set RecordParseDisplayedP $SavedRecordParseDisplayedP PackGen } msort-8.53/CREDITS0000644000175100017510000000043311236173741010565 00000000000000celelibi@gmail.com Bug reports and patches for Debian bugs 383230 and 383232. stinney@sas.upenn.edu Patch for bug in 8.42.0 that prevented compilation with -disable-uninum. Patch to 8.46 ConstructSortOrder when using utf8proc. joland@gmail.com Bug reports and patch for 8.43. msort-8.53/msort-8.53.lsm0000644000175100017510000000323111322476545012024 00000000000000Begin3 Title: msort Version: 8.53 Entered-date: 10JAN2010 Description: Msort is a sophisticated and flexible sort utility, capable of parsing out records and fields in msort allows you to sort blocks of text delimited in a number of ways rather than just lines and to specify particular fields of a record as sort keys using either their position, counted from either end, or by matching regular expressions to their tags. Any or all keys may be optional. How absent optional keys are ordered with respect to present keys may be set separately for each key. msort allows you to specify arbitrary sort orders and to define virtually unlimited numbers of collating sequences of effectively unlimited length. The sort order and multigraphs are defined separately for each key. If your system has locale support, you can also use locale collation rules instead of specify your own sort order. msort provides twelve types of key comparison: lexicographic, numeric, numeric string, hybrid, by string length, by angle, by date, by domain name, by time, by ISO8601 date/time stamp, by month name, and random. msort can reverse the characters in a key, allowing it to be used to generate reverse dictionaries. A choice of sorting algorithms is provided. msort fully supports Unicode and can perform Unicode normalization. Full Unicode case-folding is available. Keywords: sorting, unicode Author: billposer@alum.mit.edu (Bill Poser) Primary-site: billposer.org /Software/Downloads/ 440 kbytes msort-8.53.tar.bz2 Platforms: POSIX (including Linux, FreeBSD) Copying-policy: GPL 3 End msort-8.53/RegressionTests/0000777000175100017510000000000011236173744012777 500000000000000msort-8.53/RegressionTests/TimeTest02.data0000644000175100017510000000016011236173744015443 0000000000000013:37:49Z 13:37:04Z 13:36Z 07:36Z 13:37:26-04 13:37:26+02 13:37:26+02:11 13:37+04 13:37:18-04 13:37+03 13:37-04 msort-8.53/RegressionTests/MonthNameTest01.data0000644000175100017510000000007511236173744016437 00000000000000March 100 January 400 April 200 October 60 Jan 734 Jan 200 msort-8.53/RegressionTests/CharacterRangeTest04.norm0000644000175100017510000000022011236173744017457 00000000000000田中 1357F Smith 0232F Schwartz4324F Nakayama0002F Martin 0001F Gomez 1439F Jones 0023M Habib 4223M Cohen 2431M Chen 3245M msort-8.53/RegressionTests/RunTests.sh0000644000175100017510000005632411236173744015050 00000000000000#!/bin/bash #This tests comparison of angles msort -j -q -l -w -c a < AngleTest01.data > AngleTest01.result echo -n "AngleTest01 " >> TestResults; if cmp -s AngleTest01.result AngleTest01.norm then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests case-folding in the ASCII range msort -j -q -l -w -C < CaseFoldingTest01.data > CaseFoldingTest01.result echo -n "CaseFoldingTest01 " >> TestResults; if cmp -s CaseFoldingTest01.result CaseFoldingTest01.norm then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests case-folding in the Armenian range msort -j -q -l -w -C < CaseFoldingTest02.data > CaseFoldingTest02.result echo -n "CaseFoldingTest02 " >> TestResults; if cmp -s CaseFoldingTest02.result CaseFoldingTest02.norm then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi msort -j -q -B -l -d \t -e 13,13 -c l -e 9,12 -c n < CharacterRangeTest01.data > CharacterRangeTest01.result echo -n "CharacterRangeTest01 " >> TestResults; if cmp -s CharacterRangeTest01.result CharacterRangeTest01.norm then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi msort -j -q -B -l -d \t -e 9,12 -c n -e 13,13 -c l < CharacterRangeTest02.data > CharacterRangeTest02.result echo -n "CharacterRangeTest02 " >> TestResults; if cmp -s CharacterRangeTest02.result CharacterRangeTest02.norm then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi msort -j -q -B -l -d \t -e 13,13 -c l -i -e 1,8 -c l < CharacterRangeTest03.data > CharacterRangeTest03.result echo -n "CharacterRangeTest03 " >> TestResults; if cmp -s CharacterRangeTest03.result CharacterRangeTest03.norm then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi msort -j -q -I -B -l -d \t -e 13,13 -c l -i -e 1,8 -c l < CharacterRangeTest04.data > CharacterRangeTest04.result echo -n "CharacterRangeTest04 " >> TestResults; if cmp -s CharacterRangeTest04.result CharacterRangeTest04.norm then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests the check only option. echo -n "CheckOnlyTest01 " >> TestResults; msort -j -q -l -w -c n -Q < CheckOnlyTest01A.data > CheckOnlyTest01A.result rstat1=$? cmp -s CheckOnlyTest01A.result CheckOnlyTest01.norm cstat1=$? msort -j -q -l -w -c n -Q < CheckOnlyTest01B.data > CheckOnlyTest01B.result rstat2=$? cmp -s CheckOnlyTest01B.result CheckOnlyTest01.norm cstat2=$? if [[($rstat1 == 0) && ($cstat1 == 0) && ($cstat2 == 0) && ($rstat2 > 0)]]; then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests straight ASCII collating sequences. msort -j -q -l -w -s CollatingSequenceTest01.ord < CollatingSequenceTest01.data > CollatingSequenceTest01.result echo -n "CollatingSequenceTest01 " >> TestResults; if cmp -s CollatingSequenceTest01.result CollatingSequenceTest01.norm then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests collating sequences containing non-ASCII characters. msort -j -q -l -w -s CollatingSequenceTest02.ord < CollatingSequenceTest02.data > CollatingSequenceTest02.result echo -n "CollatingSequenceTest02 " >> TestResults; if cmp -s CollatingSequenceTest02.result CollatingSequenceTest02.norm then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests collating sequences containing non-ASCII characters and octal escapes. msort -j -q -l -w -s CollatingSequenceTest03.ord < CollatingSequenceTest03.data > CollatingSequenceTest03.result echo -n "CollatingSequenceTest03 " >> TestResults; if cmp -s CollatingSequenceTest03.result CollatingSequenceTest03.norm then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests stripping of both diacritics and enclosures. msort -j -q -l -w -T ed < ComboStrippingTest01.data > ComboStrippingTest01.result echo -n "ComboStrippingTest01 " >> TestResults; if cmp -s ComboStrippingTest01.result ComboStrippingTest01.norm then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests the interpretation of dates in which the month may be non-numerical. msort -j -q -l -w -c d < DateTest01.data > DateTest01.result echo -n "DateTest01 " >> TestResults; if cmp -s DateTest01.result DateTest01.norm then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests the interpretation of dates in which the month may be non-numerical #and the order of month names is specified in a sort order file. msort -j -q -l -w -c d -s FrenchMonths.ord < DateTest02.data > DateTest02.result echo -n "DateTest02 " >> TestResults; if cmp -s DateTest02.result DateTest02.norm then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests the interpretation of dates using non-Western (Gurmukhi) numerals. msort -j -q -l -w -c d < DateTest03.data > DateTest03.result echo -n "DateTest03 " >> TestResults; if cmp -s DateTest03.result DateTest03.norm then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests the interpretation of dates whose format is specified on the command line. msort -j -q -l -w -c d -f m/d/y < DateTest04.data > DateTest04.result echo -n "DateTest04 " >> TestResults; if cmp -s DateTest04.result DateTest04.norm then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests the interpretation of day-of-year dates using non-Western (Gurmukhi) numerals. msort -j -q -l -w -c d -f y-d < DateTest05.data > DateTest05.result echo -n "DateTest05 " >> TestResults; if cmp -s DateTest05.result DateTest05.norm then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests diacritic stripping msort -j -q -l -w -T d < DiacriticStrippingTest01.data > DiacriticStrippingTest01.result echo -n "DiacriticStrippingTest01 " >> TestResults; if cmp -s DiacriticStrippingTest01.result DiacriticStrippingTest01.norm then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi msort -j -q -l -n 1 -c D < DomainNameTest01.data > DomainNameTest01.result echo -n "DomainNameTest01 " >> TestResults; if cmp -s DomainNameTest01.norm DomainNameTest01.result; then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi msort -j -q -l -n 1 -c D < EmailAddressTest01.data > EmailAddressTest01.result echo -n "EmailAddressTest01 " >> TestResults; if cmp -s EmailAddressTest01.norm EmailAddressTest01.result; then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests conversion of enclosed characters to their unenclosed counterparts. msort -j -q -l -w -T e < EnclosureStrippingTest01.data > EnclosureStrippingTest01.result echo -n "EnclosureStrippingTest01 " >> TestResults; if cmp -s EnclosureStrippingTest01.norm EnclosureStrippingTest01.result; then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests exclusions specified on the command line msort -j -q -l -w -c n -X '$C' < ExclusionCLITest01.data > ExclusionCLITest01.result echo -n "ExclusionCLITest01 " >> TestResults; if cmp -s ExclusionCLITest01.norm ExclusionCLITest01.result; then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests exclusions specified in a file msort -j -q -l -w -c n -x ExclusionFileTest01.exc < ExclusionFileTest01.data > ExclusionFileTest01.result echo -n "ExclusionFileTest01 " >> TestResults; if cmp -s ExclusionCLITest01.norm ExclusionCLITest01.result; then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi msort -j -q -l -n 1 -a M -A < FirstCharOnlyTest01.data > FirstCharOnlyTest01.result echo -n "FirstCharOnlyTest01 " >> TestResults; if cmp -s FirstCharOnlyTest01.norm FirstCharOnlyTest01.result; then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests parsing into fixed size records. msort -j -q -O 36 -e 32,35 -c n < FixedSizeRecordTest01.data > FixedSizeRecordTest01.result echo -n "FixedSizeRecordTest01 " >> TestResults; if cmp -s FixedSizeRecordTest01.norm FixedSizeRecordTest01.result; then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests global inversion. msort -j -q -l -w -I < GlobalInversionTest01.data > GlobalInversionTest01.result echo -n "GlobalInversionTest01 " >> TestResults; if cmp -s GlobalInversionTest01.result GlobalInversionTest01.norm then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests hybrid (lexical/numeric) comparison. msort -j -q -l -w -c h < HybridComparisonTest01.data > HybridComparisonTest01.result echo -n "HybridComparisonTest01 " >> TestResults; if cmp -s HybridComparisonTest01.result HybridComparisonTest01.norm then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests the command line flags for specifying input and output files. msort -j -q -l -w -1 IOFlagTest01.data -2 IOFlagTest01.result echo -n "IOFlagTest01 " >> TestResults; if cmp -s IOFlagTest01.result IOFlagTest01.norm then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests the interpretation of ISO8601 date/time stamps without time zone offsets. msort -j -q -l -w -c i < ISO8601DateTimeTest01.data > ISO8601DateTimeTest01.result echo -n "ISO8601DateTimeTest01 " >> TestResults; if cmp -s ISO8601DateTimeTest01.result ISO8601DateTimeTest01.norm then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests the interpretation of ISO8601 date/time stamps with time zone offsets. msort -j -q -l -w -c i < ISO8601DateTimeTest02.data > ISO8601DateTimeTest02.result echo -n "ISO8601DateTimeTest02 " >> TestResults; if cmp -s ISO8601DateTimeTest02.result ISO8601DateTimeTest02.norm then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests the interpretation of ISO8601 date/time stamps with a leading sign. msort -j -q -l -w -c i < ISO8601DateTimeTest03.data > ISO8601DateTimeTest03.result echo -n "ISO8601DateTimeTest03 " >> TestResults; if cmp -s ISO8601DateTimeTest03.result ISO8601DateTimeTest03.norm then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests handling of input data with CR rather than LF as line terminator. msort -j -q -l -m -w < LineEndTest01.data > LineEndTest01.result echo -n "LineEndTest01 " >> TestResults; if cmp -s LineEndTest01.result LineEndTest01.norm then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests local inversion with a single key. msort -j -q -l -w -i < LocalInversionTest01.data > LocalInversionTest01.result echo -n "LocalInversionTest01 " >> TestResults; if cmp -s LocalInversionTest01.result LocalInversionTest01.norm then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests local inversion with two keys. msort -j -q -l -n 2 -c n -i -n 1 < LocalInversionTest02.data > LocalInversionTest02.result echo -n "LocalInversionTest02 " >> TestResults; if cmp -s LocalInversionTest02.result LocalInversionTest02.norm then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests handling of input lines thousands of lines longs msort -j -q -l -w < LongLineTest01.data > LongLineTest01.result echo -n "LongLineTest01 " >> TestResults; if cmp -s LongLineTest01.result LongLineTest01.norm then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests month name sorting using an order defined in a file. msort -j -q -l -n 1 -c m -s MonthNameTest02.ord -n 2 -c n < MonthNameTest02.data > MonthNameTest02.result echo -n "MonthNameTest02 " >> TestResults; if cmp -s MonthNameTest02.result MonthNameTest02.norm then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests the ability to sort on non-Western numerals (Old Persian) msort -j -q -l -w -c n -y Old_Persian < NumberTest01.data > NumberTest01.result echo -n "NumberTest01 " >> TestResults; if cmp -s NumberTest01.result NumberTest01.norm then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests the ability to sort on numbers using different numeral systems in different fields. msort -j -q -l -n 2 -c n -y Chinese -n 1 -c n -y Devanagari < NumberTest02.data > NumberTest02.result echo -n "NumberTest02 " >> TestResults; if cmp -s NumberTest02.result NumberTest02.norm then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests the ability to sort on non-Western numbers (Roman numerals) msort -j -q -l -w -c n -y Roman < NumberTest03.data > NumberTest03.result echo -n "NumberTest03 " >> TestResults; if cmp -s NumberTest03.result NumberTest03.norm then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests the ability to sort on numbers in a bunch of different numeral systems msort -j -q -l -w -c n -y all < NumberTest04.data > NumberTest04.result echo -n "NumberTest04 " >> TestResults; if cmp -s NumberTest04.result NumberTest04.norm then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests the ability to sort on numeric strings using non-Western numerals (Gurmukhi) msort -j -q -l -w -c N -y Gurmukhi < NumericStringTest01.data > NumericStringTest01.result echo -n "NumericStringTest01 " >> TestResults; if cmp -s NumericStringTest01.result NumericStringTest01.norm then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests the handling of optional tagged fields where the key is entirely absent. msort -j -q -b -t '%P:' -o g < OptionalFieldTest01.data > OptionalFieldTest01.result echo -n "OptionalFieldTest01 " >> TestResults; if cmp -s OptionalFieldTest01.result OptionalFieldTest01.norm then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests the handling of optional tagged fields where the tag is present by has no value. msort -j -q -b -t '%P:' -o g < OptionalFieldTest02.data > OptionalFieldTest02.result echo -n "OptionalFieldTest02 " >> TestResults; if cmp -s OptionalFieldTest02.result OptionalFieldTest02.norm then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests the handling of an optional positionally-defined field. msort -j -q -l -n 2 -o l -n 1 < OptionalFieldTest03.data > OptionalFieldTest03.result echo -n "OptionalFieldTest03 " >> TestResults; if cmp -s OptionalFieldTest03.result OptionalFieldTest03.norm then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests a single positive field number. msort -j -q -l -d ':' -n 3 -c n < PositionKeyTest01.data > PositionKeyTest01.result echo -n "PositionKeyTest01 " >> TestResults; if cmp -s PositionKeyTest01.norm PositionKeyTest01.result; then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests a single negative field number. msort -j -q -l -d ':' -n -5 -c n < PositionKeyTest01.data > PositionKeyTest02.result echo -n "PositionKeyTest02 " >> TestResults; if cmp -s PositionKeyTest02.norm PositionKeyTest02.result; then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests a single positive field number with character offset msort -j -q -l -d ':' -n 3.2 -c n < PositionKeyTest01.data > PositionKeyTest03.result echo -n "PositionKeyTest03 " >> TestResults; if cmp -s PositionKeyTest03.norm PositionKeyTest03.result; then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests a single negative field number with character offset msort -j -q -l -d ':' -n -5.2 -c n < PositionKeyTest01.data > PositionKeyTest04.result echo -n "PositionKeyTest04 " >> TestResults; if cmp -s PositionKeyTest04.norm PositionKeyTest04.result; then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests compound conditional keys, that is, composed of two or more fields. msort -j -q -l -d ':' -n '1,2' -c n -X ':' < PositionKeyTest05.data > PositionKeyTest05.result echo -n "PositionKeyTest05 " >> TestResults; if cmp -s PositionKeyTest05.norm PositionKeyTest05.result; then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests parsing on a specified record separator. #We set the record-separator to semi-colon and the field separator to tab #and sort numerically on the second field. msort -j -q -r ';' -d '\t' -n 2 -c n < RecordSeparatorTest01.data > RecordSeparatorTest01.result echo -n "RecordSeparatorTest01 " >> TestResults; if cmp -s RecordSeparatorTest01.result RecordSeparatorTest01.norm then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests key reversal. msort -j -q -l -n 1 -R < ReversalTest01.data > ReversalTest01.result echo -n "ReversalTest01 " >> TestResults; if cmp -s ReversalTest01.result ReversalTest01.norm then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests use of a sort order file with a non-default separator msort -j -q -l -w -W SortOrderFileSeparatorTest01.sep -s SortOrderFileSeparatorTest01.ord < SortOrderFileSeparatorTest01.data > SortOrderFileSeparatorTest01.result echo -n "SortOrderFileSeparatorTest01 " >> TestResults; if cmp -s SortOrderFileSeparatorTest01.result SortOrderFileSeparatorTest01.norm then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests skipping of the first record msort -j -q -d '/' -t w -Z SkipFirstRecordTest01.data > SkipFirstRecordTest01.result echo -n "SkipFirstRecordTest01 " >> TestResults; if cmp -s SkipFirstRecordTest01.result SkipFirstRecordTest01.norm then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests sorting on string length, with a secondary lexicographic sort. msort -j -q -l -n 1 -c s -n 1 < StringLengthTest01.data > StringLengthTest01.result echo -n "StringLengthTest01 " >> TestResults; if cmp -s StringLengthTest01.result StringLengthTest01.norm then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests sorting on string length with multigraphs and a secondary lexicographic sort. msort -j -q -l -n 1 -c s -s StringLengthTest02.ord -n 1 < StringLengthTest02.data > StringLengthTest02.result echo -n "StringLengthTest02 " >> TestResults; if cmp -s StringLengthTest02.result StringLengthTest02.norm then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi msort -j -q -l -w -T s < StylisticTest01.data > StylisticTest01.result echo -n "StylisticTest01 " >> TestResults; if cmp -s StylisticTest01.result StylisticTest01.norm then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests substitions. msort -j -q -l -w -S SubstitutionTest01.sub < SubstitutionTest01.data > SubstitutionTest01.result echo -n "SubstitutionTest01 " >> TestResults; if cmp -s SubstitutionTest01.result SubstitutionTest01.norm then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests fancy substitions. msort -j -q -l -w -S SubstitutionTest02.sub < SubstitutionTest02.data > SubstitutionTest02.result echo -n "SubstitutionTest02 " >> TestResults; if cmp -s SubstitutionTest02.result SubstitutionTest02.norm then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests key selection by tag. msort -j -q -t '%M:' -t '%P:' < TaggedKeyTest01.data > TaggedKeyTest01.result echo -n "TaggedKeyTest01 " >> TestResults; if cmp -s TaggedKeyTest01.result TaggedKeyTest01.norm then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests key selection by tags specified by means of a regular expression. msort -j -q -t '%(M|D.*|d.*):' -t '%P:' < TaggedKeyTest02.data > TaggedKeyTest02.result echo -n "TaggedKeyTest02 " >> TestResults; if cmp -s TaggedKeyTest02.result TaggedKeyTest02.norm then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests the handling of empty keys, that is, fields with a tag but no value. msort -j -q -t '%G:' -t '%P:' < TaggedKeyTest03.data > TaggedKeyTest03.result echo -n "TaggedKeyTest03 " >> TestResults; if cmp -s TaggedKeyTest03.result TaggedKeyTest03.norm then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests the interpretation of simple times, without time zone offsets msort -j -q -l -w -c t < TimeTest01.data > TimeTest01.result echo -n "TimeTest01 " >> TestResults; if cmp -s TimeTest01.result TimeTest01.norm then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests the interpretation of times with ISO8601 time zone offsets. msort -j -q -l -w -c t < TimeTest02.data > TimeTest02.result echo -n "TimeTest02 " >> TestResults; if cmp -s TimeTest02.result TimeTest02.norm then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests Turkic case folding msort -j -q -l -a m -n 1 -C -z -n 2 < TurkicCaseFoldTest.data > TurkicCaseFoldTest.result echo -n "TurkicCaseFoldTest " >> TestResults; if cmp -s TurkicCaseFoldTest.result TurkicCaseFoldTest.norm then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests disabling of the default of normalization to NFC. msort -j -q -l -n 1 -n 2 -c n -u n < UnicodeNormalizationTest01.data > UnicodeNormalizationTest01.result echo -n "UnicodeNormalizationTest01 " >> TestResults; if cmp -s UnicodeNormalizationTest01.norm UnicodeNormalizationTest01.result; then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests the default of normalization to NFC. msort -j -q -l -n 1 -n 2 -c n -u c < UnicodeNormalizationTest02.data > UnicodeNormalizationTest02.result echo -n "UnicodeNormalizationTest02 " >> TestResults; if cmp -s UnicodeNormalizationTest02.norm UnicodeNormalizationTest02.result; then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi #This tests normalization to NFD. msort -j -q -l -n 1 -n 2 -c n -u d < UnicodeNormalizationTest03.data > UnicodeNormalizationTest03.result echo -n "UnicodeNormalizationTest03 " >> TestResults; if cmp -s UnicodeNormalizationTest03.norm UnicodeNormalizationTest03.result; then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi msort -j -q -l -n 1 -c D < URIWithSchemeTest01.data > URIWithSchemeTest01.result echo -n "URIWithSchemeTest01 " >> TestResults; if cmp -s URIWithSchemeTest01.norm URIWithSchemeTest01.result; then echo "PASSED" >> TestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; fi msort-8.53/RegressionTests/Makefile0000644000175100017510000000026111236173744014352 00000000000000test: @rm -f TestResults bash RunTests.sh localetest: @rm -f LocaleTestResults bash RunLocaleTests.sh clean: @rm *.result TestResults LocaleTestResults msort.log msort-8.53/RegressionTests/out0000644000175100017510000000000011236173744013433 00000000000000msort-8.53/RegressionTests/README0000644000175100017510000000113711236173744013575 00000000000000RunTests.sh contains tests for the correct functioning of msort. In each case, test on the data in the .data file should generate the corresponding .norm file. If the .result file is the same as the .norm file, the test is successful. StylisticTest01 uses Hebrew presentation forms because these exercise the stylistic transformation in the most rigorous way since, unlike the other stylistic transformations, they require storage reallocation. To execute the tests, just type "make" or "make test". The results of the tests are logged in the file TestResults. "make clean" will remove the result files. msort-8.53/RegressionTests/StylisticTest01.norm0000644000175100017510000000005111236173744016574 00000000000000שאײיִג שאײיִד שגאג שגג msort-8.53/RegressionTests/ISO8601DateTimeTest03.data0000644000175100017510000000023211236173744017134 000000000000002007-09-02T13:36 20070902T133721 2007-09-02T13:37 2007-09-05T1338 +1997-07-03T14:47 2007-04-05T11:37 1997-02-06T14:47 -1997-02-06T14:47 2005-09-02T13:37 msort-8.53/RegressionTests/StylisticTest01.data0000644000175100017510000000005211236173744016533 00000000000000שאײיִג שאײיִד שגג שגאג msort-8.53/RegressionTests/MacBug0000644000175100017510000000032211236173744013771 00000000000000HybridComparisonTest02 uses locale comparison ISO8601DateTimeTest ? ISO8601TimeTest ? MonthNameTest01 uses locale comparison MonthNameTest03 uses locale comparison and attempts to set locale to ja_JP.EUC-JP msort-8.53/RegressionTests/MonthNameTest02.ord0000644000175100017510000000013211236173744016305 00000000000000一月 二月 三月 四月 五月 六月 七月 八月 九月 十月 十一月 十二月 msort-8.53/RegressionTests/RunLocaleTests.sh0000644000175100017510000000265711236173744016170 00000000000000#!/bin/bash #This tests hybrid (lexical/numeric) comparison using locale rules. msort -j -q -l -w -c h -s en_US < HybridComparisonTest02.data > HybridComparisonTest02.result echo -n "HybridComparisonTest02 " >> LocaleTestResults; if cmp -s HybridComparisonTest02.result HybridComparisonTest02.norm then echo "PASSED" >> LocaleTestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> LocaleTestResults; fi msort -j -q -l -n 1 -c m -s en_US -n 2 -c n < MonthNameTest01.data > MonthNameTest01.result echo -n "MonthNameTest01 " >> LocaleTestResults; if cmp -s MonthNameTest01.result MonthNameTest01.norm then echo "PASSED" >> LocaleTestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> LocaleTestResults; fi #This tests month name sorting using locale data in a non-UTF-8 locale msort -j -q -l -n 1 -c m -s ja_JP.EUC-JP < MonthNameTest03.data > MonthNameTest03.result echo -n "MonthNameTest03 " >> LocaleTestResults; if cmp -s MonthNameTest03.result MonthNameTest03.norm then echo "PASSED" >> LocaleTestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> LocaleTestResults; fi #This tests month name sorting using locale data in a non-UTF-8 locale msort -j -q -l -n 1 -c m -s fr_FR < MonthNameTest04.data > MonthNameTest04.result echo -n "MonthNameTest04 " >> LocaleTestResults; if cmp -s MonthNameTest04.result MonthNameTest04.norm then echo "PASSED" >> LocaleTestResults; else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> LocaleTestResults; fi msort-8.53/RegressionTests/CharacterRangeTest01.norm0000644000175100017510000000022011236173744017454 00000000000000Martin 0001F Nakayama0002F Smith 0232F 田中 1357F Gomez 1439F Schwartz4324F Jones 0023M Cohen 2431M Chen 3245M Habib 4223M msort-8.53/RegressionTests/CharacterRangeTest02.norm0000644000175100017510000000022011236173744017455 00000000000000Martin 0001F Nakayama0002F Jones 0023M Smith 0232F 田中 1357F Gomez 1439F Cohen 2431M Chen 3245M Habib 4223M Schwartz4324F msort-8.53/RegressionTests/CharacterRangeTest03.norm0000644000175100017510000000022011236173744017456 00000000000000Chen 3245M Cohen 2431M Habib 4223M Jones 0023M Gomez 1439F Martin 0001F Nakayama0002F Schwartz4324F Smith 0232F 田中 1357F msort-8.53/RegressionTests/CharacterRangeTest01.data0000644000175100017510000000022011236173744017412 00000000000000Smith 0232F Jones 0023M Martin 0001F Nakayama0002F Habib 4223M Schwartz4324F Chen 3245M Cohen 2431M Gomez 1439F 田中 1357F msort-8.53/RegressionTests/CharacterRangeTest02.data0000644000175100017510000000022011236173744017413 00000000000000Smith 0232F Jones 0023M Martin 0001F Nakayama0002F Habib 4223M Schwartz4324F Chen 3245M Cohen 2431M Gomez 1439F 田中 1357F msort-8.53/RegressionTests/CharacterRangeTest03.data0000644000175100017510000000022011236173744017414 00000000000000Smith 0232F Jones 0023M Martin 0001F Nakayama0002F Habib 4223M Schwartz4324F Chen 3245M Cohen 2431M Gomez 1439F 田中 1357F msort-8.53/RegressionTests/CharacterRangeTest04.data0000644000175100017510000000022011236173744017415 00000000000000Smith 0232F Jones 0023M Martin 0001F Nakayama0002F Habib 4223M Schwartz4324F Chen 3245M Cohen 2431M Gomez 1439F 田中 1357F msort-8.53/RegressionTests/DateTest01.data0000644000175100017510000000020511236173744015421 000000000000002002-December-11 2002-april-11 2002-12-15 2002-12-11 2001-JUNE-30 2001-March-30 2001-February-30 2001-July-30 1988-04-8 1987-09-6 msort-8.53/RegressionTests/MonthNameTest01.norm0000644000175100017510000000007311236173744016477 00000000000000Jan 200 January 400 Jan 734 March 100 April 200 October 60 msort-8.53/RegressionTests/MonthNameTest02.data0000644000175100017510000000021411236173744016433 00000000000000三月 150 五月 125 十二月 200 八月 122 七月 343 十二月 147 六月 225 二月 833 九月 56 十一月 100 一月 745 四月 250 msort-8.53/RegressionTests/MonthNameTest02.norm0000644000175100017510000000021411236173744016475 00000000000000一月 745 二月 833 三月 150 四月 250 五月 125 六月 225 七月 343 八月 122 九月 56 十一月 100 十二月 147 十二月 200 msort-8.53/RegressionTests/MonthNameTest03.data0000644000175100017510000000015611236173744016441 000000000000003月 150 5月 125 12月 200 8月 122 7月 343 12月 147 6月 225 2月 833 9月 56 11月 100 1月 745 4月 250 msort-8.53/RegressionTests/DateTest01.norm0000644000175100017510000000020211236173744015460 000000000000001987-09-6 1988-04-8 2001-February-30 2001-March-30 2001-JUNE-30 2001-July-30 2002-april-11 2002-12-11 2002-December-11 2002-12-15 msort-8.53/RegressionTests/MonthNameTest03.norm0000644000175100017510000000015611236173744016503 000000000000001月 745 2月 833 3月 150 4月 250 5月 125 6月 225 7月 343 8月 122 9月 56 11月 100 12月 147 12月 200 msort-8.53/RegressionTests/DateTest02.data0000644000175100017510000000010111236173744015415 000000000000002002-12-15 2002-avril-12 2002-février-12 2002-03-12 2002-12-11 msort-8.53/RegressionTests/MonthNameTest04.norm0000644000175100017510000000021011236173744016473 00000000000000janvier 229 février 283 mars 93438 avril 23 mai 33 juin 3393 juillet 944 août 484 septembre 933 octobre 382 novembre 32 décembre 33 msort-8.53/RegressionTests/FrenchMonths.ord0000644000175100017510000000013111236173744016012 00000000000000janvier février mars avril mai juin juillet août séptembre octobre novembre décembre msort-8.53/RegressionTests/MonthNameTest04.data0000644000175100017510000000021011236173744016431 00000000000000octobre 382 avril 23 mai 33 février 283 juillet 944 janvier 229 juin 3393 mars 93438 septembre 933 août 484 novembre 32 décembre 33 msort-8.53/RegressionTests/DateTest03.data0000644000175100017510000000015411236173744015426 00000000000000੨੦੦੧-੦੫-੧੫ ੨੦੦੧-੦੩-੦੨ ੨੦੦੧-੦੨-੨੧ ੧੯੯੯-੧੧-੧੨ msort-8.53/RegressionTests/HybridComparisonTest01.data0000644000175100017510000000005411236173744020022 000000000000006 4 8 2 10b 5 5b 3 7 1b 1 5a 1a 10a 9 1c 10 msort-8.53/RegressionTests/ISO8601DateTimeTest03.norm0000644000175100017510000000023111236173744017175 00000000000000-1997-02-06T14:47 1997-02-06T14:47 +1997-07-03T14:47 2005-09-02T13:37 2007-04-05T11:37 2007-09-02T13:36 20070902T133721 2007-09-02T13:37 2007-09-05T1338 msort-8.53/RegressionTests/HybridComparisonTest02.data0000644000175100017510000000002211236173744020016 000000000000004 2 1 3B 1a 1B 3A msort-8.53/RegressionTests/URIWithSchemeTest01.norm0000644000175100017510000000025111236173744017227 00000000000000http://www.lorax.ldc.upenn.edu https://www.lorax.ldc.upenn.edu ftp://homeschooling.org http://homeschooling.org ftp://ydli.org http://ydli.org https://ydli.org ydli.org msort-8.53/RegressionTests/HybridComparisonTest01.norm0000644000175100017510000000005411236173744020064 000000000000001 1a 1b 1c 2 3 4 5 5a 5b 6 7 8 9 10 10a 10b msort-8.53/RegressionTests/HybridComparisonTest02.norm0000644000175100017510000000002211236173744020060 000000000000001 1a 1B 2 3A 3B 4 msort-8.53/RegressionTests/DateTest03.norm0000644000175100017510000000015411236173744015470 00000000000000੧੯੯੯-੧੧-੧੨ ੨੦੦੧-੦੨-੨੧ ੨੦੦੧-੦੩-੦੨ ੨੦੦੧-੦੫-੧੫ msort-8.53/RegressionTests/TurkicCaseFoldTest.data0000644000175100017510000000055411236173744017254 00000000000000i a LATIN_SMALL_LETTER_I_WITH_DOT_ABOVE U+0069 ı a LATIN_SMALL_LETTER_DOTLESS_I U+0131 İ a LATIN_CAPITAL_LETTER_I_WITH_DOT_ABOVE U+0069 I a LATIN_CAPITAL_LETTER_DOTLESS_I U+0131 i b LATIN_SMALL_LETTER_I_WTIH_DOT_ABOVE U+0069 ı b LATIN_SMALL_LETTER_DOTLESS_I U+0131 İ b LATIN_CAPITAL_LETTER_I_WITH_DOT_ABOVE U+0069 I b LATIN_CAPITAL_LETTER_DOTLESS_I U+0131 msort-8.53/RegressionTests/TurkicCaseFoldTest.norm0000644000175100017510000000055411236173744017316 00000000000000i a LATIN_SMALL_LETTER_I_WITH_DOT_ABOVE U+0069 İ a LATIN_CAPITAL_LETTER_I_WITH_DOT_ABOVE U+0069 i b LATIN_SMALL_LETTER_I_WTIH_DOT_ABOVE U+0069 İ b LATIN_CAPITAL_LETTER_I_WITH_DOT_ABOVE U+0069 ı a LATIN_SMALL_LETTER_DOTLESS_I U+0131 I a LATIN_CAPITAL_LETTER_DOTLESS_I U+0131 ı b LATIN_SMALL_LETTER_DOTLESS_I U+0131 I b LATIN_CAPITAL_LETTER_DOTLESS_I U+0131 msort-8.53/RegressionTests/NumberTest01.norm0000644000175100017510000000013111236173744016034 00000000000000𐏒𐏒𐏒 𐏒𐏒𐏒𐏑 𐏒𐏒𐏒𐏒𐏑 𐏔𐏔𐏓𐏒𐏑 𐏕𐏕𐏓𐏑 msort-8.53/RegressionTests/NumberTest02.data0000644000175100017510000000025011236173744015775 00000000000000७४५३९ 五十七 ३२९४ 五十七 ३८२४९ 三百五十三 १४९ 三百二十七 २८४९३ 六万七十三 ४८३९३ 五万七千 msort-8.53/RegressionTests/URIWithSchemeTest01.data0000644000175100017510000000025111236173744017165 00000000000000http://ydli.org http://homeschooling.org https://ydli.org ydli.org ftp://ydli.org ftp://homeschooling.org https://www.lorax.ldc.upenn.edu http://www.lorax.ldc.upenn.edu msort-8.53/RegressionTests/DateTest02.norm0000644000175100017510000000010011236173744015456 000000000000002002-février-12 2002-03-12 2002-avril-12 2002-12-11 2002-12-15 msort-8.53/RegressionTests/DomainNameTest01.data0000644000175100017510000000012411236173744016554 00000000000000ydli.org thomason.org lorax.ldc.upenn.edu thomason.com billposer.org alum.mit.edu msort-8.53/RegressionTests/DomainNameTest01.norm0000644000175100017510000000012211236173744016614 00000000000000thomason.com alum.mit.edu lorax.ldc.upenn.edu billposer.org thomason.org ydli.org msort-8.53/RegressionTests/EmailAddressTest01.norm0000644000175100017510000000113411236173744017145 00000000000000gerdsen@sfu.ca merle_e_sendy@yahoo.ca bsieger@csa.com edrianoboaretto@gmail.com ennejven@gmail.com lungit.telker@gmail.com noeh.diewald@gmail.com sefetb@gmail.com senjeya.lenka@gmail.com wong.francine@gmail.com henni.woodstock@hotmail.com scottkenley@hotmail.com weikowhai@mac.com keren.edwards@sealaska.com fezeli78@yahoo.com heszey@yahoo.com johnbenks8@yahoo.com ryanling1@yahoo.com lindeconnerth@gmx.de dewn.bates@asu.edu garnett@berkeley.edu regan@hawaii.edu mcquin@mit.edu jdketz@princeton.edu dqedams@uidaho.edu doek@unt.edu middler@unt.edu jkomei@kumagaku.ac.jp hanure@air.ocn.ne.jp veeku@mail.ru msort-8.53/RegressionTests/NumberTest01.data0000644000175100017510000000013111236173744015772 00000000000000𐏒𐏒𐏒𐏒𐏑 𐏒𐏒𐏒𐏑 𐏕𐏕𐏓𐏑 𐏒𐏒𐏒 𐏔𐏔𐏓𐏒𐏑 msort-8.53/RegressionTests/EmailAddressTest01.data0000644000175100017510000000113411236173744017103 00000000000000weikowhai@mac.com dewn.bates@asu.edu dqedams@uidaho.edu fezeli78@yahoo.com edrianoboaretto@gmail.com hanure@air.ocn.ne.jp bsieger@csa.com mcquin@mit.edu senjeya.lenka@gmail.com veeku@mail.ru middler@unt.edu garnett@berkeley.edu noeh.diewald@gmail.com ryanling1@yahoo.com wong.francine@gmail.com henni.woodstock@hotmail.com johnbenks8@yahoo.com jdketz@princeton.edu ennejven@gmail.com jkomei@kumagaku.ac.jp regan@hawaii.edu sefetb@gmail.com keren.edwards@sealaska.com doek@unt.edu gerdsen@sfu.ca lungit.telker@gmail.com heszey@yahoo.com scottkenley@hotmail.com merle_e_sendy@yahoo.ca lindeconnerth@gmx.de msort-8.53/RegressionTests/NumberTest02.norm0000644000175100017510000000025011236173744016037 00000000000000३२९४ 五十七 ७४५३९ 五十七 १४९ 三百二十七 ३८२४९ 三百五十三 ४८३९३ 五万七千 २८४९३ 六万七十三 msort-8.53/RegressionTests/NumberTest03.data0000644000175100017510000000006211236173744015777 00000000000000lxvi iii iv xcii vii cclix ix mdcxxiv xii xxi i msort-8.53/RegressionTests/NumberTest03.norm0000644000175100017510000000006011236173744016037 00000000000000i iii iv vii ix xii xxi lxvi xcii cclix mdcxxiv msort-8.53/RegressionTests/NumberTest04.data0000644000175100017510000000030211236173744015775 00000000000000٦٤٥ ۶۴۵ 28 ৫৩৪ ၅၈၃၇ 廿万七 ४५३ ੭੫੩੪੯ ה׳ תתכז  𐏕𐏕𐏓𐏑 𐤙𐤙𐤘𐤗𐤖𐤖 xlviii ௮௱௨௰௩௲௨ ๓๙๖๒ ༥༨༣ msort-8.53/RegressionTests/NumberTest04.norm0000644000175100017510000000030211236173744016037 0000000000000028 xlviii 𐏕𐏕𐏓𐏑 𐤙𐤙𐤘𐤗𐤖𐤖 ४५३ ৫৩৪ ༥༨༣ ٦٤٥ ۶۴۵  ๓๙๖๒ ה׳ תתכז ၅၈၃၇ ੭੫੩੪੯ 廿万七 ௮௱௨௰௩௲௨ msort-8.53/RegressionTests/AngleTest01.data0000644000175100017510000000015611236173744015577 00000000000000180:45:34.3 280:45:34.3 280:45:32.3 -60:45:32.3 +280:46:32.3 -160:45:32.3 181 45 30.3 410:45:32.3 10:45:32.3 msort-8.53/RegressionTests/DateTest04.data0000644000175100017510000000007211236173744015426 000000000000002/5/2002 3/3/1999 08/4/2002 12/5/1999 2/5/1999 2/3/1999 msort-8.53/RegressionTests/FirstCharOnlyTest01.norm0000644000175100017510000000005511236173744017340 00000000000000Jones Moore Posner Poser Port Portugal Smith msort-8.53/RegressionTests/ReversalTest01.data0000644000175100017510000000023111236173744016326 00000000000000excitement excitation stimulation procurement banishment procurator decorator senator designator silliness rudeness velocity capacity rapacity captivity msort-8.53/RegressionTests/ReversalTest01.norm0000644000175100017510000000023111236173744016370 00000000000000stimulation excitation senator designator decorator procurator rudeness silliness procurement excitement banishment capacity rapacity velocity captivity msort-8.53/RegressionTests/StringLengthTest01.data0000644000175100017510000000005711236173744017161 00000000000000a aa aaa aaaa aaaaa bbb baa cba abc abcd dcba msort-8.53/RegressionTests/StringLengthTest01.norm0000644000175100017510000000005611236173744017222 00000000000000a aa aaa abc baa bbb cba aaaa abcd dcba aaaaa msort-8.53/RegressionTests/LocalInversionTest01.norm0000644000175100017510000000005211236173744017535 00000000000000wolf rabbit mule moose horse dog deer cat msort-8.53/RegressionTests/StringLengthTest02.data0000644000175100017510000000007011236173744017155 00000000000000a aa aaa aaaa aaaaa bbb baa cba abc abcd dcba abcbca msort-8.53/RegressionTests/FirstCharOnlyTest01.data0000644000175100017510000000005611236173744017277 00000000000000 Posner Moore Poser Port Portugal Smith Jones msort-8.53/RegressionTests/StringLengthTest02.ord0000644000175100017510000000000411236173744017025 00000000000000bc msort-8.53/RegressionTests/StringLengthTest02.norm0000644000175100017510000000006511236173744017223 00000000000000a aa abc aaa abcd baa bbb cba aaaa abcbca dcba aaaaa msort-8.53/RegressionTests/LocalInversionTest01.data0000644000175100017510000000005311236173744017474 00000000000000cat dog horse moose mule deer rabbit wolf msort-8.53/RegressionTests/LocalInversionTest02.data0000644000175100017510000000010411236173744017472 00000000000000cat 4 dog 5 horse 2 moose 3 mule 7 deer 7 rabbit 12 wolf 5 msort-8.53/RegressionTests/LocalInversionTest02.norm0000644000175100017510000000010311236173744017533 00000000000000rabbit 12 deer 7 mule 7 dog 5 wolf 5 cat 4 moose 3 horse 2 msort-8.53/RegressionTests/SortOrderFileSeparatorTest01.data0000644000175100017510000000005311236173744021151 00000000000000like lhut tsut mota bada thus ghut lh;tsas msort-8.53/RegressionTests/SortOrderFileSeparatorTest01.norm0000644000175100017510000000005311236173744021213 00000000000000lh;tsas lhut tsut thus ghut bada like mota msort-8.53/RegressionTests/DateTest04.norm0000644000175100017510000000007011236173744015466 000000000000002/3/1999 2/5/1999 3/3/1999 12/5/1999 2/5/2002 08/4/2002 msort-8.53/RegressionTests/DateTest05.data0000644000175100017510000000012011236173744015421 00000000000000੨੦੦੭-੪੩ ੨੦੦੭-੪੫ ੨੦੦੭-੧੨ ੨੦੦੭-੭੭ msort-8.53/RegressionTests/DateTest05.norm0000644000175100017510000000012011236173744015463 00000000000000੨੦੦੭-੧੨ ੨੦੦੭-੪੩ ੨੦੦੭-੪੫ ੨੦੦੭-੭੭ msort-8.53/RegressionTests/LineEndTest01.data0000644000175100017510000000005311236173744016063 00000000000000cat dog horse moose mule deer rabbit wolf msort-8.53/RegressionTests/SortOrderFileSeparatorTest01.ord0000644000175100017510000000001511236173744021022 00000000000000lh;ts gh;th msort-8.53/RegressionTests/LineEndTest01.norm0000644000175100017510000000005211236173744016124 00000000000000cat deer dog horse moose mule rabbit wolf msort-8.53/RegressionTests/SortOrderFileSeparatorTest01.sep0000644000175100017510000000000211236173744021021 00000000000000; msort-8.53/RegressionTests/DiacriticStrippingTest01.data0000644000175100017510000000002411236173744020336 00000000000000det dér dès dêq msort-8.53/RegressionTests/DiacriticStrippingTest01.norm0000644000175100017510000000002311236173744020377 00000000000000dêq dér dès det msort-8.53/RegressionTests/FixedSizeRecordTest01.data0000644000175100017510000000044011236173744017576 00000000000000Miller 008-65-84341955 Martin 008-35-84541959 Prince 008-25-84241986 Anderson 008-25-83241989 Anderton 008-25-83841989 Pugh 008-25-86841998 Chen 008-25-87841998 Nakamoto 008-15-87841972 msort-8.53/RegressionTests/FixedSizeRecordTest01.norm0000644000175100017510000000044011236173744017640 00000000000000Miller 008-65-84341955 Martin 008-35-84541959 Nakamoto 008-15-87841972 Prince 008-25-84241986 Anderson 008-25-83241989 Anderton 008-25-83841989 Pugh 008-25-86841998 Chen 008-25-87841998 msort-8.53/RegressionTests/TaggedKeyTest01.data0000644000175100017510000000016511236173744016415 00000000000000%P:さかな %M:fish %P:さけ %M:salmon %P:たこ %M:octopus %P:たけ %M:peak (of mountain) %P:うお %M:fish msort-8.53/RegressionTests/NumericStringTest01.data0000644000175100017510000000042311236173744017337 00000000000000੨ ੩੪ ੧੨੩੪੫੬੭੮੯੧੨੩੪੫੬੭੮੯੧੨੩੪੫੬੭੮੯ ੮੩੮੩੮੩ ੭੨੩੮੩੩੩੩ ੪ ੪੯੪੩੮ ੩੮੪ ੩੪੫ ੧੨੩੪੫੬੭੮੯੧੨੩੪੫੬੭੮੯੧੨੩੪੫੬੭੮੮ ੨੫੪੮੫ msort-8.53/RegressionTests/NumericStringTest01.norm0000644000175100017510000000042311236173744017401 00000000000000੨ ੪ ੩੪ ੩੪੫ ੩੮੪ ੨੫੪੮੫ ੪੯੪੩੮ ੮੩੮੩੮੩ ੭੨੩੮੩੩੩੩ ੧੨੩੪੫੬੭੮੯੧੨੩੪੫੬੭੮੯੧੨੩੪੫੬੭੮੮ ੧੨੩੪੫੬੭੮੯੧੨੩੪੫੬੭੮੯੧੨੩੪੫੬੭੮੯ msort-8.53/RegressionTests/TaggedKeyTest01.norm0000644000175100017510000000016511236173744016457 00000000000000%P:うお %M:fish %P:さかな %M:fish %P:たこ %M:octopus %P:たけ %M:peak (of mountain) %P:さけ %M:salmon msort-8.53/RegressionTests/OptionalFieldTest02.data0000644000175100017510000000015711236173744017304 00000000000000%P:さかな %M:fish %P:さけ %M:salmon %P:たこ %M:octopus %P: %M:peak (of mountain) %P:うお %M:fish msort-8.53/RegressionTests/OptionalFieldTest01.data0000644000175100017510000000015311236173744017277 00000000000000%P:さかな %M:fish %P:さけ %M:salmon %P:たこ %M:octopus %M:peak (of mountain) %P:うお %M:fish msort-8.53/RegressionTests/PositionKeyTest01.data0000644000175100017510000000126611236173744017031 00000000000000DTtest:acbdfegh:31986:1118:Desktop Test Account:/home/DTtest:/usr/local/bin/bash STT-Annotator:habdcegf:40087:31996:STT-Annotator account:/home/STT-Annotator:/usr/local/bin/bash GALE-Annotator:cbaedfgh:40088:31995:GALE-Annotator account:/home/GALE-Annotator:/usr/local/bin/bash lamya:abdcegfh:40089:1118:Diya Lamya:/home/lamya:/usr/local/bin/bash smedero:badcefgh:40091:1118:Shawn:/home/smedero:/usr/local/bin/bash yanli:acbedfgh:40094:1118:Yan:/home/yanli:/usr/local/bin/bash wenzhe:abdcefgh:40095:1118:Wenzhe:/home/wenzhe:/usr/local/bin/bash lindsayg:bacdefgh:40096:1118:Lindsay Grace:/home/lindsayg:/usr/local/bin/bash shulingm:acbdefgh:40097:1118:Shuling:/home/shulingm:/usr/local/bin/bash msort-8.53/RegressionTests/PositionKeyTest01.norm0000644000175100017510000000126611236173744017073 00000000000000DTtest:acbdfegh:31986:1118:Desktop Test Account:/home/DTtest:/usr/local/bin/bash STT-Annotator:habdcegf:40087:31996:STT-Annotator account:/home/STT-Annotator:/usr/local/bin/bash GALE-Annotator:cbaedfgh:40088:31995:GALE-Annotator account:/home/GALE-Annotator:/usr/local/bin/bash lamya:abdcegfh:40089:1118:Diya Lamya:/home/lamya:/usr/local/bin/bash smedero:badcefgh:40091:1118:Shawn:/home/smedero:/usr/local/bin/bash yanli:acbedfgh:40094:1118:Yan:/home/yanli:/usr/local/bin/bash wenzhe:abdcefgh:40095:1118:Wenzhe:/home/wenzhe:/usr/local/bin/bash lindsayg:bacdefgh:40096:1118:Lindsay Grace:/home/lindsayg:/usr/local/bin/bash shulingm:acbdefgh:40097:1118:Shuling:/home/shulingm:/usr/local/bin/bash msort-8.53/RegressionTests/OptionalFieldTest01.norm0000644000175100017510000000015311236173744017341 00000000000000%P:うお %M:fish %P:さかな %M:fish %P:さけ %M:salmon %P:たこ %M:octopus %M:peak (of mountain) msort-8.53/RegressionTests/OptionalFieldTest02.norm0000644000175100017510000000015711236173744017346 00000000000000%P:うお %M:fish %P:さかな %M:fish %P:さけ %M:salmon %P:たこ %M:octopus %P: %M:peak (of mountain) msort-8.53/RegressionTests/OptionalFieldTest03.data0000644000175100017510000000010011236173744017271 00000000000000さかな fish さけ salmon たこ octopus うお fish たけ msort-8.53/RegressionTests/OptionalFieldTest03.norm0000644000175100017510000000010011236173744017333 00000000000000たけ うお fish さかな fish たこ octopus さけ salmon msort-8.53/RegressionTests/IOFlagTest01.data0000644000175100017510000000016011236173744015645 00000000000000한국말 हिन्दी ᑕᗸᒡ ひらがな カタカナ თბილისი հաճր español ʃʌʃ msort-8.53/RegressionTests/PositionKeyTest02.norm0000644000175100017510000000126611236173744017074 00000000000000DTtest:acbdfegh:31986:1118:Desktop Test Account:/home/DTtest:/usr/local/bin/bash STT-Annotator:habdcegf:40087:31996:STT-Annotator account:/home/STT-Annotator:/usr/local/bin/bash GALE-Annotator:cbaedfgh:40088:31995:GALE-Annotator account:/home/GALE-Annotator:/usr/local/bin/bash lamya:abdcegfh:40089:1118:Diya Lamya:/home/lamya:/usr/local/bin/bash smedero:badcefgh:40091:1118:Shawn:/home/smedero:/usr/local/bin/bash yanli:acbedfgh:40094:1118:Yan:/home/yanli:/usr/local/bin/bash wenzhe:abdcefgh:40095:1118:Wenzhe:/home/wenzhe:/usr/local/bin/bash lindsayg:bacdefgh:40096:1118:Lindsay Grace:/home/lindsayg:/usr/local/bin/bash shulingm:acbdefgh:40097:1118:Shuling:/home/shulingm:/usr/local/bin/bash msort-8.53/RegressionTests/PositionKeyTest03.norm0000644000175100017510000000126611236173744017075 00000000000000STT-Annotator:habdcegf:40087:31996:STT-Annotator account:/home/STT-Annotator:/usr/local/bin/bash GALE-Annotator:cbaedfgh:40088:31995:GALE-Annotator account:/home/GALE-Annotator:/usr/local/bin/bash lamya:abdcegfh:40089:1118:Diya Lamya:/home/lamya:/usr/local/bin/bash smedero:badcefgh:40091:1118:Shawn:/home/smedero:/usr/local/bin/bash yanli:acbedfgh:40094:1118:Yan:/home/yanli:/usr/local/bin/bash wenzhe:abdcefgh:40095:1118:Wenzhe:/home/wenzhe:/usr/local/bin/bash lindsayg:bacdefgh:40096:1118:Lindsay Grace:/home/lindsayg:/usr/local/bin/bash shulingm:acbdefgh:40097:1118:Shuling:/home/shulingm:/usr/local/bin/bash DTtest:acbdfegh:31986:1118:Desktop Test Account:/home/DTtest:/usr/local/bin/bash msort-8.53/RegressionTests/PositionKeyTest04.norm0000644000175100017510000000126611236173744017076 00000000000000STT-Annotator:habdcegf:40087:31996:STT-Annotator account:/home/STT-Annotator:/usr/local/bin/bash GALE-Annotator:cbaedfgh:40088:31995:GALE-Annotator account:/home/GALE-Annotator:/usr/local/bin/bash lamya:abdcegfh:40089:1118:Diya Lamya:/home/lamya:/usr/local/bin/bash smedero:badcefgh:40091:1118:Shawn:/home/smedero:/usr/local/bin/bash yanli:acbedfgh:40094:1118:Yan:/home/yanli:/usr/local/bin/bash wenzhe:abdcefgh:40095:1118:Wenzhe:/home/wenzhe:/usr/local/bin/bash lindsayg:bacdefgh:40096:1118:Lindsay Grace:/home/lindsayg:/usr/local/bin/bash shulingm:acbdefgh:40097:1118:Shuling:/home/shulingm:/usr/local/bin/bash DTtest:acbdfegh:31986:1118:Desktop Test Account:/home/DTtest:/usr/local/bin/bash msort-8.53/RegressionTests/PositionKeyTest05.data0000644000175100017510000000002211236173744017022 000000000000003:000 20:00 100:0 msort-8.53/RegressionTests/PositionKeyTest05.norm0000644000175100017510000000002211236173744017064 00000000000000100:0 20:00 3:000 msort-8.53/RegressionTests/IOFlagTest01.norm0000644000175100017510000000016011236173744015707 00000000000000español ʃʌʃ հաճր हिन्दी თბილისი ᑕᗸᒡ ひらがな カタカナ 한국말 msort-8.53/RegressionTests/AngleTest01.norm0000644000175100017510000000015511236173744015640 0000000000000010:45:32.3 410:45:32.3 180:45:34.3 181 45 30.3 -160:45:32.3 280:45:32.3 280:45:34.3 +280:46:32.3 -60:45:32.3 msort-8.53/RegressionTests/SubstitutionTest02.sub0000644000175100017510000000002211236173744017136 00000000000000(?i)(Ma?c) X msort-8.53/RegressionTests/SubstitutionTest02.data0000644000175100017510000000007211236173744017263 00000000000000Emcee McPherson MacPherson Pherson Xman mcintosh Macey msort-8.53/RegressionTests/SkipFirstRecordTest01.norm0000644000175100017510000000023511236173744017666 00000000000000\id warldict.doc \w -ja \p cl \d *assertive {particle} \w jaa- \p pv \d *agape, as of mouth \d *spread=*apart, as of legs \w yuwirnti \p nm \cr yiwirnti msort-8.53/RegressionTests/GlobalInversionTest01.data0000644000175100017510000000005311236173744017642 00000000000000cat dog horse moose mule deer rabbit wolf msort-8.53/RegressionTests/GlobalInversionTest01.norm0000644000175100017510000000005211236173744017703 00000000000000wolf rabbit mule moose horse dog deer cat msort-8.53/RegressionTests/LongLineTest01.data0000644000175100017510000004010511236173744016256 00000000000000dkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdie kslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdie slfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdie abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz msort-8.53/RegressionTests/ExclusionCLITest01.norm0000644000175100017510000000005311236173744017110 00000000000000C$8 C$21 C$45 C$65 C$84 C$200 C$475 C$3546 msort-8.53/RegressionTests/ExclusionFileTest01.data0000644000175100017510000000005311236173744017316 00000000000000C$200 C$45 C$84 C$3546 C$21 C$8 C$65 C$475 msort-8.53/RegressionTests/ExclusionFileTest01.exc0000644000175100017510000000001611236173744017163 00000000000000$ imf C imf msort-8.53/RegressionTests/LongLineTest01.norm0000644000175100017510000004010411236173744016317 00000000000000abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz dkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdie kslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiekslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdie slfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdieslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdiedkslfjsdie msort-8.53/RegressionTests/ExclusionFileTest01.norm0000644000175100017510000000005311236173744017360 00000000000000C$8 C$21 C$45 C$65 C$84 C$200 C$475 C$3546 msort-8.53/RegressionTests/ExclusionCLITest01.data0000644000175100017510000000005311236173744017046 00000000000000C$200 C$45 C$84 C$3546 C$21 C$8 C$65 C$475 msort-8.53/RegressionTests/EnclosureStrippingTest01.data0000644000175100017510000000007711236173744020412 00000000000000ab bb cb db hb lb wb zb ⒵a ⒲a ⒧a ⒝a ⒜a ⒟a ⒞a ⒣amsort-8.53/RegressionTests/EnclosureStrippingTest01.norm0000644000175100017510000000010011236173744020437 00000000000000⒜a ab ⒝a bb ⒞a cb ⒟a db ⒣a hb ⒧a lb ⒲a wb ⒵a zb msort-8.53/RegressionTests/ComboStrippingTest01.data0000644000175100017510000000012311236173744017502 00000000000000det dér dès dêq ab bb cb db hb lb wb zb ⒵a ⒲a ⒧a ⒝a ⒜a ⒟a ⒞a ⒣amsort-8.53/RegressionTests/ComboStrippingTest01.norm0000644000175100017510000000012311236173744017544 00000000000000⒜a ab ⒝a bb ⒞a cb ⒟a db dêq dér dès det ⒣a hb ⒧a lb ⒲a wb ⒵a zb msort-8.53/RegressionTests/TaggedKeyTest02.data0000644000175100017510000000016711236173744016420 00000000000000%P:さかな %M:fish %P:さけ %M:salmon %P:たこ %def:octopus %P:たけ %D:peak (of mountain) %P:うお %M:fish msort-8.53/RegressionTests/SubstitutionTest01.norm0000644000175100017510000000002711236173744017324 00000000000000fur fuß fut ßop stop msort-8.53/RegressionTests/SubstitutionTest01.sub0000644000175100017510000000000611236173744017137 00000000000000ß ss msort-8.53/RegressionTests/SubstitutionTest01.data0000644000175100017510000000002711236173744017262 00000000000000fut fuß fur stop ßop msort-8.53/RegressionTests/TaggedKeyTest02.norm0000644000175100017510000000016711236173744016462 00000000000000%P:うお %M:fish %P:さかな %M:fish %P:たこ %def:octopus %P:たけ %D:peak (of mountain) %P:さけ %M:salmon msort-8.53/RegressionTests/CaseFoldingTest02.data0000644000175100017510000000014011236173744016721 00000000000000պակա 23 ՊաԿա 24 ՊԱԿԱ 25 եմիշ 10 Եմիշ 12 հայերեն 76 Հայերեն 89 msort-8.53/RegressionTests/CaseFoldingTest02.norm0000644000175100017510000000014011236173744016763 00000000000000եմիշ 10 Եմիշ 12 հայերեն 76 Հայերեն 89 պակա 23 ՊաԿա 24 ՊԱԿԱ 25 msort-8.53/RegressionTests/CaseFoldingTest01.data0000644000175100017510000000006211236173744016723 00000000000000Wolves cat marten Dogs Rabbits moose cow Horses msort-8.53/RegressionTests/CaseFoldingTest01.norm0000644000175100017510000000006011236173744016763 00000000000000cat cow Dogs Horses marten moose Rabbits Wolves msort-8.53/RegressionTests/TimeTest01.data0000644000175100017510000000004711236173744015446 0000000000000013:37:16 09:21 13:37 19:21 13:36 23:47 msort-8.53/RegressionTests/TaggedKeyTest03.norm0000644000175100017510000000017611236173744016463 00000000000000%P:sakana %G:fish %P:uo %G:fish %P:tako %G:octopus %P:take %G:peak (of mountain) %P:sake %G:rice wine %P:sake %G:salmon msort-8.53/RegressionTests/EmptyKeyTest01.norm0000644000175100017510000000000011236173744016346 00000000000000msort-8.53/RegressionTests/CheckOnlyTest01B.data0000644000175100017510000000001411236173744016523 00000000000000456 123 789 msort-8.53/RegressionTests/TaggedKeyTest03.data0000644000175100017510000000021311236173744016411 00000000000000%P:sakana %G:fish %P:sake %G:salmon %P:ume %G: %P:tako %G:octopus %P:take %G:peak (of mountain) %P:uo %G:fish %P:sake %G:rice wine msort-8.53/RegressionTests/CheckOnlyTest01.norm0000644000175100017510000000000011236173744016456 00000000000000msort-8.53/RegressionTests/CheckOnlyTest01A.data0000644000175100017510000000001411236173744016522 00000000000000123 456 789 msort-8.53/RegressionTests/.redethist0000644000175100017510000000000011236173744014675 00000000000000msort-8.53/RegressionTests/RecordSeparatorTest01.norm0000644000175100017510000000015111236173744017705 00000000000000Fiske 9;Hirano 34;Morimoto 34;Simms 52;Herschel 71;Smith 123;Martin 456;Yoshikawa 789;Aziz 932;Chen 1243;msort-8.53/RegressionTests/RecordSeparatorTest01.data0000644000175100017510000000015111236173744017643 00000000000000Smith 123;Martin 456;Yoshikawa 789;Hirano 34;Chen 1243;Aziz 932;Morimoto 34;Herschel 71;Fiske 9;Simms 52;msort-8.53/RegressionTests/UnicodeNormalizationTest01.data0000644000175100017510000000004411236173744020702 00000000000000été 1 été 2 été 3 été 4 msort-8.53/RegressionTests/UnicodeNormalizationTest01.norm0000644000175100017510000000004411236173744020744 00000000000000été 2 été 4 été 3 été 1 msort-8.53/RegressionTests/UnicodeNormalizationTest02.data0000644000175100017510000000004411236173744020703 00000000000000été 4 été 3 été 2 été 1 msort-8.53/RegressionTests/UnicodeNormalizationTest02.norm0000644000175100017510000000004411236173744020745 00000000000000été 1 été 2 été 3 été 4 msort-8.53/RegressionTests/UnicodeNormalizationTest03.data0000644000175100017510000000004511236173744020705 00000000000000été 4 été 3 été 2 été 1 msort-8.53/RegressionTests/UnicodeNormalizationTest03.norm0000644000175100017510000000004511236173744020747 00000000000000été 1 été 2 été 3 été 4 msort-8.53/RegressionTests/CollatingSequenceTest01.norm0000644000175100017510000000006111236173744020213 00000000000000boos lhes lhukw ligok nanguz ta too tun tsa tl'o msort-8.53/RegressionTests/CollatingSequenceTest01.ord0000644000175100017510000000010611236173744020024 00000000000000a b c d e f g h i j k lh l m n o p q r s t ts ts' tl tl' u v w x y z msort-8.53/RegressionTests/CollatingSequenceTest01.data0000644000175100017510000000006311236173744020153 00000000000000tsa lhukw ta ligok lhes boos nanguz tl'o too tun msort-8.53/RegressionTests/CollatingSequenceTest02.ord0000644000175100017510000000007011236173744020025 00000000000000a e i o ʊ u s ʃ sh z ʒ zh t d c ʦ ts ch tʃ j ʣ dz msort-8.53/RegressionTests/CollatingSequenceTest02.data0000644000175100017510000000011411236173744020151 00000000000000shar zhamun char ʃaʃ tʃaq ʦap ʃap suka sʊka sika ʒamuk ʃamuk ʣamuk msort-8.53/RegressionTests/CollatingSequenceTest02.norm0000644000175100017510000000011411236173744020213 00000000000000sika sʊka suka ʃaʃ ʃamuk ʃap shar ʒamuk zhamun ʦap tʃaq char ʣamuk msort-8.53/RegressionTests/ISO8601DateTimeTest01.data0000644000175100017510000000016611236173744017140 000000000000002007-09-02T13:36 20070902T133721 2007-09-02T13:37 2007-09-05T1338 2007-04-05T11:37 1997-02-06T14:47 2005-09-02T13:37 msort-8.53/RegressionTests/CollatingSequenceTest03.ord0000644000175100017510000000007311236173744020031 00000000000000\145 i o a ʊ u s ʃ sh z ʒ zh t d c ʦ ts ch tʃ j ʣ dz msort-8.53/RegressionTests/CollatingSequenceTest03.data0000644000175100017510000000013311236173744020153 00000000000000shar zhamun cher char ʃaʃ tʃaq ʦap ʃap suka sʊka sika saka seka ʒamuk ʃamuk ʣamuk msort-8.53/RegressionTests/CollatingSequenceTest03.norm0000644000175100017510000000013311236173744020215 00000000000000seka sika saka sʊka suka ʃaʃ ʃamuk ʃap shar ʒamuk zhamun ʦap cher tʃaq char ʣamuk msort-8.53/RegressionTests/ISO8601DateTimeTest02.data0000644000175100017510000000035611236173744017142 000000000000002007-09-02T13:36Z 20070902T1337+04 2007-09-05T13:37+04 2007-04-05T13:37+04 2007-04-05T11:37+04 1997-02-06T14:47+04 2005-09-02T13:37Z 2007-09-02T13:37-0427 2007-09-02T13:37-04:26 2007-09-02T13:37+04 2007-09-02T13:37+03 2007-09-02T13:37-04 msort-8.53/RegressionTests/TimeTest02.norm0000644000175100017510000000016011236173744015505 0000000000000007:36Z 13:37+04 13:37+03 13:37:26+02:11 13:37:26+02 13:36Z 13:37:04Z 13:37:49Z 13:37-04 13:37:18-04 13:37:26-04 msort-8.53/RegressionTests/TimeTest01.norm0000644000175100017510000000004711236173744015510 0000000000000009:21 13:36 13:37 13:37:16 19:21 23:47 msort-8.53/RegressionTests/ISO8601DateTimeTest01.norm0000644000175100017510000000016511236173744017201 000000000000001997-02-06T14:47 2005-09-02T13:37 2007-04-05T11:37 2007-09-02T13:36 20070902T133721 2007-09-02T13:37 2007-09-05T1338 msort-8.53/RegressionTests/ISO8601DateTimeTest02.norm0000644000175100017510000000035611236173744017204 000000000000001997-02-06T14:47+04 2005-09-02T13:37Z 2007-04-05T11:37+04 2007-04-05T13:37+04 20070902T1337+04 2007-09-02T13:37+04 2007-09-02T13:37+03 2007-09-02T13:36Z 2007-09-02T13:37-04 2007-09-02T13:37-04:26 2007-09-02T13:37-0427 2007-09-05T13:37+04 msort-8.53/RegressionTests/SubstitutionTest02.norm0000644000175100017510000000006711236173744017331 00000000000000Emcee Pherson MacPherson McPherson Macey mcintosh Xman msort-8.53/RegressionTests/SkipFirstRecordTest01.data0000644000175100017510000000023611236173744017625 00000000000000\id warldict.doc \w -ja \p cl \d *assertive {particle} \w yuwirnti \p nm \cr yiwirnti \w jaa- \p pv \d *agape, as of mouth \d *spread=*apart, as of legs msort-8.53/SortOrders/0000777000175100017510000000000011236173744011742 500000000000000msort-8.53/SortOrders/HiraganaAkasa.ord0000644000175100017510000000030111236173744015031 00000000000000あ い う え お か き く け こ さ し す せ そ た ち つ て と な に ぬ ね の は ひ ふ へ ほ ま み む め も や ゆ よ ら り る れ ろ わ ゐ ゑ を ん msort-8.53/SortOrders/ChineseEarthlyBranches.ord0000644000175100017510000000006011236173744016735 00000000000000子 丑 寅 卯 辰 巳 午 未 申 酉 戌 亥 msort-8.53/SortOrders/README0000644000175100017510000000732311236173744012543 00000000000000These are sample sort order definitions suitable for use with msort. They may also be useful for practical purposes. ArmenianDayNames In the traditional Armenian calendar, the days of the month are named, not numbered. There are only thirty day names since all of the months are 30 days long with the exception of the 13th month, Avelyats, which is either five or six days long. ArmenianMonthNames These are the names of the thirteen months of the traditional Armenian calendar. CatalanOrder1 This is the standard alphabetical order used for Catalan, case- and diacritic-insensitive. CatalanOrder2 This is the standard alphabetical order used for Catalan, case- and diacritic-sensitive. ChineseCelestialStems These are an ancient Chinese numeral system used in calendrics and astrology. In modern Chinese, Korean, and Japanese, they are still frequently used for ordering lists of things. That is, where in English one might label things (a), (b), (c), ... etc., in these languages one might label them with the Celestial stems. In a similar vein, they are used to label types or variants of the same thing, e.g. Hepatitis A and Hepatitis B. ChineseEarthlyBranches These originally designated the twelve phases of the orbit of the planet Jupiter. They designate the traditional twelve "hours" (two hour periods) of the day and are used together with the Celestial Stems to designate years in the sexagesimal cycle. ChineseStemBranchCycle These are the combinations of the Celestial Stems and Earthly Branches that form the Sexagesimal Cycle used in traditional Chinese calendrics. es_ES01 This is the usual Spanish order used in Spain, case- and diacritic-insensitive. es_ES02 This is the usual Spanish order used in Spain, case- and diacritic-sensitive. HiraganaAkasa Thisis one of the two traditional ways of ordering Japanese kana. This file contains just the hiragana. HiraganaIroha This is one of the two traditional ways of ordering Japanese kana. This file contains just the hiragana. JapaneseNengo These are the era names used in giving traditional Japanese dates. In modern times, there is one era name per emperor, but prior to 1868 the reign of a single emperor was not infrequently divided into several eras. KanaAkasaInterleaved This is the other traditional way of ordering Japanese kana. This file contains both hiragana and katakana, interleaved in the sense that each katakana character immediately precedes its hiragana counterpart. SikhMonths These are the names of the months used by Sikhs in Panjabi, in calendar order, in the Gurmukhi writing system. TamilMonths These are the Tamil month names in their traditional order. Note that the Tamil months do not correspond to those of the Gregorian callender. TamilSexagesimalYears These are the names of the years in the Tamil sexagesimal cycle, corresponding to five Jovian years. The current cycle began in 1987-88. Turkish This is the usual Turkish alphabetical order. TurkmenMonthNames These are the Turkmen month names written in the Latin-based "New Alphabet". The first column contains the names decreed by Saparamat Niyazov in August, 2002, in use until July, 2008. The second column contains the names in use prior to August, 2002 and now restored to use. UnitedNationsCountryOrder_English The official order used by the United Nations is largely but not entirely alphabetical. For example, the official name of Venezuela, the "Bolivarian Republic of Venezuela" is alphabetized in the same position as the country's informal name. UrduCommonEraMonths These are the Urdu adaptations of the English month names used when giving Common Era dates in Urdu. UrduIslamicMonths These are the Urdu names of the months of the Islamic year. msort-8.53/SortOrders/es_ES01.ord0000644000175100017510000000024411236173744013523 00000000000000a á A Á b B c C ch cH Ch CH d D e é E É f F g G h H i í I Í j J k K l L ll lL Ll LL m M n N ñ Ñ o ó O Ó p P q Q r R s S t T u ú U Ú v V w W x X y Y z Z msort-8.53/SortOrders/Turkish.ord0000644000175100017510000000010011236173744014004 00000000000000a b c ç d e f g ğ h ı i j k l m n o ö p r s ş t u ü v y z msort-8.53/SortOrders/ChineseStemBranchCycle.ord0000644000175100017510000000064411236173744016675 00000000000000甲子 乙丑 丙寅 丁卯 戊辰 己巳 庚午 辛未 壬申 癸酉 甲戌 乙亥 丙子 丁丑 戊寅 己卯 庚辰 辛巳 壬午 癸未 甲申 乙酉 丙戌 丁亥 戊子 己丑 庚寅 辛卯 壬辰 癸巳 甲午 乙未 丙申 丁酉 戊戌 己亥 庚子 辛丑 壬寅 癸卯 甲辰 乙巳 丙午 丁未 戊申 己酉 庚戌 辛亥 壬子 癸丑 甲寅 乙卯 丙辰 丁巳 戊午 己未 庚申 辛酉 壬戌 癸亥 msort-8.53/SortOrders/es_ES02.ord0000644000175100017510000000024411236173744013524 00000000000000a á A Á b B c C ch cH Ch CH d D e é E É f F g G h H i í I Í j J k K l L ll lL Ll LL m M n N ñ Ñ o ó O Ó p P q Q r R s S t T u ú U Ú v V w W x X y Y z Z msort-8.53/SortOrders/CatalanOrder1.ord0000644000175100017510000000044311236173744015005 00000000000000\101 \301 \300 \304 \141 \341 \340 \344 B b C c D d \105 \311 \310 \313 \145 \351 \350 \353 F f G g H h \111 \315 \314 \317 \152 \355 \354 \357 J j K k L l M m N n \117 \323 \322 \326 \157 \363 \362 \366 P p Q q R r S s T t \126 \332 \331 \334 \165 \372 \371 \374 V v W w X x Y y Z z msort-8.53/SortOrders/SikhMonths.ord0000644000175100017510000000021611236173744014452 00000000000000ਚੇਤ ਵੈਸਾਖ ਜੇਠ ਹਾੜ ਸਾwਅਣ ਭਾਦੋਂ ਅਸੂ ਕਤਕ ਮੱਘਰ ਪੋਹ ਮਾਘ ਫੱਗਣ msort-8.53/SortOrders/ChineseCelestialStems.ord0000644000175100017510000000005011236173744016577 00000000000000甲 乙 丙 丁 戊 己 庚 辛 壬 癸 msort-8.53/SortOrders/JapaneseNengo.ord0000644000175100017510000000333711236173744015107 00000000000000大化 白雉 朱鳥 大宝 慶雲 和銅 霊亀 養老 神亀 天平 天平感宝 天平勝宝 天平宝字 天平神護 神護景雲 宝亀 天応 延暦 大同 弘仁 天長 承和 嘉祥 仁寿 斉衡 天安 貞観 元慶 仁和 寛平 昌泰 延喜 延長 承平 天慶 天暦 天徳 応和 康保 安和 天禄 天延 貞元 天元 永観 寛和 永延 永祚 正暦 長徳 長保 寛弘 長和 寛仁 治安 万寿 長元 長暦 長久 寛徳 永承 天喜 康平 治暦 延久 承保 承暦 永保 応徳 寛治 嘉保 永長 承徳 康和 長治 嘉承 天仁 天永 永久 元永 保安 天治 大治 天承 長承 保延 永治 康治 天養 久安 仁平 久寿 保元 平治 永暦 応保 長寛 永万 仁安 嘉応 承安 安元 治承 養和 寿永 元暦 文治 建久 正治 建仁 元久 建永 承元 建暦 建保 承久 貞応 元仁 嘉禄 安貞 寛喜 貞永 天福 文暦 嘉禎 暦仁 延応 仁治 寛元 宝治 建長 康元 正嘉 正元 文応 弘長 文永 建治 弘安 正応 永仁 正安 乾元 嘉元 徳治 延慶 応長 正和 文保 元応 元亨 正中 嘉暦 元徳 元弘 建武 延元 興国 正平 建徳 文中 天授 弘和 元中 正慶 暦応 康永 貞和 観応 文和 延文 康安 貞治 応安 永和 康暦 永徳 至徳 嘉慶 康応 明徳 応永 正長 永享 嘉吉 文安 宝徳 享徳 康正 長禄 寛正 文正 応仁 文明 長享 延徳 明応 文亀 永正 大永 享禄 天文 弘治 永禄 元亀 天正 文禄 慶長 元和 寛永 正保 慶安 承応 明暦 万治 寛文 延宝 天和 貞享 元禄 宝永 正徳 享保 元文 寛保 延享 寛延 宝暦 明和 安永 天明 寛政 享和 文化 文政 天保 弘化 嘉永 安政 万延 文久 元治 慶応 明治 大正 昭和 平成 msort-8.53/SortOrders/CatalanOrder2.ord0000644000175100017510000000044111236173744015004 00000000000000\101 \141 \301 \341 \300 \340 \304 \344 B b C c D d \105 \145 \311 \351 \310 \350 \313 \353 F f G g H h \111 \152 \315 \355 \314 \354 \317 \357 J j K k L l M m N n \117 \157 \323 \363 \322 \362 \326 \366 P p Q q R r S s T t \126 \165 \332 \372 \331 \371 \334 \374 V v W w X x Y y Z z msort-8.53/SortOrders/TamilMonths.ord0000644000175100017510000000033311236173744014622 00000000000000சித்திரை வைகாசி ஆனி ஆடி ஆவணி புரட்டாசி ஐப்பசி கார்த்திகை மார்கழி தை மாசி பங்குனி msort-8.53/SortOrders/HiraganaIroha.ord0000644000175100017510000000027411236173744015064 00000000000000い ろ は に ほ へ と ち り ぬ る を わ か よ た れ そ つ ね な ら む う ゐ の お く や ま け ふ こ え て あ さ き ゆ め み し ゑ ひ も せ す msort-8.53/SortOrders/UnitedNationsCountryOrder_English.ord0000644000175100017510000000416411236173744021206 00000000000000Afghanistan Albania Algeria Andorra Angola Antigua and Barbuda Argentina Armenia Australia Austria Azerbaijan Bahamas Bahrain Bangladesh Barbados Belarus Belgium Belize Benin Bhutan Bolivia Bosnia and Herzegovina Botswana Brazil Brunei Darussalam Bulgaria Burkina Faso Burundi Cambodia Cameroon Canada Cape Verde Central African Republic Chad Chile China Colombia Comoros Republic of the Congo Costa Rica Cote d'Ivoire Croatia Cuba Cyprus Czech Republic Democratic People's Republic of Korea Democratic Republic of the Congo Denmark Djibouti Dominica Dominican Republic Ecuador Egypt El Salvador Equatorial Guinea Eritrea Estonia Ethiopia Fiji Finland France Gabon Gambia Georgia Germany Ghana Greece Grenada Guatemala Guinea Guinea-Bissau Guyana Haiti Honduras Hungary Iceland India Indonesia Islamic Republic of Iran Iraq Ireland Israel Italy Jamaica Japan Jordan Kazakhstan Kenya Kiribati Kuwait Kyrgyzstan Lao People's Democratic Republic Latvia Lebanon Lesotho Liberia Libyan Arab Jamahiriya Liechtenstein Lithuania Luxembourg Madagascar Malawi Malaysia Maldives Mali Malta Marshall Islands Mauritania Mauritius Mexico Federated States of Micronesia Moldova Monaco Mongolia Montenegro Morocco Mozambique Myanmar Namibia Nauru Nepal Netherlands New Zealand Nicaragua Niger Nigeria Norway Oman Pakistan Palau Panama Papua New Guinea Paraguay Peru Philippines Poland Portugal Qatar Republic of Korea Romania Russian Federation Rwanda Saint Kitts and Nevis Saint Lucia Saint Vincent and the Grenadines Samoa San Marino Sao Tome and Principe Saudi Arabia Senegal Serbia Seychelles Sierra Leone Singapore Slovakia Slovenia Solomon Islands Somalia South Africa Spain Sri Lanka Sudan Suriname Swaziland Sweden Switzerland Syrian Arab Republic Syria Tajikistan Thailand The former Yugoslav Republic of Macedonia Macedonia Timor-Leste Togo Tonga Trinidad and Tobago Tunisia Turkey Turkmenistan Tuvalu Uganda Ukraine United Arab Emirates United Kingdom of Great Britain and Northern Ireland United Kingdom United Republic of Tanzania Tanzania United States of America Uruguay Uzbekistan Vanuatu Bolivarian Republic of Venezuela Venezuela Viet Nam Yemen Zambia Zimbabwe msort-8.53/SortOrders/UrduIslamicMonths.ord0000644000175100017510000000024411236173744015776 00000000000000محرّم صفر ربی الوّل ربی الثانی جمادی الوّل جمادی الثانی رجب شابان رمظان شوّال زیقاد زل ہج msort-8.53/SortOrders/TamilSexagesimalYears.ord0000644000175100017510000000250011236173744016616 00000000000000பிரபவ் விபவ் சுக்ல் பிரமோதூத் பிரசோற்பத்தி ஆங்கீரச் ஸ்ரீமுக் பவ் யுவ் தாது ஈஸ்வர் வெகுதானிய் பிரமாதி விக்கிரம் விஷு சித்திரபானு சுபானு தாரண் பார்த்திப் விய் சர்வசித்து சர்வதாரி விரோதி விக்ருதி கர் நந்தன் விஜய் ஜய் மன்மத் துன்முகி ஹேவிளம்பி விளம்பி விகாரி சார்வரி பிலவ் சுபகிருது சோபகிருத் குரோதி விசுவாசுவ் பரபாவ் பிலவங்க் கீலக் சௌமிய் சாதாரண் விரோதகிருது பரிதாபி பிரமாதீச் ஆனந்த் ராட்சச் நள் பிங்கள் காளயுக்தி சித்தார்த்தி ரௌத்திரி துன்மதி துந்துபி ருத்ரோத்காரி ரக்தாட்சி குரோதன் அட்சய் msort-8.53/SortOrders/KanaAkasaInterleaved.ord0000644000175100017510000000060411236173744016362 00000000000000ー ア あ イ い ウ う エ え オ お カ か キ き ク く ケ け コ こ サ さ シ し ス す セ せ ソ そ タ た チ ち ツ つ テ て ト と ナ な ニ に ヌ ぬ ネ ね ノ の ハ は ヒ ひ フ ふ ヘ へ ホ ほ マ ま ミ み ム む メ め モ も ヤ や ユ ゆ ヨ よ ラ ら リ り ル る レ れ ロ ろ ワ わ ヰ ゐ ヱ ゑ ヲ を ン ん msort-8.53/SortOrders/UrduCommonEraMonths.ord0000644000175100017510000000017411236173744016277 00000000000000جنوری فروری مارچ اپریل مءی جون جولاءی اگست ستمبر اکتوبر نومبر دسمبرmsort-8.53/SortOrders/ArmenianMonthNames.ord0000644000175100017510000000023511236173744016110 00000000000000Նավասարդի Հոռի Սահմի Տրե Քաղոց Արաց Մեհեկի Արեգի Ահեկի Մարերի Մարգաց Հրոտից Ավելյաց msort-8.53/SortOrders/ArmenianDayNames.ord0000644000175100017510000000054011236173744015537 00000000000000Արեգ Հրանդ Արամ Մարգար Ահրանք Մադեղ Աստղիկ Միհր Ձոպաբեր Մուրց Երեզկան Անի Պարխար Վանատ Արամազդ Մանի Ասակ Մասիս Անահիտ Արագած Գրգոռ Կորդուիք Ծմակ Լուսնակ Ցրօն Նպատ Վահագն Սէին Վարագ Գիշերավար msort-8.53/SortOrders/NorthKoreanJamoOrder0000644000175100017510000000023511236173744015636 00000000000000ㅏ ㅑ ㅓ ㅕ ㅗ ㅛ ㅜ ㅠ ㅡ ㅣ ㅐ ㅒ ㅔ ㅖ ㅚ ㅟ ㅢ ㅘ ㅝ ㅙ ㅞ ㄱ ㄴ ㄷ ㄹ ㅁ ㅂ ㅅ ㅈ ㅊ ㅋ ㅌ ㅍ ㅎ ㄲ ㄸ ㅃ ㅆ ㅉ msort-8.53/SortOrders/TurkmenMonthNames.u0000644000175100017510000000031111236173744015456 00000000000000Türkmenbaşy Ýanwar Baýdak Fewral Nowruz Mart Gurbansoltan Aprel Magtymguly Maý Oguz Iýun Gorkut Iýul Alp Arslan Awgust Ruhnama Sentýabr Garaşsyzlyk Oktýabr Sanjar Noýabr Bitaraplyk Dekabr msort-8.53/SortOrders/SouthKoreanJamoOrder0000644000175100017510000000024011236173744015642 00000000000000ㅏ ㅐ ㅑ ㅒ ㅓ ㅔ ㅕ ㅖ ㅗ ㅘ ㅙ ㅚ ㅛ ㅜ ㅝ ㅞ ㅟ ㅠ ㅡ ㅢ ㅣ ㄱ ㄲ ㄴ ㄷ ㄸ ㄹ ㅁ ㅂ ㅃ ㅅ ㅆ ㅇ ㅈ ㅉ ㅊ ㅋ ㅌ ㅍ ㅎ