G
Guilbert STABILO
Hi everybody,
I am working on a C projet where I am receiving a Pascal string (the first
char contains the length of the string).
I need to convert this into a null terminated string (C string).
The conversion seems very simple to me but because the routine will be used
by hundred (and even more) of users, I do not want to badly reinvent
something which was already well done.
On Apple computers, there was a function called p2cstr() which was doing
this.
I searched but did not find the equivalent in the C runtime library.
Moreover, I did not find the source code of p2cstr() (which is what I am
looking for).
* Could anybody send me a link or give me the robust Pascal to C string
conversion algorithm ?
Thanks in advance for your help.
I am working on a C projet where I am receiving a Pascal string (the first
char contains the length of the string).
I need to convert this into a null terminated string (C string).
The conversion seems very simple to me but because the routine will be used
by hundred (and even more) of users, I do not want to badly reinvent
something which was already well done.
On Apple computers, there was a function called p2cstr() which was doing
this.
I searched but did not find the equivalent in the C runtime library.
Moreover, I did not find the source code of p2cstr() (which is what I am
looking for).
* Could anybody send me a link or give me the robust Pascal to C string
conversion algorithm ?
Thanks in advance for your help.