diff options
author | Olivier Paquet <olivier.paquet@gmail.com> | 2018-11-03 16:51:41 +0000 |
---|---|---|
committer | Olivier Paquet <olivier.paquet@gmail.com> | 2018-11-03 16:51:41 +0000 |
commit | 2d25c90327bfd61ae3e2700fd8193885d8c2ed8c (patch) | |
tree | 710c58d158b7a3bb6ed96a58464e2c4907c26851 /libtiff | |
parent | ed624dfe48bd13ee97461a1ad7e684d9827bb63c (diff) | |
parent | 924405d5b31b9ff37a67abd1e294892758f6379a (diff) | |
download | libtiff-git-2d25c90327bfd61ae3e2700fd8193885d8c2ed8c.tar.gz |
Merge branch 'no_tif_platform_console' into 'master'
Remove builtin support for GUI warning and error message boxes
See merge request libtiff/libtiff!24
Diffstat (limited to 'libtiff')
-rw-r--r-- | libtiff/tif_win32.c | 39 | ||||
-rw-r--r-- | libtiff/tif_wince.c | 3 |
2 files changed, 0 insertions, 42 deletions
diff --git a/libtiff/tif_win32.c b/libtiff/tif_win32.c index cde4f6dc..088880e7 100644 --- a/libtiff/tif_win32.c +++ b/libtiff/tif_win32.c @@ -405,60 +405,21 @@ _TIFFmemcmp(const void* p1, const void* p2, tmsize_t c) static void Win32WarningHandler(const char* module, const char* fmt, va_list ap) { -#ifndef TIF_PLATFORM_CONSOLE - LPTSTR szTitle; - LPTSTR szTmp; - LPCTSTR szTitleText = "%s Warning"; - LPCTSTR szDefaultModule = "LIBTIFF"; - LPCTSTR szTmpModule = (module == NULL) ? szDefaultModule : module; - SIZE_T nBufSize = (strlen(szTmpModule) + - strlen(szTitleText) + strlen(fmt) + 256)*sizeof(char); - - if ((szTitle = (LPTSTR)LocalAlloc(LMEM_FIXED, nBufSize)) == NULL) - return; - sprintf(szTitle, szTitleText, szTmpModule); - szTmp = szTitle + (strlen(szTitle)+2)*sizeof(char); - vsnprintf(szTmp, nBufSize-(strlen(szTitle)+2)*sizeof(char), fmt, ap); - MessageBoxA(GetFocus(), szTmp, szTitle, MB_OK | MB_ICONINFORMATION); - LocalFree(szTitle); - - return; -#else if (module != NULL) fprintf(stderr, "%s: ", module); fprintf(stderr, "Warning, "); vfprintf(stderr, fmt, ap); fprintf(stderr, ".\n"); -#endif } TIFFErrorHandler _TIFFwarningHandler = Win32WarningHandler; static void Win32ErrorHandler(const char* module, const char* fmt, va_list ap) { -#ifndef TIF_PLATFORM_CONSOLE - LPTSTR szTitle; - LPTSTR szTmp; - LPCTSTR szTitleText = "%s Error"; - LPCTSTR szDefaultModule = "LIBTIFF"; - LPCTSTR szTmpModule = (module == NULL) ? szDefaultModule : module; - SIZE_T nBufSize = (strlen(szTmpModule) + - strlen(szTitleText) + strlen(fmt) + 256)*sizeof(char); - - if ((szTitle = (LPTSTR)LocalAlloc(LMEM_FIXED, nBufSize)) == NULL) - return; - sprintf(szTitle, szTitleText, szTmpModule); - szTmp = szTitle + (strlen(szTitle)+2)*sizeof(char); - vsnprintf(szTmp, nBufSize-(strlen(szTitle)+2)*sizeof(char), fmt, ap); - MessageBoxA(GetFocus(), szTmp, szTitle, MB_OK | MB_ICONEXCLAMATION); - LocalFree(szTitle); - return; -#else if (module != NULL) fprintf(stderr, "%s: ", module); vfprintf(stderr, fmt, ap); fprintf(stderr, ".\n"); -#endif } TIFFErrorHandler _TIFFerrorHandler = Win32ErrorHandler; diff --git a/libtiff/tif_wince.c b/libtiff/tif_wince.c index 5bd7daf5..b3b168f1 100644 --- a/libtiff/tif_wince.c +++ b/libtiff/tif_wince.c @@ -34,9 +34,6 @@ #include "tiffiop.h" #include <windows.h> -/* Turn off console support on Windows CE. */ -#undef TIF_PLATFORM_CONSOLE - COMPILATION SHOULD FAIL This file is not yet updated to reflect changes in LibTiff 4.0. If you have the opportunity to update and test this file, please contact LibTiff folks |