2010-12-11 16:17 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)

* src/rtl/gtwin/gtwin.c
    ! Disabled HB_GTI_PALETTE support for MSVC 2005/2008
      versions combined with certain (older) SDK versions.
      The symptom is missing NDDI_* detection support, yet
      present CONSOLE_SCREEN_BUFFER_INFOEX structure.
      (Most pbly SDK 6.x. SDK 7.0a is fine)
      Thanks to Andi for the tests.

  * config/hbc.cfg
    + Few tweaks to make it more Harbour compliant.
      F.e. for hblzf.c it now generated perfect result.

  * contrib/hblzf/hblzf.c
  * contrib/hblzf/tests/test.prg
    ! Added missing EOL at EOF.
    ! Restored my formatting fixes from previous commits.
    ! Refixed wrong formatting. (for the ~5th time)
    - Deleted synonym added in previous commit.
      I suggest to write a few words of reasoning for
      changes not having obviously apparent reason.
      It's brand new lib, so we should decide about _one_
      (the best) initial name and stick to it. Let's use
      synonyms if we later find out that we did some
      mistakes in the past, or other special occasion.
This commit is contained in:
Viktor Szakats
2010-12-11 15:21:47 +00:00
parent ef92bdfb47
commit 6785f0b732
5 changed files with 47 additions and 42 deletions

View File

@@ -16,6 +16,32 @@
The license applies to all entries newer than 2009-04-28.
*/
2010-12-11 16:17 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* src/rtl/gtwin/gtwin.c
! Disabled HB_GTI_PALETTE support for MSVC 2005/2008
versions combined with certain (older) SDK versions.
The symptom is missing NDDI_* detection support, yet
present CONSOLE_SCREEN_BUFFER_INFOEX structure.
(Most pbly SDK 6.x. SDK 7.0a is fine)
Thanks to Andi for the tests.
* config/hbc.cfg
+ Few tweaks to make it more Harbour compliant.
F.e. for hblzf.c it now generated perfect result.
* contrib/hblzf/hblzf.c
* contrib/hblzf/tests/test.prg
! Added missing EOL at EOF.
! Restored my formatting fixes from previous commits.
! Refixed wrong formatting. (for the ~5th time)
- Deleted synonym added in previous commit.
I suggest to write a few words of reasoning for
changes not having obviously apparent reason.
It's brand new lib, so we should decide about _one_
(the best) initial name and stick to it. Let's use
synonyms if we later find out that we did some
mistakes in the past, or other special occasion.
2010-12-11 14:50 UTC+0200 Petr Chornyj (myorg63 at mail.ru)
* contrib/hblzf/hblzf.c
* contrib/hblzf/tests/test.prg
@@ -33,11 +59,11 @@
compilers.
(solution is hackish so it may need revision as future
non-msvc, non-watcom compiler versions implement this
feature in their own WinAPI headers.
feature in their own WinAPI headers.)
2010-12-11 01:14 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* INSTALL
+ Minor detail to HB_BUILD_WINUNI. Moved it's position towards
+ Minor detail to HB_BUILD_WINUNI. Moved its position towards
end of option list.
+ Added some clarification to HB_BUILD_CONTRIB=no <...>
option.

View File

@@ -196,7 +196,7 @@ sp_balance_nested_parens = false # false/true
sp_paren_brace = force # ignore/add/remove/force
# Add or remove space before pointer star '*'
sp_before_ptr_star = force # ignore/add/remove/force
sp_before_ptr_star = add # ignore/add/remove/force
# Add or remove space before pointer star '*' that isn't followed by a variable name
# If set to 'ignore', sp_before_ptr_star is used instead. ??????
@@ -206,7 +206,7 @@ sp_before_unnamed_ptr_star = ignore # ignore/add/remove/force
sp_between_ptr_star = remove # ignore/add/remove/force
# Add or remove space after pointer star '*', if followed by a word.
sp_after_ptr_star = remove # ignore/add/remove/force
sp_after_ptr_star = add # ignore/add/remove/force
# Add or remove space after a pointer star '*', if followed by a func proto/def.
sp_after_ptr_star_func = remove # ignore/add/remove/force
@@ -451,7 +451,7 @@ sp_after_dc = ignore # ignore/add/remove/force
sp_d_array_colon = ignore # ignore/add/remove/force
# Add or remove space after the '!' (not) operator. Default=Remove
sp_not = remove # ignore/add/remove/force
sp_not = add # ignore/add/remove/force
# Add or remove space after the '~' (invert) operator. Default=Remove
sp_inv = remove # ignore/add/remove/force

View File

@@ -62,19 +62,13 @@
#include "hblzf.ch"
/**
Return a LZF_VERSION, API version
*/
/* Return a LZF_VERSION, API version */
HB_FUNC( HB_LZF_VERSION )
{
hb_retni( LZF_VERSION );
}
/**
Return if lzf was optimized for speed (or for compression)
*/
/* Return if lzf was optimized for speed (or for compression) */
HB_FUNC( HB_LZF_OPTIMIZED_FOR_SPEED )
{
#if ULTRA_FAST
@@ -95,10 +89,7 @@ HB_FUNC( HB_LZF_COMPRESSBOUND )
hb_errRT_BASE_SubstR( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
/**
Return a string compressed with LZF
*/
/* Return a string compressed with LZF */
HB_FUNC( HB_LZF_COMPRESS )
{
PHB_ITEM pArg = hb_param( 1, HB_IT_STRING );
@@ -110,13 +101,13 @@ HB_FUNC( HB_LZF_COMPRESS )
if( in_len )
{
PHB_ITEM pBuffer = HB_ISBYREF( 2 ) ? hb_param( 2, HB_IT_STRING ) : NULL;
const char *in_data = hb_itemGetCPtr( pArg );
char *out_data;
const char * in_data = hb_itemGetCPtr( pArg );
char * out_data;
HB_SIZE out_len;
if( pBuffer )
{
if( !hb_itemGetWriteCL( pBuffer, &out_data, &out_len ) )
if( ! hb_itemGetWriteCL( pBuffer, &out_data, &out_len ) )
out_data = NULL;
}
else
@@ -143,7 +134,7 @@ HB_FUNC( HB_LZF_COMPRESS )
}
else
{
if( !pBuffer )
if( ! pBuffer )
hb_xfree( out_data );
hb_storni( HB_LZF_BUF_ERROR, 3 );
@@ -162,10 +153,7 @@ HB_FUNC( HB_LZF_COMPRESS )
hb_errRT_BASE_SubstR( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
/**
Return a string decompressed with LZF
*/
/* Return a string decompressed with LZF */
HB_FUNC( HB_LZF_DECOMPRESS )
{
PHB_ITEM pArg = hb_param( 1, HB_IT_STRING );
@@ -177,13 +165,13 @@ HB_FUNC( HB_LZF_DECOMPRESS )
if( in_len )
{
PHB_ITEM pBuffer = HB_ISBYREF( 2 ) ? hb_param( 2, HB_IT_STRING ) : NULL;
const char *in_data = hb_itemGetCPtr( pArg );
char *buffer;
const char * in_data = hb_itemGetCPtr( pArg );
char * buffer;
HB_SIZE buffer_size;
if( pBuffer )
{
if( !hb_itemGetWriteCL( pBuffer, &buffer, &buffer_size ) )
if( ! hb_itemGetWriteCL( pBuffer, &buffer, &buffer_size ) )
buffer = NULL;
}
else
@@ -213,7 +201,7 @@ HB_FUNC( HB_LZF_DECOMPRESS )
if( errno == EINVAL )
hb_storni( HB_LZF_DATA_CORRUPTED, 3 );
if( !pBuffer )
if( ! pBuffer )
hb_xfree( buffer );
}
else
@@ -227,7 +215,7 @@ HB_FUNC( HB_LZF_DECOMPRESS )
}
}
else
hb_storni( (buffer_size) ? HB_LZF_BUF_ERROR : HB_LZF_MEM_ERROR, 3 );
hb_storni( ( buffer_size ) ? HB_LZF_BUF_ERROR : HB_LZF_MEM_ERROR, 3 );
}
else
{
@@ -238,12 +226,3 @@ HB_FUNC( HB_LZF_DECOMPRESS )
else
hb_errRT_BASE_SubstR( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
/**
Return a string decompressed with LZF
*/
HB_FUNC( HB_LZF_UNCOMPRESS )
{
HB_FUNC_EXEC( HB_LZF_DECOMPRESS );
}

View File

@@ -126,10 +126,10 @@ PROCEDURE Main()
str_compressed := hb_lzf_compress( cStr, NIL, @nResult )
str_decompressed := ""
str_decompressed := hb_lzf_uncompress( str_compressed, @str_decompressed, @nResult )
str_decompressed := hb_lzf_decompress( str_compressed, @str_decompressed, @nResult )
IF nResult != HB_LZF_OK
? "hb_lzf_uncompress() return", ;
? "hb_lzf_decompress() return", ;
iif( nResult == HB_LZF_MEM_ERROR, "HB_LZF_MEM_ERROR", hb_ntos( nResult ) )
ELSE
? iif( cStr == str_decompressed, "OK!", "not OK!" )

View File

@@ -111,7 +111,7 @@
# if !defined( HB_GTWIN_USE_PCONSOLEINFOEX )
# define HB_GTWIN_USE_PCONSOLEINFOEX
# endif
#else
#elif ! defined( _MSC_VER ) || ( _MSC_VER < 1400 )
# if ! defined( __WATCOMC__ ) || ( __WATCOMC__ < 1280 )
typedef struct _CONSOLE_SCREEN_BUFFER_INFOEX
{