This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
[ Picked text/plain from multipart/alternative ]
Ack!  Now I see the 1211 in the C.  Thanks Barbara!!!

Voila!  I even got the right answer!  (after I changed the pin to ascii)

Thanks to all who helped!  I'm very grateful for these lists, and especially
for the generous pros who inhabit them.

-----Original Message-----
From: Barbara Morris []
Sent: Thursday, July 18, 2002 12:03 PM
Subject: [C400-L] Re: Calling some vendor "C" code from RPGIV

"Westdorp, Tom" wrote:
> ...
> Results are:
> In the RPGIV program running debug:
> PIN# = '1211'
> P_PIN# = SPP:FB9124C12F001B48
> eval p_pin#:x 10 gets 00000     F1F2F1F1 00...... ........ ........   -
> 1211............
> in the C program:
> buf    = SPP:FB9124C12F001B48
> eval buf:x 10 gets    00000     80000000 00...... ........ ........   -
> ...............

Tom, this is a difference in debugging behaviour.  With the RPG
debugger, :x for a pointer means to show the contents of the pointer in
hex.  (:c for a pointer means to show its contents as character.)

With the C debugger, :x for a pointer means to show the pointer value in
hex.  To see the contents of the pointer, use *buf.

eval *buf:x 10

To save yourself some trouble, prototype your char * pointer as

D Sha1            PR                  ExtProc('sha1')
D  Buffer                         *   Value Options(*String)

Then get rid of your PIN# and p_PIN# temps and just do

   Sha1(PIN: 4 : pdiv : r_digest);

This thread ...

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2020 by and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].