2010-12-09 15:34 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)

* contrib/hblzf/tests/test.prg
  * contrib/hblzf/hblzf.c
    * Changed HB_LZF_OPTIMIZED_FOR() to HB_LZF_OPTIMIZED_FOR_SPEED()
      and to return logical value.
This commit is contained in:
Viktor Szakats
2010-12-09 14:34:30 +00:00
parent 0ef35d5a72
commit 7acede5f22
3 changed files with 15 additions and 11 deletions

View File

@@ -16,6 +16,12 @@
The license applies to all entries newer than 2009-04-28.
*/
2010-12-09 15:34 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hblzf/tests/test.prg
* contrib/hblzf/hblzf.c
* Changed HB_LZF_OPTIMIZED_FOR() to HB_LZF_OPTIMIZED_FOR_SPEED()
and to return logical value.
2010-12-09 14:42 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hblzf/hblzf.c
% Deleted unnecessary assignment (fixing potential bcc warning)

View File

@@ -61,12 +61,6 @@
#include "lzf.h"
#include "lzfP.h"
#if ULTRA_FAST
# define HB_LZF_OPTIMIZED_FOR 1
#elif VERY_FAST
# define HB_LZF_OPTIMIZED_FOR 0
#endif
#define HB_LZF_BUFFSIZE 1024
typedef struct
@@ -95,12 +89,16 @@ HB_FUNC( HB_LZF_VERSION )
}
/**
Return 1 if lzf was optimized for speed, 0 for compression
Return if lzf was optimized for speed (or for compression)
*/
HB_FUNC( HB_LZF_OPTIMIZED_FOR )
HB_FUNC( HB_LZF_OPTIMIZED_FOR_SPEED )
{
hb_retni( HB_LZF_OPTIMIZED_FOR );
#if ULTRA_FAST
hb_retl( HB_TRUE );
#else
hb_retl( HB_FALSE );
#endif
}
/**

View File

@@ -15,8 +15,8 @@ PROCEDURE Main()
LOCAL errno := 0
? "LZF Api version is", ;
hb_ntos( hb_lzf_version() ) + "(" + hb_numtohex( hb_lzf_version() ) +")"
? "LibLZF optimized for", iif( hb_lzf_optimized_for() > 0, "speed.", "compression." )
hb_ntos( hb_lzf_version() ) + "(0x" + hb_numtohex( hb_lzf_version() ) +")"
? "LibLZF optimized for", iif( hb_lzf_optimized_for_speed(), "speed.", "compression." )
? "--- test 1 ---"
/*