Skip to content
This repository has been archived by the owner. It is now read-only.
Browse files

No, there's no reason not to use fprintf

  • Loading branch information
slouken committed Jul 6, 2013
1 parent a3c9043 commit 4d179f31a50918d5f704373a7668821b8c6a0599

File 1 of 1 in 4d179f3

@@ -398,16 +398,9 @@ SDL_LogOutput(void *userdata, int category, SDL_LogPriority priority,
#elif defined(__PSP__)
unsigned int length;
char* output;
FILE* pFile;
/* !!! FIXME: is there any reason we didn't just use fprintf() here? */
length = SDL_strlen(SDL_priority_prefixes[priority]) + 2 + SDL_strlen(message) + 2;
output = SDL_stack_alloc(char, length);
SDL_snprintf(output, length, "%s: %s\n", SDL_priority_prefixes[priority], message);
pFile = fopen ("SDL_Log.txt", "a");
fwrite (output, strlen (output), 1, pFile);
fprintf(pFile, "%s: %s\n", SDL_priority_prefixes[priority], message);
fclose (pFile);

0 comments on commit 4d179f3

Please sign in to comment.