minor changes in tif_win32.c
This commit is contained in:
parent
7a17af90d4
commit
04282d6b8f
@ -1,3 +1,10 @@
|
||||
2007-03-07 Joris Van Damme <joris.at.lebbeke@skynet.be>
|
||||
|
||||
* libtiff/tif_win32.c: made inclusion of windows.h unconditional
|
||||
|
||||
* libtiff/tif_win32.c: replaced preprocessor indication for consiously
|
||||
unused arguments by standard C indication for the same
|
||||
|
||||
2007-02-27 Andrey Kiselev <dron@ak4719.spb.edu>
|
||||
|
||||
* libtiff/tif_dirread.c: Use uint32 type instead of tsize_t in byte
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: tif_win32.c,v 1.20 2007-01-15 18:40:39 mloskot Exp $ */
|
||||
/* $Id: tif_win32.c,v 1.21 2007-03-07 17:10:31 joris Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988-1997 Sam Leffler
|
||||
@ -30,9 +30,7 @@
|
||||
*/
|
||||
#include "tiffiop.h"
|
||||
|
||||
#ifdef _WIN32_WCE
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
static tsize_t
|
||||
_tiffReadProc(thandle_t fd, tdata_t buf, tsize_t size)
|
||||
@ -91,12 +89,12 @@ _tiffSizeProc(thandle_t fd)
|
||||
return ((toff_t)GetFileSize(fd, NULL));
|
||||
}
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma argsused
|
||||
#endif
|
||||
static int
|
||||
_tiffDummyMapProc(thandle_t fd, tdata_t* pbase, toff_t* psize)
|
||||
{
|
||||
(void) fd;
|
||||
(void) pbase;
|
||||
(void) psize;
|
||||
return (0);
|
||||
}
|
||||
|
||||
@ -130,12 +128,12 @@ _tiffMapProc(thandle_t fd, tdata_t* pbase, toff_t* psize)
|
||||
return(1);
|
||||
}
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma argsused
|
||||
#endif
|
||||
static void
|
||||
_tiffDummyUnmapProc(thandle_t fd, tdata_t base, toff_t size)
|
||||
{
|
||||
(void) fd;
|
||||
(void) base;
|
||||
(void) size;
|
||||
}
|
||||
|
||||
static void
|
||||
@ -295,26 +293,26 @@ _TIFFfree(tdata_t p)
|
||||
tdata_t
|
||||
_TIFFrealloc(tdata_t p, tsize_t s)
|
||||
{
|
||||
void* pvTmp;
|
||||
tsize_t old;
|
||||
void* pvTmp;
|
||||
tsize_t old;
|
||||
|
||||
if(p == NULL)
|
||||
return ((tdata_t)GlobalAlloc(GMEM_FIXED, s));
|
||||
if(p == NULL)
|
||||
return ((tdata_t)GlobalAlloc(GMEM_FIXED, s));
|
||||
|
||||
old = GlobalSize(p);
|
||||
old = GlobalSize(p);
|
||||
|
||||
if (old>=s) {
|
||||
if ((pvTmp = GlobalAlloc(GMEM_FIXED, s)) != NULL) {
|
||||
CopyMemory(pvTmp, p, s);
|
||||
GlobalFree(p);
|
||||
}
|
||||
} else {
|
||||
if ((pvTmp = GlobalAlloc(GMEM_FIXED, s)) != NULL) {
|
||||
CopyMemory(pvTmp, p, old);
|
||||
GlobalFree(p);
|
||||
}
|
||||
}
|
||||
return ((tdata_t)pvTmp);
|
||||
if (old>=s) {
|
||||
if ((pvTmp = GlobalAlloc(GMEM_FIXED, s)) != NULL) {
|
||||
CopyMemory(pvTmp, p, s);
|
||||
GlobalFree(p);
|
||||
}
|
||||
} else {
|
||||
if ((pvTmp = GlobalAlloc(GMEM_FIXED, s)) != NULL) {
|
||||
CopyMemory(pvTmp, p, old);
|
||||
GlobalFree(p);
|
||||
}
|
||||
}
|
||||
return ((tdata_t)pvTmp);
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user