Show quoted text 5 lines
has anyone managed to build in a pascal program what in C is a
char *strings[]
and use it from C?
Same as char**strings so ppchar.
In pascal terms this is a single dimensional array aka vector of PChar.
Do I have to make copies of any string or is it sufficient to fill up an
array with PChar?
That depends on what you do with it, like under C, where you can also let it point to e.g. constants using &
My attemtps all failed up to know ...
Have a look at the unixutil unit (most notably stringtoppchar) and the unix unit implementation (exec procedures that use environment mostly)
Note that the unixutil unit was meant only as a temporary helper for unix, and not really meant to be used by endusers. The "leftovers" of the linux->unix unit transform are stored there.