fixed issues of watcomc for _win32 in stdio.c

This commit is contained in:
hyung-hwan 2011-04-01 09:32:07 +00:00
parent 96da678f14
commit 2f4a4000cd
3 changed files with 33 additions and 22 deletions

View File

@ -32,7 +32,7 @@
#include <stdarg.h> #include <stdarg.h>
#include <wchar.h> #include <wchar.h>
#if defined(_WIN32) #if defined(_WIN32) && !defined(__WATCOMC__)
#include <tchar.h> #include <tchar.h>
#define qse_printf _tprintf #define qse_printf _tprintf
@ -73,10 +73,21 @@ typedef int (*qse_getdelim_t) (const qse_char_t* ptr,qse_size_t len,void* arg);
extern "C" { extern "C" {
#endif #endif
int qse_vsprintf (qse_char_t* buf, size_t size, const qse_char_t* fmt, va_list ap); int qse_vsprintf (
int qse_sprintf (qse_char_t* buf, size_t size, const qse_char_t* fmt, ...); qse_char_t* buf,
qse_size_t size,
const qse_char_t* fmt,
va_list ap
);
#if !defined(_WIN32) int qse_sprintf (
qse_char_t* buf,
qse_size_t size,
const qse_char_t* fmt,
...
);
#if !defined(_WIN32) || defined(__WATCOMC__)
int qse_vfprintf (QSE_FILE *stream, const qse_char_t* fmt, va_list ap); int qse_vfprintf (QSE_FILE *stream, const qse_char_t* fmt, va_list ap);
int qse_vprintf (const qse_char_t* fmt, va_list ap); int qse_vprintf (const qse_char_t* fmt, va_list ap);
int qse_fprintf (QSE_FILE* file, const qse_char_t* fmt, ...); int qse_fprintf (QSE_FILE* file, const qse_char_t* fmt, ...);

View File

@ -29,9 +29,9 @@
#define PATH_MAX 2048 #define PATH_MAX 2048
#endif #endif
#if defined(_WIN32) #if defined(_WIN32) && !defined(__WATCOMC__)
int qse_vsprintf (qse_char_t* buf, size_t size, const qse_char_t* fmt, va_list ap) int qse_vsprintf (qse_char_t* buf, qse_size_t size, const qse_char_t* fmt, va_list ap)
{ {
int n; int n;
@ -49,7 +49,7 @@ int qse_vsprintf (qse_char_t* buf, size_t size, const qse_char_t* fmt, va_list a
return n; return n;
} }
int qse_sprintf (qse_char_t* buf, size_t size, const qse_char_t* fmt, ...) int qse_sprintf (qse_char_t* buf, qse_size_t size, const qse_char_t* fmt, ...)
{ {
int n; int n;
va_list ap; va_list ap;
@ -106,7 +106,7 @@ int qse_printf (const qse_char_t* fmt, ...)
return n; return n;
} }
int qse_vsprintf (qse_char_t* buf, size_t size, const qse_char_t* fmt, va_list ap) int qse_vsprintf (qse_char_t* buf, qse_size_t size, const qse_char_t* fmt, va_list ap)
{ {
int n; int n;
qse_char_t* nf = __adjust_format (fmt); qse_char_t* nf = __adjust_format (fmt);
@ -114,7 +114,7 @@ int qse_vsprintf (qse_char_t* buf, size_t size, const qse_char_t* fmt, va_list a
#if defined(QSE_CHAR_IS_MCHAR) #if defined(QSE_CHAR_IS_MCHAR)
n = vsnprintf (buf, size, nf, ap); n = vsnprintf (buf, size, nf, ap);
#elif defined(_WIN32) #elif defined(_WIN32) && !defined(__WATCOMC__)
n = _vsnwprintf (buf, size, nf, ap); n = _vsnwprintf (buf, size, nf, ap);
#else #else
n = vswprintf (buf, size, nf, ap); n = vswprintf (buf, size, nf, ap);
@ -129,7 +129,7 @@ int qse_vsprintf (qse_char_t* buf, size_t size, const qse_char_t* fmt, va_list a
return n; return n;
} }
int qse_sprintf (qse_char_t* buf, size_t size, const qse_char_t* fmt, ...) int qse_sprintf (qse_char_t* buf, qse_size_t size, const qse_char_t* fmt, ...)
{ {
int n; int n;
va_list ap; va_list ap;
@ -279,7 +279,7 @@ static qse_char_t* __adjust_format (const qse_char_t* format)
} }
else if (ch == QSE_T('C') || ch == QSE_T('S')) else if (ch == QSE_T('C') || ch == QSE_T('S'))
{ {
#if defined(_WIN32) #if defined(_WIN32) && !defined(__WATCOMC__)
ADDC (buf, ch); ADDC (buf, ch);
#else #else
#ifdef QSE_CHAR_IS_MCHAR #ifdef QSE_CHAR_IS_MCHAR

View File

@ -181,7 +181,7 @@ VComponent
39 39
WRect WRect
2020 2020
1693 1680
5700 5700
4240 4240
1 1
@ -196,24 +196,24 @@ debug/os2/cmd/scm/qsescm.tgt
VComponent VComponent
42 42
WRect WRect
1760 980
1360 1093
5700 5700
4240 4240
1 0
0 0
43 43
WFileName WFileName
30 30
debug/win32/lib/cmn/qsecmn.tgt debug/win32/lib/cmn/qsecmn.tgt
38 18
38 24
44 44
VComponent VComponent
45 45
WRect WRect
180 200
1240 1253
5700 5700
4240 4240
1 1
@ -228,11 +228,11 @@ debug/win32/lib/scm/qsescm.tgt
VComponent VComponent
48 48
WRect WRect
3270 3280
40 40
5700 5700
4240 4240
1 0
0 0
49 49
WFileName WFileName
@ -240,4 +240,4 @@ WFileName
debug/win32/cmd/scm/qsescm.tgt debug/win32/cmd/scm/qsescm.tgt
0 0
1 1
32 41