PS2 & NDS: Remove ps2_fprintf and some useless typedefs and #defines; use fputs instead of fprintf

svn-id: r46107
This commit is contained in:
Max Horn 2009-11-23 22:29:39 +00:00
parent f3c6e07feb
commit 3d342bec3c
6 changed files with 6 additions and 44 deletions

View file

@ -37,24 +37,15 @@ extern bool isSmartphone();
#ifdef __PLAYSTATION2__
// for those replaced fopen/fread/etc functions
typedef unsigned long uint64;
typedef signed long int64;
#include "backends/platform/ps2/fileio.h"
#define fprintf ps2_fprintf
#define fputs(str, file) ps2_fputs(str, file)
#define fflush(a) ps2_fflush(a)
#endif
#ifdef __DS__
#include "backends/fs/ds/ds-fs.h"
void std_fprintf(FILE* handle, const char* fmt, ...);
void std_fflush(FILE* handle);
#define fprintf(file, fmt, ...) do { char str[128]; sprintf(str, fmt, ##__VA_ARGS__); DS::std_fwrite(str, strlen(str), 1, file); } while(0)
#define fputs(str, file) DS::std_fwrite(str, strlen(str), 1, file)
#define fflush(file) DS::std_fflush(file)
#define fputs(str, file) DS::std_fwrite(str, strlen(str), 1, file)
#endif
@ -444,7 +435,9 @@ void warning(const char *s, ...) {
va_end(va);
#if !defined (__SYMBIAN32__)
fprintf(stderr, "WARNING: %s!\n", buf);
fputs("WARNING: ", stderr);
fputs(buf, stderr);
fputs("!\n", stderr);
#endif
#if defined( USE_WINDBG )