2012-10-15 22:14 UTC+0200 Viktor Szakats (harbour syenar.net)

* tests/tstgtapi.c
    ! fixed to compile with current GT API

  * contrib/hbfbird/firebird.c
    ! fixed to use ANSI C comments
  * contrib/hbfbird/tfirebrd.prg
    ! fixed possible typo in prev in 'FBGetdata( qry, 1 )'
      instead of 'FBGetdata( qry, 3 )'
    ! formatted, long line split.
  * ChangeLog
    + added incompatibiliy note to 2012-10-15 21:48 UTC+0200.
      it will now force field names to their aliases.
This commit is contained in:
Viktor Szakats
2012-10-15 20:17:42 +00:00
parent 3d37ba28e0
commit e5893c1f44
4 changed files with 43 additions and 25 deletions

View File

@@ -16,11 +16,26 @@
The license applies to all entries newer than 2009-04-28.
*/
2012-10-15 22:14 UTC+0200 Viktor Szakats (harbour syenar.net)
* tests/tstgtapi.c
! fixed to compile with current GT API
* contrib/hbfbird/firebird.c
! fixed to use ANSI C comments
* contrib/hbfbird/tfirebrd.prg
! fixed possible typo in prev in 'FBGetdata( qry, 1 )'
instead of 'FBGetdata( qry, 3 )'
! formatted, long line split.
* ChangeLog
+ added incompatibiliy note to 2012-10-15 21:48 UTC+0200.
it will now force field names to their aliases.
2012-10-15 21:48 UTC+0200 Jacek Kubica (jkubica/at/wssk.wroc.pl)
* contrib/hbfbird/tfirebrd.prg
* contrib/hbfbird/firebird.c
+ added missing support for aliases in sql queries
! proper translation sql TIMESTAMP -> harbour`s T value type
[INCOMPATIBLE]
! proper translation sql TIMESTAMP -> Harbour's T value type
2012-10-15 21:27 UTC+0200 Viktor Szakats (harbour syenar.net)
* contrib/gtwvg/wvgwin.c

View File

@@ -419,8 +419,8 @@ HB_FUNC( FBQUERY )
hb_arraySetNL( aTemp, 3, sqlda->sqlvar[ i ].sqllen );
hb_arraySetNL( aTemp, 4, sqlda->sqlvar[ i ].sqlscale );
hb_arraySetC( aTemp, 5, sqlda->sqlvar[ i ].relname );
hb_arraySetNL( aTemp, 6, sqlda->sqlvar[ i ].aliasname_length ); // support for aliases
hb_arraySetC( aTemp, 7, sqlda->sqlvar[ i ].aliasname ); // support for aliases
hb_arraySetNL( aTemp, 6, sqlda->sqlvar[ i ].aliasname_length ); /* support for aliases */
hb_arraySetC( aTemp, 7, sqlda->sqlvar[ i ].aliasname ); /* support for aliases */
hb_arraySetForward( aNew, i + 1, aTemp );
}

View File

@@ -982,7 +982,9 @@ STATIC FUNCTION StructConvert( aStru, db, dialect )
IF HB_ISARRAY( qry )
DO WHILE FBFetch( qry ) == 0
AAdd( aDomains, { IIF(FBGetdata( qry, 1 )==NIL,"",FBGetdata( qry, 1 )), IIF(FBGetdata( qry, 2 )==NIL,"",FBGetdata( qry, 2 )), IIF(FBGetdata( qry, 1 )==NIL,"",FBGetdata( qry, 3 )) } )
AAdd( aDomains, { iif( FBGetdata( qry, 1 ) == NIL, "", FBGetdata( qry, 1 ) ),;
iif( FBGetdata( qry, 2 ) == NIL, "", FBGetdata( qry, 2 ) ),;
iif( FBGetdata( qry, 3 ) == NIL, "", FBGetdata( qry, 3 ) ) } )
ENDDO
FBFree( qry )
@@ -1010,8 +1012,8 @@ STATIC FUNCTION StructConvert( aStru, db, dialect )
cType := "C"
EXIT
CASE SQL_SHORT
/* Firebird doesn't have boolean field, so if you define domain with BOOL then i will consider logical, ex:
create domain boolean_field as smallint default 0 not null check (value in (0,1)) */
/* Firebird doesn't have boolean field, so if you define domain with BOOL then i will consider logical, ex:
create domain boolean_field as smallint default 0 not null check (value in (0,1)) */
IF "BOOL" $ cDomain
cType := "L"

View File

@@ -4,22 +4,21 @@
#include "hbapigt.h"
void main( void )
int main( void )
{
HB_BYTE * test = "Testing GT API Functions";
HB_BYTE * test2 = "This message wraps!";
int iRow, iCol;
const char * test = "Testing GT API Functions";
const char * test2 = "This message wraps!";
/* NOTE: always have to initialze video subsystem */
hb_gtInit();
hb_gtInit( 0, 0, 0 );
/* save screen (doesn't work under DOS) */
/*
HB_BYTE * scr;
void * scr;
HB_SIZE size;
hb_gtRectSize( 1, 1, hb_gtMaxRow(), hb_gtMaxCol(), &size );
scr = ( HB_BYTE * ) hb_xgrab( size );
scr = hb_xgrab( size );
hb_gtSave( 1, 1, hb_gtMaxRow() - 1, hb_gtMaxCol() - 1, scr );
*/
@@ -35,10 +34,10 @@ void main( void )
/* writing color text */
hb_gtSetColorStr( "W+/B, B/W" );
hb_gtColorSelect( _CLR_STANDARD );
hb_gtColorSelect( HB_CLR_STANDARD );
hb_gtWrite( "Enhanced color (B/W)", 20 );
hb_gtSetPos( 22, 62 );
hb_gtColorSelect( _CLR_ENHANCED );
hb_gtColorSelect( HB_CLR_ENHANCED );
hb_gtWrite( "Standard Color (W+/B)", 21 );
/* boxes */
@@ -49,28 +48,30 @@ void main( void )
hb_gtSetPos( 12, 1 );
/* none */
hb_gtSetCursor( _SC_NONE );
getch();
hb_gtSetCursor( SC_NONE );
hb_inkey( HB_TRUE, 0.0, INKEY_ALL );
/* underline */
hb_gtSetCursor( _SC_NORMAL );
getch();
hb_gtSetCursor( SC_NORMAL );
hb_inkey( HB_TRUE, 0.0, INKEY_ALL );
/* lower half block */
hb_gtSetCursor( _SC_INSERT );
getch();
hb_gtSetCursor( SC_INSERT );
hb_inkey( HB_TRUE, 0.0, INKEY_ALL );
/* full block */
hb_gtSetCursor( _SC_SPECIAL1 );
getch();
hb_gtSetCursor( SC_SPECIAL1 );
hb_inkey( HB_TRUE, 0.0, INKEY_ALL );
/* upper half block */
hb_gtSetCursor( _SC_SPECIAL2 );
getch();
hb_gtSetCursor( SC_SPECIAL2 );
hb_inkey( HB_TRUE, 0.0, INKEY_ALL );
/* restore screen (doesn't work under DOS) */
/*
hb_gtRest( 1, 1, hb_gtMaxRow() - 1, hb_gtMaxCol() - 1, scr );
hb_xfree( scr );
*/
return 0;
}