All I need is a function in C that takes a string and computes it's SHA1 hash
(I've got the code for this) and returns the SHA1 hash as a string, I was thinking
along the lines of
int sha1hash(char *stringToHash, char *hashStringOutput); /* returns -1 if something
borks, otherwise 0 */
Anyone got a nice little bit of code for:
a) Wrapping that with the OpenVMS calling standard stuff in C (the strings will be passed
in as descriptors etc, so I need to "unpack" them I suppose)
b) An example call from COBOL to that wrapper..
Anyone? :)
Sampsa
On 13 Sep 2012, at 14:01, Mark Wickens wrote:
On 13/09/12 01:33, Jordi Guillaumes i Pons wrote:
It should be no problem. All the DEC compilers share a common ABI (VMS calling and
condition handling standard). There is a manual in the "gray wall" just about
that. I can't search for it now, but iirc the title is easy to pick up.
Basic summary: scalars are passed by reference, strings are passed by descriptor address.
VMS C provides macros to build and manage descriptors (the ASCIZ convention is fortunately
not used).
The HP OpenVMS Calling Standard manual I think is what you are referring to.
Unfortunately I don't think it's going to help Sampsa much - I had a quick flick
through and it's all low level detail, it doesn't contain any examples of calling
one language from another. More of a specification of the interface for new language
implementations.
Mark
--
http://www.wickensonline.co.uk
http://declegacy.org.uk