diff options
author | Danny Smith <dannysmith@users.sourceforge.net> | 2004-03-30 02:39:46 +0400 |
---|---|---|
committer | Danny Smith <dannysmith@users.sourceforge.net> | 2004-03-30 02:39:46 +0400 |
commit | 7308c39e33bc2ee2ce8f75f1f4e21dc608c9a9ea (patch) | |
tree | 042fc57321ad776eda1ea90c10906011a7653b62 /winsup | |
parent | 81f5200ba36593a020f74766827aa25bd2402d75 (diff) |
* lib/Makefile,in; Add directx to .PHONY target.
* lib/directx/dxerr.c: Remove dependence on mingw runtime.
Don't include stdio.h or tchar.h.
Replace _T() macro with TEXT() macro, throughout.
Replace, _stprintf with wsprintf, throughout.
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/w32api/ChangeLog | 8 | ||||
-rw-r--r-- | winsup/w32api/lib/Makefile.in | 2 | ||||
-rw-r--r-- | winsup/w32api/lib/directx/dxerr.c | 26 |
3 files changed, 21 insertions, 15 deletions
diff --git a/winsup/w32api/ChangeLog b/winsup/w32api/ChangeLog index 5f0909b0c..e655e45bf 100644 --- a/winsup/w32api/ChangeLog +++ b/winsup/w32api/ChangeLog @@ -1,3 +1,11 @@ +2004-03-29 Danny Smith <dannysmith@users.sourceforge.net> + + * lib/Makefile,in; Add directx to .PHONY target. + * lib/directx/dxerr.c: Remove dependence on mingw runtime. + Don't include stdio.h or tchar.h. + Replace _T() macro with TEXT() macro, throughout. + Replace, _stprintf with wsprintf, throughout. + 2004-03-27 Hosaka Yuji <hos@tamanegi.org> * include/dbt.h (DBT_DEVTYP_DEVICEINTERFACE, DBT_DEVTYP_HANDLE): diff --git a/winsup/w32api/lib/Makefile.in b/winsup/w32api/lib/Makefile.in index 0a7186f6a..d5bd22cd0 100644 --- a/winsup/w32api/lib/Makefile.in +++ b/winsup/w32api/lib/Makefile.in @@ -142,7 +142,7 @@ directx: TEST_OPTIONS = $(ALL_CFLAGS) -DWINVER=0x0666 \ -Wall -pedantic -Wsystem-headers -c $(srcdir)/test.c -o test.o -.PHONY: test ddk +.PHONY: test ddk directx test: @echo "Testing w32api..." @for lang in c c++ objective-c ; do \ diff --git a/winsup/w32api/lib/directx/dxerr.c b/winsup/w32api/lib/directx/dxerr.c index 54b8047e9..e893c7523 100644 --- a/winsup/w32api/lib/directx/dxerr.c +++ b/winsup/w32api/lib/directx/dxerr.c @@ -13,12 +13,10 @@ */ #include <windows.h> -#include <stdio.h> -#include <tchar.h> #ifndef DXERROR -#define DXERROR(v,n,d) {v, _T(n), _T(d)}, -#define DXERRORLAST(v,n,d) {v, _T(n), _T(d)} +#define DXERROR(v,n,d) {v, TEXT(n), TEXT(d)}, +#define DXERRORLAST(v,n,d) {v, TEXT(n), TEXT(d)} #endif #ifndef DXERROR8 #define DXERROR8(v,n,d) @@ -726,7 +724,7 @@ HRESULT __stdcall DXTrace(char *strFile, DWORD dwLine, HRESULT hr, DebugMessage = (TCHAR *)malloc((strlen(strFile) + (strMsg ? _tcslen(strMsg) : 0) + _tcslen(ErrorName) + 48) * sizeof(TCHAR)); if (DebugMessage == 0) return hr; - _stprintf(DebugMessage, _T("%hs(%Lu): %s (hr=%s(0x%Lx))"), strFile, dwLine, (strMsg ? strMsg : _T("")) ErrorName, hr); + wsprintf(DebugMessage, TEXT("%hs(%Lu): %s (hr=%s(0x%Lx))"), strFile, dwLine, (strMsg ? strMsg : TEXT("")) ErrorName, hr); OutputDebugString(DebugMessage); free(DebugMessage); @@ -737,11 +735,11 @@ HRESULT __stdcall DXTrace(char *strFile, DWORD dwLine, HRESULT hr, DebugMessage = (TCHAR *)malloc((strlen(strFile) + (strMsg ? _tcslen(strMsg) : 0) + _tcslen(ErrorName) + 60) * sizeof(TCHAR)); if (DebugMessage == 0) return DXERROR_NOT_ENOUGH_MEMORY; - _stprintf(DebugMessage, - _T("File: %hs\nLine: %Lu\nError Code: %s(0x%Lx)\nCalling: %s\n" + wsprintf(DebugMessage, + TEXT("File: %hs\nLine: %Lu\nError Code: %s(0x%Lx)\nCalling: %s\n" "Do you want to debug the application?"), strFile, dwLine, - ErrorName, hr, (strMsg ? strMsg : _T(""))); - Result = MessageBox(0, DebugMessage, _T("Unexpected error encountred"), MB_YESNO | MB_ICONDXERROR); + ErrorName, hr, (strMsg ? strMsg : TEXT(""))); + Result = MessageBox(0, DebugMessage, TEXT("Unexpected error encountred"), MB_YESNO | MB_ICONDXERROR); if (Result == 0) return hr; if (Result == IDYES) @@ -756,16 +754,16 @@ HRESULT __stdcall DXTrace(char *strFile, DWORD dwLine, HRESULT hr, const TCHAR *ErrorName = DXGetErrorString(hr); TCHAR DebugMessage[4096]; - _stprintf(DebugMessage, _T("%hs(%Lu): %s (hr=%s(0x%Lx))"), strFile, dwLine, (strMsg ? strMsg : _T("")), ErrorName, hr); + wsprintf(DebugMessage, TEXT("%hs(%Lu): %s (hr=%s(0x%Lx))"), strFile, dwLine, (strMsg ? strMsg : TEXT("")), ErrorName, hr); OutputDebugString(DebugMessage); if (bPopMsgBox) { int Result; - _stprintf(DebugMessage, - _T("File: %hs\nLine: %Lu\nError Code: %s(0x%Lx)\nCalling: %s\n" + wsprintf(DebugMessage, + TEXT("File: %hs\nLine: %Lu\nError Code: %s(0x%Lx)\nCalling: %s\n" "Do you want to debug the application?"), strFile, dwLine, - ErrorName, hr, (strMsg ? strMsg : _T(""))); - Result = MessageBox(0, DebugMessage, _T("Unexpected error encountred"), MB_YESNO | MB_ICONERROR); + ErrorName, hr, (strMsg ? strMsg : TEXT(""))); + Result = MessageBox(0, DebugMessage, TEXT("Unexpected error encountred"), MB_YESNO | MB_ICONERROR); if (Result == IDYES) DebugBreak(); } |