The code below never failed, but currently in OSX-Carbon_MachO it
always crashes when a dlog string is produced like: dlog("%s %i",
"myPlugin message: err = ", status); where status is of type
OSStatus. Whether I would use CW-10 or Xcode, MSL or BSD,
respectively, the dylib crashes in vsprintf where it accesses
__formatter. Simple strings work fine...
void dlog(char *format, ...)
{
va_list args;
char buffer[255];
va_start(args,format);
strcpy(buffer + vsprintf(buffer,format,args), "");
Str255 dst;
CopyC2P(buffer, dst);
#ifndef WIN32
DebugStr(dst);
#else
OutputDebugString(buffer);
#endif
va_end(args);
}
Any other way to implement it? What is the mistake that now pops up?
Alfred
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>