diff --git a/harbour/ChangeLog b/harbour/ChangeLog index de34af70fe..7a068219e4 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,23 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-05-24 19:53 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * contrib/sddoci/sddoci.c + ! Attempting to fix wrong numeric size for plain 'NUMERIC' + (without size) type. I'm guessing so I'd appreciate if + someone could dive into this more deeply. + + * utils/hbmk2/hbmk2.prg + * Minor. + + * package/winuni/RELNOTES + + Added OCILIB. + + * contrib/sddoci/sddoci.hbc + * contrib/sddoci/sddoci.c + * contrib/sddoci/Makefile + * Changes to follow OCILIB 3.6.0 + 2010-05-24 18:45 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * utils/hbmk2/hbmk2.prg * utils/hbmk2/examples/plug_moc.prg diff --git a/harbour/contrib/sddoci/Makefile b/harbour/contrib/sddoci/Makefile index 9eb5935b98..8e9ba14dd9 100644 --- a/harbour/contrib/sddoci/Makefile +++ b/harbour/contrib/sddoci/Makefile @@ -31,8 +31,8 @@ ifneq ($(HB_HAS_OCILIB),) ifeq ($(HB_COMPILER),bcc) HB_CFLAGS += -DOCI_API=_stdcall endif - ifneq ($(HB_WITH_OCILIB_UNICODE),) - HB_CFLAGS += -DOCI_CHARSET_UNICODE + ifneq ($(HB_WITH_OCILIB_WIDE),) + HB_CFLAGS += -DOCI_CHARSET_UNICODE -DOCI_CHARSET_WIDE else ifneq ($(HB_WITH_OCILIB_MIXED),) HB_CFLAGS += -DOCI_CHARSET_MIXED endif diff --git a/harbour/contrib/sddoci/sddoci.c b/harbour/contrib/sddoci/sddoci.c index 62095e6182..44e16c6109 100644 --- a/harbour/contrib/sddoci/sddoci.c +++ b/harbour/contrib/sddoci/sddoci.c @@ -62,7 +62,7 @@ #include -#if defined( OCI_CHARSET_UNICODE ) +#if defined( OCI_CHARSET_UNICODE ) || defined( OCI_CHARSET_WIDE ) #define M_HB_ARRAYGETSTR( arr, n, phstr, plen ) hb_arrayGetStrU16( arr, n, HB_CDP_ENDIAN_NATIVE, phstr, plen ) #define M_HB_ITEMCOPYSTR( itm, str, len ) hb_itemCopyStrU16( itm, HB_CDP_ENDIAN_NATIVE, str, len ) #define M_HB_ITEMGETSTR( itm, phstr, plen ) hb_itemGetStrU16( itm, HB_CDP_ENDIAN_NATIVE, phstr, plen ) @@ -78,7 +78,7 @@ #define M_HB_CHAR char #endif -#if defined( OCI_CHARSET_UNICODE ) || defined( OCI_CHARSET_MIXED ) +#if defined( OCI_CHARSET_UNICODE ) || defined( OCI_CHARSET_WIDE ) || defined( OCI_CHARSET_MIXED ) #define D_HB_ARRAYGETSTR( arr, n, phstr, plen ) hb_arrayGetStrU16( arr, n, HB_CDP_ENDIAN_NATIVE, phstr, plen ) #define D_HB_ITEMCOPYSTR( itm, str, len ) hb_itemCopyStrU16( itm, HB_CDP_ENDIAN_NATIVE, str, len ) #define D_HB_ITEMGETSTR( itm, phstr, plen ) hb_itemGetStrU16( itm, HB_CDP_ENDIAN_NATIVE, phstr, plen ) @@ -390,8 +390,13 @@ static HB_ERRCODE ocilibOpen( SQLBASEAREAP pArea ) case OCI_CDT_NUMERIC: pFieldInfo.uiType = HB_FT_LONG; - pFieldInfo.uiLen = ( HB_USHORT ) OCI_ColumnGetPrecision( col ); - pFieldInfo.uiDec = ( HB_USHORT ) OCI_ColumnGetScale( col ); + /* For plain 'NUMERIC', precision is zero and scale is -127 */ + if( OCI_ColumnGetPrecision( col ) > 0 ) + pFieldInfo.uiLen = ( HB_USHORT ) OCI_ColumnGetPrecision( col ); + if( OCI_ColumnGetScale( col ) >= 0 ) + pFieldInfo.uiDec = ( HB_USHORT ) OCI_ColumnGetScale( col ); + else + pFieldInfo.uiDec = ( HB_USHORT ) hb_setGetDecimals(); break; case OCI_CDT_LONG: diff --git a/harbour/contrib/sddoci/sddoci.hbc b/harbour/contrib/sddoci/sddoci.hbc index 3ac1d39d4b..a707b4d7cd 100644 --- a/harbour/contrib/sddoci/sddoci.hbc +++ b/harbour/contrib/sddoci/sddoci.hbc @@ -3,8 +3,8 @@ # libs=sddoci -{HB_WITH_OCILIB_UNICODE}libs=ocilibw +{HB_WITH_OCILIB_WIDE}libs=ocilibw {HB_WITH_OCILIB_MIXED}libs=ocilibm -{!HB_WITH_OCILIB_UNICODE&!HB_WITH_OCILIB_MIXED}libs=ociliba +{!HB_WITH_OCILIB_WIDE&!HB_WITH_OCILIB_MIXED}libs=ociliba libs=../rddsql/rddsql.hbc diff --git a/harbour/package/winuni/RELNOTES b/harbour/package/winuni/RELNOTES index a356dfff87..f5d87fe6b4 100644 --- a/harbour/package/winuni/RELNOTES +++ b/harbour/package/winuni/RELNOTES @@ -63,6 +63,7 @@ Tool/lib versions used to create this package: FreeImage 3.13.0 GD 2.0.35 MySQL 5.1.41 + OCILIB 3.6.0 OpenSSL 1.0.0 PostgreSQL 8.4.2-1 QT 4.6.2 diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index a3d13ed1de..12af227d3e 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -6015,34 +6015,25 @@ STATIC FUNCTION PlugIn_Execute( hbmk, cState ) RETURN NIL STATIC FUNCTION hbmk_ErrorMessage( oError ) - - // start error message + /* start error message */ LOCAL cMessage := iif( oError:severity > ES_WARNING, "Error", "Warning" ) + " " - // add subsystem name if available - IF ISCHARACTER( oError:subsystem ) - cMessage += oError:subsystem() - ELSE - cMessage += "???" - ENDIF + /* add subsystem name if available */ + cMessage += iif( ISCHARACTER( oError:subsystem ), oError:subsystem(), "???" ) - // add subsystem's error code if available - IF ISNUMBER( oError:subCode ) - cMessage += "/" + hb_NToS( oError:subCode ) - ELSE - cMessage += "/???" - ENDIF + /* add subsystem's error code if available */ + cMessage += "/" + iif( ISNUMBER( oError:subCode ), hb_ntos( oError:subCode ), "???" ) - // add error description if available + /* add error description if available */ IF ISCHARACTER( oError:description ) cMessage += " " + oError:description ENDIF - // add either filename or operation + /* add either filename or operation */ DO CASE - CASE !Empty( oError:filename ) + CASE ! Empty( oError:filename ) cMessage += ": " + oError:filename - CASE !Empty( oError:operation ) + CASE ! Empty( oError:operation ) cMessage += ": " + oError:operation ENDCASE