2009-02-16 22:28 UTC+0100 Viktor Szakats (harbour.01 syenar hu)

+ contrib/gtwvg/tests/gtwvg.hbp
  + contrib/hbapollo/tests/hbapollo.hbp
  + contrib/hbbtree/tests/hbbtree.hbp
  + contrib/hbbtree/tests/test.hbm
    + Added hbmk files.

  * contrib/hbbtree/tests/hbmk.bat
  * contrib/hbbtree/tests/test.prg
    * Cleaned hbct dependency.

  * contrib/hbbtree/Makefile
  * contrib/hbbtree/common.mak
  - contrib/hbbtree/hb_btree.api
  + contrib/hbbtree/hb_btree.h
  * contrib/hbbtree/hb_btree.c
  * contrib/hbbtree/tests/ctest.c
    * Renamed hb_btree.api -> hb_btree.h

  * contrib/examples/terminal/terminal.hbp
    + Added {win} filter.
This commit is contained in:
Viktor Szakats
2009-02-15 21:26:57 +00:00
parent 50d7dbd784
commit 862fa6e6e5
13 changed files with 65 additions and 20 deletions

View File

@@ -8,6 +8,28 @@
2009-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org)
*/
2009-02-16 22:28 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
+ contrib/gtwvg/tests/gtwvg.hbp
+ contrib/hbapollo/tests/hbapollo.hbp
+ contrib/hbbtree/tests/hbbtree.hbp
+ contrib/hbbtree/tests/test.hbm
+ Added hbmk files.
* contrib/hbbtree/tests/hbmk.bat
* contrib/hbbtree/tests/test.prg
* Cleaned hbct dependency.
* contrib/hbbtree/Makefile
* contrib/hbbtree/common.mak
- contrib/hbbtree/hb_btree.api
+ contrib/hbbtree/hb_btree.h
* contrib/hbbtree/hb_btree.c
* contrib/hbbtree/tests/ctest.c
* Renamed hb_btree.api -> hb_btree.h
* contrib/examples/terminal/terminal.hbp
+ Added {win} filter.
2009-02-16 20:54 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* utils/hbmk/hbmk.prg
+ Added support for '#' comment lines in .hbm files.

View File

@@ -2,6 +2,6 @@
# $Id$
#
libs=gtwvg hbwin xhb comdlg32 comctl32 shell32 ole32 oleaut32
{win}libs=gtwvg hbwin xhb comdlg32 comctl32 shell32 ole32 oleaut32
mt=yes
gui=yes

View File

@@ -0,0 +1,6 @@
#
# $Id$
#
{win}libs=gtwvg hbwin
gui=yes

View File

@@ -0,0 +1,5 @@
#
# $Id$
#
libs={!dos}hbapollo {win}sde61

View File

@@ -8,7 +8,7 @@ C_SOURCES=\
hb_btree.c \
C_HEADERS=\
hb_btree.api \
hb_btree.h \
PRG_SOURCES=\
tbtree.prg \

View File

@@ -7,7 +7,7 @@ LIBNAME = $(LIBPREF)hbbtree
LIB_PATH = $(LIB_DIR)$(LIBNAME)$(LIBEXT)
C_HEADERS = \
hb_btree.api \
hb_btree.h \
PRG_HEADERS = \
hb_btree.ch \

View File

@@ -181,7 +181,7 @@ see ChangeLog 2002-07-14 14:14 UTC+0500 April White <awhite@mail.rosecom.ca>
#include "hbapierr.h"
#include "hbinit.h"
#include "hb_btree.api"
#include "hb_btree.h"
HB_EXTERN_BEGIN

View File

@@ -36,20 +36,20 @@
#include "hbapi.h"
#include "hbapiitm.h"
#include "hb_btree.api"
#include "hb_btree.h"
static void display( const char *cKey, LONG lData, BOOL NewLine )
{
int n;
char buffer[ 80 ];
if( *cKey )
n = sprintf( buffer, "%s %ld", cKey, lData );
else
n = sprintf( buffer, "%ld", lData );
hb_conOutStd( buffer, n );
if( NewLine )
hb_conOutStd( hb_conNewLine(), strlen( hb_conNewLine() ) );
}
@@ -58,7 +58,7 @@ static void display( const char *cKey, LONG lData, BOOL NewLine )
static void insertdata( struct hb_BTree * pBTree )
{
PHB_ITEM data = hb_itemNew( NULL );
hb_BTreeInsert( pBTree, ( BYTE * ) "fuweqgsz", hb_itemPutNL( data, 1 ) );
hb_BTreeInsert( pBTree, ( BYTE * ) "sjruexrd", hb_itemPutNL( data, 2 ) );
hb_BTreeInsert( pBTree, ( BYTE * ) "fvveitnz", hb_itemPutNL( data, 3 ) );
@@ -145,7 +145,7 @@ static void insertdata( struct hb_BTree * pBTree )
HB_FUNC( CTEST )
{
struct hb_BTree * pBTree;
display( "Harbour API test", 0, TRUE );
pBTree = hb_BTreeNew( ( BYTE * ) "test_3.out", 2048, 90, HB_BTREE_UNIQUE, 0 );
if ( pBTree != NULL )
@@ -159,11 +159,11 @@ HB_FUNC( CTEST )
display( "Min ", a[ hb_BTreeINFO_MINKEYS ], FALSE );
display( "Flag", a[ hb_BTreeINFO_FLAGS ], FALSE );
display( "Keys", a[ hb_BTreeINFO_KEYCOUNT ], TRUE );
*/
*/
insertdata( pBTree );
/*
/*
display( "Keys", hb_BTreeInfo( pBTree, hb_BTreeINFO_KEYCOUNT ), TRUE );
*/
*/
display( "Forward traversal", 0, TRUE );
hb_BTreeGoTop( pBTree );
while ( TRUE )
@@ -173,7 +173,7 @@ HB_FUNC( CTEST )
if ( 1 != hb_BTreeSkip( pBTree, 1 ) )
break;
}
hb_conOutStd( hb_conNewLine(), strlen( hb_conNewLine() ) );
display( "Reverse traversal", 0, TRUE );
hb_BTreeGoBottom( pBTree );
@@ -184,7 +184,7 @@ HB_FUNC( CTEST )
if ( -1 != hb_BTreeSkip( pBTree, -1 ) )
break;
}
hb_conOutStd( hb_conNewLine(), strlen( hb_conNewLine() ) );
display( "Test SEEK", 0, TRUE );
display( hb_BTreeSeek( pBTree, ( BYTE * ) "cdntyzrf", 36, FALSE ) == 1 ? ".T." : ".F.", 0, TRUE );
@@ -199,7 +199,7 @@ HB_FUNC( CTEST )
hb_BTreeSkip( pBTree, 1 );
display( ( char * ) hb_BTreeKey( pBTree ), hb_BTreeData( pBTree ), FALSE );
display( " dmfmivqb ?", 0, TRUE );
hb_conOutStd( hb_conNewLine(), strlen( hb_conNewLine() ) );
display( "Test soft SEEK of an existing key", 0, TRUE );
display( hb_BTreeSeek( pBTree, ( BYTE * ) "cdntyzrf", 0, TRUE ) == 1 ? ".T." : ".F.", 0, TRUE );
@@ -207,7 +207,7 @@ HB_FUNC( CTEST )
hb_BTreeSkip( pBTree, 1 );
display( ( char * ) hb_BTreeKey( pBTree ), hb_BTreeData( pBTree ), FALSE );
display( " dmfmivqb ?", 0, TRUE );
hb_conOutStd( hb_conNewLine(), strlen( hb_conNewLine() ) );
display( "Test soft SEEK of a missing key, that should force EOF", 0, TRUE );
display( hb_BTreeSeek( pBTree, ( BYTE * ) "zzzzzz", 0, FALSE ) == 1 ? ".T." : ".F.", 0, TRUE );
@@ -215,7 +215,7 @@ HB_FUNC( CTEST )
hb_BTreeSkip( pBTree, 1 );
display( ( char * ) hb_BTreeKey( pBTree ), hb_BTreeData( pBTree ), FALSE );
display( " dmfmivqb ?", 0, TRUE );
hb_conOutStd( hb_conNewLine(), strlen( hb_conNewLine() ) );
hb_BTreeClose( pBTree );
}

View File

@@ -0,0 +1,5 @@
#
# $Id$
#
libs=hbbtree

View File

@@ -2,6 +2,6 @@
@rem $Id$
@rem
@set HB_USER_LIBS=user32.lib hbct.lib hbbtree.lib
@set HB_USER_LIBS=hbbtree.lib
@..\..\..\bin\hbmk %* test.prg ttest.prg ctest.c

View File

@@ -0,0 +1,5 @@
#
# $Id$
#
test.prg ttest.prg ctest.c

View File

@@ -40,9 +40,11 @@
Procedure Main()
local n, a
local c
local attr
if fileattr( "test_1.out") == 1 + 32
setfattr( "test_1.out", 32 )
hb_FGetAttr( "test_1.out", @attr )
if attr == 1 + 32
hb_FSetAttr( "test_1.out", 32 )
ferase( "test_1.out" )
endif