On Jun 12, 2009, at 5:43 AM, "Gerriet M. Denkmann" wrote:
StringPtr c = (void *)response;
NSUInteger cle = *c;
char *cu = malloc( cle + 1);
memcpy( cu, c + 1, cle);
cu[cle] = '\0';
NSLog(@"%s gestaltUserVisibleMachineName â \"%s\" (%lu
chars)",
Can reduce to:
NSMutableString *cu = [NSMutableString string];
CFStringAppendPascalString( (CFMutableStringRef)cu,
(StringPtr)response, kCFStringEncodingMacRoman );
NSLog( @"%s gestaltUserVisibleMachineName â \"%...@\" (%u chars)",
__FUNCTION__, cu, [cu length] );
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to arch...@mail-archive.com