diff options
| author | FaraSeer <[email protected]> | 2017-01-02 21:56:37 +0300 |
|---|---|---|
| committer | FaraSeer <[email protected]> | 2017-01-02 21:56:37 +0300 |
| commit | de981510f34192ff725f68130f99a99e5fa0e200 (patch) | |
| tree | 36cb2ba4315cd353705fcef6a14603405eb1b2df /setup/devcon/devcon.cpp | |
| parent | 3070c2df6eb41d1fef3588447d3a6424eaf48b41 (diff) | |
added unicode support for devcon
Diffstat (limited to 'setup/devcon/devcon.cpp')
| -rw-r--r-- | setup/devcon/devcon.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/setup/devcon/devcon.cpp b/setup/devcon/devcon.cpp index 24ec7b31..08736c82 100644 --- a/setup/devcon/devcon.cpp +++ b/setup/devcon/devcon.cpp @@ -14,6 +14,8 @@ Abstract: --*/ #include "devcon.h" +#include <io.h> +#include <fcntl.h> struct IdEntry { LPCTSTR String; // string looking for @@ -99,7 +101,7 @@ Return Value: int c; for(c=0;c<pad;c++) { - fputs(" ",stdout); + _fputts(TEXT(" "), stdout); } } @@ -1076,6 +1078,12 @@ Return Value: // -r - auto reboot // -f - force operation // + +#ifdef UNICODE + _setmode(_fileno(stdout), _O_WTEXT); + _setmode(_fileno(stderr), _O_WTEXT); +#endif + baseName = _tcsrchr(argv[0],TEXT('\\')); if(!baseName) { baseName = argv[0]; |
