X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=ChazLog.m;h=2f8eaa6cde97fc05c19e2fb46c4c8fe863602482;hb=refs%2Fheads%2Fyishen;hp=56d1f590a2217e106ffdedefb5daeb6c24da4731;hpb=556707a7a26ac2dc4d10eff8e4b2abcc893cfce3;p=chaz%2Fthecheat diff --git a/ChazLog.m b/ChazLog.m index 56d1f59..2f8eaa6 100644 --- a/ChazLog.m +++ b/ChazLog.m @@ -1,9 +1,9 @@ /* * The Cheat - The legendary universal game trainer for Mac OS X. - * http://www.dogcows.com/chaz/wiki/TheCheat + * http://www.brokenzipper.com/trac/wiki/TheCheat * - * Copyright (c) 2003-2010, Charles McGarvey et al. + * Copyright (c) 2003-2011, Charles McGarvey et al. * * Distributable under the terms and conditions of the 2-clause BSD * license; see the file COPYING for the legal text of the license. @@ -49,7 +49,7 @@ void ChazDebugSetup() FILE *file; // look for debug file - file = fopen( [filepath lossyCString], "r+" ); + file = fopen( [filepath cStringUsingEncoding:NSUTF8StringEncoding], "r+" ); if ( !file ) { // there is no debug file or we don't have permissions @@ -58,7 +58,7 @@ void ChazDebugSetup() fclose( file ); - _gDebugFile = fopen( [filepath lossyCString], "w" ); + _gDebugFile = fopen( [filepath cStringUsingEncoding:NSUTF8StringEncoding], "w" ); ChazDebug( @"Debug log found (obviously). Entering debug mode." ); } @@ -150,7 +150,7 @@ void _ChazPrint( FILE *output, NSString *format, va_list args ) fprintf( output, "[%s] %s\n", [[[NSDate date] descriptionWithCalendarFormat:@"%Y-%m-%d %H:%M:%S.%F" timeZone:nil - locale:nil] lossyCString], [string lossyCString] ); + locale:nil] cStringUsingEncoding:NSUTF8StringEncoding], [string cStringUsingEncoding:NSUTF8StringEncoding] ); fflush( output ); [string release];