diff options
author | Daniel Axtens <dja@axtens.net> | 2015-05-08 21:11:26 +1000 |
---|---|---|
committer | Hans Kristian Rosbach <hk-git@circlestorm.org> | 2015-05-11 20:40:22 +0200 |
commit | 239692bf136a9ba33f1c4f0562b9a7a08c1f25df (patch) | |
tree | 349f05eb76c6ade10745936cc503e8358df8a8d7 /gzlib.c | |
parent | e2c78cb09b2b8485e0d56392a39c6ad671e7759a (diff) |
Remove UNDER_CE: Windows CE is old.
Signed-off-by: Daniel Axtens <dja@axtens.net>
Diffstat (limited to 'gzlib.c')
-rw-r--r-- | gzlib.c | 51 |
1 files changed, 0 insertions, 51 deletions
@@ -19,57 +19,6 @@ local void gz_reset (gz_statep); local gzFile gz_open (const void *, int, const char *); -#if defined UNDER_CE - -/* Map the Windows error number in ERROR to a locale-dependent error message - string and return a pointer to it. Typically, the values for ERROR come - from GetLastError. - - The string pointed to shall not be modified by the application, but may be - overwritten by a subsequent call to gz_strwinerror - - The gz_strwinerror function does not change the current setting of - GetLastError. */ -char ZLIB_INTERNAL *gz_strwinerror (DWORD error) -{ - static char buf[1024]; - - wchar_t *msgbuf; - DWORD lasterr = GetLastError(); - DWORD chars = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM - | FORMAT_MESSAGE_ALLOCATE_BUFFER, - NULL, - error, - 0, /* Default language */ - (LPVOID)&msgbuf, - 0, - NULL); - if (chars != 0) { - /* If there is an \r\n appended, zap it. */ - if (chars >= 2 - && msgbuf[chars - 2] == '\r' && msgbuf[chars - 1] == '\n') { - chars -= 2; - msgbuf[chars] = 0; - } - - if (chars > sizeof (buf) - 1) { - chars = sizeof (buf) - 1; - msgbuf[chars] = 0; - } - - wcstombs(buf, msgbuf, chars + 1); - LocalFree(msgbuf); - } - else { - sprintf(buf, "unknown win32 error (%ld)", error); - } - - SetLastError(lasterr); - return buf; -} - -#endif /* UNDER_CE */ - /* Reset gzip file state */ local void gz_reset(gz_statep state) { |