Sha256: e92fc53ab4aa2124d681ca35edb4b1d3b6be379e0cebd278c7a9429ba990b570
Contents?: true
Size: 827 Bytes
Versions: 98
Compression:
Stored size: 827 Bytes
Contents
/* * NSLog() clone, but writes to arbitrary output stream */ #import <Foundation/Foundation.h> #import <stdio.h> int nsvfprintf (FILE *stream, NSString *format, va_list args) { int retval; NSString *str = (NSString *) CFStringCreateWithFormatAndArguments(NULL, NULL, (CFStringRef) format, args); retval = fprintf(stream, "[DEBUG] %s\n", [str UTF8String]); [str release]; return retval; } int nsfprintf (FILE *stream, NSString *format, ...) { va_list ap; int retval; va_start(ap, format); { retval = nsvfprintf(stream, format, ap); } va_end(ap); return retval; } int nsprintf (NSString *format, ...) { va_list ap; int retval; va_start(ap, format); { retval = nsvfprintf(stderr, format, ap); } va_end(ap); return retval; }
Version data entries
98 entries across 98 versions & 2 rubygems