That will be quicker than translating the C into Clarion.
@KevinErskine if you do fancy having a go at translating it from C to Clarion
You’ll be using the C instead of typical Pascal for the calling convention,
so the
pass by value, fixed-length = someproc (Datatypes)
pass by reference, fixed-length = someproc (long) where long is the address to the datatype
pass by reference, variable-length = someproc (long) where long is the address to the datatype
or you could use *[DataType] where asterisk is the address (long) to the [DataType].
The other thing to watch out for is when you need to use RAW. Raw removes the length of strings, groups and ? (any’s).
I couldnt find any source code that refers to these C functions, only snippets at that webpage, but you have the Topspeed C & C++ compiler built into Clarion, so maybe find some small postgres source code and see if you can get that compiling in clarion.
Some of the questions you might encounter can probably be found on here, like
How can a C typedef stucture containing an array be converted to a clarion structure? - questions - ClarionHub
Linking C C++
You’ll just have to hunt around a bit, but I’d start with finding the postgres source code you want to compile or translate, or better still see if they have supplied any dll’s that you want to use, and then just make a lib file using the libmaker and then define some api’s in your code.