From fcb0529a28c1902db811ebbc880e1bcbfb9c70ba Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 20 Nov 2012 01:15:47 +0000 Subject: [PATCH] 2012-11-20 02:09 UTC+0100 Firstname Lastname (me domain.net) * bin/commit.hb ! fixed for *nix systems * contrib/hbodbc/tests/testodbc.prg + added test for double opening * ChangeLog % moved copyright notice to end of file + added change markup quick reference to header * doc/howtorep.txt * synced wording with above * extras/hbxlsxml/tests/example.prg * do not use WITH OBJECT in its current form * src/rtl/gtsln/Makefile + added option needed for AIX. Reported by Luiz. * utils/hbmk2/hbmk2.prg * minor change in wording in help + added help note about incompatibility of Clipper binary objects/libs * tests/fixcase.hb % one exception removed + some others documented * contrib/gtwvg/tests/_activex.prg * contrib/gtwvg/tests/_tbrowse.prg * contrib/gtwvg/tests/_utils.prg * contrib/gtwvg/tests/demowvg.prg * contrib/gtwvg/tests/demowvg1.prg * contrib/xhb/trpccli.prg * utils/hbtest/rt_math.prg * rerun after removing one exception permanently, another temporarily. --- harbour/ChangeLog | 61 ++++- harbour/bin/commit.hb | 16 +- harbour/contrib/gtwvg/tests/_activex.prg | 2 +- harbour/contrib/gtwvg/tests/_tbrowse.prg | 2 +- harbour/contrib/gtwvg/tests/_utils.prg | 4 +- harbour/contrib/gtwvg/tests/demowvg.prg | 16 +- harbour/contrib/gtwvg/tests/demowvg1.prg | 6 +- harbour/contrib/hbodbc/tests/testodbc.prg | 12 +- harbour/contrib/xhb/trpccli.prg | 4 +- harbour/doc/howtorep.txt | 10 +- harbour/extras/hbxlsxml/tests/example.prg | 308 +++++++++++----------- harbour/src/rtl/gtsln/Makefile | 4 + harbour/tests/fixcase.hb | 5 +- harbour/utils/hbmk2/hbmk2.prg | 5 +- harbour/utils/hbtest/rt_math.prg | 2 +- 15 files changed, 254 insertions(+), 203 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index a406426a36..48a65ad584 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -5,16 +5,48 @@ /* Read doc/howtorep.txt and use this format for entry headers: YYYY-MM-DD HH:MM UTC[-|+]hhmm Your Full Name (your_email address) 2010-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) + See copyright note at the end of the file + Notation (in 5th column): + * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment + */ - This work is licensed under the Creative Commons Attribution-ShareAlike - License. To view a copy of this license, visit - http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to - Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, - USA. A summary of the license and the full legal text is included - in file: COPYING. If you wish to distribute some or all of this work - under different terms, please contact respective author(s). - The license applies to all entries newer than 2009-04-28. -*/ +2012-11-20 02:09 UTC+0100 Firstname Lastname (me domain.net) + * bin/commit.hb + ! fixed for *nix systems + + * contrib/hbodbc/tests/testodbc.prg + + added test for double opening + + * ChangeLog + % moved copyright notice to end of file + + added change markup quick reference to header + + * doc/howtorep.txt + * synced wording with above + + * extras/hbxlsxml/tests/example.prg + * do not use WITH OBJECT in its current form + + * src/rtl/gtsln/Makefile + + added option needed for AIX. Reported by Luiz. + + * utils/hbmk2/hbmk2.prg + * minor change in wording in help + + added help note about incompatibility of Clipper binary objects/libs + + * tests/fixcase.hb + % one exception removed + + some others documented + + * contrib/gtwvg/tests/_activex.prg + * contrib/gtwvg/tests/_tbrowse.prg + * contrib/gtwvg/tests/_utils.prg + * contrib/gtwvg/tests/demowvg.prg + * contrib/gtwvg/tests/demowvg1.prg + * contrib/xhb/trpccli.prg + * utils/hbtest/rt_math.prg + * rerun after removing one exception permanently, + another temporarily. 2012-11-18 13:27 UTC+0100 Viktor Szakats (harbour syenar.net) * contrib/hbodbc/hbodbc.hbx @@ -243267,3 +243299,14 @@ June 1st. 1999 00:30 Ron Pinkas so loop code may manipulate the counter vaiable. TEST/WORKING/TestFor.prg -> added this file + +/* + This work is licensed under the Creative Commons Attribution-ShareAlike + License. To view a copy of this license, visit + http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to + Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, + USA. A summary of the license and the full legal text is included + in file: COPYING. If you wish to distribute some or all of this work + under different terms, please contact respective author(s). + The license applies to all entries newer than 2009-04-28. + */ diff --git a/harbour/bin/commit.hb b/harbour/bin/commit.hb index 22d7f1f40d..bf835a75b3 100644 --- a/harbour/bin/commit.hb +++ b/harbour/bin/commit.hb @@ -193,20 +193,28 @@ STATIC FUNCTION Shell() #endif IF ! Empty( cShell ) -#if ! defined( __PLATFORM__UNIX ) - cShell := cShell + " /c" +#if defined( __PLATFORM__UNIX ) + cShell += " -c" +#else + cShell += " /c" #endif ENDIF RETURN cShell +STATIC FUNCTION CmdEscape( cCmd ) +#if defined( __PLATFORM__UNIX ) + cCmd := Chr( 34 ) + cCmd + Chr( 34 ) +#endif + RETURN cCmd + STATIC FUNCTION Changes( cVCS ) LOCAL cStdOut := "" DO CASE - CASE cVCS == "svn" ; hb_processRun( Shell() + " " + "svn status -q",, @cStdOut ) - CASE cVCS == "git" ; hb_processRun( Shell() + " " + "git status -s",, @cStdOut ) + CASE cVCS == "svn" ; hb_processRun( Shell() + " " + CmdEscape( "svn status -q" ),, @cStdOut ) + CASE cVCS == "git" ; hb_processRun( Shell() + " " + CmdEscape( "git status -s" ),, @cStdOut ) ENDCASE RETURN hb_ATokens( StrTran( cStdOut, Chr( 13 ) ), Chr( 10 ) ) diff --git a/harbour/contrib/gtwvg/tests/_activex.prg b/harbour/contrib/gtwvg/tests/_activex.prg index 6658e0657e..ce39c2fdbc 100644 --- a/harbour/contrib/gtwvg/tests/_activex.prg +++ b/harbour/contrib/gtwvg/tests/_activex.prg @@ -391,7 +391,7 @@ STATIC FUNCTION ExeActiveX( nActiveX, oCom, xParam ) // oCom:emboss( 3,0 ) oCom:copy2ClipBoard() oCom:view := 11 - oCom:setBackGroundColor( rgb( 225, 225, 225 ) ) + oCom:setBackGroundColor( RGB( 225, 225, 225 ) ) // oCom:rotate90() ENDIF diff --git a/harbour/contrib/gtwvg/tests/_tbrowse.prg b/harbour/contrib/gtwvg/tests/_tbrowse.prg index 55856654c8..97e62bd3d3 100644 --- a/harbour/contrib/gtwvg/tests/_tbrowse.prg +++ b/harbour/contrib/gtwvg/tests/_tbrowse.prg @@ -126,7 +126,7 @@ FUNCTION ExecBrowser( oCrt ) IF s_nStyle > 5 s_nStyle := 0 ENDIF - Wvt_SetPen( s_nStyle, 0, rgb( 210,1210,210 ) ) + Wvt_SetPen( s_nStyle, 0, RGB( 210,1210,210 ) ) s_nStyle++ hb_gtInfo( HB_GTI_WINTITLE, "WVT Gui TBrowse()" ) diff --git a/harbour/contrib/gtwvg/tests/_utils.prg b/harbour/contrib/gtwvg/tests/_utils.prg index 550cdb386b..ee8c903105 100644 --- a/harbour/contrib/gtwvg/tests/_utils.prg +++ b/harbour/contrib/gtwvg/tests/_utils.prg @@ -267,7 +267,7 @@ FUNCTION WvtWindowExpand( nUnits ) RETURN .T. -FUNCTION rgb( r, g, b ) +FUNCTION RGB( r, g, b ) RETURN r + ( g * 256 ) + ( b * 256 * 256 ) @@ -443,7 +443,7 @@ FUNCTION Popups( nID, lDestroy ) FUNCTION DispStatusMsg( cMsg ) - Wvt_DrawLabel( MaxRow(), 60, cMsg, 6, , 0, rgb( 198, 198, 198 ), "Arial", 18, , 900 ) + Wvt_DrawLabel( MaxRow(), 60, cMsg, 6, , 0, RGB( 198, 198, 198 ), "Arial", 18, , 900 ) RETURN .T. diff --git a/harbour/contrib/gtwvg/tests/demowvg.prg b/harbour/contrib/gtwvg/tests/demowvg.prg index 341c48dd91..28e20fe206 100644 --- a/harbour/contrib/gtwvg/tests/demowvg.prg +++ b/harbour/contrib/gtwvg/tests/demowvg.prg @@ -130,7 +130,7 @@ PROCEDURE Main() AAdd( aBlocks, {|| Wvt_SetIcon( GetResource( "vr_1.ico" ) ) } ) AAdd( aBlocks, {|| Wvt_SetTitle( "Vouch" ) } ) - AAdd( aBlocks, {|| Wvt_DrawLabel( 1, 40, cLabel, 6,, rgb( 255, 255, 255 ), rgb( 198, 198, 198 ), "Arial", 26, , , , , .T., .T. ) } ) + AAdd( aBlocks, {|| Wvt_DrawLabel( 1, 40, cLabel, 6,, RGB( 255, 255, 255 ), RGB( 198, 198, 198 ), "Arial", 26, , , , , .T., .T. ) } ) AAdd( aBlocks, {|| Wvt_DrawBoxRaised( nTop, nLft, nBtm, nRgt ) } ) AAdd( aBlocks, {|| Wvt_DrawBoxRecessed( 7, 61, 13, 70 ) } ) AAdd( aBlocks, {|| Wvt_DrawBoxGroup( 15, 59, 18, 72 ) } ) @@ -274,20 +274,20 @@ PROCEDURE WvtNextGets_X() AAdd( aBlocks, {|| Wvt_SetTitle( "Wvt Gets 2nd Window with Different Palette" ) } ) AAdd( aBlocks, {|| Wvt_DrawLine( MaxRow() - 1, 0, MaxRow() - 1, MaxCol() ) } ) - AAdd( aBlocks, {|| Wvt_SetBrush( 0, rgb( 32, 255, 100 ) ) } ) + AAdd( aBlocks, {|| Wvt_SetBrush( 0, RGB( 32, 255, 100 ) ) } ) AAdd( aBlocks, {|| Wvt_DrawEllipse( 6, 50, 10, 58 ) } ) - AAdd( aBlocks, {|| Wvt_SetBrush( 2, rgb( 255, 255, 100 ), 1 ) } ) + AAdd( aBlocks, {|| Wvt_SetBrush( 2, RGB( 255, 255, 100 ), 1 ) } ) AAdd( aBlocks, {|| Wvt_DrawRectangle( 11, 50, 13, 58 ) } ) AAdd( aBlocks, {|| Wvt_DrawBoxGroupRaised( 5, 6, 19, 72 ) } ) AAdd( aBlocks, {|| AEval( GetList, {| oGet | Wvt_DrawBoxGet( oGet:Row, oGet:Col, Len( Transform( oGet:VarGet(), oGet:Picture ) ) ) } ) } ) AAdd( aBlocks, {|| Wvt_DrawButton( 21, 6, 22, 9, "New", "vouch1.bmp" ) } ) - AAdd( aBlocks, {|| Wvt_DrawButton( 21, 11, 22, 14, "Browse", "vouch1.bmp", 1, rgb( 255, 255, 255 ) ) } ) + AAdd( aBlocks, {|| Wvt_DrawButton( 21, 11, 22, 14, "Browse", "vouch1.bmp", 1, RGB( 255, 255, 255 ) ) } ) AAdd( aBlocks, {|| Wvt_DrawButton( 21, 16, 22, 19, , "vouch1.bmp" ) } ) - AAdd( aBlocks, {|| Wvt_DrawButton( 21, 21, 22, 24, "Data",, 0, rgb( 100, 22, 241 ), rgb( 198, 198, 198 ) ) } ) + AAdd( aBlocks, {|| Wvt_DrawButton( 21, 21, 22, 24, "Data",, 0, RGB( 100, 22, 241 ), RGB( 198, 198, 198 ) ) } ) AAdd( aBlocks, {|| Wvt_DrawButton( 21, 26, 22, 29, "Flat", IMAGE_VR, 2 ) } ) AAdd( aBlocks, {|| Wvt_DrawButton( 21, 31, 22, 34, "Outline", IMAGE_VR, 3 ) } ) - AAdd( aBlocks, {|| Wvt_DrawButton( 22, 36, 22, 41, "Data",, 0, rgb( 100, 22, 241 ), rgb( 198, 198, 198 ) ) } ) + AAdd( aBlocks, {|| Wvt_DrawButton( 22, 36, 22, 41, "Data",, 0, RGB( 100, 22, 241 ), RGB( 198, 198, 198 ) ) } ) aLastPaint := WvtSetBlocks( aBlocks ) @@ -379,8 +379,8 @@ FUNCTION WvtLines() AAdd( aBlocks, {|| Wvt_DrawLine( 0, 0, 0, nCols, WVT_LINE_HORZ, WVT_LINE_RAISED, WVT_LINE_CENTER ) } ) AAdd( aBlocks, {|| Wvt_DrawLine( 1, 0, 1, nCols, WVT_LINE_HORZ, WVT_LINE_RECESSED, WVT_LINE_TOP ) } ) - AAdd( aBlocks, {|| Wvt_DrawLine( 2, 0, 2, nCols, WVT_LINE_HORZ, WVT_LINE_PLAIN, WVT_LINE_CENTER, WVT_LINE_SOLID, 4, Rgb( 255, 255, 255 ) ) } ) - AAdd( aBlocks, {|| Wvt_DrawLine( 3, 0, 3, nCols, WVT_LINE_HORZ, WVT_LINE_RAISED, WVT_LINE_CENTER, WVT_LINE_DASH, 0, Rgb( 255, 0, 0 ) ) } ) + AAdd( aBlocks, {|| Wvt_DrawLine( 2, 0, 2, nCols, WVT_LINE_HORZ, WVT_LINE_PLAIN, WVT_LINE_CENTER, WVT_LINE_SOLID, 4, RGB( 255, 255, 255 ) ) } ) + AAdd( aBlocks, {|| Wvt_DrawLine( 3, 0, 3, nCols, WVT_LINE_HORZ, WVT_LINE_RAISED, WVT_LINE_CENTER, WVT_LINE_DASH, 0, RGB( 255, 0, 0 ) ) } ) AAdd( aBlocks, {|| Wvt_DrawLine( 4, 0, 4, nCols, WVT_LINE_HORZ, WVT_LINE_RECESSED, WVT_LINE_BOTTOM ) } ) @ 0, 1 SAY "Center Raised" diff --git a/harbour/contrib/gtwvg/tests/demowvg1.prg b/harbour/contrib/gtwvg/tests/demowvg1.prg index 65b26ff233..2775697aef 100644 --- a/harbour/contrib/gtwvg/tests/demowvg1.prg +++ b/harbour/contrib/gtwvg/tests/demowvg1.prg @@ -48,7 +48,7 @@ PROCEDURE Main() aPaint := {} - AAdd( aPaint, { "Label", {|| Wvt_DrawLabel( 1, 40, "Harbour Console GUI Demo", 6, , rgb( 255, 255, 255 ), rgb( 198, 198, 198 ), "Arial", 26, , , , , .T., .T. ) }, { WVT_BLOCK_LABEL, 1, 10, 3, 50 } } ) + AAdd( aPaint, { "Label", {|| Wvt_DrawLabel( 1, 40, "Harbour Console GUI Demo", 6, , RGB( 255, 255, 255 ), RGB( 198, 198, 198 ), "Arial", 26, , , , , .T., .T. ) }, { WVT_BLOCK_LABEL, 1, 10, 3, 50 } } ) AAdd( aPaint, { "Box_1", {|| Wvt_DrawBoxRaised( 4, 4, 20, 75 ) }, { WVT_BLOCK_BOX, 4, 4, 20, 75 } } ) AAdd( aPaint, { "Box_2", {|| Wvt_DrawBoxRecessed( 7, 61, 13, 70 ) }, { WVT_BLOCK_BOX, 7, 61, 13, 70 } } ) AAdd( aPaint, { "Box_3", {|| Wvt_DrawBoxGroup( 15, 59, 18, 72 ) }, { WVT_BLOCK_BOX, 15, 59, 18, 72 } } ) @@ -137,7 +137,7 @@ STATIC FUNCTION MyChoice( aChoices ) RETURN nChoice -FUNCTION rgb( r, g, b ) +FUNCTION RGB( r, g, b ) RETURN r + ( g * 256 ) + ( b * 256 * 256 ) @@ -146,7 +146,7 @@ FUNCTION DispStatusMsg( cMsg ) ClearStatusMsg() /* NOTE: The GUI function used as such is not subject to autopainting */ - Wvt_DrawLabel( MaxRow(), 60, cMsg, 6, , 0, rgb( 198, 198, 198 ), "Arial", 18, , 900 ) + Wvt_DrawLabel( MaxRow(), 60, cMsg, 6, , 0, RGB( 198, 198, 198 ), "Arial", 18, , 900 ) RETURN .T. diff --git a/harbour/contrib/hbodbc/tests/testodbc.prg b/harbour/contrib/hbodbc/tests/testodbc.prg index fe86a3a281..dce331e0ec 100644 --- a/harbour/contrib/hbodbc/tests/testodbc.prg +++ b/harbour/contrib/hbodbc/tests/testodbc.prg @@ -29,8 +29,18 @@ PROCEDURE Main() SQLAllocEnv( @hEnv ) ? "Allocating connection... " SQLAllocConnect( hEnv, @hDbc ) + ? "-- 1st" ? "Connecting to driver " + cConnStr + "... " - SQLDriverConnect( hDbc, cConnStr, @cConstrout ) + ? SQLDriverConnect( hDbc, cConnStr, @cConstrout ) + ? cConstrout + ? "-- 2nd (test)" + cConnStr := "DBQ=" + hb_FNameMerge( hb_DirBase(), "test_nothere.mdb" ) + ";Driver={Not here (*.non)}" + ? "Connecting to driver " + cConnStr + "... " + ? SQLDriverConnect( hDbc, cConnStr, @cConstrout ) + ? cConstrout + ? SQLError( , hDbc,, @cError1, @nError, @cError2 ) + ? "SQLError", cError1, nError, cError2 + ? "--" ? "Allocating statement... " SQLAllocStmt( hDbc, @hStmt ) diff --git a/harbour/contrib/xhb/trpccli.prg b/harbour/contrib/xhb/trpccli.prg index 98ea8c5e65..911edcf8fe 100644 --- a/harbour/contrib/xhb/trpccli.prg +++ b/harbour/contrib/xhb/trpccli.prg @@ -356,7 +356,7 @@ METHOD UDPAccept() CLASS TRPCClient IF ::nTimeout >= 0 nTime := Int( Seconds() * 1000 ) // a little tollerance must be added for double roundings - // in the double INT() functions + // in the double Int() functions IF nTime - ::nUDPTimeBegin >= ::nTimeout - 5 EXIT ENDIF @@ -832,7 +832,7 @@ METHOD TCPAccept() CLASS TRPCClient IF nTimeLimit >= 0 nTime := Int( Seconds() * 1000 ) // a little tollerance must be added for double roundings - // in the double INT() functions + // in the double Int() functions IF nTime - ::nTCPTimeBegin >= nTimeLimit - 5 EXIT ENDIF diff --git a/harbour/doc/howtorep.txt b/harbour/doc/howtorep.txt index 58de667b17..c728c0e983 100644 --- a/harbour/doc/howtorep.txt +++ b/harbour/doc/howtorep.txt @@ -105,11 +105,11 @@ by Viktor Szakats * dir/filenam1.txt + dir/filenam2.txt - dir/filenam3.txt - * Changed, bla-bla - ! Fixed - % Optimized - + Added - - Removed + * Change + ! Fixe + % Optimization + + Addition + - Removal ; Comment - Best is to use commit.hb script to add new entry: diff --git a/harbour/extras/hbxlsxml/tests/example.prg b/harbour/extras/hbxlsxml/tests/example.prg index ff8437b0b8..800c4cceed 100644 --- a/harbour/extras/hbxlsxml/tests/example.prg +++ b/harbour/extras/hbxlsxml/tests/example.prg @@ -63,160 +63,147 @@ PROCEDURE Main() LOCAL xTitulo LOCAL xPeriodo LOCAL xOrdem + LOCAL oObj SET DATE ANSI oXml := ExcelWriterXML():New( xarquivo ) oXml:setOverwriteFile( .T. ) - WITH OBJECT oXml:addStyle( "textLeft" ) - :alignHorizontal( "Left" ) - :alignVertical( "Center" ) - :fontSize( 10 ) - ENDWITH + oObj := oXml:addStyle( "textLeft" ) + oObj:alignHorizontal( "Left" ) + oObj:alignVertical( "Center" ) + oObj:fontSize( 10 ) - WITH OBJECT oXml:addStyle( "textLeftWrap" ) - :alignHorizontal( "Left" ) - :alignVertical( "Center" ) - :alignWraptext() - :fontSize( 10 ) - ENDWITH - WITH OBJECT oXml:addStyle( "textLeftBold" ) - :alignHorizontal( "Left" ) - :alignVertical( "Center" ) - :fontSize( 10 ) - :setFontBold() - ENDWITH + oObj := oXml:addStyle( "textLeftWrap" ) + oObj:alignHorizontal( "Left" ) + oObj:alignVertical( "Center" ) + oObj:alignWraptext() + oObj:fontSize( 10 ) - WITH OBJECT oXml:addStyle( "textLeftBoldCor" ) - :alignHorizontal( "Left" ) - :alignVertical( "Center" ) - :fontSize( 10 ) - :setFontBold() - :bgColor( "lightblue" ) - :alignWraptext() - ENDWITH + oObj := oXml:addStyle( "textLeftBold" ) + oObj:alignHorizontal( "Left" ) + oObj:alignVertical( "Center" ) + oObj:fontSize( 10 ) + oObj:setFontBold() - WITH OBJECT oXml:addStyle( "textRight" ) - :alignHorizontal( "Right" ) - :alignVertical( "Center" ) - :fontSize( 10 ) - ENDWITH + oObj := oXml:addStyle( "textLeftBoldCor" ) + oObj:alignHorizontal( "Left" ) + oObj:alignVertical( "Center" ) + oObj:fontSize( 10 ) + oObj:setFontBold() + oObj:bgColor( "lightblue" ) + oObj:alignWraptext() - WITH OBJECT oXml:addStyle( "textRightBold" ) - :alignHorizontal( "Right" ) - :alignVertical( "Center" ) - :fontSize( 10 ) - :setFontBold() - ENDWITH + oObj := oXml:addStyle( "textRight" ) + oObj:alignHorizontal( "Right" ) + oObj:alignVertical( "Center" ) + oObj:fontSize( 10 ) - WITH OBJECT oXml:addStyle( "textRightBoldCor" ) - :alignHorizontal( "Right" ) - :alignVertical( "Center" ) - :fontSize( 10 ) - :setFontBold() - :bgColor( "lightblue" ) - :alignWraptext() - ENDWITH + oObj := oXml:addStyle( "textRightBold" ) + oObj:alignHorizontal( "Right" ) + oObj:alignVertical( "Center" ) + oObj:fontSize( 10 ) + oObj:setFontBold() - WITH OBJECT oXml:addStyle( "numberRight" ) - :alignHorizontal( "Right" ) - :alignVertical( "Center" ) - :setNumberFormat( "#,##0.00" ) - :fontSize( 10 ) - ENDWITH + oObj := oXml:addStyle( "textRightBoldCor" ) + oObj:alignHorizontal( "Right" ) + oObj:alignVertical( "Center" ) + oObj:fontSize( 10 ) + oObj:setFontBold() + oObj:bgColor( "lightblue" ) + oObj:alignWraptext() - WITH OBJECT oXml:addStyle( "numberRightBold" ) - :alignHorizontal( "Right" ) - :alignVertical( "Center" ) - :setNumberFormat( "#,##0.00" ) - :fontSize( 10 ) - :setFontBold() - ENDWITH + oObj := oXml:addStyle( "numberRight" ) + oObj:alignHorizontal( "Right" ) + oObj:alignVertical( "Center" ) + oObj:setNumberFormat( "#,##0.00" ) + oObj:fontSize( 10 ) - WITH OBJECT oXml:addStyle( "numberRightBoldCor" ) - :alignHorizontal( "Right" ) - :alignVertical( "Center" ) - :setNumberFormat( "#,##0.00" ) - :fontSize( 10 ) - :setFontBold() - :bgColor( "lightblue" ) - ENDWITH + oObj := oXml:addStyle( "numberRightBold" ) + oObj:alignHorizontal( "Right" ) + oObj:alignVertical( "Center" ) + oObj:setNumberFormat( "#,##0.00" ) + oObj:fontSize( 10 ) + oObj:setFontBold() - WITH OBJECT oXml:addStyle( "numberRightZero" ) - :alignHorizontal( "Right" ) - :alignVertical( "Center" ) - :setNumberFormat( "#,##0.00;[Red]-#,##0.00;;@" ) //"#,###.00") - :fontSize( 10 ) - :setFontBold() - ENDWITH + oObj := oXml:addStyle( "numberRightBoldCor" ) + oObj:alignHorizontal( "Right" ) + oObj:alignVertical( "Center" ) + oObj:setNumberFormat( "#,##0.00" ) + oObj:fontSize( 10 ) + oObj:setFontBold() + oObj:bgColor( "lightblue" ) - WITH OBJECT oXml:addStyle( "Cabec" ) - :alignHorizontal( "Left" ) - :alignVertical( "Center" ) - :fontSize( 12 ) - :setFontBold() - ENDWITH + oObj := oXml:addStyle( "numberRightZero" ) + oObj:alignHorizontal( "Right" ) + oObj:alignVertical( "Center" ) + oObj:setNumberFormat( "#,##0.00;[Red]-#,##0.00;;@" ) //"#,###.00") + oObj:fontSize( 10 ) + oObj:setFontBold() - WITH OBJECT oXml:addStyle( "CabecRight" ) - :alignHorizontal( "Right" ) - :alignVertical( "Center" ) - :fontSize( 12 ) - :setFontBold() - ENDWITH + oObj := oXml:addStyle( "Cabec" ) + oObj:alignHorizontal( "Left" ) + oObj:alignVertical( "Center" ) + oObj:fontSize( 12 ) + oObj:setFontBold() + + oObj := oXml:addStyle( "CabecRight" ) + oObj:alignHorizontal( "Right" ) + oObj:alignVertical( "Center" ) + oObj:fontSize( 12 ) + oObj:setFontBold() oSheet := oXml:addSheet( "Plan1" ) - WITH OBJECT oSheet - :columnWidth( 1, 70 ) // N.Fiscal - :columnWidth( 2, 20 ) // TM - :columnWidth( 3, 70 ) // Data Movto - :columnWidth( 4, 70 ) // Data Emis. - :columnWidth( 5, 50 ) // CFOP - :columnWidth( 6, 50 ) // Cod. Cliente/Fornecedor - :columnWidth( 7, 300 ) // Nome Cliente/Fornecedor - :columnWidth( 8, 20 ) // UF - :columnWidth( 9, 80 ) // Vlr.Tot. - :columnWidth( 10, 80 ) // Base Calc. - :columnWidth( 11, 80 ) // Vlr ICMS - :columnWidth( 12, 80 ) // Base IPI - :columnWidth( 13, 80 ) // Valor IPI + oObj := oSheet + oObj:columnWidth( 1, 70 ) // N.Fiscal + oObj:columnWidth( 2, 20 ) // TM + oObj:columnWidth( 3, 70 ) // Data Movto + oObj:columnWidth( 4, 70 ) // Data Emis. + oObj:columnWidth( 5, 50 ) // CFOP + oObj:columnWidth( 6, 50 ) // Cod. Cliente/Fornecedor + oObj:columnWidth( 7, 300 ) // Nome Cliente/Fornecedor + oObj:columnWidth( 8, 20 ) // UF + oObj:columnWidth( 9, 80 ) // Vlr.Tot. + oObj:columnWidth( 10, 80 ) // Base Calc. + oObj:columnWidth( 11, 80 ) // Vlr ICMS + oObj:columnWidth( 12, 80 ) // Base IPI + oObj:columnWidth( 13, 80 ) // Valor IPI - xEmpresa := "EMPRESA DEMONSTRACAO LTDA" - xDataImp := "22.03.2011" - xTitulo := "RELATORIO PARA DEMONSTRAR XML EXCEL" - xPeriodo := "01.02.2011 a 28.02.2011" - xOrdem := "DATA DE EMISSAO" + xEmpresa := "EMPRESA DEMONSTRACAO LTDA" + xDataImp := "22.03.2011" + xTitulo := "RELATORIO PARA DEMONSTRAR XML EXCEL" + xPeriodo := "01.02.2011 a 28.02.2011" + xOrdem := "DATA DE EMISSAO" - nLinha := 0 + nLinha := 0 - :writeString( ++nLinha, 1, xEmpresa , "Cabec" ) - :cellMerge( nLinha, 1, 5, 0 ) - :writeString( nLinha, 12, "Data:" + xDataImp , "CabecRight" ) - :cellMerge( nLinha, 12, 1, 0 ) - :writeString( ++nLinha, 1, xTitulo , "Cabec" ) - :cellMerge( nLinha, 1, 5, 0 ) - :writeString( ++nLinha, 1, xPeriodo , "Cabec" ) - :cellMerge( nLinha, 1, 5, 0 ) - :writeString( ++nLinha, 1, xOrdem , "Cabec" ) - :cellMerge( nLinha, 1, 5, 0 ) - ENDWITH + oObj:writeString( ++nLinha, 1, xEmpresa , "Cabec" ) + oObj:cellMerge( nLinha, 1, 5, 0 ) + oObj:writeString( nLinha, 12, "Data:" + xDataImp , "CabecRight" ) + oObj:cellMerge( nLinha, 12, 1, 0 ) + oObj:writeString( ++nLinha, 1, xTitulo , "Cabec" ) + oObj:cellMerge( nLinha, 1, 5, 0 ) + oObj:writeString( ++nLinha, 1, xPeriodo , "Cabec" ) + oObj:cellMerge( nLinha, 1, 5, 0 ) + oObj:writeString( ++nLinha, 1, xOrdem , "Cabec" ) + oObj:cellMerge( nLinha, 1, 5, 0 ) - WITH OBJECT oSheet - :writeString( ++nLinha, 1, "N.Fiscal" , "textLeftBoldCor" ) - :writeString( nLinha, 2, "TM" , "textLeftBoldCor" ) - :writeString( nLinha, 3, "Data Movto" , "textLeftBoldCor" ) - :writeString( nLinha, 4, "Data Emis." , "textLeftBoldCor" ) - :writeString( nLinha, 5, "CFOP" , "textLeftBoldCor" ) - :writeString( nLinha, 6, "Codigo" , "textLeftBoldCor" ) - :writeString( nLinha, 7, "Cliente/Fornecedor", "textLeftBoldCor" ) - :writeString( nLinha, 8, "UF" , "textLeftBoldCor" ) - :writeString( nLinha, 9, "Vlr.Tot." , "textRightBoldCor" ) - :writeString( nLinha, 10, "Base Calc." , "textRightBoldCor" ) - :writeString( nLinha, 11, "Vlr ICMS" , "textRightBoldCor" ) - :writeString( nLinha, 12, "Base IPI" , "textRightBoldCor" ) - :writeString( nLinha, 13, "Valor IPI" , "textRightBoldCor" ) - ENDWITH + oObj := oSheet + oObj:writeString( ++nLinha, 1, "N.Fiscal" , "textLeftBoldCor" ) + oObj:writeString( nLinha, 2, "TM" , "textLeftBoldCor" ) + oObj:writeString( nLinha, 3, "Data Movto" , "textLeftBoldCor" ) + oObj:writeString( nLinha, 4, "Data Emis." , "textLeftBoldCor" ) + oObj:writeString( nLinha, 5, "CFOP" , "textLeftBoldCor" ) + oObj:writeString( nLinha, 6, "Codigo" , "textLeftBoldCor" ) + oObj:writeString( nLinha, 7, "Cliente/Fornecedor", "textLeftBoldCor" ) + oObj:writeString( nLinha, 8, "UF" , "textLeftBoldCor" ) + oObj:writeString( nLinha, 9, "Vlr.Tot." , "textRightBoldCor" ) + oObj:writeString( nLinha, 10, "Base Calc." , "textRightBoldCor" ) + oObj:writeString( nLinha, 11, "Vlr ICMS" , "textRightBoldCor" ) + oObj:writeString( nLinha, 12, "Base IPI" , "textRightBoldCor" ) + oObj:writeString( nLinha, 13, "Valor IPI" , "textRightBoldCor" ) aDoc := {} FOR i := 1 TO 40 @@ -239,21 +226,21 @@ PROCEDURE Main() xqtddoc := xttotnot := xtbascal := xtvlricm := xtbasipi := xtvlripi := 0 FOR i := 1 TO 40 - WITH OBJECT oSheet - :writeString( ++nLinha, 1, aDoc[ i, 1 ], "textLeft" ) - :writeString( nLinha, 2, aDoc[ i, 2 ], "textLeft" ) - :writeString( nLinha, 3, DToC( aDoc[ i, 3 ] ), "textLeft" ) - :writeString( nLinha, 4, DToC( aDoc[ i, 4 ] ), "textLeft" ) - :writeString( nLinha, 5, aDoc[ i, 5 ], "textLeft" ) - :writeString( nLinha, 6, aDoc[ i, 6 ], "textLeft" ) - :writeString( nLinha, 7, aDoc[ i, 7 ], "textLeft" ) - :writeString( nLinha, 8, aDoc[ i, 8 ], "textLeft" ) - :writeNumber( nLinha, 9, aDoc[ i, 9 ], "numberRight" ) - :writeNumber( nLinha, 10, aDoc[ i, 10 ], "numberRight" ) - :writeNumber( nLinha, 11, aDoc[ i, 11 ], "numberRight" ) - :writeNumber( nLinha, 12, aDoc[ i, 12 ], "numberRight" ) - :writeNumber( nLinha, 13, aDoc[ i, 13 ], "numberRight" ) - ENDWITH + oObj := oSheet + oObj:writeString( ++nLinha, 1, aDoc[ i, 1 ], "textLeft" ) + oObj:writeString( nLinha, 2, aDoc[ i, 2 ], "textLeft" ) + oObj:writeString( nLinha, 3, DToC( aDoc[ i, 3 ] ), "textLeft" ) + oObj:writeString( nLinha, 4, DToC( aDoc[ i, 4 ] ), "textLeft" ) + oObj:writeString( nLinha, 5, aDoc[ i, 5 ], "textLeft" ) + oObj:writeString( nLinha, 6, aDoc[ i, 6 ], "textLeft" ) + oObj:writeString( nLinha, 7, aDoc[ i, 7 ], "textLeft" ) + oObj:writeString( nLinha, 8, aDoc[ i, 8 ], "textLeft" ) + oObj:writeNumber( nLinha, 9, aDoc[ i, 9 ], "numberRight" ) + oObj:writeNumber( nLinha, 10, aDoc[ i, 10 ], "numberRight" ) + oObj:writeNumber( nLinha, 11, aDoc[ i, 11 ], "numberRight" ) + oObj:writeNumber( nLinha, 12, aDoc[ i, 12 ], "numberRight" ) + oObj:writeNumber( nLinha, 13, aDoc[ i, 13 ], "numberRight" ) + xqtddoc++ xttotnot += aDoc[ i, 9 ] xtbascal += aDoc[ i, 10 ] @@ -262,24 +249,23 @@ PROCEDURE Main() xtvlripi += aDoc[ i, 13 ] NEXT - WITH OBJECT oSheet - :writeString( ++nLinha, 1, "", "textLeft" ) - :writeString( nLinha, 2, "", "textLeft" ) - :writeString( nLinha, 3, "", "textLeft" ) - :writeString( nLinha, 4, "", "textLeft" ) - :writeString( nLinha, 5, "", "textLeft" ) - :writeString( nLinha, 6, "", "textLeft" ) - :writeString( nLinha, 7, "TOTAL ==> " + hb_ntos( xqtddoc ) + " document(s)", "textLeftBold" ) - :writeString( nLinha, 8, "", "textLeft" ) - :writeFormula( "Number", nLinha, 9, "=SUM(R[-40]C:R[-1]C)", "numberRightBold" ) + oObj := oSheet + oObj:writeString( ++nLinha, 1, "", "textLeft" ) + oObj:writeString( nLinha, 2, "", "textLeft" ) + oObj:writeString( nLinha, 3, "", "textLeft" ) + oObj:writeString( nLinha, 4, "", "textLeft" ) + oObj:writeString( nLinha, 5, "", "textLeft" ) + oObj:writeString( nLinha, 6, "", "textLeft" ) + oObj:writeString( nLinha, 7, "TOTAL ==> " + hb_ntos( xqtddoc ) + " document(s)", "textLeftBold" ) + oObj:writeString( nLinha, 8, "", "textLeft" ) + oObj:writeFormula( "Number", nLinha, 9, "=SUM(R[-40]C:R[-1]C)", "numberRightBold" ) #if 0 - :writeNumber( nLinha, 9, xttotnot, "numberRightBold" ) + oObj:writeNumber( nLinha, 9, xttotnot, "numberRightBold" ) #endif - :writeNumber( nLinha, 10, xtbascal, "numberRightBold" ) - :writeNumber( nLinha, 11, xtvlricm, "numberRightBold" ) - :writeNumber( nLinha, 12, xtbasipi, "numberRightBold" ) - :writeNumber( nLinha, 13, xtvlripi, "numberRightBold" ) - ENDWITH + oObj:writeNumber( nLinha, 10, xtbascal, "numberRightBold" ) + oObj:writeNumber( nLinha, 11, xtvlricm, "numberRightBold" ) + oObj:writeNumber( nLinha, 12, xtbasipi, "numberRightBold" ) + oObj:writeNumber( nLinha, 13, xtvlripi, "numberRightBold" ) oXml:writeData( xarquivo ) diff --git a/harbour/src/rtl/gtsln/Makefile b/harbour/src/rtl/gtsln/Makefile index 478d4a1979..90858516a3 100644 --- a/harbour/src/rtl/gtsln/Makefile +++ b/harbour/src/rtl/gtsln/Makefile @@ -21,6 +21,10 @@ ifneq ($(HB_HAS_SLANG),) HB_CFLAGS += $(foreach d,$(HB_HAS_SLANG),-I$(d)) + ifeq ($(HB_PLATFORM),aix) + HB_CFLAGS := -DREAL_UNIX_SYSTEM + endif + ifneq ($(HB_HAS_GPM),) HB_CFLAGS += -DHB_HAS_GPM endif diff --git a/harbour/tests/fixcase.hb b/harbour/tests/fixcase.hb index c8572038a2..3ca71c78e7 100644 --- a/harbour/tests/fixcase.hb +++ b/harbour/tests/fixcase.hb @@ -126,9 +126,8 @@ STATIC PROCEDURE ProcFile( hAll, cFileName ) IF Len( a[ 2 ] ) != 2 .OR. !( Left( a[ 2 ], 1 ) $ "Dd" ) cProper := ProperCase( hAll, hb_StrShrink( a[ 3 ], 1 ) ) + "(" IF !( cProper == a[ 3 ] ) .AND. ; - !( Upper( cProper ) == "FILE(" ) .AND. ; - !( Upper( cProper ) == "RGB(" ) .AND. ; - !( Upper( cProper ) == "INT(" ) + !( Upper( cProper ) == "FILE(" ) .AND. ; /* interacts with "file(s)" text */ + !( Upper( cProper ) == "INT(" ) /* interacts with SQL statements */ cLog := StrTran( cLog, a[ 1 ], StrTran( a[ 1 ], a[ 3 ], cProper ) ) ? cFileName, a[ 3 ], cProper, "|" + a[ 1 ] + "|" nChanged++ diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index 24eefb72df..c4c75fcd8e 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -14462,10 +14462,11 @@ STATIC PROCEDURE ShowHelp( hbmk, lLong ) I_( "Platform filters are accepted in each .hbc line and with several options.\nFilter format: {[!][|||]}. Filters can be combined using '&', '|' operators and grouped by parentheses. Ex.: {win}, {gcc}, {linux|darwin}, {win&!pocc}, {(win|linux)&!watcom}, {unix&mt&gui}, -cflag={win}-DMYDEF, -stop{dos}, -stop{!allwin}, {allwin|allmsvc|allgcc|allmingw|allicc|allpocc|unix}, {x86|x86_64|ia64|arm|mips|sh}, {debug|nodebug|gui|std|mt|st|shared|static|winuni|winansi|xhb}" ), ; I_( "Certain .hbc lines (libs=, hbcs=, prgflags=, cflags=, ldflags=, libpaths=, instfiles=, instpaths=, echo=) and corresponding command line parameters will accept macros: ${hb_root}, ${hb_dir}, ${hb_dirname}, ${hb_name}, ${hb_self}, ${hb_curdir}, ${hb_tempdir}, ${hb_targetname}, ${hb_targettype}, ${hb_plat}, ${hb_comp}, ${hb_comp_ver}, ${hb_build}, ${hb_cpu}, ${hb_work}, ${hb_workdynsub}, ${hb_dynprefix}, ${hb_dynsuffix}, ${hb_dynext}, ${hb_ver}, ${hb_verstr}, ${hb_major}, ${hb_minor}, ${hb_release}, ${hb_status}, ${hb_revision}, ${hb_host_plat}, ${hb_host_plat_unix}, ${hb_bin}, ${hb_lib}, ${hb_lib3rd}, ${hb_dyn}, ${hb_inc}, ${hb_first}, ${hb_outputdir}, ${hb_outputname}, ${hb_level}, ${}. libpaths= also accepts %{hb_name} which translates to the name of the .hbc file under search." ), ; I_( 'Options accepting macros also support command substitution. Enclose command inside ``, and, if the command contains space, also enclose in double quotes. F.e. "-cflag=`wx-config --cflags`", or ldflags={unix&gcc}"`wx-config --libs`".' ), ; - I_( "Defaults and feature support vary by platform/compiler." ) , ; + I_( "Libraries and object files built with/for CA-Cl*pper won't work with any supported platform/compiler." ) , ; + I_( "Defaults and feature support may vary by platform/compiler." ) , ; hb_StrFormat( I_( "Options can also be specified in environment variable %1$s" ), _HBMK_ENV_NAME ), ; I_( ".hb or .hrb file passed as first parameter will be run as Harbour script." ) , ; - I_( ". (dot) passed as first parameter will enter an interactive Harbour shell." ) } + I_( ". (dot) passed as first parameter will enter the interactive Harbour shell." ) } hb_default( @lLong, .F. ) diff --git a/harbour/utils/hbtest/rt_math.prg b/harbour/utils/hbtest/rt_math.prg index acd7d418b5..e3c6d9112f 100644 --- a/harbour/utils/hbtest/rt_math.prg +++ b/harbour/utils/hbtest/rt_math.prg @@ -241,7 +241,7 @@ PROCEDURE Main_MATH() TEST_LINE( Round(-5000000000.129, -2) , -5000000000 ) TEST_LINE( Round(-5000000000.129, -2) , -5000000000 ) - /* INT() */ + /* Int() */ TEST_LINE( Int( NIL ) , "E 1 BASE 1090 Argument error (INT) OS:0 #:0 A:1:U:NIL F:S" ) TEST_LINE( Int( "A" ) , "E 1 BASE 1090 Argument error (INT) OS:0 #:0 A:1:C:A F:S" )