2012-11-13 14:28 UTC+0100 Viktor Szakats (harbour syenar.net)

* contrib/hbfimage/fi_winfu.c
  * contrib/hbfimage/fi_wrp.c
  * contrib/hbgd/gdwrp.c
    * cleanups

  * include/hbzlib.ch
    ! missing 'also used in C code' comment
    * formatting
This commit is contained in:
Viktor Szakats
2012-11-13 13:28:58 +00:00
parent 90d2236c45
commit e8113d9075
5 changed files with 24 additions and 42 deletions

View File

@@ -16,6 +16,16 @@
The license applies to all entries newer than 2009-04-28.
*/
2012-11-13 14:28 UTC+0100 Viktor Szakats (harbour syenar.net)
* contrib/hbfimage/fi_winfu.c
* contrib/hbfimage/fi_wrp.c
* contrib/hbgd/gdwrp.c
* cleanups
* include/hbzlib.ch
! missing 'also used in C code' comment
* formatting
2012-11-13 13:03 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* harbour/extras/gtwvw/gtwvwd.c
! eliminated hb_wcntomb()

View File

@@ -63,10 +63,6 @@
# define _WINDOWS_
#endif
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include "FreeImage.h"
/* Convert from FreeImage to HBITMAP */

View File

@@ -64,10 +64,6 @@
# endif
#endif
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include "FreeImage.h"
#define hb_fi_retl( x ) hb_retl( x ? HB_TRUE : HB_FALSE )

View File

@@ -65,10 +65,6 @@
# endif
#endif
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include "gd.h"
#include "gdfontt.h"
#include "gdfonts.h"
@@ -234,13 +230,8 @@ static PHB_ITEM hb_gdFontItemNew( gdFontPtr font )
static void * LoadImageFromHandle( HB_FHANDLE fhandle, int sz )
{
void * iptr;
void * iptr = hb_xgrab( sz );
if( ! fhandle )
fhandle = 0; /* std input */
/* Read file */
iptr = hb_xgrab( sz );
hb_fsReadLarge( fhandle, iptr, ( HB_SIZE ) sz );
return iptr;
@@ -262,7 +253,6 @@ static void * LoadImageFromFile( const char * szFile, int * sz )
iptr = hb_xgrab( *sz );
hb_fsReadLarge( fhandle, iptr, ( HB_SIZE ) *sz );
/* Close file */
hb_fsClose( fhandle );
}
else
@@ -277,10 +267,6 @@ static void * LoadImageFromFile( const char * szFile, int * sz )
static void SaveImageToHandle( HB_FHANDLE fhandle, const void * iptr, int sz )
{
if( ! fhandle )
fhandle = 1; /* std output */
/* Write Image */
hb_fsWriteLarge( fhandle, iptr, ( HB_SIZE ) sz );
}
@@ -293,7 +279,6 @@ static void SaveImageToFile( const char * szFile, const void * iptr, int sz )
/* Write Image */
SaveImageToHandle( fhandle, iptr, sz );
/* Close file */
hb_fsClose( fhandle );
}
}
@@ -468,7 +453,7 @@ static void GDImageSaveTo( int nType )
/* Write to std output or to a passed file */
HB_FHANDLE fhandle = hb_numToHandle( hb_parnint( 2 ) );
if( fhandle == FS_ERROR )
if( fhandle == FS_ERROR || fhandle == 0 )
fhandle = 1; /* std output */
/* Write Image */
@@ -1554,8 +1539,7 @@ HB_FUNC( GDIMAGESTRINGFTEX )
if( ! err )
{
/* Save in array the correct text rectangle dimensions */
PHB_ITEM pArray;
pArray = hb_itemArrayNew( 8 );
PHB_ITEM pArray = hb_itemArrayNew( 8 );
for( i = 0; i < 8; i++ )
hb_itemPutNI( hb_arrayGetItemPtr( pArray, i + 1 ), aRect[ i ] );
hb_itemCopy( pRect, pArray );
@@ -1887,7 +1871,6 @@ HB_FUNC( GDIMAGECOPY ) /* void gdImageCopy(gdImagePtr dst, gdImagePtr src, int d
int w = hb_parni( 7 );
int h = hb_parni( 8 );
/* Perform copy */
gdImageCopy( dst, src, dstX, dstY, srcX, srcY, w, h );
}
else
@@ -1919,7 +1902,6 @@ HB_FUNC( GDIMAGECOPYRESIZED ) /* void gdImageCopyResized(gdImagePtr dst, gdImage
int srcW = hb_parni( 9 );
int srcH = hb_parni( 10 );
/* Perform copy */
gdImageCopyResized( dst, src, dstX, dstY, srcX, srcY, dstW, dstH, srcW, srcH );
}
else
@@ -1951,7 +1933,6 @@ HB_FUNC( GDIMAGECOPYRESAMPLED ) /* void gdImageCopyResampled(gdImagePtr dst, gdI
int srcW = hb_parni( 9 );
int srcH = hb_parni( 10 );
/* Perform copy */
gdImageCopyResampled( dst, src, dstX, dstY, srcX, srcY, dstW, dstH, srcW, srcH );
}
else
@@ -2011,7 +1992,6 @@ HB_FUNC( GDIMAGECOPYMERGE ) /* void gdImageCopyMerge(gdImagePtr dst, gdImagePtr
int h = hb_parni( 8 );
int pct = hb_parni( 9 );
/* Perform copy */
gdImageCopyMerge( dst, src, dstX, dstY, srcX, srcY, w, h, pct );
}
else
@@ -2041,7 +2021,6 @@ HB_FUNC( GDIMAGECOPYMERGEGRAY ) /* void gdImageCopyMergeGray(gdImagePtr dst, gdI
int h = hb_parni( 8 );
int pct = hb_parni( 9 );
/* Perform copy */
gdImageCopyMergeGray( dst, src, dstX, dstY, srcX, srcY, w, h, pct );
}
else
@@ -2098,7 +2077,7 @@ HB_FUNC( GDIMAGECOMPARE ) /* int gdImageCompare(gdImagePtr im1, gdImagePtr im2)
{
if( hb_isGdImage( 1 ) &&
hb_isGdImage( 2 ) )
/* Compare images - if return <> 0 check value for infos */
/* Compare images - if return != 0 check value for infos */
hb_retni( gdImageCompare( hb_parGdImage( 1 ),
hb_parGdImage( 2 ) ) );
else
@@ -2134,7 +2113,6 @@ static void AddImageToFile( const char * szFile, const void * iptr, int sz )
/* Write Image */
SaveImageToHandle( fhandle, iptr, sz );
/* Close file */
hb_fsClose( fhandle );
}
}

View File

@@ -50,6 +50,8 @@
*
*/
/* NOTE: This file is also used by C code. */
#ifndef HB_ZLIB_CH_
#define HB_ZLIB_CH_
@@ -59,8 +61,8 @@
#define HB_ZLIB_COMPRESSION_NONE 0
#define HB_ZLIB_COMPRESSION_SPEED 1
#define HB_ZLIB_COMPRESSION_SIZE 9
#define HB_ZLIB_COMPRESSION_DEFAULT (-1)
#define HB_ZLIB_COMPRESSION_DISABLE (-2)
#define HB_ZLIB_COMPRESSION_DEFAULT ( -1 )
#define HB_ZLIB_COMPRESSION_DISABLE ( -2 )
#define HB_ZLIB_STRATEGY_DEFAULT 0
#define HB_ZLIB_STRATEGY_FILTERED 1
@@ -71,11 +73,11 @@
#define HB_ZLIB_RES_OK 0
#define HB_ZLIB_RES_STREAM_END 1
#define HB_ZLIB_RES_NEED_DICT 2
#define HB_ZLIB_RES_ERRNO (-1)
#define HB_ZLIB_RES_STREAM_ERROR (-2)
#define HB_ZLIB_RES_DATA_ERROR (-3)
#define HB_ZLIB_RES_MEM_ERROR (-4)
#define HB_ZLIB_RES_BUF_ERROR (-5)
#define HB_ZLIB_RES_VERSION_ERROR (-6)
#define HB_ZLIB_RES_ERRNO ( -1 )
#define HB_ZLIB_RES_STREAM_ERROR ( -2 )
#define HB_ZLIB_RES_DATA_ERROR ( -3 )
#define HB_ZLIB_RES_MEM_ERROR ( -4 )
#define HB_ZLIB_RES_BUF_ERROR ( -5 )
#define HB_ZLIB_RES_VERSION_ERROR ( -6 )
#endif /* HB_ZLIB_CH_ */