diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 1a9197cbe9..db7abd09c8 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,10 +16,54 @@ The license applies to all entries newer than 2009-04-28. */ +2012-11-15 13:02 UTC+0100 Viktor Szakats (harbour syenar.net) + * contrib/hbformat/hbfmtcls.prg + + added new TODO to add space between '!' + operator and single (= not parenthesised) arguments. + + * contrib/hbfimage/fi_wrp.c + * minor + + * contrib/hbodbc/odbc.c + ! fixed to build under ODBC 1.x, 2.x + ! fixed to use ODBC 3.x functions instead of + deprecated functions. + * minor cleanups to prev + + * contrib/sddodbc/sddodbc.c + ! fixed to build under ODBC 1.x, 2.x + + * README + + added note that hbrun scripts are started + in UTF-8 mode. + + added command lines for formatting C and PRG sources + * minor cleanups + + * contrib/hbnf/doc/en/cint86.txt + * contrib/hbnf/ftmenuto.ch + * contrib/xhb/html.ch + * contrib/xhb/htmlform.ch + * extras/gtwvw/docs/funclist.txt + * extras/gtwvw/docs/gtwvw.txt + * extras/gtwvw/docs/whatsnew.txt + * extras/gtwvw/gtwvwd.c + * extras/gtwvw/tests/ebtest7.prg + * extras/gtwvw/tests/prog0.prg + * extras/gtwvw/tests/prog1.prg + * extras/gtwvw/tests/prog2.prg + * extras/gtwvw/tests/wvwtest9.prg + * src/rtl/achoice.prg + * src/vm/thread.c + * website/samples/testcgi.prg.html + * website/samples/testhtml.prg.html + * website/third-party.html + * lowercased (or deleted) references to + source filenames. + 2012-11-15 01:20 UTC+0100 Viktor Szakats (harbour syenar.net) * contrib/hbnf/floptst.prg * utils/hbmk2/hbmk2.prg - * minor folloup cleanup + * minor followup cleanup 2012-11-14 21:37 UTC+0100 Viktor Szakats (harbour syenar.net) * COPYING diff --git a/harbour/README b/harbour/README index 3d2c91c1f1..8823bd9de7 100644 --- a/harbour/README +++ b/harbour/README @@ -766,7 +766,7 @@ TABLE OF CONTENT - HB_USER_LIBS=[] Add space separated of libs to link process. Lib names should be without extension and path. You only need this in special cases, like CodeGuard - build with bcc. + build with win/bcc. - HB_INSTALL_IMPLIB=no Copy import libraries created for external .dll dependencies to the library install directory in 'install' build phase. Default: yes @@ -1334,7 +1334,7 @@ TABLE OF CONTENT Follows some environment variable settings which are commonly believed by users to be useful, but which in reality are either not needed or not even used by Harbour build process and hbmk2. - You can delete them: + You should delete them: set HB_DIR= set HB_PATH= set HRB_DIR= @@ -1428,6 +1428,8 @@ TABLE OF CONTENT - To run result of above: 'hbmk2 script.hrb []' + NOTE: .hb and .hrb scripts are started in UTF-8 mode. + Examples to build a Harbour application: - To build one simple .prg: @@ -1801,7 +1803,10 @@ TABLE OF CONTENT created from root directory of the repository sandbox. Zip your patch file before attaching it. Use the extension '.zip'. Always use the same coding/formatting style as you find in - the files you're patching. + the files you're patching. The easiest way to achieve this + is to use these commands to format your sources: + $ uncrustify -c /bin/harbour.ucf <.c/.h filename> + $ /bin/hbformat <.prg/.ch/.hb filename> - In the rare case you need to send something large (> 100KB), use this free service: http://dropcanvas.com - Given a good history of valuable contributions, you can get diff --git a/harbour/contrib/hbfimage/fi_wrp.c b/harbour/contrib/hbfimage/fi_wrp.c index ba7deb19bb..d105dd3fae 100644 --- a/harbour/contrib/hbfimage/fi_wrp.c +++ b/harbour/contrib/hbfimage/fi_wrp.c @@ -1466,15 +1466,15 @@ HB_FUNC( FI_WINCONVTODIB ) #if ! defined( HB_OS_WIN_CE ) FIBITMAP * dib = hb_FIBITMAP_par( 1 ); HDC hDC = GetDC( NULL ); - HBITMAP bitmap; /* run function */ - bitmap = CreateDIBitmap( hDC, - FreeImage_GetInfoHeader( dib ), - CBM_INIT, - FreeImage_GetBits( dib ), - FreeImage_GetInfo( dib ), - DIB_RGB_COLORS ); + HBITMAP bitmap = CreateDIBitmap( hDC, + FreeImage_GetInfoHeader( dib ), + CBM_INIT, + FreeImage_GetBits( dib ), + FreeImage_GetInfo( dib ), + DIB_RGB_COLORS ); + ReleaseDC( NULL, hDC ); if( bitmap ) diff --git a/harbour/contrib/hbformat/hbfmtcls.prg b/harbour/contrib/hbformat/hbfmtcls.prg index de2921c8f6..c3074144cf 100644 --- a/harbour/contrib/hbformat/hbfmtcls.prg +++ b/harbour/contrib/hbformat/hbfmtcls.prg @@ -78,6 +78,10 @@ // STATIC a4 // THREAD STATIC a5 // --- +// +// a. To add a space between "!" operator and its argument +// unless it's beginning with a parenthesis: +// 'IF ! Empty()' and 'IF !( "a" == b )' CREATE CLASS HBFormatCode diff --git a/harbour/contrib/hbnf/doc/en/cint86.txt b/harbour/contrib/hbnf/doc/en/cint86.txt index 9b9c0a9659..1aac997150 100644 --- a/harbour/contrib/hbnf/doc/en/cint86.txt +++ b/harbour/contrib/hbnf/doc/en/cint86.txt @@ -70,7 +70,7 @@ That takes care of obtaining the segment portion of the pointer. To specify which register is to contain the offset, use the values REG_DS - and REG_ES which are defined in the FTINT86.CH file. When one of these + and REG_ES which are defined in the ftint86.ch file. When one of these values is found in an array element, it alerts FT_Int86() to use the offset portion of a pointer instead of a numeric value. REG_DS tells FT_Int86() to use the offset of the string in element 8, while REG_ES @@ -80,11 +80,11 @@ also split into two 8-bit registers. This function is only capable of receiving and returning registers that are 16 bits in size. To split a 16-bit register into two 8-bit values, you can use the - pseudo-functions HighByte() and LowByte(), contained in the .CH file. + pseudo-functions HighByte() and LowByte(), contained in the .ch file. To alter an 8-bit number so it will appear in the high-order byte of a register when passed to the FT_INT86() function, use the MakeHI() - pseudo-function contained in the .CH file. + pseudo-function contained in the .ch file. When run in real mode, this function is a shell for __ftint86(), which is written in assembler and does the actual work of executing diff --git a/harbour/contrib/hbnf/ftmenuto.ch b/harbour/contrib/hbnf/ftmenuto.ch index b6516733a4..900202b923 100644 --- a/harbour/contrib/hbnf/ftmenuto.ch +++ b/harbour/contrib/hbnf/ftmenuto.ch @@ -28,8 +28,8 @@ */ /* - These commands will simplify use of the FT_PROMPT() and - FT_MENUTO() functions. Refer to MENUTO.PRG for more info. + These commands will simplify use of the ft_Prompt() and + ft_MenuTo() functions. Refer to menuto.prg for more info. These commands can replace the existing Clipper @ PROMPT and MENU TO commands. */ diff --git a/harbour/contrib/hbodbc/odbc.c b/harbour/contrib/hbodbc/odbc.c index d3ecd1d5b6..9d8bf7bafd 100644 --- a/harbour/contrib/hbodbc/odbc.c +++ b/harbour/contrib/hbodbc/odbc.c @@ -146,7 +146,7 @@ typedef unsigned char SQLTCHAR; static HB_GARBAGE_FUNC( hb_SQLHENV_Destructor ) { /* Retrieve image pointer holder */ - SQLHENV ** ptr = ( SQLHENV ** ) Cargo; + SQLHENV * ptr = ( SQLHENV * ) Cargo; /* Check if pointer is not NULL to avoid multiple freeing */ if( *ptr ) @@ -155,7 +155,7 @@ static HB_GARBAGE_FUNC( hb_SQLHENV_Destructor ) #if ODBCVER >= 0x0300 SQLFreeHandle( SQL_HANDLE_ENV, ( SQLHANDLE ) *ptr ); #else - SQLFreeEnv( ( SQLHENV ) *ptr ); + SQLFreeEnv( *ptr ); #endif #endif @@ -177,16 +177,16 @@ static SQLHENV hb_SQLHENV_par( int iParam ) return ptr ? *ptr : NULL; } -static SQLHANDLE hb_SQLHENV_is( int iParam ) +static SQLHENV hb_SQLHENV_is( int iParam ) { return hb_parptrGC( &s_gcSQLHENVFuncs, iParam ); } -static void hb_SQLHENV_stor( SQLHENV hnd, int iParam ) +static void hb_SQLHENV_stor( SQLHENV hEnv, int iParam ) { SQLHENV * ptr = ( SQLHENV * ) hb_gcAllocate( sizeof( SQLHENV ), &s_gcSQLHENVFuncs ); - *ptr = hnd; + *ptr = hEnv; hb_storptrGC( ( void * ) ptr, iParam ); } @@ -196,7 +196,7 @@ static void hb_SQLHENV_stor( SQLHENV hnd, int iParam ) static HB_GARBAGE_FUNC( hb_SQLHDBC_Destructor ) { /* Retrieve image pointer holder */ - SQLHDBC ** ptr = ( SQLHDBC ** ) Cargo; + SQLHDBC * ptr = ( SQLHDBC * ) Cargo; /* Check if pointer is not NULL to avoid multiple freeing */ if( *ptr ) @@ -205,7 +205,7 @@ static HB_GARBAGE_FUNC( hb_SQLHDBC_Destructor ) #if ODBCVER >= 0x0300 SQLFreeHandle( SQL_HANDLE_DBC, ( SQLHANDLE ) *ptr ); #else - SQLFreeConnect( ( SQLHDBC ) *ptr ); + SQLFreeConnect( *ptr ); #endif #endif @@ -227,16 +227,16 @@ static SQLHDBC hb_SQLHDBC_par( int iParam ) return ptr ? *ptr : NULL; } -static SQLHANDLE hb_SQLHDBC_is( int iParam ) +static SQLHDBC hb_SQLHDBC_is( int iParam ) { return hb_parptrGC( &s_gcSQLHDBCFuncs, iParam ); } -static void hb_SQLHDBC_stor( SQLHDBC hnd, int iParam ) +static void hb_SQLHDBC_stor( SQLHDBC hDbc, int iParam ) { SQLHDBC * ptr = ( SQLHDBC * ) hb_gcAllocate( sizeof( SQLHDBC ), &s_gcSQLHDBCFuncs ); - *ptr = hnd; + *ptr = hDbc; hb_storptrGC( ( void * ) ptr, iParam ); } @@ -246,7 +246,7 @@ static void hb_SQLHDBC_stor( SQLHDBC hnd, int iParam ) static HB_GARBAGE_FUNC( hb_SQLHSTMT_Destructor ) { /* Retrieve image pointer holder */ - SQLHSTMT ** ptr = ( SQLHSTMT ** ) Cargo; + SQLHSTMT * ptr = ( SQLHSTMT * ) Cargo; /* Check if pointer is not NULL to avoid multiple freeing */ if( *ptr ) @@ -255,7 +255,7 @@ static HB_GARBAGE_FUNC( hb_SQLHSTMT_Destructor ) #if ODBCVER >= 0x0300 SQLFreeHandle( SQL_HANDLE_STMT, ( SQLHANDLE ) *ptr ); #else - SQLFreeStmt( ( SQLHSTMT ) *ptr, SQL_DROP ); + SQLFreeStmt( *ptr, SQL_DROP ); #endif #endif @@ -277,16 +277,16 @@ static SQLHSTMT hb_SQLHSTMT_par( int iParam ) return ptr ? *ptr : NULL; } -static SQLHANDLE hb_SQLHSTMT_is( int iParam ) +static SQLHSTMT hb_SQLHSTMT_is( int iParam ) { return hb_parptrGC( &s_gcSQLHSTMTFuncs, iParam ); } -static void hb_SQLHSTMT_stor( SQLHSTMT hnd, int iParam ) +static void hb_SQLHSTMT_stor( SQLHSTMT hStmt, int iParam ) { SQLHSTMT * ptr = ( SQLHSTMT * ) hb_gcAllocate( sizeof( SQLHSTMT ), &s_gcSQLHSTMTFuncs ); - *ptr = hnd; + *ptr = hStmt; hb_storptrGC( ( void * ) ptr, iParam ); } @@ -295,7 +295,11 @@ HB_FUNC( SQLALLOCENV ) /* @hEnv --> nRetCode */ { SQLHENV hEnv; +#if ODBCVER >= 0x0300 + hb_retni( SQLAllocHandle( SQL_HANDLE_ENV, SQL_NULL_HANDLE, &hEnv ) ); +#else hb_retni( SQLAllocEnv( &hEnv ) ); +#endif hb_SQLHENV_stor( hEnv, 1 ); } @@ -304,9 +308,14 @@ HB_FUNC( SQLALLOCCONNECT ) /* hEnv, @hDbc --> nRetCode */ { if( hb_SQLHENV_is( 1 ) ) { + SQLHENV hEnv = hb_SQLHENV_par( 1 ); SQLHDBC hDbc; - hb_retni( SQLAllocConnect( hb_SQLHENV_par( 1 ), &hDbc ) ); +#if ODBCVER >= 0x0300 + hb_retni( SQLAllocHandle( SQL_HANDLE_DBC, hEnv, &hDbc ) ); +#else + hb_retni( SQLAllocConnect( hEnv, &hDbc ) ); +#endif hb_SQLHDBC_stor( hDbc, 2 ); } @@ -410,9 +419,14 @@ HB_FUNC( SQLALLOCSTMT ) /* hDbc, @hStmt --> nRetCode */ { if( hb_SQLHDBC_is( 1 ) ) { + SQLHDBC hDbc = hb_SQLHDBC_par( 1 ); SQLHSTMT hStmt; - hb_retni( SQLAllocStmt( hb_SQLHDBC_par( 1 ), &hStmt ) ); +#if ODBCVER >= 0x0300 + hb_retni( SQLAllocHandle( SQL_HANDLE_STMT, hDbc, &hStmt ) ); +#else + hb_retni( SQLAllocStmt( hDbc, &hStmt ) ); +#endif hb_SQLHSTMT_stor( hStmt, 2 ); } @@ -666,6 +680,7 @@ HB_FUNC( SQLERROR ) /* hEnv, hDbc, hStmt, @cErrorClass, @nType, @cErrorMsg */ HB_FUNC( SQLGETDIAGREC ) /* nHandleType, hHandle, nRecNumber, @cSQLState, @nError, @cErrorMsg */ { +#if ODBCVER >= 0x0300 SQLSMALLINT iHandleType = ( SQLSMALLINT ) hb_parni( 1 ); SQLHANDLE hHandle; @@ -710,6 +725,12 @@ HB_FUNC( SQLGETDIAGREC ) /* nHandleType, hHandle, nRecNumber, @cSQLState, @nErro } else hb_errRT_BASE_SubstR( EG_ARG, 0, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); +#else + hb_retni( SQL_ERROR ); + hb_storc( "", 4 ); + hb_stornl( 0, 5 ); + hb_storc( "", 6 ); +#endif } HB_FUNC( SQLROWCOUNT ) @@ -760,7 +781,7 @@ HB_FUNC( SQLSETCONNECTATTR ) /* hDbc, nOption, uOption */ #else hb_retni( SQLSetConnectOption( hb_SQLHDBC_par( 1 ), ( SQLUSMALLINT ) hb_parni( 2 ), - ( SQLULEN ) HB_ISCHAR( 3 ) ? ( SQLULEN ) hb_parc( 3 ) : hb_parnl( 3 ) ) ); + HB_ISCHAR( 3 ) ? ( SQLULEN ) hb_parc( 3 ) : ( SQLULEN ) hb_parnl( 3 ) ) ); #endif } else @@ -779,7 +800,7 @@ HB_FUNC( SQLSETSTMTATTR ) /* hStmt, nOption, uOption --> nRetCode */ #else hb_retni( SQLSetStmtOption( hb_SQLHSTMT_par( 1 ), ( SQLUSMALLINT ) hb_parni( 2 ), - ( SQLULEN ) HB_ISCHAR( 3 ) ? ( SQLULEN ) hb_parc( 3 ) : hb_parnl( 3 ) ) ); + HB_ISCHAR( 3 ) ? ( SQLULEN ) hb_parc( 3 ) : ( SQLULEN ) hb_parnl( 3 ) ) ); #endif } else diff --git a/harbour/contrib/sddodbc/sddodbc.c b/harbour/contrib/sddodbc/sddodbc.c index 8a543297dd..8e40ace9c5 100644 --- a/harbour/contrib/sddodbc/sddodbc.c +++ b/harbour/contrib/sddodbc/sddodbc.c @@ -209,11 +209,21 @@ static HB_ERRCODE odbcConnect( SQLDDCONNECTION * pConnection, PHB_ITEM pItem ) char * szError; HB_ERRCODE errCode; +#if ODBCVER >= 0x0300 if( SQL_SUCCEEDED( SQLAllocHandle( SQL_HANDLE_ENV, SQL_NULL_HANDLE, &hEnv ) ) ) +#else + if( SQL_SUCCEEDED( SQLAllocEnv( &hEnv ) ) ) +#endif { +#if ODBCVER >= 0x0300 SQLSetEnvAttr( hEnv, SQL_ATTR_ODBC_VERSION, ( SQLPOINTER ) SQL_OV_ODBC3, SQL_IS_UINTEGER ); +#endif +#if ODBCVER >= 0x0300 if( SQL_SUCCEEDED( SQLAllocHandle( SQL_HANDLE_DBC, hEnv, &hConnect ) ) ) +#else + if( SQL_SUCCEEDED( SQLAllocConnect( hEnv, &hConnect ) ) ) +#endif { void * hConnStr; SQLTCHAR cBuffer[ 1024 ]; @@ -243,7 +253,11 @@ static HB_ERRCODE odbcConnect( SQLDDCONNECTION * pConnection, PHB_ITEM pItem ) hb_rddsqlSetError( errCode, szError, NULL, NULL, 0 ); hb_xfree( szError ); } +#if ODBCVER >= 0x0300 SQLFreeHandle( SQL_HANDLE_DBC, hConnect ); +#else + SQLFreeConnect( hConnect ); +#endif } else { @@ -251,7 +265,11 @@ static HB_ERRCODE odbcConnect( SQLDDCONNECTION * pConnection, PHB_ITEM pItem ) hb_errRT_ODBCDD( EG_OPEN, ESQLDD_CONNALLOC, szError, hb_arrayGetCPtr( pItem, 2 ), errCode ); hb_xfree( szError ); } +#if ODBCVER >= 0x0300 SQLFreeHandle( SQL_HANDLE_ENV, hEnv ); +#else + SQLFreeEnv( hEnv ); +#endif } else { @@ -268,8 +286,13 @@ static HB_ERRCODE odbcDisconnect( SQLDDCONNECTION * pConnection ) SDDCONN * pSDDConn = ( SDDCONN * ) pConnection->pSDDConn; SQLDisconnect( pSDDConn->hConn ); +#if ODBCVER >= 0x0300 SQLFreeHandle( SQL_HANDLE_DBC, pSDDConn->hConn ); SQLFreeHandle( SQL_HANDLE_ENV, pSDDConn->hEnv ); +#else + SQLFreeConnect( pSDDConn->hConn ); + SQLFreeEnv( pSDDConn->hEnv ); +#endif hb_xfree( pSDDConn ); return HB_SUCCESS; } @@ -284,7 +307,11 @@ static HB_ERRCODE odbcExecute( SQLDDCONNECTION * pConnection, PHB_ITEM pItem ) char * szError; HB_ERRCODE errCode; +#if ODBCVER >= 0x0300 if( ! SQL_SUCCEEDED( SQLAllocHandle( SQL_HANDLE_STMT, pSDDConn->hConn, &hStmt ) ) ) +#else + if( ! SQL_SUCCEEDED( SQLAllocStmt( pSDDConn->hConn, &hStmt ) ) ) +#endif { szError = odbcGetError( pSDDConn->hEnv, pSDDConn->hConn, SQL_NULL_HSTMT, &errCode ); hb_errRT_ODBCDD( EG_OPEN, ESQLDD_STMTALLOC, szError, hb_itemGetCPtr( pItem ), errCode ); @@ -302,7 +329,11 @@ static HB_ERRCODE odbcExecute( SQLDDCONNECTION * pConnection, PHB_ITEM pItem ) { /* TODO: new id */ hb_rddsqlSetError( 0, NULL, hb_itemGetCPtr( pItem ), NULL, ( unsigned long ) iCount ); +#if ODBCVER >= 0x0300 SQLFreeHandle( SQL_HANDLE_STMT, hStmt ); +#else + SQLFreeStmt( hStmt, SQL_DROP ); +#endif return HB_SUCCESS; } } @@ -312,7 +343,11 @@ static HB_ERRCODE odbcExecute( SQLDDCONNECTION * pConnection, PHB_ITEM pItem ) szError = odbcGetError( pSDDConn->hEnv, pSDDConn->hConn, hStmt, &errCode ); hb_rddsqlSetError( errCode, szError, hb_itemGetCPtr( pItem ), NULL, errCode ); hb_xfree( szError ); +#if ODBCVER >= 0x0300 SQLFreeHandle( SQL_HANDLE_STMT, hStmt ); +#else + SQLFreeStmt( hStmt, SQL_DROP ); +#endif return HB_FAILURE; } @@ -333,7 +368,11 @@ static HB_ERRCODE odbcOpen( SQLBASEAREAP pArea ) pArea->pSDDData = memset( hb_xgrab( sizeof( SDDDATA ) ), 0, sizeof( SDDDATA ) ); pSDDData = ( SDDDATA * ) pArea->pSDDData; +#if ODBCVER >= 0x0300 if( ! SQL_SUCCEEDED( SQLAllocHandle( SQL_HANDLE_STMT, pSDDConn->hConn, &hStmt ) ) ) +#else + if( ! SQL_SUCCEEDED( SQLAllocStmt( pSDDConn->hConn, &hStmt ) ) ) +#endif { szError = odbcGetError( pSDDConn->hEnv, pSDDConn->hConn, SQL_NULL_HSTMT, &errCode ); hb_errRT_ODBCDD( EG_OPEN, ESQLDD_STMTALLOC, szError, pArea->szQuery, errCode ); @@ -350,7 +389,11 @@ static HB_ERRCODE odbcOpen( SQLBASEAREAP pArea ) hb_strfree( hQuery ); hb_itemRelease( pItem ); szError = odbcGetError( pSDDConn->hEnv, pSDDConn->hConn, hStmt, &errCode ); +#if ODBCVER >= 0x0300 SQLFreeHandle( SQL_HANDLE_STMT, hStmt ); +#else + SQLFreeStmt( hStmt, SQL_DROP ); +#endif hb_errRT_ODBCDD( EG_OPEN, ESQLDD_INVALIDQUERY, szError, pArea->szQuery, errCode ); hb_xfree( szError ); return HB_FAILURE; @@ -364,7 +407,11 @@ static HB_ERRCODE odbcOpen( SQLBASEAREAP pArea ) if( ! SQL_SUCCEEDED( SQLNumResultCols( hStmt, &iNameLen ) ) ) { szError = odbcGetError( pSDDConn->hEnv, pSDDConn->hConn, hStmt, &errCode ); +#if ODBCVER >= 0x0300 SQLFreeHandle( SQL_HANDLE_STMT, hStmt ); +#else + SQLFreeStmt( hStmt, SQL_DROP ); +#endif hb_errRT_ODBCDD( EG_OPEN, ESQLDD_STMTDESCR + 1000, szError, pArea->szQuery, errCode ); hb_xfree( szError ); return HB_FAILURE; @@ -395,7 +442,11 @@ static HB_ERRCODE odbcOpen( SQLBASEAREAP pArea ) { hb_itemRelease( pItemEof ); szError = odbcGetError( pSDDConn->hEnv, pSDDConn->hConn, hStmt, NULL ); +#if ODBCVER >= 0x0300 SQLFreeHandle( SQL_HANDLE_STMT, hStmt ); +#else + SQLFreeStmt( hStmt, SQL_DROP ); +#endif hb_errRT_ODBCDD( EG_OPEN, ESQLDD_STMTDESCR + 1001, szError, pArea->szQuery, 0 ); hb_xfree( szError ); return HB_FAILURE; @@ -461,18 +512,24 @@ static HB_ERRCODE odbcOpen( SQLBASEAREAP pArea ) break; case SQL_DATE: +#if ODBCVER >= 0x0300 case SQL_TYPE_DATE: +#endif pFieldInfo.uiType = HB_FT_DATE; break; case SQL_TIME: +#if ODBCVER >= 0x0300 case SQL_TYPE_TIME: +#endif pFieldInfo.uiType = HB_FT_DATE; break; /* SQL_DATETIME = SQL_DATE = 9 */ case SQL_TIMESTAMP: +#if ODBCVER >= 0x0300 case SQL_TYPE_TIMESTAMP: +#endif pFieldInfo.uiType = HB_FT_TIMESTAMP; break; @@ -561,7 +618,11 @@ static HB_ERRCODE odbcOpen( SQLBASEAREAP pArea ) if( bError ) { hb_itemRelease( pItemEof ); +#if ODBCVER >= 0x0300 SQLFreeHandle( SQL_HANDLE_STMT, hStmt ); +#else + SQLFreeStmt( hStmt, SQL_DROP ); +#endif hb_errRT_ODBCDD( EG_CORRUPTION, ESQLDD_INVALIDFIELD, "Invalid field type", pArea->szQuery, errCode ); return HB_FAILURE; } @@ -589,7 +650,11 @@ static HB_ERRCODE odbcClose( SQLBASEAREAP pArea ) if( pSDDData ) { if( pSDDData->hStmt ) +#if ODBCVER >= 0x0300 SQLFreeHandle( SQL_HANDLE_STMT, pSDDData->hStmt ); +#else + SQLFreeStmt( pSDDData->hStmt, SQL_DROP ); +#endif hb_xfree( pSDDData ); pArea->pSDDData = NULL; @@ -656,21 +721,20 @@ static HB_ERRCODE odbcGoTo( SQLBASEAREAP pArea, HB_ULONG ulRecNo ) } case HB_FT_INTEGER: +#if ODBCVER >= 0x0300 if( pField->uiTypeExtended == ( HB_USHORT ) SQL_BIGINT ) { HB_I64 val = 0; + /* NOTE: SQL_C_SBIGINT not available before ODBC 3.0 */ if( SQL_SUCCEEDED( res = SQLGetData( hStmt, ui, SQL_C_SBIGINT, &val, sizeof( val ), &iLen ) ) ) - { pItem = hb_itemPutNIntLen( NULL, val, pField->uiLen ); - } } else +#endif { long int val = 0; if( SQL_SUCCEEDED( res = SQLGetData( hStmt, ui, SQL_C_LONG, &val, sizeof( val ), &iLen ) ) ) - { pItem = hb_itemPutNLLen( NULL, val, pField->uiLen ); - } } break; @@ -679,17 +743,13 @@ static HB_ERRCODE odbcGoTo( SQLBASEAREAP pArea, HB_ULONG ulRecNo ) { long int val = 0; if( SQL_SUCCEEDED( res = SQLGetData( hStmt, ui, SQL_C_LONG, &val, sizeof( val ), &iLen ) ) ) - { pItem = hb_itemPutNLLen( NULL, val, pField->uiLen ); - } } else { double val = 0.0; if( SQL_SUCCEEDED( res = SQLGetData( hStmt, ui, SQL_C_DOUBLE, &val, sizeof( val ), &iLen ) ) ) - { pItem = hb_itemPutNDLen( NULL, val, pField->uiLen, pField->uiDec ); - } } break; @@ -697,9 +757,7 @@ static HB_ERRCODE odbcGoTo( SQLBASEAREAP pArea, HB_ULONG ulRecNo ) { double val = 0.0; if( SQL_SUCCEEDED( res = SQLGetData( hStmt, ui, SQL_C_DOUBLE, &val, sizeof( val ), &iLen ) ) ) - { pItem = hb_itemPutNDLen( NULL, val, pField->uiLen, pField->uiDec ); - } break; } @@ -707,9 +765,7 @@ static HB_ERRCODE odbcGoTo( SQLBASEAREAP pArea, HB_ULONG ulRecNo ) { unsigned char val = 0; if( SQL_SUCCEEDED( res = SQLGetData( hStmt, ui, SQL_C_BIT, &val, sizeof( val ), &iLen ) ) ) - { pItem = hb_itemPutL( NULL, val != 0 ); - } break; } @@ -717,9 +773,7 @@ static HB_ERRCODE odbcGoTo( SQLBASEAREAP pArea, HB_ULONG ulRecNo ) { DATE_STRUCT val = { 0, 0, 0 }; if( SQL_SUCCEEDED( res = SQLGetData( hStmt, ui, SQL_C_DATE, &val, sizeof( val ), &iLen ) ) ) - { pItem = hb_itemPutD( NULL, val.year, val.month, val.day ); - } break; } @@ -727,9 +781,7 @@ static HB_ERRCODE odbcGoTo( SQLBASEAREAP pArea, HB_ULONG ulRecNo ) { TIME_STRUCT val = { 0, 0, 0 }; if( SQL_SUCCEEDED( res = SQLGetData( hStmt, ui, SQL_C_TIME, &val, sizeof( val ), &iLen ) ) ) - { pItem = hb_itemPutTDT( NULL, 0, hb_timeEncode( val.hour, val.minute, val.second, 0 ) ); - } break; } @@ -737,10 +789,8 @@ static HB_ERRCODE odbcGoTo( SQLBASEAREAP pArea, HB_ULONG ulRecNo ) { TIMESTAMP_STRUCT val = { 0, 0, 0, 0, 0, 0, 0 }; if( SQL_SUCCEEDED( res = SQLGetData( hStmt, ui, SQL_C_TIMESTAMP, &val, sizeof( val ), &iLen ) ) ) - { pItem = hb_itemPutTDT( NULL, hb_dateEncode( val.year, val.month, val.day ), hb_timeEncode( val.hour, val.minute, val.second, val.fraction / 1000000 ) ); - } break; } } diff --git a/harbour/contrib/xhb/html.ch b/harbour/contrib/xhb/html.ch index 269d19b31d..9eaef867be 100644 --- a/harbour/contrib/xhb/html.ch +++ b/harbour/contrib/xhb/html.ch @@ -4,7 +4,7 @@ /* * Harbour Project source code: - * HTML.CH Main HTML include File Definition of all html lib commands + * Main HTML include File Definition of all html lib commands * * Copyright 2000 Manos Aspradakis * www - http://harbour-project.org diff --git a/harbour/contrib/xhb/htmlform.ch b/harbour/contrib/xhb/htmlform.ch index b9cf58db4a..e51a33f064 100644 --- a/harbour/contrib/xhb/htmlform.ch +++ b/harbour/contrib/xhb/htmlform.ch @@ -4,7 +4,7 @@ /* * Harbour Project source code: - * FORMS.CH Include file to create forms + * Include file to create forms * * Copyright 2000 Manos Aspradakis * www - http://harbour-project.org diff --git a/harbour/extras/gtwvw/docs/funclist.txt b/harbour/extras/gtwvw/docs/funclist.txt index 6fdd844a11..e3493ab11d 100644 --- a/harbour/extras/gtwvw/docs/funclist.txt +++ b/harbour/extras/gtwvw/docs/funclist.txt @@ -554,7 +554,7 @@ read the source code :-). //------------------------------------------------- // // GTWVT compatibility functions. -// See WVT2WVW.CH about how to map coresponding +// See wvt2wvw.ch about how to map coresponding // GTWVT functions to GTWVW's ones. // //------------------------------------------------- @@ -798,7 +798,7 @@ WIN_DRAWTEXT ([]) // // CALLBACK FUNCTIONS // (functions in .prg, called by gtwvw) -// See WVT2WVW.CH about how to map coresponding +// See wvt2wvw.ch about how to map coresponding // GTWVT functions to GTWVW's ones. // //------------------------------------------------- diff --git a/harbour/extras/gtwvw/docs/gtwvw.txt b/harbour/extras/gtwvw/docs/gtwvw.txt index 89a867a333..46ccf80565 100644 --- a/harbour/extras/gtwvw/docs/gtwvw.txt +++ b/harbour/extras/gtwvw/docs/gtwvw.txt @@ -333,13 +333,13 @@ as similar as possible in structure. Although it is not a correct perpective a GTWVT application can be thought of as a GTWVW application with one window (ie. the Main window). With this perspective, one may expect to compile and link his GTWVT program using GTWVW. And yes, to some extent that is possible. -One of the simplest way is to include a function translator (WVT2WVW.CH) that +One of the simplest way is to include a function translator (wvt2wvw.ch) that will translate GTWVT functions into GTWVW ones, assuming Current Window is -used in all WVW_* functions. (Details of translation is described in WVT2WVW.CH). +used in all WVW_* functions. (Details of translation is described in wvt2wvw.ch). Notes: If one uses wvtclass functions, he must recompile/link wvtclass.prg and wvtpaint.prg, -after adding '#include "WVT2WVW.CH"', using GTWVW. +after adding '#include "wvt2wvw.ch"', using GTWVW. Notes: There is no guarantee that GTWVW will always be compatible with GTWVT. diff --git a/harbour/extras/gtwvw/docs/whatsnew.txt b/harbour/extras/gtwvw/docs/whatsnew.txt index 79156e87cc..cd76bfe0a6 100644 --- a/harbour/extras/gtwvw/docs/whatsnew.txt +++ b/harbour/extras/gtwvw/docs/whatsnew.txt @@ -104,9 +104,9 @@ * HB_FUNC( WVW_DRAWIMAGE ) Added lTransp optional parameter. Supports displaying images with proportional height/width ratio. - + .PRG callable wvw_SetMaxBMcache() + + .prg callable wvw_SetMaxBMcache() This is to get/set maximum number of bitmap cache for WVW_DRAWIMAGE. - + .PRG callable wvw_NumBMcache() + + .prg callable wvw_NumBMcache() This is to get current number of bitmap cached by WVW_DRAWIMAGE. * contrib/gtwvw/doc/whatsnew.txt * notes about this change. @@ -400,7 +400,7 @@ MISCELLANEOUS * WVW_ID_BASE_PUSHBUTTON is now 64000 (was 65000). It means we may not have Menu Id >= 64000 now. - New .PRG callable Functions: (combobox functions): + New .prg callable Functions: (combobox functions): + WVW_CBcreate( [nWinNum], nTop, nLeft, nWidth, aText, bBlock, nListLines, ; nReserved, nKbdType, aOffset) + WVW_CBdestroy( [nWinNum], nCBid ) @@ -628,7 +628,7 @@ You can now create pushbutton very easily. Simply define where do you want it to sit, and what action do you want it to do when it's clicked by means of a codeblock. -In previous version, we had to use WVWMOUSE.PRG to simulate pushbuttons +In previous version, we had to use wvwmouse.prg to simulate pushbuttons using wvw_DrawBoxRaised(). We also had to handle 'OnMouseHover', 'OnMouseOut', 'OnPressed', etc, to simulate the pressed/released state of the button. By using native push buttons, we don't have to worry about all that anymore. @@ -689,7 +689,7 @@ by WVW_INPUTFOCUS(). If no WVW_INPUTFOCUS() exists, or if it returns .f., GTWVW will do the usual response: asterisk sound and flashing window. -See INPFOCUS.PRG sample program demonstrating this feature. +See inpfocus.prg sample program demonstrating this feature. /*-------------------------------------------------------------------*/ @@ -830,7 +830,7 @@ WVW_Draw* functions. window. * Some castings and optimizations. * Some changes in some EXPORTed C functions. - (All .PRG / HB_FUNC functions are not affected) + (All .prg / HB_FUNC functions are not affected) * aOffset parameter to more primitive GUI drawing functions (following the changes on GTWVT by Pritpal Bedi) @@ -843,13 +843,13 @@ WVW_Draw* functions. * Some changes to Tooltip functions (adopted from Pritpal Bedi's work on GTWVT) - + New .PRG / HB_FUNC functions: (adopted from Pritpal Bedi's on GTWVT) + + New .prg / HB_FUNC functions: (adopted from Pritpal Bedi's on GTWVT) + HB_FUNC( WVW_UPDATEWINDOW ) + HB_FUNC( WVW_DRAWCOLORRECT ) (similar to WVW_FillRectangle) + DlgModeless functions + many WIN_* functions, general window API wrapper functions - - Removed .PRG / HB_FUNC functions: + - Removed .prg / HB_FUNC functions: - WVW_DeleteObject() (following GTWVT. Use WIN_DeleteObject() instead) diff --git a/harbour/extras/gtwvw/gtwvwd.c b/harbour/extras/gtwvw/gtwvwd.c index ea0322d307..04b271657f 100644 --- a/harbour/extras/gtwvw/gtwvwd.c +++ b/harbour/extras/gtwvw/gtwvwd.c @@ -5337,7 +5337,7 @@ static VOID CALLBACK hb_gt_wvwFlashWindow( HWND hwnd, UINT uMsg, UINT_PTR idEven static void hb_gt_wvwInputNotAllowed( UINT usWinNum, UINT message, WPARAM wParam, LPARAM lParam ) { - /* user may handle this event and returns .t. from .PRG level + /* user may handle this event and returns .T. from .prg level using function WVW_INPUTFOCUS() */ if( s_pWvwData->s_sApp->pSymWVW_INPUTFOCUS ) diff --git a/harbour/extras/gtwvw/tests/ebtest7.prg b/harbour/extras/gtwvw/tests/ebtest7.prg index 1af9085a08..ee6a84d88f 100644 --- a/harbour/extras/gtwvw/tests/ebtest7.prg +++ b/harbour/extras/gtwvw/tests/ebtest7.prg @@ -884,7 +884,7 @@ STATIC FUNCTION GetNumMask( Text, mcvaltype ) RETURN s -// from TGET.PRG +// from tget.prg STATIC FUNCTION IsBadDate( cBuffer ) // , cPicFunc ) diff --git a/harbour/extras/gtwvw/tests/prog0.prg b/harbour/extras/gtwvw/tests/prog0.prg index d632ff3f80..c99e95f8ee 100644 --- a/harbour/extras/gtwvw/tests/prog0.prg +++ b/harbour/extras/gtwvw/tests/prog0.prg @@ -90,7 +90,7 @@ PROCEDURE xGet1() RETURN // xGet1() -/* the following is adapted from WVTGUI.PRG by Pritpal Bedi +/* the following is adapted from wvtgui.prg by Pritpal Bedi for illustration purposes only */ FUNCTION xBrowse1() diff --git a/harbour/extras/gtwvw/tests/prog1.prg b/harbour/extras/gtwvw/tests/prog1.prg index 1e938f6985..1ea16cc050 100644 --- a/harbour/extras/gtwvw/tests/prog1.prg +++ b/harbour/extras/gtwvw/tests/prog1.prg @@ -5,8 +5,8 @@ /* Copyright 2004 Budyanto Dj. - This is PROG0.PRG modified in a quick and dirty fashion to convert - pseudo-windows in PROG0.PRG into real windows of GTWVW. + This is prog0.prg modified in a quick and dirty fashion to convert + pseudo-windows in prog0.prg into real windows of GTWVW. This quick and dirty approach is making use of GTWVW's MainCoord Mode. Instead of specifying to which window we are writing output, we simply @@ -108,7 +108,7 @@ PROCEDURE xGet1() RETURN // xGet1() -/* the following is adapted from WVTGUI.PRG by Pritpal Bedi +/* the following is adapted from wvtgui.prg by Pritpal Bedi for illustration purposes only */ FUNCTION xBrowse1() diff --git a/harbour/extras/gtwvw/tests/prog2.prg b/harbour/extras/gtwvw/tests/prog2.prg index 1c4cc0a17f..1c052d9875 100644 --- a/harbour/extras/gtwvw/tests/prog2.prg +++ b/harbour/extras/gtwvw/tests/prog2.prg @@ -128,7 +128,7 @@ PROCEDURE xGet1() RETURN // xGet1() -/* the following is adapted from WVTGUI.PRG by Pritpal Bedi +/* the following is adapted from wvtgui.prg by Pritpal Bedi for illustration purposes only */ FUNCTION xBrowse1() diff --git a/harbour/extras/gtwvw/tests/wvwtest9.prg b/harbour/extras/gtwvw/tests/wvwtest9.prg index 90b1696ba6..c4cb44c5e3 100644 --- a/harbour/extras/gtwvw/tests/wvwtest9.prg +++ b/harbour/extras/gtwvw/tests/wvwtest9.prg @@ -11,7 +11,7 @@ // Budyanto Dj. // based on: // -// WVTGUI.PRG, +// wvtgui.prg, // GTWVT Console GUI Interface // by Pritpal Bedi // @@ -114,14 +114,8 @@ #define IDTRYAGAIN 10 -#define WVW_MAXWINDOWS 20 // ! must match with HBGTWVW.H -#define WVW_DEFAULT_MENUKEYEVENT 1024 // ! must match with HBGTWVW.H - -// 20040303: !!! copied from WVWMOUSE.PRG pls create an include file -// mouse object types //20040303 -#define _MOBJECT_BUTTON 0 // mouse button -#define _MOBJECT_HSCROLL 1 // horiz scrollbar //obsolete, not used -#define _MOBJECT_VSCROLL 2 // horiz scrollbar //obsolete, not used +#define WVW_MAXWINDOWS 20 // ! must match with hbgtwvw.h +#define WVW_DEFAULT_MENUKEYEVENT 1024 // ! must match with hbgtwvw.h // for Button Types: //20040303 #define _BUTTON_NORMAL 0 // normal button diff --git a/harbour/src/rtl/achoice.prg b/harbour/src/rtl/achoice.prg index a824655aff..689a832259 100644 --- a/harbour/src/rtl/achoice.prg +++ b/harbour/src/rtl/achoice.prg @@ -76,7 +76,7 @@ FUNCTION AChoice( nTop, nLeft, nBottom, nRight, acItems, xSelect, xUserFunc, nPo ColorSelect( CLR_STANDARD ) /* NOTE: Undocumented parameter passing handled. ACHOICE() - is called in such way in RLDIALG.PRG from RL tool + is called in such way in rldialg.prg from RL tool supplied with Clipper 5.x. 6th parameter is the user function and 7th parameter is zero (empty I suppose). [vszakats] */ diff --git a/harbour/src/vm/thread.c b/harbour/src/vm/thread.c index dc3d214fdd..9de3f21187 100644 --- a/harbour/src/vm/thread.c +++ b/harbour/src/vm/thread.c @@ -893,7 +893,7 @@ HB_THREAD_NO hb_threadNO( void ) } /* - * .PRG level functions + * .prg level functions */ /* I. THREADS */ diff --git a/harbour/website/samples/testcgi.prg.html b/harbour/website/samples/testcgi.prg.html index c95c56619b..7e342ee592 100644 --- a/harbour/website/samples/testcgi.prg.html +++ b/harbour/website/samples/testcgi.prg.html @@ -24,7 +24,6 @@ body { color: #000000; background-color: #FFFFFF; }
/*
  *
- * TestCGI.PRG
  * Harbour Test of a CGI/HTML-Generator class.
  *
  * 1999/05/30  First implementation.
diff --git a/harbour/website/samples/testhtml.prg.html b/harbour/website/samples/testhtml.prg.html
index 7683a336d0..b56b4f2c7c 100644
--- a/harbour/website/samples/testhtml.prg.html
+++ b/harbour/website/samples/testhtml.prg.html
@@ -24,7 +24,6 @@ body { color: #000000; background-color: #FFFFFF; }
 
 
/*
 *
-*  TestHTML.PRG
 *  Harbour Test of a HTML-Generator class.
 *
 *  1999/05/30  First implementation.
diff --git a/harbour/website/third-party.html b/harbour/website/third-party.html
index 52a9a111e8..b68432316c 100644
--- a/harbour/website/third-party.html
+++ b/harbour/website/third-party.html
@@ -302,7 +302,7 @@ Harbour supports Vista Software's legendary, award-winning Apollo data engin
                     
Clip2win
-
Clip2win 3.9 is a tool to convert your old DOS programs for Windows so easy. Adding only one line in .PRG of your project and you get a program similar to Windows with menus, controls TextBox, Buttons and other characteristics of the environment.
+ Clip2win 3.9 is a tool to convert your old MS-DOS programs for Windows so easy. Adding only one line in .prg of your project and you get a program similar to Windows with menus, controls TextBox, Buttons and other characteristics of the environment.

Clip2win  is a simple way to pass clipper to windows based on Harbour & ooHG.