I am porting some code from unix and I
used unix_string.h to map unix-style
"memset" to PalmOS MemSet. But the mapping
is not correct. The functions are not exactly
the same.
I ported the following code from a Unix app.
XYZObject * CreateNewObject()
{
return (XYZObject *)memset(
malloc(sizeof(XYZObject)), 0, sizeof(XYZObject));
}
It compiled without changes, but won't work.
Palm MemSet:-
Err MemSet (VoidPtr dstP, ULong numBytes,
Byte value)
Unix memset:-
void *memset(void *s, int c, size_t n)
PalmOS version of memset returns a "status"
(which is always 0 anyway). And since
my code had a type-cast, the compiler didn't find
it either!
===
Ion Popescu
[EMAIL PROTECTED]
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com