Mercurial > dwindows
comparison win/dw.c @ 1630:48fabb2f93c5
On Windows with the correct -DUNICODE -D_UNICODE and #include <tchar.h> lines
the hacky #ifdefs I had in the source file are no longer needed. Removed.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Wed, 28 Mar 2012 16:29:35 +0000 |
parents | d97e3f7f4e47 |
children | 0e6c2aeed041 |
comparison
equal
deleted
inserted
replaced
1629:d97e3f7f4e47 | 1630:48fabb2f93c5 |
---|---|
453 | 453 |
454 if(retbuf) | 454 if(retbuf) |
455 WideCharToMultiByte(CP_UTF8, 0, widestring, -1, retbuf, WideCharToMultiByte(CP_UTF8, 0, widestring, -1, NULL, 0, NULL, NULL), NULL, NULL); | 455 WideCharToMultiByte(CP_UTF8, 0, widestring, -1, retbuf, WideCharToMultiByte(CP_UTF8, 0, widestring, -1, NULL, 0, NULL, NULL), NULL, NULL); |
456 return retbuf; | 456 return retbuf; |
457 } | 457 } |
458 /* FIXME: Not sure why this is needed */ | |
459 #ifndef _tstol | |
460 #define _tstol _wtol | |
461 #endif | |
462 #ifndef _tcscpy | |
463 #define _tcscpy wcscpy | |
464 #endif | |
465 #ifndef _sntprintf | |
466 #define _sntprintf _snwprintf | |
467 #endif | |
468 #ifndef _stprintf | |
469 #define _stprintf _swprintf | |
470 #endif | |
471 #ifndef _tcsftime | |
472 #define _tcsftime wcsftime | |
473 #endif | |
474 | |
475 #else | 458 #else |
476 #define UTF8toWide(a) a | 459 #define UTF8toWide(a) a |
477 #define WideToUTF8(a) a | 460 #define WideToUTF8(a) a |
478 /* FIXME: Not sure why this is needed */ | |
479 #ifndef _tstol | |
480 #define _tstol atol | |
481 #endif | |
482 #ifndef _tcscpy | |
483 #define _tcscpy strcpy | |
484 #endif | |
485 #ifndef _sntprintf | |
486 #define _sntprintf _snprintf | |
487 #endif | |
488 #ifndef _stprintf | |
489 #define _stprintf sprintf | |
490 #endif | |
491 #ifndef _tcsftime | |
492 #define _tcsftime strftime | |
493 #endif | |
494 | |
495 #endif | 461 #endif |
496 | 462 |
497 DWORD GetDllVersion(LPCTSTR lpszDllName) | 463 DWORD GetDllVersion(LPCTSTR lpszDllName) |
498 { | 464 { |
499 | 465 |