home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume38 / lic / part06 < prev    next >
Text File  |  1993-08-11  |  66KB  |  1,581 lines

  1. Newsgroups: comp.sources.misc
  2. From: casey@gauss.llnl.gov (Casey Leedom)
  3. Subject: v38i109:  lic - LLNL Line Integral Convolution, v1.2, Part06/10
  4. Message-ID: <1993Aug12.013908.14233@sparky.sterling.com>
  5. X-Md4-Signature: 64cf321283b575bf139fd82cad4b7ae6
  6. Sender: kent@sparky.sterling.com (Kent Landfield)
  7. Organization: Sterling Software
  8. Date: Thu, 12 Aug 1993 01:39:08 GMT
  9. Approved: kent@sparky.sterling.com
  10.  
  11. Submitted-by: casey@gauss.llnl.gov (Casey Leedom)
  12. Posting-number: Volume 38, Issue 109
  13. Archive-name: lic/part06
  14. Environment: UNIX
  15.  
  16. #! /bin/sh
  17. # This is a shell archive.  Remove anything before this line, then feed it
  18. # into a shell via "sh file" or similar.  To overwrite existing files,
  19. # type "sh file -c".
  20. # Contents:  lic.1.2/doc/siggraph93/p.frame.UU.C
  21. #   lic.1.2/liblic/Filters.c lic.1.2/lic/lic.c
  22. # Wrapped by kent@sparky on Wed Aug 11 19:38:05 1993
  23. PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin ; export PATH
  24. echo If this archive is complete, you will see the following message:
  25. echo '          "shar: End of archive 6 (of 10)."'
  26. if test -f 'lic.1.2/doc/siggraph93/p.frame.UU.C' -a "${1}" != "-c" ; then 
  27.   echo shar: Will not clobber existing file \"'lic.1.2/doc/siggraph93/p.frame.UU.C'\"
  28. else
  29.   echo shar: Extracting \"'lic.1.2/doc/siggraph93/p.frame.UU.C'\" \(32376 characters\)
  30.   sed "s/^X//" >'lic.1.2/doc/siggraph93/p.frame.UU.C' <<'END_OF_FILE'
  31. XM   $+', !554  555  "JJH * ')#Z@    W' CZ'%1H92!U<'!E<B!L969T
  32. XM(&AA;F0@<75A<G1E<B!O9B!T:&4@8VER8W5L87(@=F5C=&]R(!P+<@ .55( 
  33. XM!554  *JJ@   <D/J [9 $!F:65L9"!I<R!C;VYV;VQV960@=7-I;F<@3$E#
  34. XM(&]V97(@0G5T=&5R=V]R=&@@;&]W+7!A<W,@9FEL=&5R960@    %U50  55
  35. XM5  "JJH   ')#ZA=+ !!=VAI=&4@;F]I<V4@=VET:"!C=71O9F8@9G)E<75E
  36. XM;F-I97,@;V8@,3(X+" X-BP@-C0L(&%N9" S,B H;&5F="!H "!53@ %550 
  37. XM JJJ $ !R0^H#N( &G1O(')I9VAT+"!T;W @=&\@8F]T=&]M*2X+ #8    V
  38. XM    [_G; (N)-P[$#ML.F0[+#I<        . '!O           .U0[R    
  39. XM         '); !YO4 !EFCP 9_.N  K+RP[%#N(.P [1#K8        0 ');
  40. XM !YO4 !KO_@       %A<@"597%U86Q;8VAA<EML72QL97%;:6YD97AE<ULP
  41. XM+#$L=&EM97-;8VAA<EMI72QS=')I;F=;(A%S=6-H$71H8701(ETL8VAA<EMS
  42. XM75TL8VAA<EMI75TL;&5S<W1H86Y;8VAA<EM,72QI;F1E>&5S6S L,2QC:&%R
  43. XM6W-=+'!L=7-;8VAA<EMI72QN=6U;,2PB,2)=75U=75TL #8    V    [_G;
  44. XM 0_S@0[&#N$.E@  #I0        . &%R           .U@[N            
  45. XM &UA #8#$@%9"H( [_G; #&M3@['#MH   [/#IH        . &%R     /_^
  46. XM'_\.R0[3   .FPBS U0  &%R !W5P !-0XL J?'Q !4X' [(#MD.T@  #K8 
  47. XM       / "QC#K\.P  ? %8 !+"Z )YXS@ 5.$P.R0[B   .V@['        
  48. XM$ !N*@!N/+T $<67      (!9ET PF5Q=6%L6W1I;65S6V-H87);:UTL:61;
  49. XM8VAA<EMW75U=+&-R;W-S6V]V97);<&QU<UMN=6U;,2PB,2)=+&-O<UMI9%MT
  50. XM:6UE<ULH*FXJ*6-H87);8UTL8VAA<EMW75U=75TL;G5M6S(L(C(B75TL;W9E
  51. XM<EMP;'5S6VYU;5LQ+"(Q(ETL8V]S6VED6W!L=7-;=&EM97-;8VAA<EMD72QC
  52. XM:&%R6W==72QC:&%R6V)E=&%=75U=72QN=6U;,BPB,B)=75U= !Z",  E2%  
  53. XMQI/" &16P@[*#N(.S0[4#L\        0     (',$0!99*D      @%55 ,]
  54. XM97%U86Q;<')O;7!T6UTL=&EM97-;;W9E<EMN=6U;,2PB,2)=+&YU;5LT+"(T
  55. XM(EU=+&ED6V%T;W!;<&QU<UMC:&%R6V)=+&UI;G5S6W!L=7-;*"IN*BEC:&%R
  56. XM6V%=+&]V97);<VEN6W!L=7-;*"IN*BEI9%MT:6UE<UMC:&%R6V)=+&-H87);
  57. XM8UU=72QM:6YU<UMS:6Y;:61;=&EM97-;8VAA<EMA72QC:&%R6V-=75U=75U=
  58. XM+&-H87);8UU=75U=+'!L=7-;<W1R:6YG6R(1(ETL;W9E<EMS:6Y;<&QU<ULH
  59. XM*FXJ*6ED6W!L=7-;=&EM97-;8VAA<EMB72QC:&%R6V1=72QC:&%R6V)E=&%=
  60. XM75TL;6EN=7-;<VEN6VED6W!L=7-;=&EM97-;8VAA<EMA72QC:&%R6V1=72QC
  61. XM:&%R6V)E=&%=75U=75U=+&-H87);9%U=72QP;'5S6W-T<FEN9ULB$2)=+&]V
  62. XM97);<VEN6W!L=7-;*"IN*BEI9%MP;'5S6W1I;65S6V-H87);8ETL:61;<&QU
  63. XM<ULH*FXJ*6-H87);8UTL;6EN=7-;8VAA<EMD75U=75TL;6EN=7-;8VAA<EMB
  64. XM971A75U=72QM:6YU<UMS:6Y;:61;<&QU<UMT:6UE<UMC:&%R6V%=+&ED6W!L
  65. XM=7-;*"IN*BEC:&%R6V-=+&UI;G5S6V-H87);9%U=75U=+&UI;G5S6V-H87);
  66. XM8F5T85U=75U=75U=+'1I;65S6VYU;5LR+"(R(ETL:61;<&QU<UMC:&%R6V-=
  67. XM+&UI;G5S6V-H87);9%U=75U=75TL<&QU<UMS=')I;F=;(A$B72QO=F5R6W-I
  68. XM;EMP;'5S6R@J;BHI:61;<&QU<UMT:6UE<UMC:&%R6V)=+&ED6W!L=7-;8VAA
  69. XM<EMC72QC:&%R6V1=75U=+&-H87);8F5T85U=72QM:6YU<UMS:6Y;:61;<&QU
  70. XM<UMT:6UE<UMC:&%R6V%=+&ED6W!L=7-;8VAA<EMC72QC:&%R6V1=75U=+&-H
  71. XM87);8F5T85U=75U=75TL=&EM97-;;G5M6S(L(C(B72QI9%MP;'5S6V-H87);
  72. XM8UTL8VAA<EMD75U=75U=75U=73$ -@   ;=\[0#O^=L!!H,2#LL.VP[$#K4.
  73. XMEP        X 87(           [9#O$             97(  P=D &5G+P!M
  74. XM!W, 1019#LP.X@[!#M<.J@  #M<.ZQ  6V, .8L= (G:4P     " 5TL B]E
  75. XM<75A;%MI;F1E>&5S6S L,2QC:&%R6W-=+&-H87);95U=+&QP87)E;ELH*FDR
  76. XM:2HI871O<%MT:6UE<UMC:&%R6VEN9G1Y72QS=')I;F=;(A%I9A$B72QC:&%R
  77. XM6U9=+'-T<FEN9ULB$7P2?!$B72QC:&%R6R@J;BHI95TL<W1R:6YG6R(1$1$1
  78. XM$1$1$1$1$1$1$1$1$2)=72QT:6UE<UMN=6U;,"PB,")=+'-T<FEN9ULB$6EF
  79. XM$2)=+&QE<W-T:&%N6R@J;BHI;W9E<ELH*FXJ*7!L=7-;*"IN*BEF;&]O<ELH
  80. XM*FXJ*6EN9&5X97-;*"IN*BDP+#$L8VAA<ELH*FXJ*5!=+&-H87);*"IN*BEC
  81. XM75U=+&UI;G5S6R@J;BHI:6YD97AE<ULH*FXJ*3 L,2QC:&%R6R@J;BHI4%TL
  82. XM8VAA<ELH*FXJ*6-=75U=+&EN9&5X97-;*"IN*BDP+#$L8VAA<ELH*FXJ*59=
  83. XM+&-H87);*"IN*BEC75U=+'1I;65S6VYU;5LH*FXJ*3 L(C B72QS=')I;F=;
  84. XM(A$1$2)=75U=+'1I;65S6V]V97);<&QU<UMF;&]O<EMI;F1E>&5S6S L,2QC
  85. XM:&%R6U!=+&-H87);8UU=72QM:6YU<UMI;F1E>&5S6S L,2QC:&%R6U!=+&-H
  86. XM87);8UU=75TL:6YD97AE<ULP+#$L8VAA<EM672QC:&%R6V-=75TL<W1R:6YG
  87. XM6R(1;W1H97)W:7-E(EU=75U=97-; !Z?Z0 %EJP )2JS "! \P[-#N(   [*
  88. XM#L\        0 %MC #$U0@ 7:!T      @%U<P _:6YT6W1I;65S6V-H87);
  89. XM:UTL:61;8VAA<EMW75TL8VAA<EMD72QC:&%R6W==72QC:&%R6V%=+&-H87);
  90. XM8EU=75U= #8   (@=L@ [_G; *^)-P[.#ML.W@[;#IT        . %LH    
  91. XM       .WP[B             %MB #0CV &S"H( \[A1 (_K!P[/#MH.QP  
  92. XM#IH        . &)E     /_LA L.S0[4   .FPBT U0  '-; -M@#  0$;8 
  93. XM%B28  JVW@[0#ML.J0  #JL        , %MD -M@#  0$;8 %B28  JVW@  
  94. XM                   !_P          <&P       %R6P &    !@    , 
  95. XM  !H :0/HETQ  4<",H<"^T VVGD !\MH0 6))@ "'WZ#M$.VP[%#M(.M@  
  96. XM      P     VVGD !\MH0 6))@ "'WZ                      (!    
  97. XM                 5MC  8    &     P   &@!IP^B97$ !1P(UQP+90#;
  98. XM48$ 9K_Y !8DF  '[\ .T@[;#M$.R ZV        #     #;48$ 9K_Y !8D
  99. XMF  '[\                       @(          &AA       !='( !@  
  100. XM  8    #    : &[#Z(H*@ %' C8' MT -N .  )6VP %B28  JVW@[3#ML.
  101. XMV@  #L<        , '5M -N .  )6VP %B28  JVW@                  
  102. XM   " P          *"H       %S6P &    !@    ,   !H :L/HF1E  4<
  103. XM"+X<"RH W  X !!9K0 6))@ "K;>#M0.VP[*   .SP        P :6X W  X
  104. XM !!9K0 6))@ "K;>                      ($          !;*       
  105. XM 5U=  8    &     P   &@!K@^B+&, !1P(W1P+*@      >8DW ._YVP 2
  106. XM   .U0[;   .\@[$        #  P+       >8DW ._YVP 2            
  107. XM             @@          ');       "<UL !554  555  "JJH * &W
  108. XM#ZA=70 X' B\'$-I<F-U;&%R(&%N9"!T=7)B=6QE;G0@9FQU:60@9'EN86UI
  109. XM8W,@=F5C=&]R(&9I96QD<R L8P .55( !554  *JJ@!  ;</J&]T "-I;6%G
  110. XM960@=7-I;F<@3$E#(&]V97(@=VAI=&4@;F]I<V4N"P .R@      ](,2 ._"
  111. XMCP ;   .U@[;   .[@[&        # !T:0      ](,2 ._"CP ;        
  112. XM                 @D          &AA       #:&$ !554  555  "JJH 
  113. XM* &Y#ZCYVP U' C '$$@='=O+61I;65N<VEO;F%L('9E8W1O<B!F:65L9"!S
  114. XM:&]W:6YG('1H92!L;V-A;"""  Y54@ %550  JJJ   !N0^H    4W-T<F5A
  115. XM;2!L:6YE('-T87)T:6YG(&EN(&-E;&P@*!L/JAMX&P^H&RP@&P^J&WD;#Z@;
  116. XM*2X@5&AE('9E8W1O<B!F:65L9"!I<R!T:&4@=7!P97(@     !=54  %550 
  117. XM JJJ $@!N0^H    3&QE9G0@8V]R;F5R(&]F('1H92!F;'5I9"!D>6YA;6EC
  118. XM<R!F:65L9"!I;B!F:6=U<F5S(!P)$APR' D6'"!A;F0@' DO'#0<"3 <+@MI
  119. XMY !M,RT ;[3U &CSOP R#Y0.UP[B#LP.Z ZJ#LP   [K$     "AK0P BJVW
  120. XM      (!   !C&EN6R@J;BHI=&EM97-;<W1R:6YG6R)F;W(B72QI9%MC;VUM
  121. XM85LH*FXJ*6-H87);*"IN*BEE72QC:&%R6R@J;BHI8UU=75TL:61;*"II,FDJ
  122. XM*6%T;W!;:61;=&EM97-;8VAA<EMT72QC:&%R6V]=+&-O;6UA6R@J;BHI8VAA
  123. XM<ELH*FXJ*7!=+&-H87);*"IN*BEY75U=72QI9%MT:6UE<UMC:&%R6V)=+&-H
  124. XM87);;UTL8VAA<EMT72QC:&%R6W1=+&-H87);;UTL8V]M;6%;*"IN*BEC:&%R
  125. XM6R@J;BHI;5TL8VAA<ELH*FXJ*7E=75U=+&ED6W1I;65S6V-H87);;%TL8VAA
  126. XM<EME72QC:&%R6V9=+&-O;6UA6R@J;BHI8VAA<ELH*FXJ*71=+&-H87);*"IN
  127. XM*BEX75U=72QI9%MT:6UE<UMC:&%R6W)=+&-H87);:5TL8VAA<EMG72QC:&%R
  128. XM6VA=+&-O;6UA6R@J;BHI8VAA<ELH*FXJ*71=+&-H87);*"IN*BEX75U=75U=
  129. XM70    "X40  N%$ [HDW .Z)-P[8#N<.PP  #K4        &            
  130. XM    ](,2 ._YVP 2   .V0[;   .\0[+        #  !MP      ](,2 ._Y
  131. XMVP 2                         @H          &%M       "8W0 !554
  132. XM  555  "JJH * '!#ZA55  ]' CS'%!H;W1O9W)A<&@@;V8@9FQO=V5R<R!P
  133. XM<F]C97-S960@=7-I;F<@3$E#('=I=&@@&P^J&TP;#Z@;((\ #E52  555  "
  134. XMJJH 0 '!#Z@    Y97%U86P@=&\@,"P@-2P@,3 @86YD(#(P("AL969T('1O
  135. XM(')I9VAT+"!T;W @=&\@8F]T=&]M*2X+5  +51X '#JB .'4@P 4*,X.V@[B
  136. XM#LD.TP['        $ !I;P!\/U\ *$ !      (!;&0!671I;65S6W-T<FEN
  137. XM9ULB$3TB72QO=F5R6VYU;5LQ+"(Q(ETL;G5M6S0L(C0B75TL:61;<&QU<ULH
  138. XM*FXJ*6YU;5LQ+"(Q(ETL8V]S6W!L=7-;*"IN*BEI9%MT:6UE<ULH*FXJ*6-H
  139. XM87);8UTL8VAA<EMW75U=+&-O<UMT:6UE<UMI9%MP;'5S6W1I;65S6V-H87);
  140. XM9%TL8VAA<EMW75TL8VAA<EMB971A75U=+'1I;65S6R@J;BHI<W1R:6YG6R@J
  141. XM;BHI(A$K(ETL8V]S6R@J;BHI=&EM97-;*"IN*BEI9%MT:6UE<UMC:&%R6R@J
  142. XM;BHI8UTL8VAA<ELH*FXJ*7==75TL8V]S6R@J;BHI:61;<&QU<ULH*FXJ*71I
  143. XM;65S6R@J;BHI8VAA<ELH*FXJ*61=+&-H87);*"IN*BEW75TL8VAA<ELH*FXJ
  144. XM*6)E=&%=75U=75U=75U=75U=76,!/4W2 B!VR #O^=L KXDW#ML.VP[.   .
  145. XMG0        X =%T           [D#N4             87( -@   #8   #O
  146. XM^=L!1!)N#MP.VPZ?#MX.G0        X 8V@           [@#O,         
  147. XM    8V@      -SWS@#O^=L &P  #MT.VP  #OL.P@        P *6T     
  148. XM -SWS@#O^=L &P                        (,           L8P      
  149. XM RQC  555  %550  JJJ "@!P@^H*BD -QP(^!Q0:&%S92!S:&EF=&5D($AA
  150. XM;FYI;F<@<FEP<&QE(&9U;F-T:6]N<RAT;W I+"!A($AA;@9H72P #E52  55
  151. XM5  "JJH   '"#ZAN*@ Y;FEN9R!W:6YD;W=I;F<@9G5N8W1I;VXH;6ED9&QE
  152. XM*2P@86YD($AA;FYI;F<@<FEP<&QE(&9U;F,&   755  !554  *JJ@!  <(/
  153. XMJ    #ET:6]N<R!M=6QT:7!L:65D(&)Y('1H92!(86YN:6YG('=I;F1O=R!F
  154. XM=6YC=&EO;BAB;W1T;VTI+@L  3U-T@ V    [_G; )V)-P[>#ML.W [.#IT 
  155. XM       . !P(           .X0\              ',@      "4B3< [_G;
  156. XM !L   [?#ML   [B#LX        , ""/      "4B3< [_G; !L         
  157. XM               "#P          9"        -F=  %550 !554  *JJ@ H
  158. XM = /J&)O #D<")D<02!W:6YD('9E;&]C:71Y('9I<W5A;&EZ871I;VX@:7,@
  159. XM8W)E871E9"!B>2!C;VUP;W-I= 9D  Y54@ %550  JJJ   !T ^H(ET .FEN
  160. XM9R!A;B!I;6%G92!O9B!.;W)T:"!!;65R:6-A('5N9&5R(&%N(&EM86=E(&]F
  161. XM('1H92!V96QO8P8 %U50  555  "JJH 0 '0#ZAN*@!%:71Y(&9I96QD(')E
  162. XM;F1E<F5D('5S:6YG('9A<FEA8FQE(&QE;F=T:"!,24,@;W9E<B Q+QL/JAMF
  163. XM&P^H&R!N;VES92X+70     !*1)N ._YVP ;   .X [;   .\P[<        
  164. XM#  H*@     !*1)N ._YVP ;                         @T         
  165. XM "IN       #+&, !554  555  "JJH * ',#ZAN*@ U' D '%=H:71E(&YO
  166. XM:7-E(&-O;G9O;'9E9"!W:71H(&9L=6ED(&1Y;F%M:6-S('9E8W1O<B!=  Y5
  167. XM4@ %550  JJJ   !S ^H=L@ 0&9I96QD('5S:6YG('9A<FEA8FQE(&YO<FUA
  168. XM;&EZ871I;VX@*'1O<"D@=F5R<W5S(&9I>&5D(&YO<FUA;&EZ8082;@ 755  
  169. XM!554  *JJ@!  <P/J&-H  ]T:6]N("AB;W1T;VTI+@L          'F)-P#O
  170. XM^=L )   #N$.VP  #P .W@        P          'F)-P#O^=L )       
  171. XM                  (.                    !     555  %550  JJJ
  172. XM "@!S@^H <( ,QP(EAQ7:&ET92!N;VES92!C;VYV;VQV960@=VET:"!C:&5C
  173. XM:V5R8F]A<F0@=F5C=&]R("P@80 .55( !554  *JJ@   <X/J*JJ $%F:65L
  174. XM9"!U<VEN9R!F:7AE9"!N;W)M86QI>F%T:6]N("AL969T*2P@86YD('1H96X@
  175. XM9W)A9&EE;G0@<VAA9&5D(   %U50  555  "JJH   '.#Z@    \*')I9VAT
  176. XM*2!T;R!G:79E('1H92!A<'!E87)A;F-E(&]F(&$@<F]U9V@@=V]V96X@<W5R
  177. XM9F%C92!T97@&3=( (%5.  555  "JJH 0 '.#Z@.S@ &='5R92X+  "X40  
  178. XMN%$ [HDW (Z/7 [B#N<.WP  #LX        & (DW ._YVP V    -@   ._Y
  179. XMVP%$$FX.XP[;#J(.Y@Z@        #@#YVP          #NP/ 0          
  180. XM            E(DW ._YVP ;   .Y [;   .Y0[;        # !B;P      
  181. XME(DW ._YVP ;                         A           &%T       #
  182. XM8V\ !554  555  "JJH * '1#ZBJJ@ X' D)'%1H92!F:7AE9"!N;W)M86QI
  183. XM>F%T:6]N(&9L=6ED(&1Y;F%M:6-S(&9I96QD(&EM86=E9"!T:  .55( !554
  184. XM  *JJ@ ( =$/J*JJ $=I;B!F:6=U<F4@' C@'#@<".(<(&ES(&UU;'1I<&QI
  185. XM960@8GD@82!C;VQO<B!I;6%G92!O9B!T:&4@;6%G;FET=61E(&]F(&]I<P 7
  186. XM55  !554  *JJ@!  =$/J    !)T:&4@=F5C=&]R(&9I96QD+@L  +A1  "X
  187. XM40#NB3< CH]<#N4.YP[D   .VP        8          #8   ([=L@ [_G;
  188. XM )2)-P[F#ML.XP[G#J         . !P)           .Z0\#            
  189. XM &0@ 3U-T@' ?.T [_G; 0^#$@[G#ML.Y@  #J         . %54        
  190. XM   .Z@\"             &EN -NWZ "#%-0 %B28  D,,P[H#ML.UP[K#JH 
  191. XM       , '-U -NWZ "#%-0 %B28  D,,P                     "!@  
  192. XM        =&D       %T=  &    !@    ,   !H =(/HOG;  4<"-,<"]L 
  193. XM     'F)-P#O^=L &P  #ND.VP  #P,.Y@        P          'F)-P#O
  194. XM^=L &P                        (1          "JJ@      ! '"  55
  195. XM5  %550  JJJ "@!TP^H8V\ .!P)'AQ4:&4@;W)I9VEN86P@<&AO=&\@;VX@
  196. XM=&AE(&QE9G0@<VAO=W,@;F\@;6]T:6]N(&)L=7(&9FD #E52  555  "JJH 
  197. XM  '3#ZAR;0 _<FEN9R!4:&4@<&AO=&\@;VX@=&AE(')I9VAT('5S97,@=F%R
  198. XM:6%B;&4@;&5N9W1H($Q)0R!T;R!M;W1I;VX@/"AR !=54  %550  JJJ   !
  199. XMTP^H87  /6)L=7(@0F]R:7,@665L='-I;M5S('=A=FEN9R!A<FTL('-I;75L
  200. XM871I;F<@82!S;&]W97(@<VAU='1E<B!U "6JJ  %550  JJJ $ !TP^HCUP 
  201. XM!W-P965D+@O.         /2#$@#O^=L &P  #NH.VP  #P(.YP        P 
  202. XM#N8      /2#$@#O^=L &P                        (2          ")
  203. XM-P       P    555  %550  JJJ "@!U0^H8F\ /!P)(1Q!('1H<F5E+61I
  204. XM;65N<VEO;F%L(#4Q,AL/K1LS&P^H&R!E;&5C=')O<W1A=&EC(&9I96QD(&ES
  205. XM(*JJ  Y54@ %550  JJJ   !U0^H9FD /6EM86=E9"!B>2!V;VQU;65T<FEC
  206. XM86QL>2!R87D@=')A8VEN9R!A('1H<F5E+61I;65N<VEO;F%L('-C80;1 !=5
  207. XM4  %550  JJJ $ !U0^HX!P +VQA<B!F:65L9"!P<F]D=6-E9"!U<VEN9R!,
  208. XM24,@;W9E<B!W:&ET92!N;VES92X+='5D  ,'9 !E9R\ TQ^( $4$60[K#MD.
  209. XMZ   #JH        / '9E#LP.UP     !*1)N ._YVP ;   .[ [;   / 0[C
  210. XM        #          !*1)N ._YVP ;                         A, 
  211. XM                   #    !554  555  "JJH ( ';#ZA1@0 R02!P:&]T
  212. XM;V=R87!H("AT;W I(&]F('1H92!&;&%V:6%N($%M<&AI=&AE871E<B!I<R  
  213. XM#E52  555  "JJH   ';#Z@DF !!=7-E9"!T;R!C<F5A=&4@82!V96-T;W(@
  214. XM9FEE;&0N(%1H92!F:65L9"!I<R!T:&5N('5S960@=&\@:6UA9V4@82!I !=5
  215. XM4  %550  JJJ $@!VP^H    .])P86EN=&5DTR!V97)S:6]N(&]F('1H92!S
  216. XM86UE('!H;W1O9W)A<&@@*&)O='1O;2D<"+\<&P^N&RX+[_G;  !NEP      
  217. XM[QUB -AR"0[M#MD/#0  #L(        /    #OL/#0           ._YVP#O
  218. XM^=L.[@[:#M8   [&        #0!I;@              (       8SQU/CQU
  219. XM/CQC/F%V<SQC/F1A=&$\8SYF:6YA;"YP87!E<CQC/F9I9W5R93,N97!S/%4^
  220. XM+VAO;64O=3 V+V-A8G)A;"]A=G,O9&%T82]F:6YA;"YP87!E<B]F:6=U<F4S
  221. XM+F5P<T,@=            ._YVP#O^=L.[P[:#O0   ZR        #0!B;   
  222. XM            ;       8SQU/CQU/CQC/F%V<SQC/F1A=&$\8SYF:6YA;"YP
  223. XM87!E<CQC/F9I9W5R93$N97!S/%4^+VAO;64O=3 V+V-A8G)A;"]A=G,O9&%T
  224. XM82]F:6YA;"YP87!E<B]F:6=U<F4Q+F5P<^<   $]3=( -@   ._YVP"+B3<.
  225. XM\ [A#I,.L@Z/        #@              #O4/#@                  
  226. XMN%$  +A1 .Z)-P#NB3<.\0[G#MD   [+        !@!D:0!E;G,  +A1  "X
  227. XM40#NB3< <X]<#O(.YP[5   .Q         8 :64 9"!I  "X40  N%$ [HDW
  228. XM 2,8DP[S#N<.X   #MP        & 'D@ &]L=0      ](,2 ._YVP 2   .
  229. XM] [;   .[PZR        # !E;@      ](,2 ._YVP 2                
  230. XM         @4          &0@       "960 !554  555  "JJH * &P#ZAI
  231. XM=  V' C/'%1H92!M87!P:6YG(&]F(&$@=F5C=&]R(&]N=&\@82!$1$$@;&EN
  232. XM92!A;F0@:6YP=70@  Y54@ %550  JJJ $ !L ^H#P$ +G!I>&5L(&9I96QD
  233. XM(&=E;F5R871I;F<@82!S:6YG;&4@;W5T<'5T('!I>&5L+@L      'F)-P#O
  234. XM^=L $@  #O4.VP  #PX.\         P 48$      'F)-P#O^=L $@      
  235. XM                  ('          !H90       G,@  555  %550  JJJ
  236. XM "@!M0^H))@ .!P(XQQ#:7)C=6QA<B!A;F0@='5R8G5L96YT(&9L=6ED(&1Y
  237. XM;F%M:6-S('9E8W1O<B!F:65L9',@(&D #E52  555  "JJH 0 &U#ZBJJ@ O
  238. XM:6UA9V5D('5S:6YG($1$02!C;VYV;VQU=&EO;B!O=F5R('=H:71E(&YO:7-E
  239. XM+@MH("@  &Z7     0 O__\ 2   #OL.V@[=#P0.P@  #P0.[0T <@D     
  240. XM   !#@           %D\=3X\=3X\8SYA=G,\8SYD871A/&,^9FEN86PN<&%P
  241. XM97(\8SYH,#$N<',\53XO:&]M92]U,#8O8V%B<F%L+V%V<R]D871A+V9I;F%L
  242. XM+G!A<&5R+V@P,2YP<V$  +A1  "X40#NB3< <X]<#P .YP[A   .W@      
  243. XM  8 86P 879S  "X40  N%$ [HDW 2,8DP\!#N<.[   #N,        &    
  244. XM        N%$  +A1 .Z)-P#NB3</ @[G#NH   [G        !@       &P 
  245. XM +A1  "X40#NB3< <X]<#P,.YP[I   .Y@        8 <&$ 97(\ "^H*P  
  246. XM    +_[% $@   \$#MH.^P\%#L(.^P\%#NT- '9S         0X    N    
  247. XM  !9/'4^/'4^/&,^879S/&,^9&%T83QC/F9I;F%L+G!A<&5R/&,^:# R+G!S
  248. XM/%4^+VAO;64O=3 V+V-A8G)A;"]A=G,O9&%T82]F:6YA;"YP87!E<B]H,#(N
  249. XM<',W %[@B0    ( +__@ $@   \%#MH/! \&#L(/! \&#NT- (DW        
  250. XM 0X           !9/'4^/'4^/&,^879S/&,^9&%T83QC/F9I;F%L+G!A<&5R
  251. XM/&,^:# S+G!S/%4^+VAO;64O=3 V+V-A8G)A;"]A=G,O9&%T82]F:6YA;"YP
  252. XM87!E<B]H,#,N<',  (\V 0    ( +__\ $@   \&#MH/!0\'#L(/!0\'#NT-
  253. XM             0X   !D      !9/'4^/'4^/&,^879S/&,^9&%T83QC/F9I
  254. XM;F%L+G!A<&5R/&,^:# T+G!S/%4^+VAO;64O=3 V+V-A8G)A;"]A=G,O9&%T
  255. XM82]F:6YA;"YP87!E<B]H,#0N<',! +^+^@    $ +___ $@   \'#MH/!@\(
  256. XM#L(/!@\(#NT- &]U         0X    +      !9/'4^/'4^/&,^879S/&,^
  257. XM9&%T83QC/F9I;F%L+G!A<&5R/&,^:# U+G!S/%4^+VAO;64O=3 V+V-A8G)A
  258. XM;"]A=G,O9&%T82]F:6YA;"YP87!E<B]H,#4N<'-4 %[@B0!'JLL +___ $@ 
  259. XM  \(#MH/!P\)#L(/!P\)#NT- &)U         0X   !D      !A/'4^/'4^
  260. XM/&,^879S/&,^9&%T83QC/F9I;F%L+G!A<&5R/&,^:&%N;FEN9RYP<SQ5/B]H
  261. XM;VUE+W4P-B]C86)R86PO879S+V1A=&$O9FEN86PN<&%P97(O:&%N;FEN9RYP
  262. XM<P$  &Z7 )!R"0 O__P 2   #PD.V@\(#PH.P@\(#PH.[0T  0X        !
  263. XM#@   '4      %D\=3X\=3X\8SYA=G,\8SYD871A/&,^9FEN86PN<&%P97(\
  264. XM8SYH,3$N<',\53XO:&]M92]U,#8O8V%B<F%L+V%V<R]D871A+V9I;F%L+G!A
  265. XM<&5R+V@Q,2YP<U$ +Z@K )!R"0 O_^  2   #PH.V@\)#PL.P@\)#PL.[0T 
  266. XMN%$        !#@   ),      %D\=3X\=3X\8SYA=G,\8SYD871A/&,^9FEN
  267. XM86PN<&%P97(\8SYH,3(N<',\53XO:&]M92]U,#8O8V%B<F%L+V%V<R]D871A
  268. XM+V9I;F%L+G!A<&5R+V@Q,BYP<P  7N") )!R"0 O__P 2   #PL.V@\*#PP.
  269. XMP@\*#PP.[0T #OL        !#@           %D\=3X\=3X\8SYA=G,\8SYD
  270. XM871A/&,^9FEN86PN<&%P97(\8SYH,3,N<',\53XO:&]M92]U,#8O8V%B<F%L
  271. XM+V%V<R]D871A+V9I;F%L+G!A<&5R+V@Q,RYP<W( CS8! )!R"0 O_^  2   
  272. XM#PP.V@\+#PT.P@\+#PT.[0T #P0        !#@           %D\=3X\=3X\
  273. XM8SYA=G,\8SYD871A/&,^9FEN86PN<&%P97(\8SYH,30N<',\53XO:&]M92]U
  274. XM,#8O8V%B<F%L+V%V<R]D871A+V9I;F%L+G!A<&5R+V@Q-"YP<W( OXOZ )!R
  275. XM"  O_L4 2   #PT.V@\,#NT.P@\,   .[0T #P4        !#@          
  276. XM %D\=3X\=3X\8SYA=G,\8SYD871A/&,^9FEN86PN<&%P97(\8SYH,34N<',\
  277. XM53XO:&]M92]U,#8O8V%B<F%L+V%V<R]D871A+V9I;F%L+G!A<&5R+V@Q-2YP
  278. XM<W(  +A1  "X40#NB3< <X]<#PX.YP[U   .\         8 #P8 " X1#B$.
  279. XM%  +   "9    Q@   X1      YU      $ /F$ !$QE9G0   )D   #&   
  280. XM#A(     #G8      0#OP  %4FEG:'1E   P-@)D   #&   #A,     #H  
  281. XM     @ N<  )4F5F97)E;F-E5   X(D"9    Q@   X5   .%@Y]        
  282. XM#P<      F0   ,8   .%@X5#A<.CP !     #QU      )D   #&   #A<.
  283. XM%@X8#I0  @    !P80     "9    Q@   X8#A<.&0Z7  ,     ,#8     
  284. XM F0   ,8   .&0X8#AH.F@ $     &5R      )D   #&   #AH.&0X;#IT 
  285. XM!0             "9    Q@   X;#AH.' Z@  8      0X      F0   ,8
  286. XM   .' X;   .HP '     &%T      \]#XT/10 V                    
  287. XM   $     0    #F9@ !     1F9                      \]#Z$   0#
  288. XM%     (# P4!  #@  P                                    " 0 &
  289. XM!0$             "$%B<W1R86-T                                
  290. XM          (     YF8  0    $9F0                     //@     %
  291. XM 00    " P,% 0  B0 ,                                     @$ 
  292. XM!@4!     0X       A#96QL0F]D>0                              
  293. XM           "     .9F  $    !&9D       (          @  #S\     
  294. XM!0,      @,#!0$  3, #                                     (!
  295. XM  8% 0    \$       +0V5L;$AE861I;F=9                    "0  
  296. XM                  $     YF8  0    $9F0                     /
  297. XM0 ^B   $! 0    " P,% @  <@ )                                
  298. XM     @$ !@4!    #NT       1";V1Y                            
  299. XM   .    !0    (     YF8  0    $9F0                     /00  
  300. XM   % 50    " P,% 0  80 .                                    
  301. XM @$ !@D!   .#N<       =(96%D:6YG              1";V1Y !(    2
  302. XM    $@               @    #F9@ !     1F9                    
  303. XM  ]"      4!!     (# P4!      H                             
  304. XM       " 0 &!0$  &0         #51A8FQE1F]O=&YO=&4'            
  305. XM                                 @    #F9@ !     1F9        
  306. XM              ]#    5 4# 0    (# P4!   V  P                 
  307. XM                   " 0 &"0$  !@         "E1A8FQE5&ET;&4     
  308. XM    #E0Z5&%B;&4@/&XK/CH@                          0    !    
  309. XM .9F  $    !&9D                     #T0     !0,4     @,#!0$ 
  310. XM &8 $@                                    ,!  8) 0   P,%    
  311. XM   %5&ET;&4                                              @  
  312. XM  #F9@ !     1F9       "          (   ]&#Z$   0#      (# P4!
  313. XM  %F  P                                    " 0 &!0$   ,#!0  
  314. XM    "T-E;&Q(96%D:6YG                                        
  315. XM   "     .9F  $    !&9D                     #T</H0  ! $$    
  316. XM @,#!0$     #                                     (!  8% 0  
  317. XM  $S       (0V5L;$)O9'D                                     
  318. XM     @    #F9@ !     1F9                      ](#Z0 5 0# 0  
  319. XM  (# P4!  !F  P                                    " 0 &"0$ 
  320. XM  ,#!0      "E1A8FQE5&ET;&4         #E0Z5&%B;&4@/&XK/CH@    
  321. XM                      0    !     .9F  $    !&9D             
  322. XM        #TD/K   ! ,4     @,#!0$     #                       
  323. XM              (!  8%!0             (06)S=')A8W0             
  324. XM                  ,    #     0    #F9@ !     1F9            
  325. XM          ]*#Z(  00$%0    (# P4!      D                     
  326. XM               " 0 &!0$             "$5Q=6%T:6]N          <H
  327. XM/&X].#XI           )                     0    #F9@ !     1F9
  328. XM                      ],      4$!     (# P4"      D         
  329. XM                           " 0 &!0$             !$)O9'D     
  330. XM                          <          0    #F9@ !     1F9    
  331. XM                  ]-    4P4$%0    (# P4!      D             
  332. XM                       # 0 &"0$             "%-E8W1I;VXS    
  333. XM     !!3.CQN/BX\;CXN/&XK/B @                    !P         !
  334. XM     .9F  $    !&9D                     #TX/JP  ! $4     @,#
  335. XM!0$     "0                                    ,!  8) 0      
  336. XM       &2&5A9&5R              $                             
  337. XM 0    #F9@ !     1F9                      ]/#[D   0$5     (#
  338. XM P4!  "9  @                                    " 0 &!0$   P 
  339. XM        "$9O;W1N;W1E                               '        
  340. XM  $     YF8  0    $9F0                     /4      % 10    "
  341. XM P,% 0  F0 )                                     P$ !@D!   ,
  342. XM          9(96%D97(                                 !P      
  343. XM   !     .9F  $    !&9D                     #U$   !3!0$5    
  344. XM @,#!0$     "0                                    ,!  8) 0  
  345. XM  0#       (4V5C=&EO;C(         #%,Z/&X^+CQN*SX@(           
  346. XM          ,    #     0    #F9@ !     1F9                    
  347. XM  ]2#Z(  00$%0    (# P4!      D                             
  348. XM       " 0 &!0$             "$5Q=6%T:6]N          <H/&X],3XI
  349. XM @                               0    #F9@ !     1F9        
  350. XM              ]4#Z@ 1@0!%0    (# P4!      @                 
  351. XM                   % 0 &!@$             #D9I9W5R92U#87!T:6]N
  352. XM          Y&.D9I9W5R92 \-SXZ(                               
  353. XM 0    #F9@ !     1F9                      ]5      4$5     (#
  354. XM P4!      @                                    " 0 &!0$     
  355. XM        "$9O;W1N;W1E                               #     P  
  356. XM  $     YF8  0    $9F0                     /5@    $%!!4    "
  357. XM P,% 0     )                                     @$ !@4!    
  358. XM          A%<75A=&EO;@         '*#QN/3$^*0                  
  359. XM              $     YF8  0    $9F0                     /5P^H
  360. XM $8$ 14    " P,% 0     (                                    
  361. XM!0$ !@8!              Y&:6=U<F4M0V%P=&EO;@         .1CI&:6=U
  362. XM<F4@/#@^.B                                $     YF8  0    $9
  363. XMF0                     /60^H $8$ 14    " P,% 0  !0 (        
  364. XM                            !0$ !@8!   ) 0        Y&:6=U<F4M
  365. XM0V%P=&EO;@         .1CI&:6=U<F4@/#$^.B                     #
  366. XM     P    $     YF8  0    $9F0                     /6@^B  $$
  367. XM!!4    " P,% 0     )                                     @$ 
  368. XM!@4!   R          A%<75A=&EO;@         '*#QN/3(^*0          
  369. XM           '          $     YF8  0    $9F0                  
  370. XM   /6P^K %,$ 14    " P,% 0     )                            
  371. XM         P$ !@D!  !"          A396-T:6]N,0         )4SH\;BL^
  372. XM+B @                         P    ,    !     .9F  $    !&9D 
  373. XM                    #UP/H@ !! 05     @,#!0$     "0          
  374. XM                          (!  8% 0  0V%P       (17%U871I;VX 
  375. XM        !R@\;CTW/BD                      P    ,    !     .9F
  376. XM  $    !&9D                     #UT/H@ !! 05     @,#!0$     
  377. XM"0                                    (!  8% 0             (
  378. XM17%U871I;VX         !R@\;CTV/BD                      P    , 
  379. XM   !     .9F  $    !&9D                     #UX/H@ !! 05    
  380. XM @,#!0$     "0                                    (!  8% 0  
  381. XM871I       (17%U871I;VX         !R@\;CTT/BD                 
  382. XM     P    ,    !     .9F  $    !&9D                     #U\/
  383. XMH@ !! 05     @,#!0$     "0                                  
  384. XM  (!  8% 0  =7)E       (17%U871I;VX         !R@\;CTU/BD@    
  385. XM                 P    ,    !     .9F  $    !&9D             
  386. XM        #V /H@ !! 05     @,#!0$   4 "0                      
  387. XM              (!  8% 0  "0$        (17%U871I;VX         !R@\
  388. XM;CTS/BDZ    $@                    (    !     .9F  $    !&9D 
  389. XM                    #V(/H@!2! 0%     @,#!0,   0 "0          
  390. XM                          (!  8% 0           0 2   !        
  391. XM"5)E9F5R96YC96X         "%(Z/&XK/BX(                        
  392. XM       !     .9F  $    !&9D                     #V,   !&!0$5
  393. XM     @,#!0$     "                                     4!  8&
  394. XM 0  0@         .1FEG=7)E+4-A<'1I;VX         #D8Z1FEG=7)E(#PS
  395. XM/CH@                    !P         !     .9F  $    !&9D     
  396. XM                #V0   !3!0$5     @,#!0$     "0              
  397. XM                      ,!  8) 0  "$5Q       (4V5C=&EO;C$     
  398. XM    "5,Z/&XK/BX@(                              $     0    # 
  399. XM   !     4                        ]E#Z(   0#%     (" @4!    
  400. XM  D                                    " 0 &!0$  &%T:0    ( 
  401. XMZ@   @ H/  !(#X!U    P     !(   "$%B<W1R86-T                
  402. XM                    !     $     YF8  0    $9F0              
  403. XM       /9@^B   $ Q0    " P,% 0     )                        
  404. XM             @$ !@4!   ]-#X       A!8G-T<F%C=               
  405. XM                !P         !     .9F  $    !&9D             
  406. XM        #V</JP!3! $5     @,#!0$     "0                      
  407. XM              ,!  8) 0             (4V5C=&EO;C(         #%,Z
  408. XM/&X^+CQN*SX@(                     <          0    #F9@ !    
  409. XM 1F9                      ]I#ZL 4P0$%0    (# P4!      D     
  410. XM                               # 0 &"0$   <H/       "%-E8W1I
  411. XM;VXS         !!3.CQN/BX\;CXN/&XK/B @    !@                  
  412. XM       !     .9F  $    !&9D                     #VH/N0  ! %0
  413. XM     @,#!0$     "                                     (!  8%
  414. XM 0             (1F]O=&YO=&4 "$9O;W1N;W1E                    
  415. XM              0    !     .9F  $    !&9D                     
  416. XM#VP/IP  ! ,4     @,#!0$     $@                              
  417. XM      (!  8% 0             (06)S=')A8W0                     
  418. XM                     0    #F9@ !     1F9                    
  419. XM  ]N#Z@ 1@0!%0    (# P4!      @                             
  420. XM       % 0 &!@$   A%<0      #D9I9W5R92U#87!T:6]N         !!&
  421. XM.D9I9W5R92 \;CTR/CH@                            !     $     
  422. XMYF8  0    $9F0                     /< _!   $ Q0    " P,% 0  
  423. XM   2                                     P$ !@D!    *#P     
  424. XM  54:71L90              <F$ $@                    (    !    
  425. XM .9F  $    !&9D                     #W,   !2!00%     @,#!0, 
  426. XM  , "0                                    (!  8% 0          
  427. XM 0 2   ! #0^    "5)E9F5R96YC970         "%(Z/&XK/BX(        
  428. XM                       !     .9F  $    !&9D                 
  429. XM    #W0/J !&! $5     @,#!0$     "                           
  430. XM          4!  8& 0  "%-E       .1FEG=7)E+4-A<'1I;VX         
  431. XM$$8Z1FEG=7)E(#QN/3,^.B                                   0  
  432. XM  #F9@ !     1F9                      ]U#Z@ 1@0!%0    (# P4!
  433. XM      @                                    % 0 &!@$         
  434. XM    #D9I9W5R92U#87!T:6]N         !!&.D9I9W5R92 \;CTT/CH@  #F
  435. XM9@                            $     YF8  0    $9F0          
  436. XM           /=@^H $8$ 14    " P,% 0     (                    
  437. XM                !0$ !@8!              Y&:6=U<F4M0V%P=&EO;@  
  438. XM       01CI&:6=U<F4@/&X]-3XZ(                               
  439. XM   !     .9F  $    !&9D                     #W</J !&! $5    
  440. XM @,#!0$     "                                     4!  8& 0  
  441. XM           .1FEG=7)E+4-A<'1I;VX         $$8Z1FEG=7)E(#QN/38^
  442. XM.B    ,%                             0    #F9@ !     1F9    
  443. XM                  ]X#Z@ 1@0!%0    (# P4!   0  @             
  444. XM                       % 0 &!@$   0         #D9I9W5R92U#87!T
  445. XM:6]N         !!&.D9I9W5R92 \;CTY/CH@   #!0                  
  446. XM          $     YF8  0    $9F0                     />0^H $8$
  447. XM 14    " P,% 0     (                                    !0$ 
  448. XM!@8!              Y&:6=U<F4M0V%P=&EO;@         11CI&:6=U<F4@
  449. XM/&X],3$^.B                                 !     .9F  $    !
  450. XM&9D                     #WH/J !&! $5     @,#!0$     "       
  451. XM                              4!  8& 0             .1FEG=7)E
  452. XM+4-A<'1I;VX         $48Z1FEG=7)E(#QN/3$P/CH@                
  453. XM                 0    #F9@ !     1F9                      ][
  454. XM#Z@ 1@0!%0    (# P4!      @                                 
  455. XM   % 0 &!@$             #D9I9W5R92U#87!T:6]N         !%&.D9I
  456. XM9W5R92 \;CTQ,CXZ(                                 $     YF8 
  457. XM 0    $9F0                     /? ^H $8$ 14    " P,% 0     (
  458. XM                                    !0$ !@8!              Y&
  459. XM:6=U<F4M0V%P=&EO;@         11CI&:6=U<F4@/&X],30^.B          
  460. XM                       !     .9F  $    !&9D                 
  461. XM    #WT/J !&! $5     @,#!0$     "                           
  462. XM          4!  8& 0             .1FEG=7)E+4-A<'1I;VX         
  463. XM$48Z1FEG=7)E(#QN/3$S/CH@    #Z$/T0^R !P #                   
  464. XM     'K95M,/H0    (!  8% 0 $.D9I  !R90 )                    
  465. XM    >ME6TP^B     @$ !@4!  0 YF8       D                  /_,
  466. XMX       #Z,    " 0 &!0$ !0  $  (16UP:&%S:7,    ,            
  467. XM            %>[C^ ^D     @$ !@D!  1U<F4  &%P  D             
  468. XM     /_,X       #Z4    " 0 &!0$ !0     )4W5B<V-R:7!T   )    
  469. XM              #_S.        ^F     @$ !@4!  5&! $ "U-U<&5R<V-R
  470. XM:7!T"    !(                       !ZV5;3#Z<    " 0 &!0$ !   
  471. XM    1FD "                        'NM/HH/J     4!  8& 0 $    
  472. XM       )                        %>[C^ ^I     @$ !@D!  0     
  473. XM      @                        $K;.B#ZH    % 0 &!@0 !       
  474. XM    "0                        >I%:T/JP    ,!  8) 0 $:6]N    
  475. XM   ,                        :+"$L@^L     @$ !@4%  0         
  476. XM  @                       ![K3Z*#ZT    % 0@&!@$ !$8$ 0      
  477. XM"                        /(3>3P/K@    4!  8(!  $!0$    !   )
  478. XM                        :+"$L@^O     @$ !@4%  1U<F4 !DET86QI
  479. XM8P )                        %>[C^ ^P     @$ !@D!  0!&9D !$)O
  480. XM;&0    )                        %>[C^ ^Q     @$(!@D!  0     
  481. XM!$)O;&0    )                        6@1L60^X     @$ !@D%  1I
  482. XM;VX       @                       !ZV5;3#[D    " 0 &!0$ !   
  483. XM        "0                       &BPA+(/N@    (!  8%!0 $1@0!
  484. XM       )                        !$8I>P^[    ! $ !@4!  0% 0  
  485. XM  $   D                       !HL(2R#[T    " 1 &!04 !'5R90 &
  486. XM271A;&EC  D                        $1BE[#[\    $ 0 &!0$ !*$ 
  487. XM   &271A;&EC  @                       !HL(2R#\     " 0 &!04 
  488. XM! (!   &271A;&EC !(                        'J16M#\$    # 0 &
  489. XM"0$ ! 4!     !  "0                       &BPA+(/QP    (!$ 8%
  490. XM!0 $I      !   )                        >ME6TP_(     @$ !@4!
  491. XM  2E    !DET86QI8P )                        >ME6TP_)     @$(
  492. XM!@4!  0     !DET86QI8P[9#OD.X  +  $   [9    #P              
  493. XM 0  #MH #P /                @  .VP /  <,   $ @( $%H'___8.P[<
  494. XM    #P               0  #MT    /      ("        @  .W@    \ 
  495. XM     @(       $   [?  \ !PP   0" @ 06@<  0  #N$ #P '      ("
  496. XM           .X@                    $   [C  \ #P     " @      
  497. XM !F9#N< #@ '#   ! (" !!:!P!E '4 :@ %  "         90     !   $
  498. XM5&AI;@    (         9@     !   &365D:75M  "    "    9P     "
  499. XM   &1&]U8FQE  ,         :      !   %5&AI8VL   !         :0  
  500. XM   !   )5F5R>2!4:&EN             ,D V0#)  ( #     P         
  501. XM      8    &    !@    8    $       % ,H  @ /  \ #P!E &4 90!E
  502. XM &4 90!E &4 90!G#T@%   !     @($     0@   $!!0              
  503. XM  !(   /1@]'#T8       $           !(   /1@]'#T8 ;P    (     
  504. XM      !(   /1@]'#T8       ,           !(   /1@]'#T8       0 
  505. XM          !(   /1@]'#T8 TP (1F]R;6%T($$!   ,    #           
  506. XM    !@    8    &    !@    0       4 RP "  \ #P /    90   &8 
  507. XM90!E &4 90!E &8/2 4  0$    " @0    !"    0$%                
  508. XM $@   ]&#T</1@       0           $@   ]&#T</1@!T     @      
  509. XM     $@   ]&#T</1@       P           $@   ]&#T</1@!T    !   
  510. XM         $@   ]&#T</1@    A&;W)M870@0@                     !
  511. XM+0$] 2T  0       0$N  $" 0    =#;VUM96YT P           !$ !  "
  512. XM  54:6UE<P   P )2&5L=F5T:6-AL  $  93>6UB;VP !0 *079A;G1'87)D
  513. XM90 )  $ !@ '4F5G=6QA<@  #  $  4 !U)E9W5L87(%  8 !$)O;VL "  (
  514. XM1&5M:4)O;&0 "0 $0F]L9  %  ,  0 '4F5G=6QA<@( !  '3V)L:7%U908 
  515. XM!0 &271A;&EC                                                
  516. XM                                                            
  517. XM                                                            
  518. XM                                                            
  519. XM                                                            
  520. XM                                                            
  521. XM                                                            
  522. XM                                                            
  523. XM                                                            
  524. XM                                                            
  525. XM                                                            
  526. XM                                                            
  527. XM                                                            
  528. XM                                                            
  529. XM                                                            
  530. XM                                                            
  531. XM                                                            
  532. XM                                                            
  533. XM                                                            
  534. XM                                                            
  535. XM                                                            
  536. XM                                                            
  537. XM                                                            
  538. XM                                                            
  539. XM                                                            
  540. XM                                                            
  541. XM                                                            
  542. XM                                                            
  543. XM                                                       ! @,$
  544. XMM5%@52EG987Y'1P$1Y_3-=H)S0OA6I*(&46.IKGCJ/"[7]7BT-P9%V_=M%P<
  545. XMV+F[")JOI/F?(<'IC$1ZL*0K7J).L>L%#K6<#.-GMBY@L-PL/C#A]W@P_<&_
  546. XM9$^9;M967O-,+M3",!7+D)5P>%6?'(4DVZG175>EK,ZRW O_KHTQ\#PUF!BP
  547. XM6?!@7K$:8^+I'UGDT01[H2:Z%#<E+5TG.X:5R,&-*7C63A_AM;+D#=VA DJ)
  548. XMD]:[-J8D:#!<L*[V:OP?)D;0Z__TBI2YJQ&M7HM$.NX#D8%/"5X+K?Q0CFD8
  549. XM/X=RO2"^IM&&1]/F);6]9$(1\,U<4HJE*R=]7(S*13GWT2YC;6RN9ZU"K*9J
  550. XMG4:N[T+G\Q'8-C*JKIB0S?S TMAR^Y7]"C#GM5LN]J%B9"EP?[2R(#OVK3W_
  551. XM=0+5$T:[MW4[8%^% 1(2[*>L#Z&B.K^4#"#Q8=Q*#D170MC6ZDB7>UWVLF8 
  552. XMLF0SA(^P **1GN)D1_D>N3FQ^/I4E"2\=2?:7XO'#/E%LU_ON*&>$CI_-N< 
  553. X#    
  554. Xend
  555. END_OF_FILE
  556.   if test 32376 -ne `wc -c <'lic.1.2/doc/siggraph93/p.frame.UU.C'`; then
  557.     echo shar: \"'lic.1.2/doc/siggraph93/p.frame.UU.C'\" unpacked with wrong size!
  558.   elif test -f 'lic.1.2/doc/siggraph93/p.frame.UU.A' && test -f 'lic.1.2/doc/siggraph93/p.frame.UU.B' ; then
  559.     echo shar: Combining  \"'paper.frame.UU'\" \(143959 characters\)
  560.     cat 'lic.1.2/doc/siggraph93/p.frame.UU.A' 'lic.1.2/doc/siggraph93/p.frame.UU.B' 'lic.1.2/doc/siggraph93/p.frame.UU.C' > 'paper.frame.UU'
  561.     if test 143959 -ne `wc -c <'paper.frame.UU'`; then
  562.       echo shar: \"'paper.frame.UU'\" combined with wrong size!
  563.     else 
  564.       rm lic.1.2/doc/siggraph93/p.frame.UU.A lic.1.2/doc/siggraph93/p.frame.UU.B lic.1.2/doc/siggraph93/p.frame.UU.C
  565.       echo shar: Uudecoding \"'lic.1.2/doc/siggraph93/paper.frame'\" \(104448 characters\)
  566.       cat paper.frame.UU | uudecode
  567.       if test 104448 -ne `wc -c <'lic.1.2/doc/siggraph93/paper.frame'`; then
  568.         echo shar: \"'lic.1.2/doc/siggraph93/paper.frame'\" uudecoded with wrong size!
  569.       else
  570.         rm paper.frame.UU
  571.       fi 
  572.       # end of 'paper.frame.UU'
  573.     fi
  574.   fi
  575.   # end of 'lic.1.2/doc/siggraph93/p.frame.UU.B'
  576. fi
  577. if test -f 'lic.1.2/liblic/Filters.c' -a "${1}" != "-c" ; then 
  578.   echo shar: Will not clobber existing file \"'lic.1.2/liblic/Filters.c'\"
  579. else
  580.   echo shar: Extracting \"'lic.1.2/liblic/Filters.c'\" \(6103 characters\)
  581.   sed "s/^X//" >'lic.1.2/liblic/Filters.c' <<'END_OF_FILE'
  582. X/*
  583. X * $Header: /d/sisal/a/casey/tmp/lic/liblic/RCS/Filters.c,v 1.12 1993/08/10 23:35:32 casey Exp $
  584. X */
  585. X
  586. X/*
  587. X * Copyright (c) 1993 The Regents of the University of California.
  588. X * All rights reserved.
  589. X *
  590. X * Redistribution and use in source and binary forms, with or without
  591. X * modification, are permitted provided that the following conditions
  592. X * are met:
  593. X * 1. Redistributions of source code must retain the above copyright
  594. X *    notice, this list of conditions and the following disclaimer.
  595. X * 2. Redistributions in binary form must reproduce the above copyright
  596. X *    notice, this list of conditions and the following disclaimer in the
  597. X *    documentation and/or other materials provided with the distribution.
  598. X * 3. All advertising materials mentioning features or use of this software
  599. X *    must display the following acknowledgement:
  600. X *    This product includes software developed by the University of
  601. X *    California, Lawrence Livermore National Laboratory and its
  602. X *    contributors.
  603. X * 4. Neither the name of the University nor the names of its contributors
  604. X *    may be used to endorse or promote products derived from this software
  605. X *    without specific prior written permission.
  606. X *
  607. X * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  608. X * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  609. X * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  610. X * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  611. X * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  612. X * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  613. X * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  614. X * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  615. X * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  616. X * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  617. X * SUCH DAMAGE.
  618. X */
  619. X
  620. X#ifndef lint
  621. X    static char rcsid[] = "$Header: /d/sisal/a/casey/tmp/lic/liblic/RCS/Filters.c,v 1.12 1993/08/10 23:35:32 casey Exp $";
  622. X    static char copyright[] =
  623. X    "Copyright (c) 1993 The Regents of the University of California.\n"
  624. X    "All rights reserved.\n";
  625. X#endif
  626. X
  627. X
  628. X#include "liblic.h"
  629. X
  630. X
  631. X/*
  632. X *    Build integral tables from filter integrator.
  633. X *    =============================================
  634. X */
  635. X
  636. Xvoid
  637. XLIC_BuildIntegralTables(LIC *This)
  638. X    /*
  639. X     * Build integral tables for LIC instance if needed.
  640. X     */
  641. X{
  642. X    int speed, length;
  643. X
  644. X    if (!This->NeedIntegration)
  645. X    return;
  646. X    This->NeedIntegration = FALSE;
  647. X
  648. X    /*
  649. X     * Build the convolution integral tables.  Build LIC_INTEGRAL_SPEEDS
  650. X     * different versions of them with speed varying between 0 and
  651. X     * LIC_INTEGRAL_SPEEDS.
  652. X     */
  653. X    for (speed = 0; speed < LIC_INTEGRAL_SPEEDS; speed++)
  654. X    {
  655. X    double s;
  656. X
  657. X    for (length = 0; length < LIC_INTEGRAL_LEN; length++)
  658. X    {
  659. X        s = LIC_Length(This) * length / (double)LIC_INTEGRAL_LEN;
  660. X        This->NegIntegralTable[speed][length] = This->Filter(This,  -s, 0.0, speed);
  661. X        This->PosIntegralTable[speed][length] = This->Filter(This, 0.0,   s, speed);
  662. X    }
  663. X    }
  664. X}
  665. X
  666. X
  667. Xdouble
  668. XLIC_Box(LIC *This, double a, double b, int speed)
  669. X    /*
  670. X     * Compute the integral bewteen points a and b, a <= b, of a box
  671. X     * filter:
  672. X     *
  673. X     *    k(s) = 1
  674. X     */
  675. X{
  676. X    return(b - a);
  677. X}
  678. X
  679. X
  680. Xdouble
  681. XLIC_Ripple(LIC *This, double a, double b, int speed)
  682. X    /*
  683. X     * Compute the integral bewteen points a and b, a <= b, of a phase shifted
  684. X     * Hanning low pass filter multiplied by a Hanning window function:
  685. X     *
  686. X     *    k(s) = (cos(d*s + phase) + 1)/2 * (cos(c*s) + 1)/2
  687. X     *
  688. X     * We need to scale the filter to the length of the filter support.  This
  689. X     * requires scaling each occurance of s by Pi/L.  Things fall out in the
  690. X     * integral which allow us to slip the scaling factors into c and d.
  691. X     */
  692. X{
  693. X    REGISTER double m;        /* speed multiple */
  694. X    REGISTER double p;        /* phase of the Hanning ripple function */
  695. X    REGISTER double f;        /* frequency of the Hanning ripple function */
  696. X    REGISTER double c;        /* Hanning window function dilation constant */
  697. X    REGISTER double d;        /* Hanning ripple filter dilation constant */
  698. X    REGISTER double w;        /* integral value */
  699. X    
  700. X    if (LIC_Length(This) == 0 || a == b)
  701. X    return(0.0);
  702. X    
  703. X    /*
  704. X     * Implement ``speed'' variations by scaling the frequency inversely
  705. X     * to speed.  This causes low magnitude vectors to be convolved using
  706. X     * a higher frequency filter which will yield less distinct output
  707. X     * features.  As the frequency increases the filter begins to approximate
  708. X     * the Hanning window filter.
  709. X     */
  710. X
  711. X    p = LIC_Phase(This);
  712. X    f = LIC_Frequency(This) * (6.0 - 5.0*(double)speed/(LIC_INTEGRAL_SPEEDS - 1));
  713. X    c = 1.0/LIC_Length(This) * M_PI;
  714. X    d = 1.0/LIC_Length(This) * M_PI * f;
  715. X    
  716. X    w =   b                          - a
  717. X    + sin(b*c)/c                 - sin(a*c)/c
  718. X    + sin(b*d + p)/d             - sin(a*d + p)/d
  719. X    + sin(b*(c+d) + p)/(2*(c+d)) - sin(a*(c+d) + p)/(2*(c+d));
  720. X    if (c != d)
  721. X    w +=  sin(b*(c-d) - p)/(2*(c-d))
  722. X        - sin(a*(c-d) - p)/(2*(c-d));
  723. X    w /= 4;
  724. X    return(w);
  725. X}
  726. X
  727. X
  728. Xdouble
  729. XLIC_Ramp(LIC *This, double a, double b, int speed)
  730. X    /*
  731. X     * Compute the integral bewteen points a and b, a <= b, of a biased
  732. X     * triangle filter:
  733. X     *
  734. X     *    k(s) = (s + L) / (2 * L)
  735. X     */
  736. X{
  737. X    if (LIC_Length(This) == 0)
  738. X    return(0.0);
  739. X    else
  740. X    return((a*a - b*b)/(4*LIC_Length(This)) + (a - b)/2);
  741. X}
  742. X
  743. X
  744. Xdouble
  745. XLIC_Select(LIC *This, double a, double b, int speed)
  746. X    /*
  747. X     * Compute the integral bewteen points a and b, a <= b, of a 
  748. X     * narrow Gaussian filter which sits at L-2 along the local
  749. X     * streamline.  This filter's delta function like shape and
  750. X     * it's location near the end of the local streamline means that
  751. X     * the filter acts as a pixel selection filter. Hence it's name.
  752. X     *
  753. X     *    k(s) = 1/2*pi * e^(x - L + 2)^2 
  754. X     */
  755. X{
  756. X    if (LIC_Length(This) == 0)
  757. X    return(0.0);
  758. X    else 
  759. X    return(  erf((b - LIC_Length(This) + 2) / sqrt(2.0))
  760. X           - erf((a - LIC_Length(This) + 2) / sqrt(2.0)));
  761. X}
  762. END_OF_FILE
  763.   if test 6103 -ne `wc -c <'lic.1.2/liblic/Filters.c'`; then
  764.     echo shar: \"'lic.1.2/liblic/Filters.c'\" unpacked with wrong size!
  765.   fi
  766.   # end of 'lic.1.2/liblic/Filters.c'
  767. fi
  768. if test -f 'lic.1.2/lic/lic.c' -a "${1}" != "-c" ; then 
  769.   echo shar: Will not clobber existing file \"'lic.1.2/lic/lic.c'\"
  770. else
  771.   echo shar: Extracting \"'lic.1.2/lic/lic.c'\" \(22645 characters\)
  772.   sed "s/^X//" >'lic.1.2/lic/lic.c' <<'END_OF_FILE'
  773. X/*
  774. X * $Header: /d/sisal/a/casey/tmp/lic/lic/RCS/lic.c,v 1.24 1993/08/11 17:25:35 casey Exp $
  775. X */
  776. X
  777. X/*
  778. X * Copyright (c) 1993 The Regents of the University of California.
  779. X * All rights reserved.
  780. X *
  781. X * Redistribution and use in source and binary forms, with or without
  782. X * modification, are permitted provided that the following conditions
  783. X * are met:
  784. X * 1. Redistributions of source code must retain the above copyright
  785. X *    notice, this list of conditions and the following disclaimer.
  786. X * 2. Redistributions in binary form must reproduce the above copyright
  787. X *    notice, this list of conditions and the following disclaimer in the
  788. X *    documentation and/or other materials provided with the distribution.
  789. X * 3. All advertising materials mentioning features or use of this software
  790. X *    must display the following acknowledgement:
  791. X *    This product includes software developed by the University of
  792. X *    California, Lawrence Livermore National Laboratory and its
  793. X *    contributors.
  794. X * 4. Neither the name of the University nor the names of its contributors
  795. X *    may be used to endorse or promote products derived from this software
  796. X *    without specific prior written permission.
  797. X *
  798. X * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  799. X * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  800. X * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  801. X * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  802. X * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  803. X * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  804. X * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  805. X * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  806. X * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  807. X * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  808. X * SUCH DAMAGE.
  809. X */
  810. X
  811. X#ifndef lint
  812. X    static char rcsid[] = "$Header: /d/sisal/a/casey/tmp/lic/lic/RCS/lic.c,v 1.24 1993/08/11 17:25:35 casey Exp $";
  813. X    static char copyright[] =
  814. X    "Copyright (c) 1993 The Regents of the University of California.\n"
  815. X    "All rights reserved.\n";
  816. X#endif
  817. X
  818. X
  819. X/*
  820. X * UNIX command line interface to the Line Integral Convolution library.
  821. X */
  822. X
  823. X
  824. X#include <stdlib.h>
  825. X#include <unistd.h>
  826. X#include <errno.h>
  827. X#include <string.h>
  828. X#include <stdio.h>
  829. X#include <time.h>
  830. X#include <sys/times.h>
  831. X#include <sys/types.h>
  832. X
  833. X#include <fcntl.h>
  834. X#include <math.h>
  835. X#include <sys/stat.h>
  836. X
  837. X#if defined(HAS_MMAP)
  838. X#   include <sys/mman.h>
  839. X#endif
  840. X
  841. X#include <lic.h>
  842. X
  843. X
  844. X#ifdef NEED_EXIT_CODES
  845. X    /*
  846. X     * EXIT_SUCCESS and EXIT_FAILURE are supposed to be defined in <stdlib.h>
  847. X     * according to the ANSI C X3.159-1989 specification, but Sun OS 4.1.1
  848. X     * fails to define them ...
  849. X     */
  850. X#   define EXIT_SUCCESS    0
  851. X#   define EXIT_FAILURE    1
  852. X#endif
  853. X
  854. X
  855. X#ifdef NEED_STRERROR
  856. X    /*
  857. X     * strerror is supposed to be defined in <string.h> and supplied in the
  858. X     * standard C library according to the ANSI C X3.159-1989 specification,
  859. X     * but Sun OS 4.1.1 fails to define or supply it ...  Unfortunately the
  860. X     * only way we can control this is with an externally supplied define.
  861. X     */
  862. X    extern int      errno;        /* system error number */
  863. X    extern char     *sys_errlist[];    /* system error messages */
  864. X    extern int      sys_nerr;        /* number of entries in sys_errlist */
  865. X
  866. X    static char *
  867. X    strerror(int err)
  868. X    {
  869. X    if (err < 0 || err >= sys_nerr) {
  870. X        static char msg[100];
  871. X
  872. X        sprintf(msg, "system error number %d", err);
  873. X        return(msg);
  874. X    }
  875. X    return(sys_errlist[err]);
  876. X    }
  877. X#endif
  878. X
  879. X
  880. X/*
  881. X *    Arguments
  882. X *    =========
  883. X */
  884. Xstatic char *usage =
  885. X"usage: %s options in-image in-vector-field out-image\n"
  886. X"  -x x-extent            - *required*                  (no default)\n"
  887. X"  -y y-extent            - *required*                  (no default)\n"
  888. X"  -z z-extent            -                             (default 1)\n"
  889. X"  -i i-extent            - in-image X extent           (default x-extent)\n"
  890. X"  -j j-extent            - in-image Y extent           (default y-extent)\n"
  891. X"  -k k-extent            - in-image Z extent           (default z-extent)\n"
  892. X"  -f filter              - 'box', 'ripple', 'ramp' or  (default 'box')\n"
  893. X"                           'select'\n"
  894. X"  -n normalization       - 'fixed' or 'variable'       (default 'variable')\n"
  895. X"  -N                     - input vector field already normalized\n"
  896. X"  -l filter-length       -                             (default 10.0)\n"
  897. X"  -d filter-frequency    -                             (default 3.0)\n"
  898. X"  -p filter-phase        -                             (default 0.0)\n"
  899. X"  -L                     - vary filter-length based on vector magnitude\n"
  900. X"  -S                     - vary filter-phase based on vector magnitude\n"
  901. X"  -r default-red         - for zero vectors            (default -1)\n"
  902. X"  -g default-green       - for zero vectors            (default -1)\n"
  903. X"  -b default-blue        - for zero vectors            (default -1)\n"
  904. X"  -a default-alpha       - for zero vectors            (default -1)\n"
  905. X"  -v                     - verbose progress and timing information\n"
  906. X"  -V                     - version information\n"
  907. X    ;
  908. X
  909. Xstatic char *myname;            /* argv[0]: name we were invoked by */
  910. Xstatic int    size_x = -1;        /* -x: X extent */
  911. Xstatic int    size_y = -1;        /* -y: Y extent */
  912. Xstatic int    size_z =  1;        /* -z: Z extent (default 1) */
  913. Xstatic int    size_i = -1;        /* -i: input image X extent */
  914. Xstatic int    size_j = -1;        /* -j: input image Y extent */
  915. Xstatic int    size_k = -1;        /* -k: input image Z extent */
  916. Xstatic LIC_Filter
  917. X              filter = LIC_Box;        /* -f: filter */
  918. Xstatic int    normalization = LIC_VARIABLE;
  919. X                     /* -n: normalization */
  920. Xstatic int    normalized    = FALSE;    /* -N: input vectors prenormalized */
  921. Xstatic double filter_length = 10.0;    /* -l: filter length */
  922. Xstatic double filter_frequency = 3.0;    /* -d: filter frequency */
  923. Xstatic double filter_phase  = 0.0;    /* -p: filter phase */
  924. Xstatic int    vary_length   = FALSE;    /* -L: vary length by vector mag. */
  925. Xstatic int    vary_speed    = FALSE;    /* -S: vary phase by vector mag. */
  926. Xstatic int    default_red   = -1;    /* -r: default red ... */
  927. Xstatic int    default_green = -1;    /* -g: default green ... */
  928. Xstatic int    default_blue  = -1;    /* -b: default blue ... */
  929. Xstatic int    default_alpha = -1;    /* -a: default alpha for zero vector */
  930. Xstatic int    verbose       = FALSE;    /* -v: display progress information */
  931. Xstatic int    version       = FALSE;    /* -V: display version information */
  932. X
  933. Xstatic char  *in_img;            /* input image filename */
  934. Xstatic char  *in_vec;            /* input vector field filename */
  935. Xstatic char  *out_img;            /* output image filename */
  936. X
  937. X
  938. X/*
  939. X *    Local variables
  940. X *    ===============
  941. X */
  942. Xstatic time_t     t0;            /* time we started/ended the LIC */
  943. Xstatic clock_t    t0_clk, tN_clk;    /*   calculation */
  944. Xstatic struct tms t0_tms, tN_tms;
  945. X
  946. Xstatic void      *in_img_addr,        /* virtual addresses of memory */
  947. X                 *in_vec_addr,        /*   mapped input image, input */
  948. X                 *out_img_addr;        /*   vector field and output image */
  949. Xstatic off_t      in_img_size,        /* sizes of image and vector files */
  950. X                  in_vec_size,
  951. X                  out_img_size;
  952. X#if !defined(HAS_MMAP)
  953. X    static int    out_img_fd;        /* output image file descriptor */
  954. X#endif
  955. X
  956. X
  957. X/*
  958. X *    Local routines
  959. X *    ==============
  960. X */
  961. Xint         main(int argc, char *argv[]);
  962. Xstatic void ParseArguments(int argc, char *argv[]);
  963. Xstatic void LoadFiles(void);
  964. Xstatic void UnloadFiles(void);
  965. Xstatic void LicFiles(void);
  966. Xstatic void PrintLicStatus(double PercentDone);
  967. Xstatic void PrintLicError(const char *message);
  968. X
  969. X
  970. Xint
  971. Xmain(int argc, char *argv[])
  972. X{
  973. X    ParseArguments(argc, argv);
  974. X    LoadFiles();
  975. X    LicFiles();
  976. X    UnloadFiles();
  977. X    exit(EXIT_SUCCESS);
  978. X    /*NOTREACHED*/
  979. X}
  980. X
  981. X
  982. Xstatic void
  983. XParseArguments(int argc, char *argv[])
  984. X{
  985. X    int          ch;
  986. X#if defined(HAS_HP_GETOPT)
  987. X    extern int   getopt(int, char * const [], const char *);
  988. X#else
  989. X    extern int   getopt(int, char **, char *);
  990. X#endif
  991. X    extern char *optarg;
  992. X    extern int   optind;
  993. X
  994. X    myname = strrchr(argv[0], '/');
  995. X    if (myname != NULL)
  996. X    myname++;
  997. X    else
  998. X    myname = argv[0];
  999. X    while ((ch = getopt(argc, argv, "x:y:z:i:j:k:f:n:Nl:d:p:LSr:g:b:a:vV")) != EOF)
  1000. X    switch ((char)ch)
  1001. X    {
  1002. X        default:
  1003. X        case '?':
  1004. X        (void)fprintf(stderr, "%s: unknown option -%c\n",
  1005. X                  myname, ch);
  1006. X        (void)fprintf(stderr, usage, myname);
  1007. X        exit(EXIT_FAILURE);
  1008. X        /*NOTREACHED*/
  1009. X        case 'x':
  1010. X        size_x = atoi(optarg);
  1011. X        break;
  1012. X        case 'y':
  1013. X        size_y = atoi(optarg);
  1014. X        break;
  1015. X        case 'z':
  1016. X        size_z = atoi(optarg);
  1017. X        break;
  1018. X        case 'i':
  1019. X        size_i = atoi(optarg);
  1020. X        break;
  1021. X        case 'j':
  1022. X        size_j = atoi(optarg);
  1023. X        break;
  1024. X        case 'k':
  1025. X        size_k = atoi(optarg);
  1026. X        break;
  1027. X        case 'f':
  1028. X        if (strcasecmp(optarg, "box") == 0)
  1029. X            filter = LIC_Box;
  1030. X        else if (strcasecmp(optarg, "ripple") == 0)
  1031. X            filter = LIC_Ripple;
  1032. X        else if (strcasecmp(optarg, "ramp") == 0)
  1033. X            filter = LIC_Ramp;
  1034. X        else if (strcasecmp(optarg, "select") == 0)
  1035. X            filter = LIC_Select;
  1036. X        else
  1037. X        {
  1038. X            (void)fprintf(stderr, "%: invalid filter type %s:"
  1039. X                  " use 'box', 'ripple' or 'ramp'\n",
  1040. X                  myname, optarg);
  1041. X            exit(EXIT_FAILURE);
  1042. X            /*NOTREACHED*/
  1043. X        }
  1044. X        break;
  1045. X        case 'n':
  1046. X        if (strcasecmp(optarg, "fixed") == 0)
  1047. X            normalization = LIC_FIXED;
  1048. X        else if (strcasecmp(optarg, "variable") == 0)
  1049. X            normalization = LIC_VARIABLE;
  1050. X        else
  1051. X        {
  1052. X            (void)fprintf(stderr, "%: invalid normalization type %s:"
  1053. X                  " use 'fixed' or 'variable'\n",
  1054. X                  myname, optarg);
  1055. X            exit(EXIT_FAILURE);
  1056. X            /*NOTREACHED*/
  1057. X        }
  1058. X        break;
  1059. X        case 'N':
  1060. X        normalized = TRUE;
  1061. X        break;
  1062. X        case 'l':
  1063. X        filter_length = atof(optarg);
  1064. X        break;
  1065. X        case 'd':
  1066. X        filter_frequency = atof(optarg);
  1067. X        break;
  1068. X        case 'p':
  1069. X        filter_phase = atof(optarg);
  1070. X        break;
  1071. X        case 'L':
  1072. X        vary_length = TRUE;
  1073. X        break;
  1074. X        case 'S':
  1075. X        vary_speed = TRUE;
  1076. X        break;
  1077. X        case 'r':
  1078. X        default_red = (*optarg == '-')
  1079. X            ? -atoi(optarg+1)
  1080. X            :  atoi(optarg);
  1081. X        break;
  1082. X        case 'g':
  1083. X        default_green = (*optarg == '-')
  1084. X            ? -atoi(optarg+1)
  1085. X            :  atoi(optarg);
  1086. X        break;
  1087. X        case 'b':
  1088. X        default_blue = (*optarg == '-')
  1089. X            ? -atoi(optarg+1)
  1090. X            :  atoi(optarg);
  1091. X        break;
  1092. X        case 'a':
  1093. X        default_alpha = (*optarg == '-')
  1094. X            ? -atoi(optarg+1)
  1095. X            :  atoi(optarg);
  1096. X        break;
  1097. X        case 'v':
  1098. X        verbose = TRUE;
  1099. X        break;
  1100. X        case 'V':
  1101. X        version = TRUE;
  1102. X        break;
  1103. X    }
  1104. X
  1105. X    if (version)
  1106. X    (void)printf("%s: compiled with LIC library using %d byte %s pixels\n",
  1107. X             myname, LIC_ConfiguredPixelSize(),
  1108. X             LIC_ConfiguredPixelType());
  1109. X
  1110. X    if (argc != optind + 3)
  1111. X    {
  1112. X    (void)fprintf(stderr, "%s: need three file options\n", myname);
  1113. X    (void)fprintf(stderr, usage, myname);
  1114. X    exit(EXIT_FAILURE);
  1115. X    /*NOTREACHED*/
  1116. X    }
  1117. X    in_img = argv[optind + 0];
  1118. X    in_vec = argv[optind + 1];
  1119. X    out_img = argv[optind + 2];
  1120. X    if (size_x == -1 || size_y == -1)
  1121. X    {
  1122. X    (void)fprintf(stderr, "%s: must specify both -x and -y options ...\n",
  1123. X              myname);
  1124. X    exit(EXIT_FAILURE);
  1125. X    /*NOTREACHED*/
  1126. X    }
  1127. X    if (size_i == -1)
  1128. X    size_i = size_x;
  1129. X    if (size_j == -1)
  1130. X    size_j = size_y;
  1131. X    if (size_k == -1)
  1132. X    size_k = size_z;
  1133. X}
  1134. X
  1135. X
  1136. X#if defined(HAS_MMAP)
  1137. X
  1138. X/*
  1139. X * Versions of LoadFiles and UnloadFiles for systems that support mmap(2).
  1140. X */
  1141. X
  1142. Xstatic void
  1143. XLoadFiles(void)
  1144. X    /*
  1145. X     * Map input and output files into virtual memory.  Make sure that the
  1146. X     * input files match the user specified sizes and pre-extend the
  1147. X     * output file to its final length.
  1148. X     */
  1149. X{
  1150. X    char        c;
  1151. X    int         fd;
  1152. X    struct stat stbuf;
  1153. X
  1154. X    /*
  1155. X     * Map input vector field into virtual memory.  (We always map the
  1156. X     * input vector field first because it will always be larger than
  1157. X     * either of the other two files.  This should, hopefully, give the
  1158. X     * operating system the best possible chance to find virtual address
  1159. X     * space for the three files.)
  1160. X     */
  1161. X    fd = open(in_vec, O_RDONLY);
  1162. X    if (fd < 0)
  1163. X    {
  1164. X    (void)fprintf(stderr, "%s: unable to open %s: %s\n",
  1165. X              myname, in_vec, strerror(errno));
  1166. X    exit(EXIT_FAILURE);
  1167. X    /*NOTREACHED*/
  1168. X    }
  1169. X    if (fstat(fd, &stbuf) < 0)
  1170. X    {
  1171. X    (void)fprintf(stderr, "%s: unable to stat %s: %s\n",
  1172. X              myname, in_vec, strerror(errno));
  1173. X    exit(EXIT_FAILURE);
  1174. X    /*NOTREACHED*/
  1175. X    }
  1176. X    in_vec_size = stbuf.st_size;
  1177. X    if (size_x * size_y * size_z * sizeof(float) * (size_z == 1 ? 2 : 3)
  1178. X    != in_vec_size)
  1179. X    {
  1180. X    (void)fprintf(stderr, "%s: input vector field size doesn't"
  1181. X              " match %d * x=%d * y=%d * z=%d\n",
  1182. X              myname, sizeof(float) * (size_z == 1 ? 2 : 3),
  1183. X              size_x, size_y, size_z);
  1184. X    exit(EXIT_FAILURE);
  1185. X    /*NOTREACHED*/
  1186. X    }
  1187. X    in_vec_addr = mmap((void *)0, (int)in_vec_size, PROT_READ,
  1188. X               MAP_SHARED, fd, (off_t)0);
  1189. X    if ((int)in_vec_addr == -1)
  1190. X    {
  1191. X    (void)fprintf(stderr, "%s: unable to map %s: %s\n",
  1192. X              myname, in_vec, strerror(errno));
  1193. X    exit(EXIT_FAILURE);
  1194. X    /*NOTREACHED*/
  1195. X    }
  1196. X    (void)close(fd);
  1197. X
  1198. X    /*
  1199. X     * Map input image into virtual memory.
  1200. X     */
  1201. X    fd = open(in_img, O_RDONLY);
  1202. X    if (fd < 0)
  1203. X    {
  1204. X    (void)fprintf(stderr, "%s: unable to open %s: %s\n",
  1205. X              myname, in_img, strerror(errno));
  1206. X    exit(EXIT_FAILURE);
  1207. X    /*NOTREACHED*/
  1208. X    }
  1209. X    if (fstat(fd, &stbuf) < 0)
  1210. X    {
  1211. X    (void)fprintf(stderr, "%s: unable to stat %s: %s\n",
  1212. X              myname, in_img, strerror(errno));
  1213. X    exit(EXIT_FAILURE);
  1214. X    /*NOTREACHED*/
  1215. X    }
  1216. X    in_img_size = stbuf.st_size;
  1217. X    if (size_i * size_j * size_k * LIC_ConfiguredPixelSize() != in_img_size)
  1218. X    {
  1219. X    (void)fprintf(stderr, "%s: input image size doesn't"
  1220. X              " match %d * x=%d * y=%d * z=%d\n",
  1221. X              myname, LIC_ConfiguredPixelSize(),
  1222. X              size_i, size_j, size_k);
  1223. X    exit(EXIT_FAILURE);
  1224. X    /*NOTREACHED*/
  1225. X    }
  1226. X    in_img_addr = mmap((void *)0, (int)in_img_size, PROT_READ,
  1227. X               MAP_SHARED, fd, (off_t)0);
  1228. X    if ((int)in_img_addr == -1)
  1229. X    {
  1230. X    (void)fprintf(stderr, "%s: unable to map %s: %s\n",
  1231. X              myname, in_img, strerror(errno));
  1232. X    exit(EXIT_FAILURE);
  1233. X    /*NOTREACHED*/
  1234. X    }
  1235. X    (void)close(fd);
  1236. X
  1237. X    /*
  1238. X     * Map output image into virtual memory.
  1239. X     */
  1240. X    fd = open(out_img, O_CREAT|O_RDWR|O_EXCL, 0666);
  1241. X    if (fd < 0)
  1242. X    {
  1243. X    (void)fprintf(stderr, "%s: unable to open %s: %s\n",
  1244. X              myname, out_img, strerror(errno));
  1245. X    exit(EXIT_FAILURE);
  1246. X    /*NOTREACHED*/
  1247. X    }
  1248. X    out_img_size = size_x * size_y * size_z * LIC_ConfiguredPixelSize();
  1249. X    (void)lseek(fd, out_img_size - 1, SEEK_SET);
  1250. X    c = '\0';
  1251. X    if (write(fd, &c, 1) != 1)
  1252. X    {
  1253. X    (void)fprintf(stderr, "%s: unable to preextend %s to %ld bytes: %s\n",
  1254. X              myname, out_img, strerror(errno));
  1255. X    exit(EXIT_FAILURE);
  1256. X    /*NOTREACHED*/
  1257. X    }
  1258. X    out_img_addr = mmap((void *)0, (int)out_img_size, PROT_WRITE,
  1259. X            MAP_SHARED, fd, (off_t)0);
  1260. X    if ((int)out_img_addr == -1)
  1261. X    {
  1262. X    (void)fprintf(stderr, "%s: unable to map %s: %s\n",
  1263. X              myname, out_img, strerror(errno));
  1264. X    exit(EXIT_FAILURE);
  1265. X    /*NOTREACHED*/
  1266. X    }
  1267. X    (void)close(fd);
  1268. X}
  1269. X
  1270. X
  1271. Xstatic void
  1272. XUnloadFiles(void)
  1273. X    /*
  1274. X     * Unmap input and output files from virtual memory.
  1275. X     */
  1276. X{
  1277. X    (void)munmap(in_img_addr, (int)in_img_size);
  1278. X    (void)munmap(in_vec_addr, (int)in_vec_size);
  1279. X    (void)munmap(out_img_addr, (int)out_img_size);
  1280. X}
  1281. X
  1282. X#else /* HAS_MMAP */
  1283. X
  1284. X/*
  1285. X * Versions of LoadFiles and UnloadFiles for systems that *don't* support
  1286. X * mmap(2).
  1287. X */
  1288. X
  1289. Xstatic void
  1290. XLoadFiles(void)
  1291. X    /*
  1292. X     * Load input files into malloc'ed memory and malloc memory for
  1293. X     * output image.  Make sure that the input files match the user
  1294. X     * specified sizes.  Preallocate output image on disk in order to
  1295. X     * make sure we have the space to output the image later in
  1296. X     * UnloadFiles.
  1297. X     */
  1298. X{
  1299. X    int         fd;
  1300. X    struct stat stbuf;
  1301. X
  1302. X    /*
  1303. X     * Load input image into malloc'ed memory.
  1304. X     */
  1305. X    fd = open(in_img, O_RDONLY);
  1306. X    if (fd < 0)
  1307. X    {
  1308. X    (void)fprintf(stderr, "%s: unable to open %s: %s\n",
  1309. X              myname, in_img, strerror(errno));
  1310. X    exit(EXIT_FAILURE);
  1311. X    /*NOTREACHED*/
  1312. X    }
  1313. X    if (fstat(fd, &stbuf) < 0)
  1314. X    {
  1315. X    (void)fprintf(stderr, "%s: unable to stat %s: %s\n",
  1316. X              myname, in_img, strerror(errno));
  1317. X    exit(EXIT_FAILURE);
  1318. X    /*NOTREACHED*/
  1319. X    }
  1320. X    in_img_size = stbuf.st_size;
  1321. X    if (size_i * size_j * size_k * LIC_ConfiguredPixelSize()
  1322. X    != in_img_size)
  1323. X    {
  1324. X    (void)fprintf(stderr, "%s: input image size doesn't"
  1325. X              " match %d * x=%d * y=%d * z=%d\n",
  1326. X              myname, LIC_ConfiguredPixelSize(),
  1327. X              size_i, size_j, size_k);
  1328. X    exit(EXIT_FAILURE);
  1329. X    /*NOTREACHED*/
  1330. X    }
  1331. X    in_img_addr = malloc(in_img_size);
  1332. X    if (in_img_addr == NULL)
  1333. X    {
  1334. X    (void)fprintf(stderr, "%s: unable to allocate %u bytes for"
  1335. X              " input image\n", myname, in_img_size);
  1336. X    exit(EXIT_FAILURE);
  1337. X    /*NOTREACHED*/
  1338. X    }
  1339. X    if (read(fd, in_img_addr, in_img_size) != in_img_size)
  1340. X    {
  1341. X    (void)fprintf(stderr, "%s: unable to read %u bytes from %s\n",
  1342. X              myname, in_img_size, in_img);
  1343. X    exit(EXIT_FAILURE);
  1344. X    /*NOTREACHED*/
  1345. X    }
  1346. X    (void)close(fd);
  1347. X
  1348. X    /*
  1349. X     * Load input vector field into malloc'ed memory.
  1350. X     */
  1351. X    fd = open(in_vec, O_RDONLY);
  1352. X    if (fd < 0)
  1353. X    {
  1354. X    (void)fprintf(stderr, "%s: unable to open %s: %s\n",
  1355. X              myname, in_vec, strerror(errno));
  1356. X    exit(EXIT_FAILURE);
  1357. X    /*NOTREACHED*/
  1358. X    }
  1359. X    if (fstat(fd, &stbuf) < 0)
  1360. X    {
  1361. X    (void)fprintf(stderr, "%s: unable to stat %s: %s\n",
  1362. X              myname, in_vec, strerror(errno));
  1363. X    exit(EXIT_FAILURE);
  1364. X    /*NOTREACHED*/
  1365. X    }
  1366. X    in_vec_size = stbuf.st_size;
  1367. X    if (size_x * size_y * size_z * sizeof(float) * (size_z == 1 ? 2 : 3)
  1368. X    != in_vec_size)
  1369. X    {
  1370. X    (void)fprintf(stderr, "%s: input vector field size doesn't"
  1371. X              " match %d * x=%d * y=%d * z=%d\n",
  1372. X              myname, (size_z == 1 ? 2 : 3),
  1373. X              size_x, size_y, size_z);
  1374. X    exit(EXIT_FAILURE);
  1375. X    /*NOTREACHED*/
  1376. X    }
  1377. X    in_vec_addr = malloc(in_vec_size);
  1378. X    if (in_vec_addr == NULL)
  1379. X    {
  1380. X    (void)fprintf(stderr, "%s: unable to allocate %u bytes for"
  1381. X              " input vector field\n", myname, in_vec_size);
  1382. X    exit(EXIT_FAILURE);
  1383. X    /*NOTREACHED*/
  1384. X    }
  1385. X    if (read(fd, in_vec_addr, in_vec_size) != in_vec_size)
  1386. X    {
  1387. X    (void)fprintf(stderr, "%s: unable to read %u bytes from %s\n",
  1388. X              myname, in_vec_size, in_vec);
  1389. X    exit(EXIT_FAILURE);
  1390. X    /*NOTREACHED*/
  1391. X    }
  1392. X    (void)close(fd);
  1393. X
  1394. X    /*
  1395. X     * Open output file and allocate space for output image (both in
  1396. X     * memory and on disk).
  1397. X     */
  1398. X    out_img_fd = open(out_img, O_CREAT|O_WRONLY|O_EXCL, 0666);
  1399. X    if (out_img_fd < 0)
  1400. X    {
  1401. X    (void)fprintf(stderr, "%s: unable to open %s: %s\n",
  1402. X              myname, out_img, strerror(errno));
  1403. X    exit(EXIT_FAILURE);
  1404. X    /*NOTREACHED*/
  1405. X    }
  1406. X    out_img_size = size_x * size_y * size_z * LIC_ConfiguredPixelSize();
  1407. X    out_img_addr = malloc(out_img_size);
  1408. X    if (out_img_addr == NULL)
  1409. X    {
  1410. X    (void)fprintf(stderr, "%s: unable to allocate %u bytes for"
  1411. X              " output image\n", myname, out_img_size);
  1412. X    exit(EXIT_FAILURE);
  1413. X    /*NOTREACHED*/
  1414. X    }
  1415. X    if (write(out_img_fd, out_img_addr, out_img_size) != out_img_size)
  1416. X    {
  1417. X    (void)fprintf(stderr, "%s: unable to extend %s to %u bytes\n",
  1418. X              myname, out_img, out_img_size);
  1419. X    exit(EXIT_FAILURE);
  1420. X    /*NOTREACHED*/
  1421. X    }
  1422. X    (void)lseek(out_img_fd, (off_t)0, SEEK_SET);
  1423. X}
  1424. X
  1425. X
  1426. Xstatic void
  1427. XUnloadFiles(void)
  1428. X    /*
  1429. X     * Free malloc'ed space used by input files, write output image and
  1430. X     * free up it's malloc'ed memory.
  1431. X     */
  1432. X{
  1433. X    if (write(out_img_fd, out_img_addr, out_img_size) != out_img_size)
  1434. X    (void)fprintf(stderr, "%s: unable to write %u bytes to %s!\n",
  1435. X              myname, out_img_size, out_img);
  1436. X    close(out_img_fd);
  1437. X    free(in_img_addr);
  1438. X    free(in_vec_addr);
  1439. X    free(out_img_addr);
  1440. X}
  1441. X
  1442. X#endif /* HAS_MMAP */
  1443. X
  1444. X
  1445. Xstatic void
  1446. XLicFiles()
  1447. X    /*
  1448. X     * Execute LIC algorithm on arguments.
  1449. X     */
  1450. X{
  1451. X    LIC *lic;
  1452. X
  1453. X    lic = LIC_Create((unsigned char *)in_img_addr, size_i, size_j, size_k,
  1454. X             (float *)        in_vec_addr, size_x, size_y, size_z,
  1455. X             (unsigned char *)out_img_addr,
  1456. X             filter, normalization, normalized,
  1457. X             filter_length,
  1458. X             filter_frequency,
  1459. X             vary_length,
  1460. X             vary_speed && (filter == LIC_Ripple),
  1461. X             default_red, default_green, default_blue, default_alpha,
  1462. X             verbose ? PrintLicStatus : (void (*)(double))NULL,
  1463. X             PrintLicError);
  1464. X    if (lic == (LIC *)NULL)
  1465. X    {
  1466. X    (void)fprintf(stderr, "%s: LIC_Create returned NULL!\n", myname);
  1467. X    return;
  1468. X    }
  1469. X    LIC_ChangePhase(lic, filter_phase);
  1470. X
  1471. X    /*
  1472. X     * Build integral tables here so the build isn't computed as part of
  1473. X     * time to compute the image.
  1474. X     */
  1475. X    LIC_BuildIntegralTables(lic);
  1476. X
  1477. X    t0 = time(NULL);
  1478. X    t0_clk = times(&t0_tms);
  1479. X    LIC_ComputeImage(lic);
  1480. X    tN_clk = times(&tN_tms);
  1481. X
  1482. X    LIC_Destroy(lic);
  1483. X
  1484. X    if (verbose)
  1485. X    {
  1486. X    long   clk_tck = sysconf(_SC_CLK_TCK);
  1487. X#if defined(HAS_OLD_TIMES)
  1488. X        double wall   = (double)(time(NULL)       - t0);
  1489. X#else
  1490. X    double wall   = (double)(tN_clk           - t0_clk          )/clk_tck;
  1491. X#endif
  1492. X    double cpu    = (double)(tN_tms.tms_utime - t0_tms.tms_utime)/clk_tck;
  1493. X    double ncells = (double)(size_x * size_y * size_z);
  1494. X
  1495. X    if (wall == 0.0)
  1496. X        wall = 1.0e-6;
  1497. X    if (cpu == 0.0)
  1498. X        cpu  = 1.0e-6;
  1499. X    (void)printf("\n"
  1500. X             "Performance statistics\n"
  1501. X             "--------------------------------\n"
  1502. X             "CPU utilization             = %d%%\n"
  1503. X             "CPU time (seconds)          = %.2f\n"
  1504. X             "Cells processed per second  = %.2f\n"
  1505. X             "Ave loop count              = %.2f\n"
  1506. X             "Ave length                  = %.2f\n",
  1507. X             (int)(cpu/wall*100),
  1508. X             cpu,
  1509. X             ncells/cpu,
  1510. X             lic->TotalLoopCount/ncells/2,
  1511. X             lic->TotalLength/ncells/2);
  1512. X    }
  1513. X}
  1514. X
  1515. X
  1516. Xstatic void
  1517. XPrintLicStatus(double PercentDone)
  1518. X    /*
  1519. X     * Output the current LIC progress statistics.  (Only called if verbose
  1520. X     * is TRUE.)
  1521. X     */
  1522. X{
  1523. X    if (PercentDone == 0.0)
  1524. X    (void)printf("%s: %6.2f%% done ...\r", myname, PercentDone);
  1525. X    else
  1526. X    {
  1527. X    /*
  1528. X     * Should really use a smoothed exponentially decaying sample series
  1529. X     * of CPU utilization to predict future CPU utilization to get better
  1530. X     * estimates of completion times.  But, I mean, get real.  This is
  1531. X     * really just a convenience! :-)  So, we cheat and just use CPU
  1532. X     * utilization since the start of the computation to predict future
  1533. X     * CPU ultilization.
  1534. X     */
  1535. X    time_t t  = time(NULL);
  1536. X    time_t tN = t0 + (unsigned int)((double)(t-t0) * 100/PercentDone);
  1537. X    char      *cp = ctime(&tN);
  1538. X    char       cbuf[26];
  1539. X
  1540. X    (void)strcpy(cbuf, cp);
  1541. X    cbuf[24] = '\0';
  1542. X    (void)printf("%s: %6.2f%% done, estimated completion: %s\r",
  1543. X             myname, PercentDone, cbuf);
  1544. X    }
  1545. X    fflush(stdout);
  1546. X}
  1547. X
  1548. X
  1549. Xstatic void
  1550. XPrintLicError(const char *message)
  1551. X    /*
  1552. X     * Print an error reported by the LIC subroutine library.
  1553. X     */
  1554. X{
  1555. X    (void)fprintf(stderr, "%s: LIC library error: %s\n", myname);
  1556. X}
  1557. END_OF_FILE
  1558.   if test 22645 -ne `wc -c <'lic.1.2/lic/lic.c'`; then
  1559.     echo shar: \"'lic.1.2/lic/lic.c'\" unpacked with wrong size!
  1560.   fi
  1561.   # end of 'lic.1.2/lic/lic.c'
  1562. fi
  1563. echo shar: End of archive 6 \(of 10\).
  1564. cp /dev/null ark6isdone
  1565. MISSING=""
  1566. for I in 1 2 3 4 5 6 7 8 9 10 ; do
  1567.     if test ! -f ark${I}isdone ; then
  1568.     MISSING="${MISSING} ${I}"
  1569.     fi
  1570. done
  1571. if test "${MISSING}" = "" ; then
  1572.     echo You have unpacked all 10 archives.
  1573.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1574. else
  1575.     echo You still must unpack the following archives:
  1576.     echo "        " ${MISSING}
  1577. fi
  1578. exit 0
  1579. exit 0 # Just in case...
  1580.