www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - convert javah headers to D

reply Nicholas Jordan <asdf some.com> writes:
I am converting a c source to D - I had it run a few times under C
compile but there were too many issues. Decided to transition to 'D'
for the reasons discussed ...

I got this far, compiler is stating I should:
     "semicolon expected, not 'TWAIN_AcquireNative'"

    /*
     * Class:     ocr_zarf
     * Method:    zarf_AcquireNative
     * Signature: ()I
     */
    export extern (Windows) synchronized long
    Java_ocr_zarf_zarf_1AcquireNative
    (JNIEnv * JEnvironmentPointer, jobject jayObject)

So JNI has a way of doing things that does not translate directly in
my mind, should I just make JNIEnv a class - and put ....

There's some 1,700 calls or lines of code or something in the JNI
headers. Seems to me to be an excellent time for me to ask for
intervention > this what D is all about.

I need to get a dll working that will interface to EZTwain, that is
called from Java. ( Note the attachment is first draft - I started on
D yesterday so spare me some critical review )
begin 644 zarfOCR.d

M=F%R:6%N="![;&]N9R!F86EL7U\]("TQ,C,T-38[?0T*:6YV87)I86YT('MR










M+R!S:7IE7W0 :7, =&\ 8F4 ;&]O<"!I;F1E>"`M(`T*:6YV87)I86YT('MP


M,3!C-CDU-#AE.6%F9F-D86$V9#DU8S

M864T-3-D96%F8S X,6(U,30R-#ED8C
M3D-%("` 9U]H26YS=#L-" T*97AP;W)T(&5X=&5R;B`H5VEN9&]W<RD-"B` 

M85]O8W)?>F%R9E]I;FET241S*$I.245N=B`J+"!J8VQA<W,I.PT*("` ("` 
M("!E>'!O<G0 97AT97)N("A7:6YD;W=S*2!L;VYG($IA=F%?;V-R7WIA<F9?
M>F%R9E\Q27-!=F%I;&%B;&4H2DY)16YV("HL(&IO8FIE8W0I.PT*("` ("` 
M("!E>'!O<G0 97AT97)N("A7:6YD;W=S*2!L;VYG($IA=F%?;V-R7WIA<F9?

M("` (&5X<&]R="!E>'1E<FX *%=I;F1O=W,I(&QO;F< 2F%V85]O8W)?>F%R

M<&]R="!E>'1E<FX *%=I;F1O=W,I(&QO;F< 2F%V85]O8W)?>F%R9E]Z87)F

M="!E>'1E<FX *%=I;F1O=W,I(&QO;F< 2F%V85]O8W)?>F%R9E]Z87)F7S%$

M>'1E<FX *%=I;F1O=W,I(&QO;F< 2F%V85]O8W)?>F%R9E]Z87)F7S%$:6)(
M96EG:'0H2DY)16YV("HL(&IO8FIE8W0I.PT*("` ("` ("!E>'!O<G0 97AT
M97)N("A7:6YD;W=S*2!L;VYG($IA=F%?;V-R7WIA<F9?>F%R9E\Q1&EB3G5M
M0V]L;W)S*$I.245N=B`J+"!J;V)J96-T*3L-"B` ("` ("` 97AP;W)T(&5X
M=&5R;B`H5VEN9&]W<RD ;&]N9R!*879A7V]C<E]Z87)F7WIA<F9?,5)O=T)Y
M=&5S*$I.245N=B`J+"!J;V)J96-T*3L-"B` ("` ("` 97AP;W)T(&5X=&5R
M;B`H5VEN9&]W<RD ;&]N9R!*879A7V]C<E]Z87)F7WIA<F9?,49R965.871I
M=F4H2DY)16YV("HL(&IO8FIE8W0I.PT*("` ("` ("!E>'!O<G0 97AT97)N
M("A7:6YD;W=S*2!L;VYG($IA=F%?;V-R7WIA<F9?>F%R9E\Q3&]A9%-O=7)C
M94UA;F%G97(H2DY)16YV("HL(&IO8FIE8W0I.PT*("` ("` ("!E>'!O<G0 
M97AT97)N("A7:6YD;W=S*2!L;VYG($IA=F%?;V-R7WIA<F9?>F%R9E\Q3W!E
M;E-O=7)C94UA;F%G97(H2DY)16YV("HL(&IO8FIE8W0I.PT*("` ("` ("!E
M>'!O<G0 97AT97)N("A7:6YD;W=S*2!L;VYG($IA=F%?;V-R7WIA<F9?>F%R
M9E\Q3W!E;D1E9F%U;'13;W5R8V4H2DY)16YV("HL(&IO8FIE8W0I.PT*("` 
M("` ("!E>'!O<G0 97AT97)N("A7:6YD;W=S*2!L;VYG($IA=F%?;V-R7WIA
M<F9?>F%R9E\Q16YA8FQE4V]U<F-E*$I.245N=B`J+"!J;V)J96-T*3L-"B` 
M("` ("` 97AP;W)T(&5X=&5R;B`H5VEN9&]W<RD ;&]N9R!*879A7V]C<E]Z
M87)F7WIA<F9?,41I<V%B;&53;W5R8V4H2DY)16YV("HL(&IO8FIE8W0I.PT*
M("` ("` ("!E>'!O<G0 97AT97)N("A7:6YD;W=S*2!L;VYG($IA=F%?;V-R
M7WIA<F9?>F%R9E\Q0VQO<V53;W5R8V4H2DY)16YV("HL(&IO8FIE8W0I.PT*
M("` ("` ("!E>'!O<G0 97AT97)N("A7:6YD;W=S*2!L;VYG($IA=F%?;V-R
M7WIA<F9?>F%R9E\Q0VQO<V53;W5R8V5-86YA9V5R*$I.245N=B`J+"!J;V)J
M96-T*3L-"B` ("` ("` 97AP;W)T(&5X=&5R;B`H5VEN9&]W<RD ;&]N9R!*
M879A7V]C<E]Z87)F7WIA<F9?,5\Q56YL;V%D4V]U<F-E36%N86=E<BA*3DE%

M("` ('L-"B` ("` ("` +R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O
M+R\O+R\O+PT*("` ("` ("!(04Y$3$4 15I405!)(%1704E.7T%C<75I<F5.
M871I=F4H2%=.1"!H=VYD07!P+"!U;G-I9VYE9"!W4&EX5'EP97,I.PT*("` 
M("` ("!V;VED($5:5$%022!45T%)3E]&<F5E3F%T:79E*$A!3D1,12!H9&EB

M<F0H2%=.1"!H=VYD07!P+"!U;G-I9VYE9"!W4&EX5'EP97,I.PT*("` ("` 
M("!I;G0 15I405!)(%1704E.7T%C<75I<F54;T9I;&5N86UE*$A73D0 :'=N




M="!%6E1!4$D 5%=!24Y?1&EB1&5P=& H2$%.1$Q%(&AD:6(I.PT*("` ("` 
M("!I;G0 15I405!)(%1704E.7T1I8E=I9'1H*$A!3D1,12!H9&EB*3L-"B` 
M("` ("` :6YT($5:5$%022!45T%)3E]$:6)(96EG:'0H2$%.1$Q%(&AD:6(I
M.PT*("` ("` ("!I;G0 15I405!)(%1704E.7T1I8DYU;4-O;&]R<RA(04Y$

M1$E"(&AD:6(I.PT*("` ("` ("!V;VED($5:5$%022!$24)?4F5A9%)O=RA(
M04Y$3$4 :&1I8BP :6YT(&Y2;W<L($)95$4J('!R;W<I.PT*("` ("` ("!(
M4$%,151412!%6E1!4$D 5%=!24Y?0W)E871E1&EB4&%L971T92A(04Y$3$4 



M+R\ 9&5S=&EN871I;VX *' L>2D-"B` ("` ("` ("` (&EN="!W+"!I;G0 

M:&1I8BP ("` +R\ 1$E"(&AA;F1L90T*("` ("` ("` ("` :6YT('-X+"!I
M;G0 <WD ("\O('-O=7)C92`H>"QY*2!I;B!$24(-"B` ("` ("` ("` ("D[


M="!%6E1!4$D 5%=!24Y?5W)I=&5.871I=F54;T9I;&4H2$%.1$Q%(&AD:6(L
M($A&24Q%(&9H*3L-"B` ("` ("` 2$%.1$Q%($5:5$%022!45T%)3E],;V%D
M3F%T:79E1G)O;49I;&5N86UE*$Q00U-44B!P<WI&:6QE*3L-"B` ("` ("` 
M2$%.1$Q%($5:5$%022!45T%)3E],;V%D3F%T:79E1G)O;49I;&4H2$9)3$4 
M9F I.PT*("` ("` ("!V;VED($5:5$%022!45T%)3E]3971(:61E54DH:6YT
M(&9(:61E*3L-"B` ("` ("` :6YT($5:5$%022!45T%)3E]'971(:61E54DH

M*`T*("` ("` ("!I;G0 ("!N36%J;W).=6TL("` ("`O+R!M86IO<B!A;F0 

M(&EN="` (&Y-:6YO<DYU;2P ("` ("\O(&4N9RX =F5R<VEO;B`T+C4Z(&Y-

M;F=U86=E+"` ("` +R\ *&AU;6%N*2!L86YG=6%G92`H=7-E(%173$=?>'AX
M(&9R;VT 5%=!24XN2"D-"B` ("` ("` :6YT("` ;D-O=6YT<GDL("` ("` 
M+R\ 8V]U;G1R>2`H=7-E(%170UE?>'AX(&9R;VT 5%=!24XN2"D-"B` ("` 
M("` 3%!35%( ;'!S>E9E<G-I;VXL("` +R\ =F5R<VEO;B!I;F9O('-T<FEN


M<F%Z8F%T(%-O9G1W87)E( T*("` ("` ("!,4%-44B!L<'-Z1F%M:6QY+"` 
M("`O+R!P<F]D=6-T(&9A;6EL>2!E+F<N(")":713=&]M<&5R( T*("` ("` 
M("!,4%-44B!L<'-Z4')O9'5C="` ("`O+R!S<&5C:69I8R!P<F]D=6-T(&4N
M9RX (D)I=%-T;VUP97( 1&5L=7AE(%!R;R(-"B` ("` ("` *3L ("`-"B` 
M("` ("` +R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\-"B` ("` ("` 


M*'9O:60I.PT*("` ("` ("!V;VED($5:5$%022!45T%)3E]%<G)O<D)O>"A,
M4$-35%( <'I-<V<I.PT*("` ("` ("!V;VED($5:5$%022!45T%)3E]297!O

M22!45T%)3E],;V%D4V]U<F-E36%N86=E<BAV;VED*3L-"B` ("` ("` :6YT
M($5:5$%022!45T%)3E]/<&5N4V]U<F-E36%N86=E<BA(5TY$(&AW;F0I.PT*
M("` ("` ("!I;G0 15I405!)(%1704E.7T]P96Y$969A=6QT4V]U<F-E*'9O
M:60I.PT*("` ("` ("!I;G0 15I405!)(%1704E.7T5N86)L95-O=7)C92A(
M5TY$(&AW;F0I.PT*("` ("` ("!I;G0 15I405!)(%1704E.7T1I<V%B;&53



M5%=!24Y?56YL;V%D4V]U<F-E36%N86=E<BAV;VED*3L-"B` ('T-"B` ("`O

M=" I.PT*("` ("` ("!V;VED(&=C7W1E<FTH*3L-"B` ("` ("` =F]I9"!?
M;6EN:70H*3L-"B` ("` ("` =F]I9"!?;6]D=6QE0W1O<B I.PT*("` ("` 

M("!E>'1E<FX *%=I;F1O=W,I($)/3TP 1&QL36%I;BA(24Y35$%.0T4 :$EN





M3T-%4U-?1$5404-(. T*("` ("` ("` ("` ("` ('!R:6YT9B B1$Q,7U!2
M3T-%4U-?1$5404-(7&XB*3L-"B` ("` ("` ("` ("` ("`O+R!S=&0N8RYS
M=&1I;RY?9F-L;W-E86QL<"`](&YU;&P[("\O('-O('-T9&EO(&1O97-N)W0 

M("` ("!C87-E($1,3%]42%)%041?051404-(. T*("` ("` ("` ("` ("` 
M('!R:6YT9B B1$Q,7U1(4D5!1%]!5%1!0TA<;B(I.PT*("` ("` ("` ("` 
M("` (')E='5R;B!F86QS93L-" T*("` ("` ("` ("` 8V%S92!$3$Q?5$A2

M041?1$5404-(7&XB*3L-"B` ("` ("` ("` ("` ("!R971U<FX 9F%L<V4[

M("` ("` +R\-"B` ("` ("` <V-O<&4H<W5C8V5S<RD >R!R971U<FX =')U
M93L ?0T*("` ("` ("!S8V]P92AF86EL=7)E*2![(')E='5R;B!F86QS93L 
M?0T*("` ('T-"B` ("`O+PT*("` (&5X<&]R="!V;VED($UY1$Q,7TEN:71I





M("` ('!R:6YT9B B37E$3$Q?5&5R;6EN871E*"E<;B(I.PT*("` ("` ("!?
M;6]D=6QE1'1O<B I.R` ("` ("` ("` ("` ("` ("` ("`O+R!R=6X ;6]D


M(#L-

M>F%R9 T*("` ("`J($UE=&AO9#H
M("` ("H 4VEG;F%T=7)E.B`H*4D-"B` ("` *B\-"B` ("!E>'!O<G0 97AT
M97)N("A7:6YD;W=S*2!S>6YC:')O;FEZ960 ;&]N9R!*879A7V]C<E]Z87)F
M7WIA<F9?,4%C<75I<F5.871I=F4 *$I.245N=B`J($I%;G9I<F]N;65N=%!O

M("` ("`O+R` ;&]N9R` 9F%I;%]?/2`H+3$R,S0U-BD[("T 8V]M;65N=&5D

M("` ("` ("` (&QO;F< ('!R;W1O='EP:6YG(#T




M, T*("` ("` ("` ("` ("` (&EF*'1W86EN3F%T:792968 (3T *"!(04Y$


M97(V-#T
M("` ("` ("` ("` ("` ("` ("!I9B  8G5F9F5R-C0 (3T *&QO;F< *BDP


M:71-87!(86YD;&4]*$A'3$]"04PI1VQO8F%L3&]C:RAT=V%I;DYA=&EV4F5F
M*3L-"B` ("` ("` ("` ("` ("` ("` ("` (&EF*&)I=$UA<$AA;F1L92$]




M92P =&AE('-I>F4 ;V8 =&AE(&-O;&]R('1A8FQE('-H;W5L9"!B92`R-38J
M-"!B>71E<RP-"B` ("` ("` ("` ("` ("` ("` ("` ("` ("`J("!S;R!)
M('-U<W!E8W0 *&EM86=E7VAE:6=H="HH:6UA9V5?=VED=& K*&EM86=E7W=I
M9'1H("4 <VEZ96]F*&EN="DI*2D :7, 9V]I;F< =&\-"B` ("` ("` ("` 
M("` ("` ("` ("` ("` ("`J("!T:')O=R!T:&4 86QI9VYM96YT(&]F('EO
M=7( :6UA9V4 ;V9F+"!O<B!L96%V92!G87)B86=E(&EN('1H92!B;W1T;VT 

M("` ("` ("` ("` ("` ("` ("` 4$))5$U!4$E.1D](14%$15( <$)I=&UA
M<$EN9F]0;VEN=&5R/2A00DE434%024Y&3TA%041%4BEB:71-87!(86YD;&4[

M9&5R7W-I>F4 ("` ("`]*"` <VEG;F5D(&EN="DH*G!":71M87!);F9O4&]I
M;G1E<BDN8FE3:7IE.R\O*S`-"B` ("` ("` ("` ("` ("` ("` ("` ("` 
M("!S:6=N960 :6YT("!I;6%G95]W:61T:"` ("` (#TH("!S:6=N960 :6YT
M*2 J<$)I=&UA<$EN9F]0;VEN=&5R*2YB:5=I9'1H.R\O*S$-"B` ("` ("` 
M("` ("` ("` ("` ("` ("` ("!S:6=N960 :6YT("!I;6%G95]H96EG:'0 
M("` (#TH("!S:6=N960 :6YT*2 J<$)I=&UA<$EN9F]0;VEN=&5R*2YB:4AE
M:6=H=#LO
M(&EN="` :6UA9V5?<&QA;F5S("` ("`]*"` <VEG;F5D(&EN="DH*G!":71M
M87!);F9O4&]I;G1E<BDN8FE0;&%N97,[+R\K,PT*("` ("` ("` ("` ("` 
M("` ("` ("` ("` ('-I9VYE9"!I;G0 (&EM86=E7V)I=%]C;W5N="` /2  
M('-I9VYE9"!I;G0I*"IP0FET;6%P26YF;U!O:6YT97(I+F)I0FET0V]U;G0[
M+R\K-`T*("` ("` ("` ("` ("` ("` ("` ("` ("` ('-I9VYE9"!I;G0 
M(&EM86=E7V-O;7!R97-S:6]N/2  ('-I9VYE9"!I;G0I*"IP0FET;6%P26YF
M;U!O:6YT97(I+F)I0V]M<')E<W-I;VX[+R\K-0T*("` ("` ("` ("` ("` 
M("` ("` ("` ("` ('-I9VYE9"!I;G0 (&EM86=E7W-I>F4 ("` ("` /2  
M('-I9VYE9"!I;G0I*"IP0FET;6%P26YF;U!O:6YT97(I+F)I4VEZ94EM86=E
M.R\O*S8-"B` ("` ("` ("` ("` ("` ("` ("` ("` ("!S:6=N960 :6YT
M("!096QS7U!E<E]-971E<E]8(#TH("!S:6=N960 :6YT*2 J<$)I=&UA<$EN
M9F]0;VEN=&5R*2YB:5A096QS4&5R365T97([+R\K-PT*("` ("` ("` ("` 
M("` ("` ("` ("` ("` ('-I9VYE9"!I;G0 (%!E;'-?4&5R7TUE=&5R7UD 
M/2  ('-I9VYE9"!I;G0I*"IP0FET;6%P26YF;U!O:6YT97(I+F)I65!E;'-0

M;F5D(&EN="` 0V]L;W)?57-E9"` ("` ("`]*"` <VEG;F5D(&EN="DH*G!"


M(#TH("!S:6=N960 :6YT*2 J<$)I=&UA<$EN9F]0;VEN=&5R*2YB:4-L<DEM
M<&]R=&%N=#LO+RLQ,`T*("` ("` ("` ("` ("` ("` ("` ("` ("` ("\O
M("T :68 =V4 9V5T('1H:7, 9F%R+"!I="!I<R!P<F]B86)L>2!P<F]D=6-T
M:79E('1O('1R>2!F;W( 9V5T=&EN9R!T:&4 :6UA9V4 9&%T82!P87-S960-
M"B` ("` ("` ("` ("` ("` ("` ("` ("` ("`O+R` ('1O($IA=F$ 4V]U
M<F-E($-O9&4 =&AR;W5G:"!*879A($EN=F]C871I;VX 05!)("T ($I$2R`Q
M+C$N, T*("` ("` ("` ("` ("` ("` ("` ("` ("` ("\O('!O:6YT97)4
M;T1A=&%":71S/2A,4$)95$4I1FEN9$)I=',H<$)I=&UA<$EN9F]0;VEN=&5R

M("` ("` ("` ("` ("` ("` ("` ("` ("` +R\ ;6EN;W( :&%C:R!T;R!W

M("` ("` ("` ("` ("` ("` ("` +R\ 8G5I;'0 9F]R('!E;W!L92!W:71H
M(&-O;7!U=&5R('-C:65N8V4 9&5G<F5E<RX-"B` ("` ("` ("` ("` ("` 
M("` ("` ("` ("`O+R!S<&EK92P =&AE(&5X=&5R;F%L<R!F;W( 0FUI4F]W
M0GET97, 86YD($9I;F1":71S('=O=6QD(&YO="!L:6YK+ T*("` ("` ("` 
M("` ("` ("` ("` ("` ("` (&QO;F< (&)A<V5?;V9?:&5A9&5R/2AL;VYG
M*7!":71M87!);F9O4&]I;G1E<CL-"B` ("` ("` ("` ("` ("` ("` ("` 


M('-H;W5L9"!B92!T:&4 <W1A<G0 ;V8 =&AE(&EM86=E('-O(&YO=R!L971S
M(&=E="!A;B!I;6%G92!S:7IE+ T*("` ("` ("` ("` ("` ("` ("` ("` 
M("` (&EN="` 24U!1T5?4TE:13TH*&EM86=E7V)I=%]C;W5N="`J(&EM86=E

M("` ("` ("` ("\O('1H:7, ;FES(&)U;&P =VAI;&4 22!G<F%S<"!W:&%T
M(&ES(&=O:6YG(&]N('=I=&  9&EB(&]P<RP-"B` ("` ("` ("` ("` ("` 
M("` ("` ("` ("`O+R!M=6-H('1H86YK<R!T;R!S<&EK92`H('EE82$ *2`Z

M2$5!1$52+DAE861E<E-I>F4]:&5A9&5R7W-I>F4[+R\K,`T*("` ("` ("` 
M("` ("` ("` ("` ("` ("` ($MA;'ET=&%?0DE434%07TA%041%4BY7:61T
M:#UI;6%G95]W:61T:#LO
M("` 2V%L>71T85]"251-05!?2$5!1$52+DAE:6=H=#UI;6%G95]H96EG:'0[
M+R\K, T*("` ("` ("` ("` ("` ("` ("` ("` ("` ($MA;'ET=&%?0DE4
M34%07TA%041%4BY0;&%N97,]:6UA9V5?<&QA;F5S.R\O*S,-"B` ("` ("` 
M("` ("` ("` ("` ("` ("` ("!+86QY='1A7T))5$U!4%](14%$15(N0FET
M0V]U;G0]:6UA9V5?8FET7V-O=6YT.R\O*S0-"B` ("` ("` ("` ("` ("` 
M("` ("` ("` ("!+86QY='1A7T))5$U!4%](14%$15(N0V]M<')E<W-I;VX]
M:6UA9V5?8V]M<')E<W-I;VX[+R\K-0T*("` ("` ("` ("` ("` ("` ("` 
M("` ("` ($MA;'ET=&%?0DE434%07TA%041%4BY3:7IE26UA9V4]24U!1T5?

M85]"251-05!?2$5!1$52+E!E;'-097)-971E<E ]4&5L<U]097)?365T97)?
M6#LO
M251-05!?2$5!1$52+E!E;'-097)-971E<ED]4&5L<U]097)?365T97)?63LO

M05!?2$5!1$52+D-L<E5S960]0V]L;W)?57-E9#LO
M("` ("` ("` ("` ("` ("` 2V%L>71T85]"251-05!?2$5!1$52+D-L<DEM
M<&]R=&%N=#U
M("` ("` ("` ("` ("!+86QY='1A7T))5$U!4%](14%$15(N4F5D36%S:STP




M("` ("` ("` ("` ("` ("` ("!+86QY='1A7T))5$U!4%](14%$15(N06QP



M<VMI<'!E9`T*("` ("` ("` ("` ("` ("` ("` ("` ("` ($MA;'ET=&%?
M0DE434%07TA%041%4BY'86UM85)E9#TP
M("` ("` ("` ("` ("` ("` ("` ("` 2V%L>71T85]"251-05!?2$5!1$52

M("` ("` ("` ("` ($MA;'ET=&%?0DE434%07TA%041%4BY'86UM84)L=64]

M("\O(&)E9VEN(&EM86=E(&]P<PT*("` ("` ("` ("` ("` ("` ("` ("` 
M("` (&QO;F< ('-T871U<U\P/6%V86EL86)I;&ET>3L-"B` ("` ("` ("` 
M("` ("` ("` ("` ("` ("!L;VYG("!S=&%T=7-?,3UI;6%G95]W:61T:#L-
M"B` ("` ("` ("` ("` ("` ("` ("` ("` ("!L;VYG("!S=&%T=7-?,CUI

M9R` <W1A='5S7S,]:6UA9V5?<&QA;F5S.PT*("` ("` ("` ("` ("` ("` 
M("` ("` ("` (&QO;F< ('-T871U<U\T/6EM86=E7V)I=%]C;W5N=#L-"B` 
M("` ("` ("` ("` ("` ("` ("` ("` ("!L;VYG("!S=&%T=7-?-3UI;6%G
M95]C;VUP<F5S<VEO;CL-"B` ("` ("` ("` ("` ("` ("` ("` ("` ("`O
M+R!R92UC86QC)V5D(&EM86=E('-I>F4 <&5R(')E;6%R:W, 8GD <W!I:V4L

M;VYG("!S=&%T=7-?-CU)34%'15]325I%.PT*("` ("` ("` ("` ("` ("` 

M("` ("` ("` ("` ("` ("` ("` ("` ("` ;&]N9R` <W1A='5S7S ]4&5L
M<U]097)?365T97)?63L-"B` ("` ("` ("` ("` ("` ("` ("` ("` ("`O
M+R!T:&ES(&ES(&$ 9&%T82!T<F%N<V9E<B!B=69F97( =&AA="!)('5N9&5R

M;W5L9"!N;W0 9V5T('!A<W0 <&]I;G1E<B!I<W-U97, =VAE;B!)('=R;W1E

M86X 8F4 =7-E9"!O;B!T:&4 2F%V82!S:61E('1O(&9O<B!R961U;F1A;G0 

M,%T /6AE861E<E]S:7IE.R\O*S$-"B` ("` ("` ("` ("` ("` ("` ("` 
M("` ("!B=69F97(V-%LQ72`]:6UA9V5?=VED=& [+R\K, T*("` ("` ("` 
M("` ("` ("` ("` ("` ("` (&)U9F9E<C8T6S)=(#UI;6%G95]H96EG:'0[
M+R\K,PT*("` ("` ("` ("` ("` ("` ("` ("` ("` (&)U9F9E<C8T6S-=
M(#UI;6%G95]P;&%N97,[+R\K-`T*("` ("` ("` ("` ("` ("` ("` ("` 
M("` (&)U9F9E<C8T6S1=(#UI;6%G95]B:71?8V]U;G0[+R\K-0T*("` ("` 
M("` ("` ("` ("` ("` ("` ("` (&)U9F9E<C8T6S5=(#UI;6%G95]C;VUP

M9F5R-C1;-ET /4E-04=%7U-)6D4[+R\K-PT*("` ("` ("` ("` ("` ("` 
M("` ("` ("` (&)U9F9E<C8T6S==(#U096QS7U!E<E]-971E<E]8.R\O*S -
M"B` ("` ("` ("` ("` ("` ("` ("` ("` ("!B=69F97(V-%LX72`]4&5L

M("` 8G5F9F5R-C1;.5T /4-O;&]R7U5S960[+R\K,3`-"B` ("` ("` ("` 
M("` ("` ("` ("` ("` ("!B=69F97(V-%LQ,%T]0V]L;W)?26UP;W)T86YT

M,3%=/2AI;G0I8G5F9F5R-C0[+R\-"B` ("` ("` ("` ("` ("` ("` ("` 























M,#LO+PT*("` ("` ("` ("` ("` ("` ("` ("` ("` (&)U9F9E<C8T6S,Q









M+R\-"B` ("` ("` ("` ("` ("` ("` ("` ("` ("!B=69F97(V-%LS.5T]




M+PT*("` ("` ("` ("` ("` ("` ("` ("` ("` (&)U9F9E<C8T6S4R73TP









M"B` ("` ("` ("` ("` ("` ("` ("` ("` ("!B=69F97(V-%LV,5T],' P



M("` ("` ("` ("` ("` ("`O+SI*879A(%1Y<&4Z3F%T:79E(%1Y<&4Z1&5S


M("` ("` ("` ("` ("` +R\Z8GET93IJ8GET93IS:6=N960 ."!B:71S. T*
M("` ("` ("` ("` ("` ("` ("` ("` ("` ("\O.F-H87(Z:F-H87(Z=6YS
M:6=N960 ,38 8FET<SH-"B` ("` ("` ("` ("` ("` ("` ("` ("` ("`O
M+SIS:&]R=#IJ

M("` ("` ("` ("` ("` ("` ("` ("` ("`O+SIL;VYG.FIL;VYG.G-I9VYE


M("` +R\Z9&]U8FQE.FID;W5B;&4Z-C0 8FET<PT*("` ("` ("` ("` ("` 

M*B!4:&ES('-H;W5L9"!B96=I;B!A8W1U86QL>2!C;VYS=')U8W1I;B!T:&4 

M("` ("` ("` ("` ("` ("` ("` ("` ("H 268 86YY=&AI;F< 8G)E86MS
M(&%F=&5R('1H:7,L(&ET(&UA>2!P<F]P;V=A=&4 :6X-"B` ("` ("` ("` 
M("` ("` ("` ("` ("` ("`J('5N:VYO=VX =V%Y<RX-"B` ("` ("` ("` 

M("` *B!7;W5L9"!B92!B971T97( :68 2F%V82=S(")&86EL($9A<W0B(&5N

M("` *B!C;W5L9"!B92!I;7!L96UE;G1E9"!H97)E+"!A;&P =&AE(&-H96-K
M<R!Y;W4 8V%N(&1O('-H;W5L9`T*("` ("` ("` ("` ("` ("` ("` ("` 
M("` ("H 8F4 :6UP;&5M96YT960 =VAE<F4 =&AI<R!C;VUM96YT(&ES+ T*

M("` ("` ("` ("` ("` :F-L87-S(&QO8V%L4F5F>F%R9D-L87-S/2 J2D5N
M=FER;VYM96YT4&]I;G1E<BDM/D=E=$]B:F5C=$-L87-S*$I%;G9I<F]N;65N

M("` ("` :F9I96QD240 ;&]C86Q2969Z87)F365M8F5R5F%R7S` /2 J2D5N
M=FER;VYM96YT4&]I;G1E<BDM/D=E=%-T871I8T9I96QD240H2D5N=FER;VYM

M22(I.R\O<')I=F%T92!S=&%T:6, =F]L871I;&4 :6YT(&%V86EL86)I;&ET
M>3TH+3!X9F9F9BD[+R]L;V-A;%)E9GIA<F9-96UB97)687)?,`T*("` ("` 
M("` ("` ("` ("` ("` ("` ("` (&IF:65L9$E$(&QO8V%L4F5F>F%R9DUE
M;6)E<E9A<E\Q(#TH*DI%;G9I<F]N;65N=%!O:6YT97(I+3Y'9713=&%T:6-&
M:65L9$E$*$I%;G9I<F]N;65N=%!O:6YT97(L;&]C86Q2969Z87)F0VQA<W,L
M(FEM86=E7W=I9'1H(BPB22(I.R\O<')I=F%T92!S=&%T:6, =F]L871I;&4 
M:6YT(&EM86=E7W=I9'1H/2 M,'AF9F9F*3LO+VQO8V%L4F5F>F%R9DUE;6)E

M;&]C86Q2969Z87)F365M8F5R5F%R7S( /2 J2D5N=FER;VYM96YT4&]I;G1E
M<BDM/D=E=%-T871I8T9I96QD240H2D5N=FER;VYM96YT4&]I;G1E<BQL;V-A

M<W1A=&EC('9O;&%T:6QE(&EN="!I;6%G95]H96EG:'0]*"TP>&9F9F8I.R\O
M;&]C86Q2969Z87)F365M8F5R5F%R7S(-"B` ("` ("` ("` ("` ("` ("` 
M("` ("` ("!J9FEE;&1)1"!L;V-A;%)E9GIA<F9-96UB97)687)?,R`]*"I*
M16YV:7)O;FUE;G10;VEN=&5R*2T^1V5T4W1A=&EC1FEE;&1)1"A*16YV:7)O
M;FUE;G10;VEN=&5R+&QO8V%L4F5F>F%R9D-L87-S+")I;6%G95]P;&%N97,B
M+"))(BD[+R]P<FEV871E('-T871I8R!V;VQA=&EL92!I;G0 :6UA9V5?<&QA

M("` ("` ("` ("` ("` ("` ("` ("` :F9I96QD240 ;&]C86Q2969Z87)F
M365M8F5R5F%R7S0 /2 J2D5N=FER;VYM96YT4&]I;G1E<BDM/D=E=%-T871I

M<RPB:6UA9V5?8FET7V-O=6YT(B`L(DDB*3LO+W!R:79A=&4 <W1A=&EC('9O
M;&%T:6QE(&EN="!I;6%G95]B:71?8V]U;G0]*"TP>&9F9F8I.R\O;&]C86Q2
M969Z87)F365M8F5R5F%R7S0-"B` ("` ("` ("` ("` ("` ("` ("` ("` 
M("!J9FEE;&1)1"!L;V-A;%)E9GIA<F9-96UB97)687)?-2`]*"I*16YV:7)O
M;FUE;G10;VEN=&5R*2T^1V5T4W1A=&EC1FEE;&1)1"A*16YV:7)O;FUE;G10
M;VEN=&5R+&QO8V%L4F5F>F%R9D-L87-S+")I;6%G95]C;VUP<F5S<VEO;B(L
M(DDB*3LO+W!R:79A=&4 <W1A=&EC('9O;&%T:6QE(&EN="!I;6%G95]C;VUP
M<F5S<VEO;CTH+3!X9F9F9BD[+R]L;V-A;%)E9GIA<F9-96UB97)687)?-0T*
M("` ("` ("` ("` ("` ("` ("` ("` ("` (&IF:65L9$E$(&QO8V%L4F5F
M>F%R9DUE;6)E<E9A<E\V(#TH*DI%;G9I<F]N;65N=%!O:6YT97(I+3Y'9713
M=&%T:6-&:65L9$E$*$I%;G9I<F]N;65N=%!O:6YT97(L;&]C86Q2969Z87)F
M0VQA<W,L(FEM86=E7W-I>F4B("PB22(I.R\O<')I=F%T92!S=&%T:6, =F]L
M871I;&4 :6YT(&EM86=E7W-I>F4]*"TP>&9F9F8I.R\O;&]C86Q2969Z87)F
M365M8F5R5F%R7S8-"B` ("` ("` ("` ("` ("` ("` ("` ("` ("!J9FEE
M;&1)1"!L;V-A;%)E9GIA<F9-96UB97)687)?-R`]*"I*16YV:7)O;FUE;G10
M;VEN=&5R*2T^1V5T4W1A=&EC1FEE;&1)1"A*16YV:7)O;FUE;G10;VEN=&5R
M+&QO8V%L4F5F>F%R9D-L87-S+")096QS7U!E<E]-971E<E]8(BPB22(I.R\O
M<')I=F%T92!S=&%T:6, =F]L871I;&4 :6YT(%!E;'-?4&5R7TUE=&5R7U ]
M*"TP>&9F9F8I.R\O;&]C86Q2969Z87)F365M8F5R5F%R7S<-"B` ("` ("` 
M("` ("` ("` ("` ("` ("` ("!J9FEE;&1)1"!L;V-A;%)E9GIA<F9-96UB
M97)687)?."`]*"I*16YV:7)O;FUE;G10;VEN=&5R*2T^1V5T4W1A=&EC1FEE
M;&1)1"A*16YV:7)O;FUE;G10;VEN=&5R+&QO8V%L4F5F>F%R9D-L87-S+")0
M96QS7U!E<E]-971E<E]9(B`L(DDB*3LO+W!R:79A=&4 <W1A=&EC('9O;&%T
M:6QE(&EN="!096QS7U!E<E]-971E<E]9/2 M,'AF9F9F*3LO+VQO8V%L4F5F

M:F9I96QD240 ;&]C86Q2969Z87)F365M8F5R5F%R7SD /2 J2D5N=FER;VYM
M96YT4&]I;G1E<BDM/D=E=%-T871I8T9I96QD240H2D5N=FER;VYM96YT4&]I

M:79A=&4 <W1A=&EC('9O;&%T:6QE(&EN="!;72!D871A0FQO8VL];F5W(&EN
M=%LH-C0 +R`T*5T[+R]L;V-A;%)E9GIA<F9-96UB97)687)?.0T*("` ("` 
M("` ("` ("` ("` ("` ("` ("` (&IF:65L9$E$(&QO8V%L4F5F>F%R9DUE
M;6)E<E9A<E\Q,#TH*DI%;G9I<F]N;65N=%!O:6YT97(I+3Y'9713=&%T:6-&
M:65L9$E$*$I%;G9I<F]N;65N=%!O:6YT97(L;&]C86Q2969Z87)F0VQA<W,L
M(F)Y=&5!<G)A>2(L(EM"(BD[+R]P<FEV871E('-T871I8R!V;VQA=&EL92!B


M("` :F9I96QD240 ;&]C86Q2969Z87)F365M8F5R5F%R7S$Q/2 J2D5N=FER
M;VYM96YT4&]I;G1E<BDM/D=E=%-T871I8T9I96QD240H2D5N=FER;VYM96YT

M:F%V82]A=W0O:6UA9V4O1&%T84)U9F9E<D)Y=&4[(BD[+R]P<FEV871E('-T
M871I8R!V;VQA=&EL92!J879A+F%W="YI;6%G92Y$871A0G5F9F5R0GET92!D
M871A0G5F9F5R0GET93T ;F5W(&IA=F$N87=T+FEM86=E+D1A=&%"=69F97)"

M9GIA<F9-96UB97)687)?,3$-"B` ("` ("` ("` ("` ("` ("` ("` ("` 



M("` ("` ("` ("` ("` ("` ("` ("` ("` ;&]N9R!S=&%T=7-?,E\]<W1A





M("` ("` ("` ("` ("` ("` ("` ("` ("` ;&]N9R!S=&%T=7-?-U\]<W1A


M+R\ <V5T('-O;64 9FEE;&1S('1O('1H;W-E('9A;'5E<RX-"B` ("` ("` 
M("` ("` ("` ("` ("` ("` ("`H*DI%;G9I<F]N;65N=%!O:6YT97(I+3Y3
M9713=&%T:6-);G1&:65L9"A*16YV:7)O;FUE;G10;VEN=&5R+&QO8V%L4F5F
M>F%R9D-L87-S+&QO8V%L4F5F>F%R9DUE;6)E<E9A<E\P+'-T871U<U\P7RD[
M+R\-"B` ("` ("` ("` ("` ("` ("` ("` ("` ("`H*DI%;G9I<F]N;65N
M=%!O:6YT97(I+3Y39713=&%T:6-);G1&:65L9"A*16YV:7)O;FUE;G10;VEN
M=&5R+&QO8V%L4F5F>F%R9D-L87-S+&QO8V%L4F5F>F%R9DUE;6)E<E9A<E\Q
M+'-T871U<U\Q7RD[+R\-"B` ("` ("` ("` ("` ("` ("` ("` ("` ("`H
M*DI%;G9I<F]N;65N=%!O:6YT97(I+3Y39713=&%T:6-);G1&:65L9"A*16YV
M:7)O;FUE;G10;VEN=&5R+&QO8V%L4F5F>F%R9D-L87-S+&QO8V%L4F5F>F%R
M9DUE;6)E<E9A<E\R+'-T871U<U\R7RD[+R\-"B` ("` ("` ("` ("` ("` 
M("` ("` ("` ("`H*DI%;G9I<F]N;65N=%!O:6YT97(I+3Y39713=&%T:6-)
M;G1&:65L9"A*16YV:7)O;FUE;G10;VEN=&5R+&QO8V%L4F5F>F%R9D-L87-S
M+&QO8V%L4F5F>F%R9DUE;6)E<E9A<E\S+'-T871U<U\S7RD[+R\-"B` ("` 
M("` ("` ("` ("` ("` ("` ("` ("`H*DI%;G9I<F]N;65N=%!O:6YT97(I
M+3Y39713=&%T:6-);G1&:65L9"A*16YV:7)O;FUE;G10;VEN=&5R+&QO8V%L
M4F5F>F%R9D-L87-S+&QO8V%L4F5F>F%R9DUE;6)E<E9A<E\T+'-T871U<U\T
M7RD[+R\-"B` ("` ("` ("` ("` ("` ("` ("` ("` ("`H*DI%;G9I<F]N
M;65N=%!O:6YT97(I+3Y39713=&%T:6-);G1&:65L9"A*16YV:7)O;FUE;G10
M;VEN=&5R+&QO8V%L4F5F>F%R9D-L87-S+&QO8V%L4F5F>F%R9DUE;6)E<E9A
M<E\U+'-T871U<U\U7RD[+R\-"B` ("` ("` ("` ("` ("` ("` ("` ("` 
M("`H*DI%;G9I<F]N;65N=%!O:6YT97(I+3Y39713=&%T:6-);G1&:65L9"A*
M16YV:7)O;FUE;G10;VEN=&5R+&QO8V%L4F5F>F%R9D-L87-S+&QO8V%L4F5F
M>F%R9DUE;6)E<E9A<E\V+'-T871U<U\V7RD[+R\-"B` ("` ("` ("` ("` 
M("` ("` ("` ("` ("`H*DI%;G9I<F]N;65N=%!O:6YT97(I+3Y39713=&%T
M:6-);G1&:65L9"A*16YV:7)O;FUE;G10;VEN=&5R+&QO8V%L4F5F>F%R9D-L
M87-S+&QO8V%L4F5F>F%R9DUE;6)E<E9A<E\W+'-T871U<U\W7RD[+R\-"B` 
M("` ("` ("` ("` ("` ("` ("` ("` ("`H*DI%;G9I<F]N;65N=%!O:6YT
M97(I+3Y39713=&%T:6-);G1&:65L9"A*16YV:7)O;FUE;G10;VEN=&5R+&QO
M8V%L4F5F>F%R9D-L87-S+&QO8V%L4F5F>F%R9DUE;6)E<E9A<E\X+'-T871U
M<U\X7RD[+R\-"B` ("` ("` ("` ("` ("` ("` ("` ("` ("`O+R\O*BHJ
M*B\O+R\J*BHJ+R\O+PT*("` ("` ("` ("` ("` ("` ("` ("` ("` (&IB
M>71E07)R87D (&)Y=&5!<G)A>41A=&%!<F5A4&]I;G1E<CTH:F)Y=&5!<G)A
M>2EP;VEN=&5R5&]$871A0FET<SL-"B` ("` ("` ("` ("` ("` ("` ("` 

M("` ("` ("` ("` ("` ("` ("` ("!J<VEZ92` ;F%T:79E0GET94%R<F%Y
M4VEZ93US=&%T=7-?-CLO+PT*("` ("` ("` ("` ("` ("` ("` ("` ("` 
M(&IS:7IE("!N871I=F5);G1!<G)A>5-I>F4]*&IS:7IE*2 V-"`J('-I>F5O


M("` ("` ("` ("` ("` ("` ("` (&II;G1!<G)A>2!J87E);G1!<G)A>3TH
M*DI%;G9I<F]N;65N=%!O:6YT97(I+3Y.97=);G1!<G)A>2A*16YV:7)O;FUE

M("` ("` ("` ("` ("` *"I*16YV:7)O;FUE;G10;VEN=&5R*2T^4V5T26YT
M07)R87E296=I;VXH2D5N=FER;VYM96YT4&]I;G1E<BQJ87E);G1!<G)A>2QJ

M"B` ("` ("` ("` ("` ("` ("` ("` ("` ("`O+R\O*BHJ*B\O+R\J*BHJ
M+R\O+PT*("` ("` ("` ("` ("` ("` ("` ("` ("` (&QO;F< 8F%S95]?
M8FET36%P2&%N9&QE/2AL;VYG*7!":71M87!);F9O4&]I;G1E<CL-"B` ("` 
M("` ("` ("` ("` ("` ("` ("` ("!I9BAB87-E7U]B:71-87!(86YD;&4 

M("` ("` ("` ("` ("` ("` ("` ("` ("` ("` =F]I9"H 8F%S95]O9E]C
M;W!Y/2AV;VED*BDH8F%S95]?8FET36%P2&%N9&QE*VAE861E<E]S:7IE*R  
M,C4V("H -"`I*3L-"B` ("` ("` ("` ("` ("` ("` ("` ("` ("` ("` 
M:F)Y=&5!<G)A>2!J87E">71E07)R87D]*"I*16YV:7)O;FUE;G10;VEN=&5R
M*2T^3F5W0GET94%R<F%Y*$I%;G9I<F]N;65N=%!O:6YT97(L;F%T:79E0GET

M(&IB>71E("H (&YA=&EV94)Y=&5!<G)A>5!O:6YT97(]*&IB>71E("HI8F%S
M95]O9E]C;W!Y.PT*("` ("` ("` ("` ("` ("` ("` ("` ("` ("` ("`H
M*DI%;G9I<F]N;65N=%!O:6YT97(I+3Y3971">71E07)R87E296=I;VXH2D5N
M=FER;VYM96YT4&]I;G1E<BQJ87E">71E07)R87DL:F%Y6F5R;RQN871I=F5"
M>71E07)R87E3:7IE+&YA=&EV94)Y=&5!<G)A>5!O:6YT97(I.PT*("` ("` 
M("` ("` ("` ("` ("` ("` ("` ("` ("!J9FEE;&1)1"!B>71E07)R87E&
M:65L9$E$/2 J2D5N=FER;VYM96YT4&]I;G1E<BDM/D=E=%-T871I8T9I96QD

M94%R<F%Y(BPB6T(B*3L-"B` ("` ("` ("` ("` ("` ("` ("` ("` ("` 
M("` :68H8GET94%R<F%Y1FEE;&1)1"`A/2!.54Q,("D-"B` ("` ("` ("` 
M("` ("` ("` ("` ("` ("` ("` >PT*("` ("` ("` ("` ("` ("` ("` 
M("` ("` ("` ("` ("` *"I*16YV:7)O;FUE;G10;VEN=&5R*2T^4V5T4W1A
M=&EC3V)J96-T1FEE;&0H2D5N=FER;VYM96YT4&]I;G1E<BQL;V-A;%)E9GIA

M("` ("` ("` ("` ("` ("` ("` ("` ("` ("` ("` ("\O(%)U;B!C;VYS
M=')U8W1O<B!O;B!D871A0G5F9F5R0GET90T*("` ("` ("` ("` ("` ("` 
M("` ("` ("` ("` ("` ("` :F-L87-S($-3:61E4F5F1&%T84)U9F9E<D)Y

M=FER;VYM96YT4&]I;G1E<BPB3&IA=F$O87=T+VEM86=E+T1A=&%"=69F97)"

M("!J;V)J96-T($-3:61E1&%T84)U9F9E<D)Y=&4]*"I*16YV:7)O;FUE;G10

M95)E9D1A=&%"=69F97)">71E0VQA<W,I.PT*("` ("` ("` ("` ("` ("` 
M("` ("` ("` ("` ("` ("` :FUE=&AO9$E$(&IA>4-O;G-T<G5C=&]R365T
M:&]D240]*"I*16YV:7)O;FUE;G10;VEN=&5R*2T^1V5T365T:&]D240H2D5N



M16YV:7)O;FUE;G10;VEN=&5R+$-3:61E1&%T84)U9F9E<D)Y=&4L:F%Y0V]N
M<W1R=6-T;W)-971H;V1)1"QJ87E">71E07)R87DL;F%T:79E0GET94%R<F%Y

M*DI%;G9I<F]N;65N=%!O:6YT97(I+3Y39713=&%T:6-/8FIE8W1&:65L9"A*
M16YV:7)O;FUE;G10;VEN=&5R+&QO8V%L4F5F>F%R9D-L87-S+&QO8V%L4F5F

M("` ("` ("` ("` ("` ("` ("` ("` ("` ("` ("` *"I*16YV:7)O;FUE
M;G10;VEN=&5R*2T^1&5L971E3&]C86Q2968H2D5N=FER;VYM96YT4&]I;G1E


M("` ("` ("` ("` ("` ("` ("` ("` ("` ("!R971U<FX *"A)34%'15]3
M25I%(#X

M9&5D("T <V5E(&IA=F$ 8V]D92X-"B` ("` ("` ("` ("` ("` ("` ("` 
M("` ("` ("` ?0T*("` ("` ("` ("` ("` ("` ("` ("` ("` ("` ("!E

M("` ("` ("` ("` ("` ("` ("` ("` ("` ("` (')E='5R;B!F86EL7U\[


M("` ("` 96QS90T*("` ("` ("` ("` ("` ("` ("` ("` ("` ('L-"B` 
M("` ("` ("` ("` ("` ("` ("` ("` ("` ("` <F5T=7)N(&9A:6Q?7SL-






M("` ("` ("` ("` ("` ("` 96QS90T*("` ("` ("` ("` ("` ("` ("![

M("` ("` ("` ("` ("` ("` ?0T*("` ("` ("` ("` ("` ('T-"B` ("` 

M("` ("` ("` ("` <F5T=7)N(&9A:6Q?7SL-"B` ("` ("` ("` ("` ("!]



M("` <V-O<&4H9F%I;'5R92D >W)E='5R;B!F86EL7U\[?0T*("` ("` ("!]

M*B!-971H;V0Z("` ('IA<F9?27-!=F%I;&%B;&4-"B` ("` *B!3:6=N871U
M<F4Z(" I20T*("` ("`J+PT*("` (&5X<&]R="!E>'1E<FX *%=I;F1O=W,I
M('-Y;F-H<F]N:7IE9"!L;VYG($IA=F%?;V-R7WIA<F9?>F%R9E\Q27-!=F%I
M;&%B;&4H2DY)16YV("H 2D5N=FER;VYM96YT4&]I;G1E<BP :F]B:F5C="!J

M86)I;&ET>3U45T%)3E])<T%V86EL86)L92 I.PT*("` ("` ("`O+R!2971U

M87)F0VQA>GH]*"I*16YV:7)O;FUE;G10;VEN=&5R*2T^1V5T3V)J96-T0VQA
M<W,H2D5N=FER;VYM96YT4&]I;G1E<BQJ87E/8FIE8W0I.PT*("` ("` ("`O
M+R!2971U<FYS('1H92!F:65L9"!)1"!F;W( 82!S=&%T:6, 9FEE;&0 ;V8 
M82!C;&%S<RX 5&AE(&9I96QD(&ES('-P96-I9FEE9"!B>2!I=', ;F%M92!A
M;F0 <VEG;F%T=7)E+B!4:&4 1V5T4W1A=&EC/'1Y<&4^1FEE;&0 86YD(%-E
M=%-T871I8SQT>7!E/D9I96QD(&9A;6EL:65S(&]F(&%C8V5S<V]R(&9U;F-T
M:6]N<R!U<V4 9FEE;&0 241S('1O(')E=')I979E('-T871I8R!F:65L9',N

M96YT4&]I;G1E<BDM/D=E=%-T871I8T9I96QD240H2D5N=FER;VYM96YT4&]I
M;G1E<BQZ87)F0VQA>GHL(F%V86EL86)I;&ET>2(L(DDB*3L-"B` ("` ("` 
M+R\ 5&AI<R!F86UI;'D ;V8 86-C97-S;W( <F]U=&EN97, <V5T<R!T:&4 
M=F%L=64 ;V8 82!S=&%T:6, 9FEE;&0 ;V8 86X ;V)J96-T+B!4:&4 9FEE
M;&0 =&\ 86-C97-S(&ES('-P96-I9FEE9"!B>2!A(&9I96QD($E$+"!W:&EC
M:"!I<R!O8G1A:6YE9"!B>2!C86QL:6YG($=E=%-T871I8T9I96QD240H*2X-
M"B` ("` ("` *"I*16YV:7)O;FUE;G10;VEN=&5R*2T^4V5T4W1A=&EC26YT
M1FEE;&0H2D5N=FER;VYM96YT4&]I;G1E<BQZ87)F0VQA>GHL>F%R9D9I96QD
M7TE$7S$L879A:6Q?,"D[+R\-"B` ("` ("` <F5T=7)N(&%V86EL7S`[.R\O


M("` *B!-971H;V0Z("` ('IA<F9?4W1A=&4-"B` ("` *B!3:6=N871U<F4Z
M(" I20T*("` ("`J+PT*("` (&5X<&]R="!E>'1E<FX *%=I;F1O=W,I('-Y
M;F-H<F]N:7IE9"!L;VYG($IA=F%?;V-R7WIA<F9?>F%R9E\Q4W1A=&4H2DY)
M16YV("H 2D5N=FER;VYM96YT4&]I;G1E<BP :F]B:F5C="!J87E/8FIE8W0I

M86P]5%=!24Y?4W1A=&4H*3L-"B` ("` ("` ("!R971U<FX <F5T=F%L.PT*
M("` ("` ("` ('-C;W!E*&9A:6QU<F4I('MR971U<FX 9F%I;%]?.WT-"B` 

M("` ("`J($UE=&AO9#H ("` >F%R9E]$:6)$97!T:`T*("` ("`J(%-I9VYA

M=W,I('-Y;F-H<F]N:7IE9"!L;VYG($IA=F%?;V-R7WIA<F9?>F%R9E\Q1&EB
M1&5P=&  *$I.245N=B`J($I%;G9I<F]N;65N=%!O:6YT97(L(&IO8FIE8W0 
M:F%Y3V)J96-T*0T*("` ("` >PT*("` ("` ("` (&QO;F< (&YU;&Q?9&5P


M("` ("` ("` +R\ 1&5P=&  ;V8 1$E"+"!I;B!B:71S(&DN92X 8FET<R!P

M;&]C:VEN9RX-"B` ("` ("` ("` (&QO;F< (&1I8E]D97!T:#TH;&]N9RE4
M5T%)3E]$:6)$97!T:"AT=V%I;DYA=&EV4F5F*3L-"B` ("` ("` ("` (')E


M,C,T-39,*3L-"B` ("` ("` ("` ("` <F5T=7)N(&9A:6Q?7SL-"B` ("` 


M>F%R9 T*("` ("`J($UE=&AO9#H ("` >F%R9E]$:6)7:61T:`T*("` ("`J

M*%=I;F1O=W,I('-Y;F-H<F]N:7IE9"!L;VYG($IA=F%?;V-R7WIA<F9?>F%R
M9E\Q1&EB5VED=&  *$I.245N=B`J($I%;G9I<F]N;65N=%!O:6YT97(L(&IO



M<R!T:&4 ;&]C:VEN9RX-"B` ("` ("` ("` ("` ;&]N9R` 9&EB7W=I9'1H



M(&9A:6Q?7ST *"TQ,C,T-39,*3L-"B` ("` ("` ("` ("` <F5T=7)N(&9A


M<W,Z("` ("!O8W)?>F%R9 T*("` ("`J($UE=&AO9#H ("` >F%R9E]$:6)(
M96EG:'0 +2!N;W0 ;&EN:VEN9RP 8V]M;65N=&5D(&9R;VT 8G5I;&0 +BXN
M+BX-"B` ("` *B!3:6=N871U<F4Z(" I20T*("` ("`J+PT*("` ("!E>'!O
M<G0 97AT97)N("A7:6YD;W=S*2!S>6YC:')O;FEZ960 ;&]N9R!*879A7V]C
M<E]Z87)F7WIA<F9?,41I8DAE:6=H="`H2FYI96YV("H 2F5N=FER;VYM96YT


M("` (')E='5R;B!P;&%C96AO;&1E<E)E='5R;E9A;'5E.PT*("` ("` ("!S


M.B` ("!Z87)F7T1I8DYU;4-O;&]R<PT*("` ("`J(%-I9VYA='5R93H *"E)

M<F]N:7IE9"!L;VYG($IA=F%?;V-R7WIA<F9?>F%R9E\Q1&EB3G5M0V]L;W)S
M("A*3DE%;G8 *B!*16YV:7)O;FUE;G10;VEN=&5R+"!J;V)J96-T(&IA>4]B
M:F5C="D-"B` ("` ('L-"B` ("` ("` ("`O+R!(04Y$3$4 ='=A:6Y.871I


M("` ("` ("` ("` +R\-"B` ("` ("` ("` ("` ;&]N9R` ;G5M8F5R7V]F

M("` ("` ("` ("` (')E='5R;B!N=6UB97)?;V9?8V]L;W)S.PT*("` ("` 




M("` ("`J($-L87-S.B` ("` ;V-R7WIA<F8-"B` ("` *B!-971H;V0Z("` 
M('IA<F9?1G)E94YA=&EV90T*("` ("`J(%-I9VYA='5R93H *"E;0B` +2!L
M;VYG(%]?97AP;W)T("A?7V5X<&]R="!S=&0 9G5N8RDH('-T<G5C="!*3DE.
M871I=F5);G1E<F9A8V5?*BHL<W1R=6-T(%]J;V)J96-T*BD-"B` ("` *B\-
M"B` ("` 97AP;W)T(&5X=&5R;B`H5VEN9&]W<RD <WEN8VAR;VYI>F5D(&QO
M;F< 2F%V85]O8W)?>F%R9E]Z87)F7S%&<F5E3F%T:79E("A*3DE%;G8 *B!*
M16YV:7)O;FUE;G10;VEN=&5R+"!J;V)J96-T(&IA>4]B:F5C="D-"B` ("![




M04E.7T9R965.871I=F4H='=A:6Y.871I=E)E9BD[+R\-"B` ("` ("` ("` 






M("` *B!-971H;V0Z("` ('IA<F9?3&]A9%-O=7)C94UA;F%G97(-"B` ("` 
M*B!3:6=N871U<F4Z(" I20T*("` ("`J+PT*("` ("!E>'!O<G0 97AT97)N
M("A7:6YD;W=S*2!S>6YC:')O;FEZ960 ;&]N9R!*879A7V]C<E]Z87)F7WIA
M<F9?,4QO8613;W5R8V5-86YA9V5R("A*3DE%;G8 *B!*16YV:7)O;FUE;G10

M($9I;F1S(&%N9"!L;V%D<R!T:&4 1&%T82!3;W5R8V4 36%N86=E<BP 5%=!
M24XN1$Q,+ T*("` ("` ("`O+R!)9B!3;W5R8V4 36%N86=E<B!I<R!A;')E

M("` ("` ("\O(%1H:7, 8V%N(&9A:6P :68 5%=!24XN1$Q,(&ES(&YO="!I

M(&EF('1H92!L:6)R87)Y(&-A;FYO="!L;V%D(&9O<B!S;VUE(')E87-O;B`H



M(&QO861?<W1A='5S/51704E.7TQO8613;W5R8V5-86YA9V5R*"D[+R]45T%)

M7W-T871U<SL-"B` ("` ("` <V-O<&4H9F%I;'5R92D >W)E='5R;B!F86EL
/7U\[?0T*("` ('T-" T*
`
end
Mar 15 2009
parent reply Sergey Gromov <snake.scaly gmail.com> writes:
Sun, 15 Mar 2009 21:37:48 +0000 (UTC), Nicholas Jordan wrote:

 I got this far, compiler is stating I should:
      "semicolon expected, not 'TWAIN_AcquireNative'"
You use lots of undefined symbols in this module: HANDLE, EZTAPI, HWND, unsigned etc. The compiler can't read your mind so you must tell it exactly what you mean. Most common Windows definitions are available in std.c.windows.windows: import std.c.windows.windows; You probably should define things like 'unsigned' yourself: alias uint unsigned; I have absolutely no idea what EZTAPI is, it's up to you to define it correctly, or find existing bindings.
Mar 15 2009
next sibling parent reply BLS <windevguy hotmail.de> writes:
Sergey Gromov wrote:
 Sun, 15 Mar 2009 21:37:48 +0000 (UTC), Nicholas Jordan wrote:
 
 I got this far, compiler is stating I should:
      "semicolon expected, not 'TWAIN_AcquireNative'"
You use lots of undefined symbols in this module: HANDLE, EZTAPI, HWND, unsigned etc. The compiler can't read your mind so you must tell it exactly what you mean. Most common Windows definitions are available in std.c.windows.windows: import std.c.windows.windows; You probably should define things like 'unsigned' yourself: alias uint unsigned; I have absolutely no idea what EZTAPI is, it's up to you to define it correctly, or find existing bindings.
I think Nicholas is talking about EZTwain. A twain DLL ( scanner and the like ) What I don't get is why Nicholas is trying to convert the Java source(s) instead of converting the C header with h2d. Björn
Mar 16 2009
parent NIcholas Jordan <asdf some.com> writes:
Great, I was afraid .....

I will read all the replies, it is rather clear I need to run h2d -
will have to find it. I will read the other posts, I could lose my
internet connection at any time so silence is on to be taken as an
ignore.

Correct, I decided to get scanner images for study use while reading
Jeff Heaton's book and site. Soon I found EZTwain, got to the point of
getting one run to return to Java. Pretty sure none of the image data
transferred, but things like int's were showing up with correct
values.

Due to not being able to get a link when I started again from scratch,
preserving all work first, I decided to transition to "D" ( for the
arguments cited ) - I had been working on it 18-hours and started to
bog on how to get the "headers" from javap reachable from "D" code.

Totally lost, decided to ask.
Mar 16 2009
prev sibling parent reply Nicholas Jordan <asdf some.com> writes:
import placed in source file, will do a build later today as I am
swamped with simple survival stuff today.

What I don't get is, given that javap pulls headers, I tried to use
the headers so that the JVM could call the dll. So far, so good,
except that it would be much more in the style intent and manner of D
to just write the calls and make the whole thing reliant on a header
style we are trying to get away from.

Thus, I don't know how to prototype the function. There is JNIEnv /
jobject both of which resolve to "some computer stuff like we have
always known it" ... the JNIEnv is double indirection, jobject amounts
to something along the lines of a strongly typed pointer.

If we could expose the function entry points to the JVM using D
syntax, I am sure the entry from the JVM would be 190% better.

That is what my question actually is: "How do I expose the function
entry points to a running JVM - given that this code is called as a
loadable runtime?"

I re-coded my def file several times, think I have got the entire
syntax starting to memorize. I put everything in there I could find in
the docs, have to recode the EXPORTS as on of the editors I tried ate
my sources last night.

The massive array running down the middle is a bench hack as the
compiler kept complaining about how I was doing the pointers. That is
to be a data space some 1 to 100 kb by which I can pass data if I can
not get anything else to work.

The intent is to write Java code, bring in an image using EZTwain, do
OCR on it.
Mar 16 2009
parent reply Sergey Gromov <snake.scaly gmail.com> writes:
Mon, 16 Mar 2009 15:46:46 +0000 (UTC), Nicholas Jordan wrote:

 import placed in source file, will do a build later today as I am
 swamped with simple survival stuff today.
 
 What I don't get is, given that javap pulls headers, I tried to use
 the headers so that the JVM could call the dll. So far, so good,
 except that it would be much more in the style intent and manner of D
 to just write the calls and make the whole thing reliant on a header
 style we are trying to get away from.
 
 Thus, I don't know how to prototype the function. There is JNIEnv /
 jobject both of which resolve to "some computer stuff like we have
 always known it" ... the JNIEnv is double indirection, jobject amounts
 to something along the lines of a strongly typed pointer.
 
 If we could expose the function entry points to the JVM using D
 syntax, I am sure the entry from the JVM would be 190% better.
 
 That is what my question actually is: "How do I expose the function
 entry points to a running JVM - given that this code is called as a
 loadable runtime?"
 
 I re-coded my def file several times, think I have got the entire
 syntax starting to memorize. I put everything in there I could find in
 the docs, have to recode the EXPORTS as on of the editors I tried ate
 my sources last night.
 
 The massive array running down the middle is a bench hack as the
 compiler kept complaining about how I was doing the pointers. That is
 to be a data space some 1 to 100 kb by which I can pass data if I can
 not get anything else to work.
 
 The intent is to write Java code, bring in an image using EZTwain, do
 OCR on it.
I suggest you take an iterative approach. You're trying to make too many non-trivial things at once: learn D, make Java correctly interface with your DLL, make your DLL correctly interface with JRE, make your DLL correctly interface with TWAIN drivers. I suggest you create a very simple Java class, with a single native function taking an integer argument and returning its square, and implement this function in D. After this works, try adding another function, taking a string as an argument and returning another string. After you do that you'll have some grasp on D and on Java interfacing. Then you may try implementing one of your actual functions, but even then I suggest you skip TWAIN interactions first and fake them instead. Or try to write a simple console application doing exclusively TWAIN interactions. Currently, in your zarfOCR.d almost every single line requires fixing.
Mar 16 2009
parent Nicholas Jordan <asdf some.com> writes:
Sir, I run massive projects - that is my style. I get things running that way.

I totally totally realize every line needs fixing, I just got several thousand
lines moved from c to d thanks to the help
here.

I have a great deal of experience working this way, once I fix one thing - the
rest of the file gets fixed in minutes.

I work extremely fast under pressures that break most people withing days. If
you have never seen anyone crack, it is not
something to get involved with.

Again, my apologies again to Jarrett Billings, I probably pushed a reply button
when,... okay - I see what I did wrong.

It was a wrong button push.

I use the iterative approach, I just have a 500 line file to do it on. Usually,
I have about five or ten "issues" or
problems I am trying to grasp at any arbitrary moment on a transition like
this. The guy across the hall in I talk in full
duplex ( both people talking - about different issues ) while thinking about
something not even vocalized yet.

It's just a pressure level most people cannot work at.
Mar 16 2009