diff --git a/harbour/ChangeLog b/harbour/ChangeLog index b4d7581b8f..d632aef940 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,63 @@ The license applies to all entries newer than 2009-04-28. */ +2012-10-03 19:06 UTC+0200 Viktor Szakats (harbour syenar.net) + + extras/hbvpdf/fonts.dat + * contrib/gtwvg/* + * extras/gtwvw/* + * contrib/hbct/tests/addascii.prg + * contrib/hbct/tests/expomant.prg + * contrib/hbct/tests/finan.prg + * contrib/hbct/tests/math.prg + * contrib/hbct/tests/num1.prg + * contrib/hbct/tests/trig.prg + * contrib/hbct/tests/wordswap.prg + * contrib/hbct/token2.c + * contrib/hbfimage/tests/fitest.prg + * contrib/hbmisc/stringp.prg + * contrib/hbnf/tests/aredit.prg + * contrib/hbpgsql/tests/cache.prg + * contrib/hbsqlit3/tests/metadata.prg + * contrib/hbsqlit3/tests/sl3_test.prg + * contrib/hbtip/popcli.prg + * contrib/hbwin/tests/olesrv4.prg + * contrib/hbwin/tests/oletst3.prg + * contrib/rddads/tests/datad.prg + * contrib/xhb/hbstruct.ch + * contrib/xhb/tcgi.prg + * contrib/xhb/tedit.prg + * contrib/xhb/thtm.prg + * contrib/xhb/ttable.prg + * contrib/xhb/txml.prg + * contrib/xhb/xhbcls.ch + * contrib/xhb/xhberr.prg + * contrib/xhb/xhbtedit.prg + * doc/en/set.txt + * extras/guestbk/testcgi.prg + * extras/hbvpdf/hbvpdf.prg + * extras/hbvpdf/hbvpdft.prg + * extras/hbvpdf/hbvpsup.prg + * extras/hbvpdf/tests/pdf_demo.prg + * extras/hbvpdf/tests/tstpdf.prg + * src/compiler/hbopt.c + * src/rtl/gtsln/gtsln.c + * src/rtl/tlabel.prg + * src/rtl/treport.prg + * tests/and_or.prg + * tests/db_brows.prg + * tests/gtchars.prg + * tests/mt/mttest04.prg + * tests/mt/mttest10.prg + * tests/parexpr.prg + * tests/rddtest/rddtst.prg + * tests/vec1.prg + * utils/hbtest/rt_misc.prg + * utils/hbtest/rt_stra.prg + * utils/hbtest/rt_trans.prg + * more cleanups + % font.dat restored and now included in binary form + in source using __streaminclude #pragma (was base64 encoded) + 2012-10-03 17:29 UTC+0200 Viktor Szakats (harbour syenar.net) * config/postinst.hb * utils/hbmk2/hbmk2.prg diff --git a/harbour/contrib/gtwvg/activex.prg b/harbour/contrib/gtwvg/activex.prg index 4cc8d8eacb..8214dd3d50 100644 --- a/harbour/contrib/gtwvg/activex.prg +++ b/harbour/contrib/gtwvg/activex.prg @@ -96,7 +96,7 @@ CLASS WvgActiveXControl FROM WvgWindow DATA interface DATA interfaceName - DATA lSubStdEvents INIT .f. + DATA lSubStdEvents INIT .F. DATA hEvents INIT { => } DATA hContainer @@ -277,7 +277,7 @@ METHOD WvgActiveXControl:mapEvent( nEvent, bBlock ) // METHOD WvgActiveXControl:inheritPresParams() - Local lSuccess := .t. + Local lSuccess := .T. RETURN lSuccess diff --git a/harbour/contrib/gtwvg/bitmap.prg b/harbour/contrib/gtwvg/bitmap.prg index 87bc3d6f1b..ebde5fb603 100644 --- a/harbour/contrib/gtwvg/bitmap.prg +++ b/harbour/contrib/gtwvg/bitmap.prg @@ -93,7 +93,7 @@ CLASS WvgBitmap DATA hBitmap DATA hDCcompat - DATA lDCToDestroy INIT .f. + DATA lDCToDestroy INIT .F. METHOD new() METHOD create( oPScompat ) @@ -126,7 +126,7 @@ METHOD create( oPScompat ) CLASS WvgBitmap IF oPScompat == NIL ::hDCComp := WVG_GetDC() - ::lDCToDestroy := .t. + ::lDCToDestroy := .T. ELSE ::hDCComp := oPScompat:hDC ENDIF diff --git a/harbour/contrib/gtwvg/class.prg b/harbour/contrib/gtwvg/class.prg index 932e07aaf7..e096476ff0 100644 --- a/harbour/contrib/gtwvg/class.prg +++ b/harbour/contrib/gtwvg/class.prg @@ -165,7 +165,7 @@ CLASS wvtDialog DATA nKey DATA hFonts INIT {} DATA lEventHandled - DATA lTabStops INIT .f. + DATA lTabStops INIT .F. DATA bOnCreate ACCESS nObjects INLINE len( ::aObjects ) @@ -242,7 +242,7 @@ METHOD wvtDialog:New( nRows, nCols, cTitle, cFont, nFontHeight, nFontWidth,nFont ::nKey := 0 ::cColor := "N/W" ::nUseObj := 0 - ::lGui := Wvt_SetGui( .f. ) + ::lGui := Wvt_SetGui( .F. ) RETURN Self @@ -251,7 +251,7 @@ METHOD wvtDialog:New( nRows, nCols, cTitle, cFont, nFontHeight, nFontWidth,nFont METHOD wvtDialog:Create() LOCAL aPalette, i, j - ::oldToolTipActive := Wvt_SetToolTipActive( .t. ) + ::oldToolTipActive := Wvt_SetToolTipActive( .T. ) IF ::nTooltipWidth != nil Wvt_setTooltipWidth( ::nTooltipWidth ) ENDIF @@ -271,7 +271,7 @@ METHOD wvtDialog:Create() ::aOldPnt := WvtSetPaint( {} ) SetMode( ::nRows, ::nCols ) - do while .t. + do while .T. IF Wvt_SetFont( ::cFont, ::nFontHeight, ::nFontWidth, ::nFontBold, ::nFontQuality ) EXIT ENDIF @@ -303,7 +303,7 @@ METHOD wvtDialog:Create() WvtSetPaint( wvg_GetPaint( ::cPaintBlockID ) ) IF ascan( ::aObjects, {| o | o:lTabStop } ) > 0 - ::lTabStops := .t. + ::lTabStops := .T. ENDIF ::Update() @@ -374,7 +374,7 @@ METHOD wvtDialog:Event() METHOD wvtDialog:Execute() IF ::nObjects == 0 - DO WHILE .t. + DO WHILE .T. IF inkey( 0.1, INKEY_ALL + HB_INKEY_GTEVENT ) == K_ESC EXIT ENDIF @@ -391,7 +391,7 @@ METHOD wvtDialog:Execute() METHOD wvtDialog:Inkey() LOCAL n, oObj, nID, i - ::lEventHandled := .f. + ::lEventHandled := .F. ::nUseObj := 0 ::nKey := ::Event() @@ -406,7 +406,7 @@ METHOD wvtDialog:Inkey() CASE ::nKey == K_TAB IF ::lTabStops - DO WHILE .t. + DO WHILE .T. ::nCurObj++ IF ::nCurObj > ::nObjects ::nCurObj := 1 @@ -417,11 +417,11 @@ METHOD wvtDialog:Inkey() ENDDO ENDIF - ::lEventHandled := .t. + ::lEventHandled := .T. CASE ::nKey == K_SH_TAB IF ::lTabStops - DO WHILE .t. + DO WHILE .T. ::nCurObj-- IF ::nCurObj < 1 ::nCurObj := ::nObjects @@ -432,7 +432,7 @@ METHOD wvtDialog:Inkey() ENDDO ENDIF - ::lEventHandled := .t. + ::lEventHandled := .T. CASE ::nKey == K_MOUSEMOVE .or. ::nKey == K_MMLEFTDOWN ::MouseOver() @@ -443,7 +443,7 @@ METHOD wvtDialog:Inkey() ELSE Wvt_SetPointer( WVT_IDC_ARROW ) ENDIF - ::lEventHandled := .t. + ::lEventHandled := .T. ENDCASE @@ -475,7 +475,7 @@ METHOD wvtDialog:Inkey() ::nUseObj := ::nObjOver ELSE - ::lEventHandled := .t. + ::lEventHandled := .T. ENDIF ENDIF @@ -530,7 +530,7 @@ METHOD wvtDialog:Inkey() IF !( ::lEventHandled := ::aObjects[ ::nUseObj ]:LeftDown() ) ::lEventHandled := ::Eval( ::aObjects[ ::nUseObj ]:bOnLeftDown ) IF ::aObjects[ ::nUseObj ]:className == "WVTBROWSE" - ::lEventHandled := .f. + ::lEventHandled := .F. ENDIF ENDIF ENDIF @@ -758,9 +758,9 @@ CLASS WvtObject DATA xSettings DATA cText DATA cToolTip - DATA lActive INIT .t. - DATA lAnimate INIT .f. - DATA lTabStop INIT .t. + DATA lActive INIT .T. + DATA lAnimate INIT .F. + DATA lTabStop INIT .T. DATA hFont DATA aPopup INIT {} @@ -801,7 +801,7 @@ CLASS WvtObject DATA bOnFocus INIT {|| NIL } DATA bOnRefresh INIT {|| NIL } DATA bOnLeftUp INIT {|| NIL } - DATA bOnLeftDown INIT {|| .f. } + DATA bOnLeftDown INIT {|| .F. } DATA bOnMMLeftDown INIT {|| NIL } DATA bOnLeftPressed INIT {|| NIL } DATA bTooltip INIT {|| NIL } @@ -828,11 +828,11 @@ CLASS WvtObject METHOD PaintBlock() INLINE nil METHOD Hilite() INLINE nil METHOD DeHilite() INLINE nil - METHOD HandleEvent() INLINE .f. - METHOD LeftDown() INLINE .f. - METHOD LeftUp() INLINE .f. - METHOD MMLeftDown() INLINE .f. - METHOD LeftPressed() INLINE .f. + METHOD HandleEvent() INLINE .F. + METHOD LeftDown() INLINE .F. + METHOD LeftUp() INLINE .F. + METHOD MMLeftDown() INLINE .F. + METHOD LeftPressed() INLINE .F. METHOD HoverOn() INLINE nil METHOD HoverOff() INLINE nil METHOD OnTimer() INLINE nil @@ -866,7 +866,7 @@ METHOD WvtObject:New( oParent, nType, nID, nTop, nLeft, nBottom, nRight ) CASE DLG_OBJ_STATIC ::ClassName := "WVTSTATIC" - ::lTabStop := .f. + ::lTabStop := .F. EXIT CASE DLG_OBJ_GETS @@ -875,7 +875,7 @@ METHOD WvtObject:New( oParent, nType, nID, nTop, nLeft, nBottom, nRight ) CASE DLG_OBJ_IMAGE ::ClassName := "WVTIMAGE" - ::lTabStop := .f. + ::lTabStop := .F. EXIT CASE DLG_OBJ_PUSHBUTTON @@ -884,42 +884,42 @@ METHOD WvtObject:New( oParent, nType, nID, nTop, nLeft, nBottom, nRight ) CASE DLG_OBJ_BUTTON ::ClassName := "WVTBUTTON" - ::lTabStop := .f. + ::lTabStop := .F. EXIT CASE DLG_OBJ_TOOLBAR ::ClassName := "WVTTOOLBAR" - ::lTabStop := .f. + ::lTabStop := .F. EXIT CASE DLG_OBJ_LABEL ::ClassName := "WVTLABEL" - ::lTabStop := .f. + ::lTabStop := .F. EXIT CASE DLG_OBJ_SCROLLBAR ::ClassName := "WVTSCROLLBAR" - ::lTabStop := .f. + ::lTabStop := .F. EXIT CASE DLG_OBJ_STATUSBAR ::ClassName := "WVTSTATUSBAR" - ::lTabStop := .f. + ::lTabStop := .F. EXIT CASE DLG_OBJ_BANNER ::ClassName := "WVTBANNER" - ::lTabStop := .f. + ::lTabStop := .F. EXIT CASE DLG_OBJ_TEXTBOX ::ClassName := "WVTTEXTBOX" - ::lTabStop := .f. + ::lTabStop := .F. EXIT CASE DLG_OBJ_PROGRESSBAR ::ClassName := "WVTPROGRESSBAR" - ::lTabStop := .f. + ::lTabStop := .F. EXIT end @@ -974,7 +974,7 @@ METHOD WvtObject:CreatePopup() // METHOD WvtObject:ShowPopup() - LOCAL lRet := .f., nRet, n, aPos + LOCAL lRet := .F., nRet, n, aPos IF ::hPopup != nil aPos := Wvt_GetCursorPos() @@ -983,7 +983,7 @@ METHOD WvtObject:ShowPopup() aPos[ 1 ], aPos[ 2 ], 0, Wvt_GetWindowHandle() ) IF nRet > 0 IF ( n := ascan( ::aPopup, {| e_ | e_[ 3 ] == nRet } ) ) > 0 - lRet := .t. + lRet := .T. IF HB_ISBLOCK( ::aPopup[ n,2 ] ) Eval( ::aPopup[ n,2 ] ) @@ -1008,8 +1008,8 @@ CLASS WvtBrowse FROM WvtObject DATA cAlias DATA oBrw - DATA lHSBar INIT .t. - DATA lVSBar INIT .t. + DATA lHSBar INIT .T. + DATA lVSBar INIT .T. DATA oHBar DATA oVBar DATA bTotalRecords @@ -1163,7 +1163,7 @@ METHOD WvtBrowse:Refresh() // METHOD WvtBrowse:HandleEvent( nKey ) - LOCAL lRet := .f. + LOCAL lRet := .F. IF valtype( ::bHandleEvent ) == "B" lRet := eval( ::bHandleEvent, self, ::oParent:cPaintBlockID, ::oBrw, nKey ) @@ -1531,7 +1531,7 @@ METHOD WvtLabel:New( oParent, nID, nTop, nLeft, nBottom, nRight ) METHOD WvtLabel:Create( lConfg ) - DEFAULT lConfg TO .f. + DEFAULT lConfg TO .F. DEFAULT ::nBottom TO ::nTop DEFAULT ::nRight TO ::nLeft + len( ::Text ) @@ -1616,14 +1616,14 @@ METHOD WvtLabel:Configure() // METHOD WvtLabel:HoverOn() - LOCAL lOn := .f. + LOCAL lOn := .F. IF ::nTextColorHoverOn != nil - lOn := .t. + lOn := .T. ::nTextColor := ::nTextColorHoverOn ENDIF IF ::nBackColorHoverOn != nil - lOn := .t. + lOn := .T. ::nBackColor := ::nBackColorHoverOn ENDIF @@ -1636,14 +1636,14 @@ METHOD WvtLabel:HoverOn() // METHOD WvtLabel:HoverOff() - LOCAL lOn := .f. + LOCAL lOn := .F. IF ::nTextColorHoverOn != nil - lOn := .t. + lOn := .T. ::nTextColor := ::nTextColorHoverOff ENDIF IF ::nBackColorHoverOn != nil - lOn := .t. + lOn := .T. ::nBackColor := ::nBackColorHoverOff ENDIF @@ -1667,7 +1667,7 @@ CLASS WvtToolBar FROM WvtObject DATA nPaintID DATA aObjects INIT {} - DATA lHidden INIT .f. + DATA lHidden INIT .F. DATA nCurButton INIT 0 DATA lActive DATA lFloating @@ -1699,7 +1699,7 @@ METHOD WvtToolBar:New( oParent, nID, nTop, nLeft, nBottom, nRight ) ::Super:New( oParent, DLG_OBJ_TOOLBAR, nID, nTop, nLeft, nBottom, nRight ) - ::lActive := .t. + ::lActive := .T. ::lFloating := .F. ::nPaintID := ::oParent:nPaintID++ @@ -1710,8 +1710,8 @@ METHOD WvtToolBar:New( oParent, nID, nTop, nLeft, nBottom, nRight ) METHOD WvtToolBar:Create() IF ::lFloating - ::lActive := .f. - ::lHidden := .t. + ::lActive := .F. + ::lHidden := .T. ENDIF aeval( ::aObjects, {| o | o:lActive := ::lActive } ) @@ -1785,8 +1785,8 @@ METHOD WvtToolBar:AddButton( cFileImage, bBlock, cTooltip ) METHOD WvtToolBar:HoverOn() IF ::lFloating .and. ::lHidden - ::lHidden := .f. - ::lActive := .t. + ::lHidden := .F. + ::lActive := .T. #IF 0 ::cScreen := SaveScreen( ::nTop, ::nLeft, ::nBottom, ::nRight ) ::wScreen := Wvt_SaveScreen( ::nTop, ::nLeft, ::nBottom, ::nRight ) @@ -1803,12 +1803,12 @@ METHOD WvtToolBar:HoverOn() METHOD WvtToolBar:HoverOff() IF ::lFloating .and. !( ::lHidden ) - ::lHidden := .t. - ::lActive := .f. + ::lHidden := .T. + ::lActive := .F. aeval( ::aObjects, {| o | o:lActive := ::lActive } ) #IF 0 RestScreen( ::nTop, ::nLeft, ::nBottom, ::nRight, ::cScreen ) - Wvt_RestScreen( ::nTop, ::nLeft, ::nBottom, ::nRight, ::wScreen, .f. ) + Wvt_RestScreen( ::nTop, ::nLeft, ::nBottom, ::nRight, ::wScreen, .F. ) #ENDIF ::Refresh() ENDIF @@ -1890,11 +1890,11 @@ METHOD WvtToolButton:PaintButton() // METHOD WvtToolButton:LeftDown() - LOCAL lRet := .f. + LOCAL lRet := .F. IF ::lActive .and. ::nBtnType == TLB_BUTTON_TYPE_IMAGE Wvt_DrawToolButtonState( ::nTop, ::nLeft, ::nBottom, ::nRight, ::aPxlOffSet, 2 ) - lRet := .t. + lRet := .T. ENDIF RETURN lRet @@ -1902,12 +1902,12 @@ METHOD WvtToolButton:LeftDown() // METHOD WvtToolButton:LeftUp() - LOCAL lRet := .f. + LOCAL lRet := .F. IF ::lActive .and. ::nBtnType == TLB_BUTTON_TYPE_IMAGE Wvt_DrawToolButtonState( ::nTop, ::nLeft, ::nBottom, ::nRight, ::aPxlOffSet, 1 ) Eval( ::bOnLeftUp ) - lRet := .t. + lRet := .T. ENDIF RETURN lRet @@ -2042,12 +2042,12 @@ METHOD WvtStatic:New( oParent, nID, nTop, nLeft, nBottom, nRight ) // METHOD WvtStatic:Create() - LOCAL lInside := .f. + LOCAL lInside := .F. SWITCH ::nStatic CASE WVT_STATIC_LINE - lInside := .t. + lInside := .T. ::bPaint := {|| Wvt_DrawLine( ::nTop, ::nLeft, ::nBottom, ::nRight, ; ::nOrient, ::nFormat, ::nAlign, ::nStyle, ::nThick, ::nColor ) } EXIT @@ -2073,27 +2073,27 @@ METHOD WvtStatic:Create() EXIT CASE WVT_STATIC_RECTANGLE - lInside := .t. + lInside := .T. ::bPaint := {|| Wvt_DrawRectangle( ::nTop, ::nLeft, ::nBottom, ::nRight, ::aPxlOffSet ) } EXIT CASE WVT_STATIC_ROUNDRECT - lInside := .t. + lInside := .T. ::bPaint := {|| Wvt_DrawRoundRect( ::nTop, ::nLeft, ::nBottom, ::nRight, ::aPxlOffSet ) } EXIT CASE WVT_STATIC_FOCUSRECT - lInside := .t. + lInside := .T. ::bPaint := {|| Wvt_DrawFocusRect( ::nTop, ::nLeft, ::nBottom, ::nRight, ::aPxlOffSet ) } EXIT CASE WVT_STATIC_ELLIPSE - lInside := .t. + lInside := .T. ::bPaint := {|| Wvt_DrawEllipse( ::nTop, ::nLeft, ::nBottom, ::nRight, ::aPxlOffSet ) } EXIT CASE WVT_STATIC_SHADEDRECT - lInside := .t. + lInside := .T. ::bPaint := {|| Wvt_DrawShadedRect( ::nTop, ::nLeft, ::nBottom, ::nRight, ; ::aPxlOffSet, ::nHorzVert, ::aRGBb, ::aRGBe ) } EXIT @@ -2205,7 +2205,7 @@ METHOD WvtPushButton:LeftDown() Wvt_DrawToolButtonState( ::nTop, ::nLeft, ::nBottom, ::nRight,{0,0,0,0} , 2 ) - RETURN .t. + RETURN .T. // @@ -2214,7 +2214,7 @@ METHOD WvtPushButton:LeftUp() Wvt_DrawToolButtonState( ::nTop, ::nLeft, ::nBottom, ::nRight, {0,0,0,0}, 1 ) ::Eval( ::bOnLeftUp ) - RETURN .t. + RETURN .T. // // @@ -2323,12 +2323,12 @@ METHOD WvtGets:AddGets( nRow, nCol, xVar, cPic, cColor, bValid, bWhen ) // METHOD WvtGets:HandleEvent( nKey ) - LOCAL lRet := .f. + LOCAL lRet := .F. DO CASE CASE nKey == K_LDBLCLK ::Read() - lRet := .t. + lRet := .T. ENDCASE RETURN lRet @@ -2410,7 +2410,7 @@ CLASS WvtScrollBar FROM WvtObject DATA bBtnScroll DATA bTotal DATA bCurrent - DATA lHidden INIT .t. + DATA lHidden INIT .T. DATA aPxlBtnTop INIT {0,0,0,0} DATA aPxlBtnLft INIT {0,0,0,0} @@ -2418,10 +2418,10 @@ CLASS WvtScrollBar FROM WvtObject DATA aPxlBtnRgt INIT {0,0,0,0} DATA aPxlScroll INIT {0,0,0,0} - DATA lLeftDown INIT .f. - DATA lOnThumb INIT .f. - DATA lAnchored INIT .f. - DATA lOnLeftDown INIT .f. + DATA lLeftDown INIT .F. + DATA lOnThumb INIT .F. + DATA lAnchored INIT .F. + DATA lOnLeftDown INIT .F. DATA nScrollUnits INIT 0 @@ -2489,9 +2489,9 @@ METHOD wvtScrollbar:Create() {|| Wvt_DrawScrollThumbVert( ::nSTop ,::nSLeft ,::nSBottom,::nSRight,::aPxlScroll,; ::nThumbPos ) } ::bBtnLeftTopDep := ; - {|| Wvt_DrawScrollButton( ::nBtn1Top,::nBtn1Left,::nBtn1Bottom,::nBtn1Right,::aPxlBtnTop,1,.t. ) } + {|| Wvt_DrawScrollButton( ::nBtn1Top,::nBtn1Left,::nBtn1Bottom,::nBtn1Right,::aPxlBtnTop,1,.T. ) } ::bBtnRightBottomDep := ; - {|| Wvt_DrawScrollButton( ::nBtn2Top,::nBtn2Left,::nBtn2Bottom,::nBtn2Right,::aPxlBtnBtm,3,.t. ) } + {|| Wvt_DrawScrollButton( ::nBtn2Top,::nBtn2Left,::nBtn2Bottom,::nBtn2Right,::aPxlBtnBtm,3,.T. ) } ELSE DEFAULT ::nBottom TO ::nTop @@ -2529,14 +2529,14 @@ METHOD wvtScrollbar:Create() ::bBtnScroll := ; {|| Wvt_DrawScrollThumbHorz( ::nSTop,::nSLeft,::nSBottom,::nSRight, ::aPxlScroll,::nThumbPos ) } ::bBtnLeftTopDep := ; - {|| Wvt_DrawScrollButton( ::nBtn1Top,::nBtn1Left,::nBtn1Bottom,::nBtn1Right,::aPxlBtnLft,2,.t. ) } + {|| Wvt_DrawScrollButton( ::nBtn1Top,::nBtn1Left,::nBtn1Bottom,::nBtn1Right,::aPxlBtnLft,2,.T. ) } ::bBtnRightBottomDep := ; - {|| Wvt_DrawScrollButton( ::nBtn2Top,::nBtn2Left,::nBtn2Bottom,::nBtn2Right,::aPxlBtnRgt,4,.t. ) } + {|| Wvt_DrawScrollButton( ::nBtn2Top,::nBtn2Left,::nBtn2Bottom,::nBtn2Right,::aPxlBtnRgt,4,.T. ) } ENDIF ::bOnLeftUp := {|| ::HandleEvent( K_LBUTTONUP ) } - ::bOnLeftDown := {|| ::HandleEvent( K_LBUTTONDOWN ), .f. } + ::bOnLeftDown := {|| ::HandleEvent( K_LBUTTONDOWN ), .F. } ::bOnMMLeftDown := {|| ::HandleEvent( K_MMLEFTDOWN ) } ::bOnLeftPressed := {|| ::HandleEvent( K_LBUTTONPRESSED ) } @@ -2709,7 +2709,7 @@ METHOD wvtScrollbar:HandleEvent( nKey ) LOCAL mKeys_:={ K_LBUTTONDOWN, K_LBUTTONUP, K_MMLEFTDOWN, K_LBUTTONPRESSED } IF ascan( mKeys_, nKey ) == 0 - RETURN .f. + RETURN .F. ENDIF nmRow := MRow() @@ -2717,7 +2717,7 @@ METHOD wvtScrollbar:HandleEvent( nKey ) DO CASE CASE ::nBarType == WVT_SCROLLBAR_VERT - lHit := .t. + lHit := .T. DO CASE CASE ::lAnchored .and. nKey == K_MMLEFTDOWN @@ -2742,21 +2742,21 @@ METHOD wvtScrollbar:HandleEvent( nKey ) ::SetTooltip() Wvt_Keyboard( K_SBTHUMBTRACKVERT ) ELSE - lHit := .f. + lHit := .F. ENDIF CASE ::lAnchored .and. nKey == K_LBUTTONUP - ::lAnchored := .f. + ::lAnchored := .F. OTHERWISE - lHit := .f. + lHit := .F. IF nmCol >= ::nLeft .and. nmCol <= ::nRight - lHit := .t. + lHit := .T. DO CASE CASE nmRow == ::nThumbPos .and. nKey == K_LBUTTONDOWN - ::lAnchored := .t. + ::lAnchored := .T. CASE nKey == K_LBUTTONUP IF ( lHit := ::lOnLeftDown ) @@ -2768,10 +2768,10 @@ METHOD wvtScrollbar:HandleEvent( nKey ) CASE nmRow < ::nThumbPos .and. nmRow > ::nTop CASE nmRow > ::nThumbPos .and. nmRow < ::nBottom OTHERWISE - lHit := .f. + lHit := .F. ENDCASE IF lHit - ::lOnLeftDown := .f. + ::lOnLeftDown := .F. ENDIF ENDIF @@ -2787,7 +2787,7 @@ METHOD wvtScrollbar:HandleEvent( nKey ) CASE nmRow > ::nThumbPos .and. nmRow < ::nBottom Wvt_Keyboard( K_SBPAGEDOWN ) OTHERWISE - lHit := .f. + lHit := .F. ENDCASE ENDIF @@ -2804,10 +2804,10 @@ METHOD wvtScrollbar:HandleEvent( nKey ) CASE nmRow > ::nThumbPos .and. nmRow < ::nBottom Wvt_Keyboard( K_SBPAGEDOWN ) OTHERWISE - lHit := .f. + lHit := .F. ENDCASE IF lHit - ::lOnLeftDown := .t. + ::lOnLeftDown := .T. ENDIF ENDCASE ENDIF @@ -2841,8 +2841,8 @@ METHOD wvtScrollbar:HandleEvent( nKey ) ENDIF CASE ::lAnchored .and. nKey == K_LBUTTONUP - ::lAnchored := .f. - lHit := .t. + ::lAnchored := .F. + lHit := .T. OTHERWISE @@ -2850,7 +2850,7 @@ METHOD wvtScrollbar:HandleEvent( nKey ) DO CASE CASE nKey == K_LBUTTONDOWN .and. nmCol >= ::nThumbPos .and. nmCol <= ::nThumbPos+1 - ::lAnchored := .t. + ::lAnchored := .T. CASE nKey == K_LBUTTONUP @@ -2863,10 +2863,10 @@ METHOD wvtScrollbar:HandleEvent( nKey ) CASE nmCol < ::nThumbPos CASE nmCol > ::nThumbPos+1 OTHERWISE - lHit := .f. + lHit := .F. ENDCASE IF lHit - ::lOnLeftDown := .f. + ::lOnLeftDown := .F. ENDIF ENDIF @@ -2882,7 +2882,7 @@ METHOD wvtScrollbar:HandleEvent( nKey ) CASE nmCol > ::nThumbPos+1 Wvt_Keyboard( K_SBPAGERIGHT ) OTHERWISE - lHit := .f. + lHit := .F. ENDCASE ENDIF @@ -2899,10 +2899,10 @@ METHOD wvtScrollbar:HandleEvent( nKey ) CASE nmCol > ::nThumbPos+1 Wvt_Keyboard( K_SBPAGERIGHT ) OTHERWISE - lHit := .f. + lHit := .F. ENDCASE IF lHit - ::lOnLeftDown := .t. + ::lOnLeftDown := .T. ENDIF ENDCASE ENDIF @@ -3198,8 +3198,8 @@ CLASS WvtProgressBar FROM WvtObject DATA cImage DATA nDirection INIT 0 /* 0-Left-Right,Top-Bottom 1-Right-Left,Bottom-Top */ DATA nStyle INIT 0 - DATA lVertical INIT .f. - DATA lActive INIT .f. + DATA lVertical INIT .F. + DATA lActive INIT .F. DATA nBarColor INIT RGB( 0,0,128 ) DATA nCurrent INIT 0 @@ -3273,7 +3273,7 @@ METHOD WvtProgressBar:Activate() ::cScreen := SaveScreen( ::nTop, ::nLeft, ::nBottom, ::nRight ) DispBox( ::nTop, ::nLeft, ::nBottom, ::nRight, " ", ::cBackColor ) - ::lActive := .t. + ::lActive := .T. RETURN Self @@ -3281,7 +3281,7 @@ METHOD WvtProgressBar:Activate() METHOD WvtProgressBar:DeActivate() - ::lActive := .f. + ::lActive := .F. ::nCurrent := 0 ::nTotal := 1 RestScreen( ::nTop, ::nLeft, ::nBottom, ::nRight, ::cScreen ) diff --git a/harbour/contrib/gtwvg/crt.prg b/harbour/contrib/gtwvg/crt.prg index c6ae0f32df..dc63e64f4d 100644 --- a/harbour/contrib/gtwvg/crt.prg +++ b/harbour/contrib/gtwvg/crt.prg @@ -155,11 +155,11 @@ CLASS WvgCrt INHERIT WvgWindow, WvgPartHandler DATA sl_dragDrop /* HARBOUR implementation */ - DATA resizable INIT .t. + DATA resizable INIT .T. DATA resizeMode INIT HB_GTI_RESIZEMODE_FONT DATA style INIT (WS_OVERLAPPED + WS_CAPTION + WS_SYSMENU + WS_SIZEBOX + WS_MINIMIZEBOX + WS_MAXIMIZEBOX) DATA exStyle INIT 0 - DATA lModal INIT .f. + DATA lModal INIT .F. DATA pGTp DATA pGT DATA objType INIT objTypeCrt @@ -356,7 +356,7 @@ METHOD WvgCrt:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) IF ::visible Hb_GtInfo( HB_GTI_SPEC, HB_GTS_SHOWWINDOW, SW_NORMAL ) - ::lHasInputFocus := .t. + ::lHasInputFocus := .T. ENDIF RETURN Self @@ -557,7 +557,7 @@ METHOD WvgCrt:setFontCompoundName() // METHOD WvgCrt:setFrameState( nState ) - Local lSuccess := .f. + Local lSuccess := .F. DO CASE @@ -627,7 +627,7 @@ METHOD WvgCrt:setSize( aSize, lPaint ) METHOD WvgCrt:show() Hb_GtInfo( HB_GTI_SPEC, HB_GTS_SHOWWINDOW, SW_NORMAL ) - ::lHasInputFocus := .t. + ::lHasInputFocus := .T. RETURN Self diff --git a/harbour/contrib/gtwvg/dataref.prg b/harbour/contrib/gtwvg/dataref.prg index 634597c1c9..aee19ef76a 100644 --- a/harbour/contrib/gtwvg/dataref.prg +++ b/harbour/contrib/gtwvg/dataref.prg @@ -180,7 +180,7 @@ METHOD WvgDataRef:setData( xValue, mp2 ) CASE ::className == "SCROLLBAR" IF ::sl_editBuffer != NIL - WAPI_SetScrollPos( ::pWnd, SB_CTL, ::sl_editBuffer, .t. ) + WAPI_SetScrollPos( ::pWnd, SB_CTL, ::sl_editBuffer, .T. ) ENDIF CASE ::className == "COMBOBOX" @@ -200,7 +200,7 @@ METHOD WvgDataRef:setData( xValue, mp2 ) METHOD WvgDataRef:undo() - RETURN .f. + RETURN .F. // @@ -212,6 +212,6 @@ METHOD WvgDataRef:validate( xParam ) ::sl_validate := xParam ENDIF - RETURN .t. + RETURN .T. // diff --git a/harbour/contrib/gtwvg/dialog.prg b/harbour/contrib/gtwvg/dialog.prg index cf90c81c3e..b01af210b6 100644 --- a/harbour/contrib/gtwvg/dialog.prg +++ b/harbour/contrib/gtwvg/dialog.prg @@ -81,7 +81,7 @@ CLASS WvgDialog FROM WvgWindow DATA oMenu DATA aRect DATA drawingArea - DATA tasklist INIT .t. + DATA tasklist INIT .T. METHOD new( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) METHOD create( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) @@ -161,10 +161,10 @@ METHOD WvgDialog:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) endif if ::visible - ::lHasInputFocus := .t. + ::lHasInputFocus := .T. ENDIF - oW := WvgDrawingArea():new( Self ):create( , , {0,0}, Self:currentSize(), , .f. ) + oW := WvgDrawingArea():new( Self ):create( , , {0,0}, Self:currentSize(), , .F. ) IF ! empty( oW:hWnd ) ::drawingArea := oW ELSE @@ -207,7 +207,7 @@ METHOD WvgDialog:destroy() // METHOD WvgDialog:setFrameState( nState ) - LOCAL lSuccess := .f. + LOCAL lSuccess := .F. DO CASE diff --git a/harbour/contrib/gtwvg/drawarea.prg b/harbour/contrib/gtwvg/drawarea.prg index db9d284a6e..399efd4971 100644 --- a/harbour/contrib/gtwvg/drawarea.prg +++ b/harbour/contrib/gtwvg/drawarea.prg @@ -98,7 +98,7 @@ METHOD WvgDrawingArea:new( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) ::exStyle := 0 ::className := "DrawingArea" ::objType := objTypeDA - ::visible := .t. + ::visible := .T. RETURN Self @@ -108,7 +108,7 @@ METHOD WvgDrawingArea:create( oParent, oOwner, aPos, aSize, aPresParams, lVisibl HB_SYMBOL_UNUSED( lVisible ) - ::wvgWindow:create( oParent, oOwner, aPos, aSize, aPresParams, .t. ) + ::wvgWindow:create( oParent, oOwner, aPos, aSize, aPresParams, .T. ) ::oParent:addChild( Self ) diff --git a/harbour/contrib/gtwvg/menubar.prg b/harbour/contrib/gtwvg/menubar.prg index 77ce4804f0..588e616c4c 100644 --- a/harbour/contrib/gtwvg/menubar.prg +++ b/harbour/contrib/gtwvg/menubar.prg @@ -281,7 +281,7 @@ METHOD WvgMenuBar:addItem( aItem, p2, p3, p4 ) nAttrib := p4 ENDIF - RETURN ::putItem( { xCaption, bAction, nStyle, nAttrib }, -1, .t. ) + RETURN ::putItem( { xCaption, bAction, nStyle, nAttrib }, -1, .T. ) // @@ -289,7 +289,7 @@ METHOD WvgMenuBar:putItem( aItem, nPos, lInsert ) LOCAL nItemIndex, cCaption LOCAL xCaption, bAction, nStyle, nAttrib - DEFAULT lInsert TO .t. + DEFAULT lInsert TO .T. ASize( aItem, 4 ) @@ -333,7 +333,7 @@ METHOD WvgMenuBar:putItem( aItem, nPos, lInsert ) ELSE nItemIndex := nPos IF lInsert - ::aMenuItems := hb_AIns( ::aMenuItems, nPos, aItem, .t. ) + ::aMenuItems := hb_AIns( ::aMenuItems, nPos, aItem, .T. ) WVG_InsertMenu( ::hMenu, ; nItemIndex - 1, ; aItem[ 1 ] + MF_BYPOSITION, ; @@ -424,7 +424,7 @@ METHOD WvgMenuBar:checkItem( nItemNum, lCheck ) // METHOD WvgMenuBar:enableItem( nItemNum ) - LOCAL lSuccess := .f. + LOCAL lSuccess := .F. IF !empty( ::hMenu ) .AND. HB_ISNUMERIC( nItemNum ) lSuccess := WVG_EnableMenuItem( ::hMenu, nItemNum-1, MF_BYPOSITION + MF_ENABLED ) @@ -435,7 +435,7 @@ METHOD WvgMenuBar:enableItem( nItemNum ) // METHOD WvgMenuBar:disableItem( nItemNum ) - LOCAL lSuccess := .f. + LOCAL lSuccess := .F. IF !empty( ::hMenu ) .AND. !empty( nItemNum ) lSuccess := WVG_EnableMenuItem( ::hMenu, nItemNum-1, MF_BYPOSITION + MF_GRAYED ) @@ -457,7 +457,7 @@ METHOD WvgMenuBar:getItem( nItemNum ) METHOD WvgMenuBar:insItem( nItemNum, aItem ) - ::putItem( aItem, nItemNum, .t. ) + ::putItem( aItem, nItemNum, .T. ) RETURN Self @@ -478,16 +478,16 @@ METHOD WvgMenuBar:isItemEnabled( nItemNum ) METHOD WvgMenuBar:selectItem( nItemNum ) IF HB_ISNUMERIC( nItemNum ) - RETURN .f. + RETURN .F. ENDIF - RETURN .t. + RETURN .T. // METHOD WvgMenuBar:setItem( nItemNum, aItem ) - RETURN ::putItem( aItem, nItemNum, .f. ) + RETURN ::putItem( aItem, nItemNum, .F. ) // /* Callback Methods */ diff --git a/harbour/contrib/gtwvg/paint.prg b/harbour/contrib/gtwvg/paint.prg index 29f809b3d3..fc450eec8e 100644 --- a/harbour/contrib/gtwvg/paint.prg +++ b/harbour/contrib/gtwvg/paint.prg @@ -89,7 +89,7 @@ function WvtPaintObjects() tlbr_:= Wvt_GetPaintRect() for i := 1 to nBlocks - lExe := .t. + lExe := .T. if aBlocks[ i,3 ] != nil .and. !empty( aBlocks[ i,3 ] ) /* Check parameters against tlbr_ depending upon the @@ -99,7 +99,7 @@ function WvtPaintObjects() case aBlocks[ i,3,1 ] == WVT_BLOCK_GRID_V b := aBlocks[ i,3,6 ] if len( b:aColumnsSep ) == 0 - lExe := .f. + lExe := .F. else nLeft := b:aColumnsSep[ 1 ] nRight := b:aColumnsSep[ len( b:aColumnsSep ) ] @@ -107,7 +107,7 @@ function WvtPaintObjects() tlbr_[ 3 ] >= aBlocks[ i,3,2 ] .and. ; /* bootm > top */ tlbr_[ 2 ] <= nRight + 1 .and. ; /* left < right */ tlbr_[ 4 ] >= nLeft - 2 ) /* right > left */ - lExe := .f. + lExe := .F. endif endif @@ -116,7 +116,7 @@ function WvtPaintObjects() tlbr_[ 3 ] >= aBlocks[ i,3,2 ] .and. ; /* bootm > top */ tlbr_[ 2 ] <= aBlocks[ i,3,5 ] .and. ; /* left < righ */ tlbr_[ 4 ] >= aBlocks[ i,3,3 ] ) /* right > left */ - lExe := .f. + lExe := .F. endif otherwise @@ -127,7 +127,7 @@ function WvtPaintObjects() tlbr_[ 3 ] >= aBlocks[ i,3,2 ] .and. ; /* bootm >= top */ tlbr_[ 2 ] <= aBlocks[ i,3,5 ] .and. ; /* left < right */ tlbr_[ 4 ] >= aBlocks[ i,3,3 ] ) /* right > left */ - lExe := .f. + lExe := .F. endif endcase endif @@ -200,7 +200,7 @@ function wvg_DelPaint( cID, nAction ) if ( n := ascan( t_paint_, {| e_ | e_[ 1 ] == cID } ) ) > 0 if ( n1 := ascan( t_paint_[ n, 2 ], {| e_ | e_[ 1 ] == nAction } ) ) > 0 xData := t_paint_[ n,2,n1,2 ] - t_paint_[ n,2,n1,2 ] := {|| .t. } + t_paint_[ n,2,n1,2 ] := {|| .T. } endif endif @@ -211,7 +211,7 @@ function wvg_DelPaint( cID, nAction ) function wvg_PurgePaint( cID,lDummy ) local n, aPaint - DEFAULT lDummy TO .f. + DEFAULT lDummy TO .F. if ( n := ascan( t_paint_, {| e_ | e_[ 1 ] == cID } ) ) > 0 aPaint := t_paint_[ n ] @@ -230,7 +230,7 @@ function wvg_PurgePaint( cID,lDummy ) function wvg_InsertPaint( cID, aPaint, lSet ) local n - DEFAULT lSet TO .f. + DEFAULT lSet TO .F. if ( n := ascan( t_paint_, {| e_ | e_[ 1 ] == cID } ) ) > 0 t_paint_[ n ] := aPaint @@ -476,7 +476,7 @@ Function Wvt_DialogBox( acnDlg, cbDlgProc, hWndParent ) xTemplate := acnDlg endif - nResult := Wvt_CreateDialogModal( xTemplate, .f., cbDlgProc, nDlgMode, hWndParent ) + nResult := Wvt_CreateDialogModal( xTemplate, .F., cbDlgProc, nDlgMode, hWndParent ) Wvg_SetFocus( hWndParent ) @@ -727,8 +727,8 @@ FUNCTION Wvt_GetWindowHandle() FUNCTION Wvt_CenterWindow( lCenter, lRePaint ) - DEFAULT lCenter TO .t. - DEFAULT lRePaint TO .f. + DEFAULT lCenter TO .T. + DEFAULT lRePaint TO .F. RETURN Hb_GtInfo( HB_GTI_SPEC, HB_GTS_CENTERWINDOW, { lCenter, lRePaint } ) @@ -736,8 +736,8 @@ FUNCTION Wvt_CenterWindow( lCenter, lRePaint ) FUNCTION Wvt_WindowCentre( lCenter, lRePaint ) - DEFAULT lCenter TO .t. - DEFAULT lRePaint TO .f. + DEFAULT lCenter TO .T. + DEFAULT lRePaint TO .F. RETURN Hb_GtInfo( HB_GTI_SPEC, HB_GTS_CENTERWINDOW, { lCenter, lRePaint } ) @@ -747,7 +747,7 @@ FUNCTION Wvt_ProcessMessages() Hb_GtInfo( HB_GTI_SPEC, HB_GTS_PROCESSMESSAGES ) - RETURN .t. + RETURN .T. // diff --git a/harbour/contrib/gtwvg/parthdlr.prg b/harbour/contrib/gtwvg/parthdlr.prg index 03dd26f20f..6cfb83ef8c 100644 --- a/harbour/contrib/gtwvg/parthdlr.prg +++ b/harbour/contrib/gtwvg/parthdlr.prg @@ -205,7 +205,7 @@ METHOD WvgPartHandler:removeChild( oChild ) LOCAL n IF ( n := ascan( ::aChildren, {| o | o == oChild } ) ) > 0 - hb_aDel( ::aChildren, n, .t. ) + hb_aDel( ::aChildren, n, .T. ) ENDIF RETURN Self @@ -374,13 +374,13 @@ METHOD WvgPartHandler:notifier( nEvent, xParams ) IF HB_ISBLOCK( ::sl_setInputFocus ) eval( ::sl_setInputFocus, NIL, NIL, Self ) ENDIF - ::lHasInputFocus := .t. + ::lHasInputFocus := .T. CASE nEvent == HB_GTE_KILLFOCUS IF HB_ISBLOCK( ::sl_killInputFocus ) eval( ::sl_killInputFocus, NIL, NIL, Self ) ENDIF - ::lHasInputFocus := .f. + ::lHasInputFocus := .F. CASE nEvent == HB_GTE_PAINT /* aeval( ::aChildren, {| o | WVG_InvalidateRect( o:hWnd ) } ) */ @@ -464,7 +464,7 @@ METHOD WvgPartHandler:notifier( nEvent, xParams ) CASE nEvent == HB_GTE_RESIZED IF ::objType == objTypeDialog IF ::drawingArea:objType == objTypeDA - ::drawingArea:setPosAndSize( {0,0}, ::currentSize(), .f. ) + ::drawingArea:setPosAndSize( {0,0}, ::currentSize(), .F. ) ENDIF ENDIF IF HB_ISBLOCK( ::sl_resize ) @@ -590,7 +590,7 @@ METHOD WvgPartHandler:controlWndProc( hWnd, nMessage, nwParam, nlParam ) CASE WM_MOUSELEAVE IF ::objType == objTypeScrollBar - ::lTracking := .f. + ::lTracking := .F. IF ::oParent:objType == objTypeCrt WAPI_SetFocus( ::oParent:pWnd ) ENDIF diff --git a/harbour/contrib/gtwvg/scrollbr.prg b/harbour/contrib/gtwvg/scrollbr.prg index 66ea574c9b..bf2cbe3d47 100644 --- a/harbour/contrib/gtwvg/scrollbr.prg +++ b/harbour/contrib/gtwvg/scrollbr.prg @@ -118,15 +118,15 @@ typedef struct tagRECT { ; CLASS WvgScrollBar INHERIT WvgWindow, WvgDataRef - DATA autoTrack INIT .t. + DATA autoTrack INIT .T. DATA range INIT {0,1} DATA scrollBoxSize INIT -1 DATA type INIT WVGSCROLL_HORIZONTAL - DATA excludeScrollBox INIT .f. + DATA excludeScrollBox INIT .F. DATA sl_xbeSB_Scroll - DATA lTracking INIT .f. + DATA lTracking INIT .F. METHOD new( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) METHOD create( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) @@ -229,50 +229,50 @@ METHOD handleEvent( nMessage, aNM ) CLASS WvgScrollBar CASE nScrMsg == SB_LEFT nCommand := WVGSB_PREVPOS IF nScrPos > ::range[ 1 ] - WAPI_SetScrollPos( ::pWnd, SB_CTL, --nScrPos, .t. ) + WAPI_SetScrollPos( ::pWnd, SB_CTL, --nScrPos, .T. ) ENDIF CASE nScrMsg == SB_RIGHT nCommand := WVGSB_NEXTPOS IF nScrPos < ::range[ 2 ] - WAPI_SetScrollPos( ::pWnd, SB_CTL, ++nScrPos, .t. ) + WAPI_SetScrollPos( ::pWnd, SB_CTL, ++nScrPos, .T. ) ENDIF CASE nScrMsg == SB_LINELEFT nCommand := WVGSB_PREVPAGE IF nScrPos > ::range[ 1 ] - WAPI_SetScrollPos( ::pWnd, SB_CTL, --nScrPos, .t. ) + WAPI_SetScrollPos( ::pWnd, SB_CTL, --nScrPos, .T. ) ENDIF CASE nScrMsg == SB_LINERIGHT nCommand := WVGSB_NEXTPAGE IF nScrPos < ::range[ 2 ] - WAPI_SetScrollPos( ::pWnd, SB_CTL, ++nScrPos, .t. ) + WAPI_SetScrollPos( ::pWnd, SB_CTL, ++nScrPos, .T. ) ENDIF CASE nScrMsg == SB_PAGELEFT nCommand := WVGSB_PREVPAGE IF nScrPos > ::range[ 1 ] - WAPI_SetScrollPos( ::pWnd, SB_CTL, --nScrPos, .t. ) + WAPI_SetScrollPos( ::pWnd, SB_CTL, --nScrPos, .T. ) ENDIF CASE nScrMsg == SB_PAGERIGHT nCommand := WVGSB_NEXTPAGE IF nScrPos < ::range[ 2 ] - WAPI_SetScrollPos( ::pWnd, SB_CTL, ++nScrPos, .t. ) + WAPI_SetScrollPos( ::pWnd, SB_CTL, ++nScrPos, .T. ) ENDIF CASE nScrMsg == SB_THUMBPOSITION nCommand := WVGSB_SLIDERTRACK - WAPI_SetScrollPos( ::pWnd, SB_CTL, nScrPos, .t. ) + WAPI_SetScrollPos( ::pWnd, SB_CTL, nScrPos, .T. ) CASE nScrMsg == SB_THUMBTRACK nCommand := WVGSB_ENDTRACK - WAPI_SetScrollPos( ::pWnd, SB_CTL, nScrPos, .t. ) + WAPI_SetScrollPos( ::pWnd, SB_CTL, nScrPos, .T. ) CASE nScrMsg == SB_ENDSCROLL nCommand := WVGSB_ENDSCROLL - WAPI_SetScrollPos( ::pWnd, SB_CTL, nScrPos, .t. ) + WAPI_SetScrollPos( ::pWnd, SB_CTL, nScrPos, .T. ) ENDCASE @@ -301,50 +301,50 @@ METHOD handleEvent( nMessage, aNM ) CLASS WvgScrollBar CASE nScrMsg == SB_TOP nCommand := WVGSB_TOP IF nScrPos > ::range[ 1 ] - WAPI_SetScrollPos( ::pWnd, SB_CTL, --nScrPos, .t. ) + WAPI_SetScrollPos( ::pWnd, SB_CTL, --nScrPos, .T. ) ENDIF CASE nScrMsg == SB_BOTTOM nCommand := WVGSB_BOTTOM IF nScrPos < ::range[ 2 ] - WAPI_SetScrollPos( ::pWnd, SB_CTL, ++nScrPos, .t. ) + WAPI_SetScrollPos( ::pWnd, SB_CTL, ++nScrPos, .T. ) ENDIF CASE nScrMsg == SB_LINEUP nCommand := WVGSB_PREVPOS IF nScrPos > ::range[ 1 ] - WAPI_SetScrollPos( ::pWnd, SB_CTL, --nScrPos, .t. ) + WAPI_SetScrollPos( ::pWnd, SB_CTL, --nScrPos, .T. ) ENDIF CASE nScrMsg == SB_LINEDOWN nCommand := WVGSB_NEXTPOS IF nScrPos < ::range[ 2 ] - WAPI_SetScrollPos( ::pWnd, SB_CTL, ++nScrPos, .t. ) + WAPI_SetScrollPos( ::pWnd, SB_CTL, ++nScrPos, .T. ) ENDIF CASE nScrMsg == SB_PAGEUP nCommand := WVGSB_PREVPAGE IF nScrPos > ::range[ 1 ] - WAPI_SetScrollPos( ::pWnd, SB_CTL, --nScrPos, .t. ) + WAPI_SetScrollPos( ::pWnd, SB_CTL, --nScrPos, .T. ) ENDIF CASE nScrMsg == SB_PAGEDOWN nCommand := WVGSB_NEXTPAGE IF nScrPos < ::range[ 2 ] - WAPI_SetScrollPos( ::pWnd, SB_CTL, ++nScrPos, .t. ) + WAPI_SetScrollPos( ::pWnd, SB_CTL, ++nScrPos, .T. ) ENDIF CASE nScrMsg == SB_THUMBPOSITION nCommand := WVGSB_SLIDERTRACK - WAPI_SetScrollPos( ::pWnd, SB_CTL, nScrPos, .t. ) + WAPI_SetScrollPos( ::pWnd, SB_CTL, nScrPos, .T. ) CASE nScrMsg == SB_THUMBTRACK nCommand := WVGSB_ENDTRACK - WAPI_SetScrollPos( ::pWnd, SB_CTL, nScrPos, .t. ) + WAPI_SetScrollPos( ::pWnd, SB_CTL, nScrPos, .T. ) CASE nScrMsg == SB_ENDSCROLL nCommand := WVGSB_ENDSCROLL - WAPI_SetScrollPos( ::pWnd, SB_CTL, nScrPos, .t. ) + WAPI_SetScrollPos( ::pWnd, SB_CTL, nScrPos, .T. ) ENDCASE @@ -387,7 +387,7 @@ METHOD setRange( aRange ) CLASS WvgScrollBar aOldRange := ::range ENDIF - IF WAPI_SetScrollRange( ::pWnd, SB_CTL, aRange[ 1 ], aRange[ 2 ], .t. ) + IF WAPI_SetScrollRange( ::pWnd, SB_CTL, aRange[ 1 ], aRange[ 2 ], .T. ) ::range := aRange ENDIF diff --git a/harbour/contrib/gtwvg/syswnd.prg b/harbour/contrib/gtwvg/syswnd.prg index 203ba39086..8ba06a95fa 100644 --- a/harbour/contrib/gtwvg/syswnd.prg +++ b/harbour/contrib/gtwvg/syswnd.prg @@ -186,7 +186,7 @@ METHOD WvgSysWindow:show() METHOD WvgSysWindow:setPos( aPos ) - WVG_SetWindowPosition( ::hWnd, aPos[ 1 ], aPos[ 2 ], .f. ) + WVG_SetWindowPosition( ::hWnd, aPos[ 1 ], aPos[ 2 ], .F. ) RETURN Self @@ -284,7 +284,7 @@ CLASS WvgFontDialog INHERIT WvgSysWindow DATA oScreenPS DATA oPrinterPS DATA aPos INIT { 0, 0 } - DATA ok INIT .f. + DATA ok INIT .F. METHOD wndProc( hWnd, nMessage, nwParam, nlParam ) METHOD GetWvgFont( aFont ) PROTECTED @@ -328,10 +328,10 @@ METHOD create( oParent, oOwner, oScreenPS, oPrinterPS, aPos ) CLASS WvgFontDialo ::aPos := aPos IF ::viewPrinterFonts .and. ::oPrinterPS == NIL - ::viewPrinterFonts := .f. + ::viewPrinterFonts := .F. ENDIF IF ( ! ::viewScreenFonts .and. ! ::viewPrinterFonts ) - ::viewScreenFonts := .t. + ::viewScreenFonts := .T. ENDIF ::WvgSysWindow:create( oParent, oOwner ) @@ -356,33 +356,33 @@ METHOD wndProc( hWnd, nMessage, nwParam, nlParam ) CLASS WvgFontDialog WVG_SetWindowText( ::hWnd, ::title ) ENDIF IF !( ::buttonCancel ) - WVG_EnableWindow( WVG_GetDlgItem( ::hWnd,IDCANCEL ), .f. ) + WVG_EnableWindow( WVG_GetDlgItem( ::hWnd,IDCANCEL ), .F. ) ENDIF IF !( ::buttonApply ) - WVG_EnableWindow( WVG_GetDlgItem( ::hWnd,1026 ), .f. ) + WVG_EnableWindow( WVG_GetDlgItem( ::hWnd,1026 ), .F. ) ENDIF IF !( ::buttonHelp ) - WVG_EnableWindow( WVG_GetDlgItem( ::hWnd,1038 ), .f. ) + WVG_EnableWindow( WVG_GetDlgItem( ::hWnd,1038 ), .F. ) ENDIF IF !( ::strikeOut ) - WVG_EnableWindow( WVG_GetDlgItem( ::hWnd,1040 ), .f. ) + WVG_EnableWindow( WVG_GetDlgItem( ::hWnd,1040 ), .F. ) ENDIF IF !( ::underscore ) - WVG_EnableWindow( WVG_GetDlgItem( ::hWnd,1041 ), .f. ) + WVG_EnableWindow( WVG_GetDlgItem( ::hWnd,1041 ), .F. ) ENDIF IF !( ::name ) - WVG_EnableWindow( WVG_GetDlgItem( ::hWnd,1136 ), .f. ) + WVG_EnableWindow( WVG_GetDlgItem( ::hWnd,1136 ), .F. ) ENDIF IF !( ::style ) - WVG_EnableWindow( WVG_GetDlgItem( ::hWnd,1137 ), .f. ) + WVG_EnableWindow( WVG_GetDlgItem( ::hWnd,1137 ), .F. ) ENDIF IF !( ::size ) - WVG_EnableWindow( WVG_GetDlgItem( ::hWnd,1138 ), .f. ) + WVG_EnableWindow( WVG_GetDlgItem( ::hWnd,1138 ), .F. ) ENDIF IF ::aPos[ 1 ] > 0 .OR. ::aPos[ 2 ] > 0 aRect := WVG_GetWindowRect( ::hWnd ) - WVG_MoveWindow( ::hWnd, ::aPos[ 1 ], ::aPos[ 2 ], aRect[3]-aRect[1], aRect[4]-aRect[2], .f. ) + WVG_MoveWindow( ::hWnd, ::aPos[ 1 ], ::aPos[ 2 ], aRect[3]-aRect[1], aRect[4]-aRect[2], .F. ) ENDIF RETURN 1 @@ -396,7 +396,7 @@ METHOD wndProc( hWnd, nMessage, nwParam, nlParam ) CLASS WvgFontDialog DO CASE CASE nL == IDOK - ::ok := .t. + ::ok := .T. IF HB_ISBLOCK( ::sl_activateOk ) eval( ::sl_activateOk, ::GetWvgFont(), NIL, Self ) ENDIF @@ -430,7 +430,7 @@ METHOD display( nMode ) CLASS WvgFontDialog hWnd := WVG_GetDesktopWindow() ENDIF - ::ok := .f. + ::ok := .F. aInfo := Wvg_ChooseFont( hWnd, {| h, m, w, l | ::wndProc( h, m, w, l ) }, ::familyName, ; ::nominalPointSize, ::viewScreenFonts, ::viewPrinterFonts ) IF !( ::ok ) diff --git a/harbour/contrib/gtwvg/tabpage.prg b/harbour/contrib/gtwvg/tabpage.prg index 64c28e533a..f6bc574949 100644 --- a/harbour/contrib/gtwvg/tabpage.prg +++ b/harbour/contrib/gtwvg/tabpage.prg @@ -207,7 +207,7 @@ METHOD minimize() CLASS WvgTabPage ::hide() - RETURN .f. + RETURN .F. // @@ -215,7 +215,7 @@ METHOD maximize() CLASS WvgTabPage ::show() - RETURN .t. + RETURN .T. // diff --git a/harbour/contrib/gtwvg/tests/activex.prg b/harbour/contrib/gtwvg/tests/activex.prg index ad251f72c8..93b189f94b 100644 --- a/harbour/contrib/gtwvg/tests/activex.prg +++ b/harbour/contrib/gtwvg/tests/activex.prg @@ -31,15 +31,15 @@ FUNCTION ExecuteActiveX( nActiveX, xParam ) //--------------------------- Dialog -------------------------------\\ #if 1 - oCrt := WvgDialog():new( , , { 30,30 }, { 800,600 }, , .t. ) - oCrt:closable := .t. + oCrt := WvgDialog():new( , , { 30,30 }, { 800,600 }, , .T. ) + oCrt:closable := .T. oCrt:create() #else - oCrt := WvgCrt():new( , , { 5,5 }, { 30,60 }, , .t. ) + oCrt := WvgCrt():new( , , { 5,5 }, { 30,60 }, , .T. ) oCrt:resizeMode := HB_GTI_RESIZEMODE_ROWS - oCrt:closable := .t. + oCrt:closable := .T. oCrt:create() - SetCursor( .f. ) + SetCursor( .F. ) #endif oDA := oCrt:drawingArea @@ -51,7 +51,7 @@ FUNCTION ExecuteActiveX( nActiveX, xParam ) oTBar := BuildWvgToolBar( oDA, nActiveX ) //--------------------------- StatusBar ---------------------------\\ - oSBar := WvgStatusBar():new( oDA ):create( , , , , , .t. ) + oSBar := WvgStatusBar():new( oDA ):create( , , , , , .T. ) oSBar:panelClick := {| oPanel | WVG_MessageBox( , oPanel:caption ) } oPanel := oSBar:getItem( 1 ) oPanel:caption := 'My Root Panel' @@ -66,12 +66,12 @@ FUNCTION ExecuteActiveX( nActiveX, xParam ) oStatic:options := WVGSTATIC_TEXT_CENTER oStatic:caption := chr(13)+'Implemented Xbase++ Parts' oStatic:create( , , { 0, oTBar:currentSize()[2]+3 }, { 120, oCrt:currentSize()[2]-; - oTBar:currentSize()[2]-oSBar:currentSize()[2]-4 }, , .t. ) + oTBar:currentSize()[2]-oSBar:currentSize()[2]-4 }, , .T. ) oStatic:setColorBG( RGB( 198,198,198 ) ) #if 0 // panel //--------------------------- Static + Radio + Checkbox ----------\\ - oStatic2:= WvgStatic():New( oCrt, , { 150, 150 }, { 500,310 }, , .f. ) + oStatic2:= WvgStatic():New( oCrt, , { 150, 150 }, { 500,310 }, , .F. ) //oStatic2:type := WVGSTATIC_TYPE_RAISEDBOX //BGNDFRAME oStatic2:exStyle += WS_EX_WINDOWEDGE //oStatic2:options := WVGSTATIC_FRAMETHICK @@ -93,7 +93,7 @@ FUNCTION ExecuteActiveX( nActiveX, xParam ) oRadio:caption := "Com 2" oRadio:create() - oCheck := WvgCheckBox():New( oStatic2, , { 10,70 }, { 100,15 }, , .t. ) + oCheck := WvgCheckBox():New( oStatic2, , { 10,70 }, { 100,15 }, , .T. ) oCheck:caption := 'Checkbox A' oCheck:create() oCheck:selected := {| m1, m2, o | m1:=m1,m2:=m2, WVG_MessageBox( , iif( o:getData(), 'I am selected','I am not selected' ) ) } @@ -139,7 +139,7 @@ FUNCTION ExecuteActiveX( nActiveX, xParam ) // assign data code block accessing LOCAL variable oMLE := WvgMLE():new( oStatic2 ) oMLE:wordWrap := .F. - oMLE:border := .t. + oMLE:border := .T. oMLE:dataLink := {| x | iif( x == NIL, cText, cText := x ) } oMLE:create( oStatic2, , { 180,10 }, { 310,250 } ) // Copy text from LOCAL variable into edit buffer via :dataLink @@ -181,7 +181,7 @@ FUNCTION ExecuteActiveX( nActiveX, xParam ) //--------------------------- TreeView ---------------------------\\ oTree := WvgTreeView():new( oDA, , { oCrt:currentSize()[1]-160,oTBar:currentSize()[2]+3 }, ; { 160, oCrt:currentSize()[2]-; - oTBar:currentSize()[2]-oSBar:currentSize()[2]-4 }, , .t. ) + oTBar:currentSize()[2]-oSBar:currentSize()[2]-4 }, , .T. ) oTree:hasLines := .T. oTree:hasButtons := .T. oTree:alwaysShowSelection := .T. @@ -202,9 +202,9 @@ FUNCTION ExecuteActiveX( nActiveX, xParam ) oItem2:addItem( "Third level C" ) #if 0 - oItem1:expand( .t. ) + oItem1:expand( .T. ) #else - oTree:showExpanded( .t., 2 ) + oTree:showExpanded( .T., 2 ) #endif oTree:setData( oItem2 ) @@ -227,7 +227,7 @@ FUNCTION ExecuteActiveX( nActiveX, xParam ) ENDIF #else oCrt:show() - DO WHILE .t. + DO WHILE .T. IF inkey() == K_ESC EXIT ENDIF @@ -255,12 +255,12 @@ STATIC FUNCTION ResizeDialog( oCrt, oTBar, oSBar, oStatic, oCom, oTree ) nH := aCrt[2]-aTBar[2]-aSBar[2] IF oStatic:isVisible - oStatic:setPosAndSize( { 0, nT+3 }, { 120, nH-4 }, .t. ) - oCom:setPosAndSize( { 120, nT }, { aCrt[1]-120-150, nH }, .t. ) - oTree:setPosAndSize( { aCrt[1]-150, nT }, { 150, nH }, .t. ) + oStatic:setPosAndSize( { 0, nT+3 }, { 120, nH-4 }, .T. ) + oCom:setPosAndSize( { 120, nT }, { aCrt[1]-120-150, nH }, .T. ) + oTree:setPosAndSize( { aCrt[1]-150, nT }, { 150, nH }, .T. ) ELSE - oCom:setPosAndSize( { 0, nT }, { aCrt[1]-150, nH }, .t. ) - oTree:setPosAndSize( { aCrt[1]-150, nT }, { 150, nH }, .t. ) + oCom:setPosAndSize( { 0, nT }, { aCrt[1]-150, nH }, .T. ) + oTree:setPosAndSize( { aCrt[1]-150, nT }, { 150, nH }, .T. ) ENDIF RETURN 1 @@ -310,7 +310,7 @@ STATIC FUNCTION BuildActiveXControl( nActiveX, oDA ) DEFAULT nActiveX TO 2 - oCom := WvgActiveXControl():New( oDA, , { 0, 0 }, { 100, 100 }, , .t. ) + oCom := WvgActiveXControl():New( oDA, , { 0, 0 }, { 100, 100 }, , .T. ) do case case nActiveX == 1 @@ -338,8 +338,8 @@ STATIC FUNCTION BuildActiveXControl( nActiveX, oDA ) oCom:mapEvent( evDblClk, {|| oCom:Value := seconds()/86400 ,; oCom:BackColor := RGB( 0,140,210 ),; oCom:Refresh() ,; - oCom:ShowSecondsHand := .t. ,; - oCom:Hands3D := .t. ,; + oCom:ShowSecondsHand := .T. ,; + oCom:Hands3D := .T. ,; oCom:Refresh() ,; oCom:showAboutBox() ; } ) @@ -380,12 +380,12 @@ STATIC FUNCTION ExeActiveX( nActiveX, oCom, xParam ) // if nActiveX == 1 hb_gtInfo( HB_GTI_WINTITLE, iif( empty( xParam ), 'http://hbide.vouch.info', xParam ) ) - oCom:AddressBar := .t. + oCom:AddressBar := .T. oCom:Navigate( iif( empty( xParam ), 'http://hbide.vouch.info', xParam ) ) elseif nActiveX == 4 ConfigureRMChart( oCom ) - oCom:Draw( .t. ) + oCom:Draw( .T. ) oCom:Draw2Clipboard() elseif nActiveX == 5 @@ -400,7 +400,7 @@ STATIC FUNCTION ExeActiveX( nActiveX, oCom, xParam ) endif - do while .t. + do while .T. nKey := inkey() IF nActiveX == 2 @@ -421,7 +421,7 @@ STATIC FUNCTION ExeActiveX( nActiveX, oCom, xParam ) oCom:Region(1):SetProperties( 5.0,5.0,-5.0,-5.0 ) - oCom:Draw( .t. ) + oCom:Draw( .T. ) endif elseif nKey == K_F11 @@ -574,7 +574,7 @@ STATIC FUNCTION ExeActiveX( nActiveX, oCom, xParam ) oCom:Reset() oCom:RMCFile := sData - oCom:Draw( .t. ) + oCom:Draw( .T. ) endif endif diff --git a/harbour/contrib/gtwvg/tests/cuigdlgs.prg b/harbour/contrib/gtwvg/tests/cuigdlgs.prg index ee84d85b3f..72c58ec373 100644 --- a/harbour/contrib/gtwvg/tests/cuigdlgs.prg +++ b/harbour/contrib/gtwvg/tests/cuigdlgs.prg @@ -24,7 +24,7 @@ PROCEDURE ExecGCUI() IF hb_mtvm() - Hb_ThreadStart( {| oCrt | oCrt := WvgCrt():New( , , { 2,4 }, { 20,81 }, , .t. ) , ; + Hb_ThreadStart( {| oCrt | oCrt := WvgCrt():New( , , { 2,4 }, { 20,81 }, , .T. ) , ; oCrt:icon := GetResource( "dia_excl.ico" ),; oCrt:create(), ; GCUIConsole( oCrt ) , ; @@ -62,22 +62,22 @@ PROCEDURE GCUIConsole( oCrt ) @ 3, nColGet GET dDate ; WHEN {|| Wvg_SetGObjData( hTxt, 1, FetchText( 1 ) ) } ; - Valid {|| Wvg_SetGObjData( hTxt, 6, RGB( 255,0,0 ) ), .t. } + Valid {|| Wvg_SetGObjData( hTxt, 6, RGB( 255,0,0 ) ), .T. } @ 6, nColGet GET cName ; WHEN {|| Wvg_SetGObjData( hTxt, 1, FetchText( 2 ) ) } ; Valid {|| Wvg_SetGObjData( hTxt, 6, RGB( 255,255,0 ) ), ; - Wvg_SetGObjState( hBoxR, 3 ), .t. } + Wvg_SetGObjState( hBoxR, 3 ), .T. } @ 9, nColGet GET cAdd1 ; WHEN {|| Wvg_SetGObjData( hTxt, 1, FetchText( 3 ) ) } ; - Valid {|| Wvg_SetGObjData( hTxt, 6, RGB( 255,0,255 ) ), .t. } + Valid {|| Wvg_SetGObjData( hTxt, 6, RGB( 255,0,255 ) ), .T. } @ 11, nColGet GET cAdd2 ; WHEN {|| Wvg_SetGObjData( hTxt, 1, FetchText( 4 ) ) } ; Valid {|| Wvg_SetGObjData( hTxt, 6, RGB( 255,255,255 ) ), ; - Wvg_SetGObjState( hBoxR, 1 ), .t. } + Wvg_SetGObjState( hBoxR, 1 ), .T. } @ 13, nColGet GET cAdd3 ; - WHEN {|| Wvg_SetGObjData( hTxt, 6, RGB( 198,21,140 ) ), .t. } + WHEN {|| Wvg_SetGObjData( hTxt, 6, RGB( 198,21,140 ) ), .T. } @ 16, nColGet GET nSlry PICTURE "@Z 9999999.99" ; - WHEN {|| Wvg_SetGObjData( hTxt, 6, RGB( 0,0,0 ) ), .t. } + WHEN {|| Wvg_SetGObjData( hTxt, 6, RGB( 0,0,0 ) ), .T. } // The only additional calls to render your console GUI // diff --git a/harbour/contrib/gtwvg/tests/demowvg.prg b/harbour/contrib/gtwvg/tests/demowvg.prg index 8642ba6b1e..0cb9839000 100644 --- a/harbour/contrib/gtwvg/tests/demowvg.prg +++ b/harbour/contrib/gtwvg/tests/demowvg.prg @@ -109,10 +109,10 @@ PROCEDURE Main() SET( _SET_EVENTMASK, INKEY_ALL + HB_INKEY_GTEVENT ) - Wvt_SetGui( .t. ) - WvtSetKeys( .t. ) + Wvt_SetGui( .T. ) + WvtSetKeys( .T. ) Popups( 1 ) - Wvt_SetMouseMove( .t. ) + Wvt_SetMouseMove( .T. ) Wvt_SetFont( "Courier New", 18, 0, 0 ) CLS @@ -143,7 +143,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 ) } ) @@ -190,10 +190,10 @@ PROCEDURE Main() WvtSetObjects( aObjects ) SetColor( clr ) RestScreen( 0,0,maxrow(),maxcol(), scr ) - WvtSetKeys( .f. ) + WvtSetKeys( .F. ) Wvt_SetPopupMenu( hPopup ) - Popups( 1, .t. ) + Popups( 1, .T. ) SetGT( 1, pGT ) ErrorBlock( oError ) @@ -461,7 +461,7 @@ FUNCTION BuildMainMenu() LOCAL oMenu LOCAL g_oMenuBar := WvgSetAppWindow():menuBar() - oMenu := WvgMenu():new( g_oMenuBar, , .t. ):create() + oMenu := WvgMenu():new( g_oMenuBar, , .T. ):create() oMenu:Caption:= "Wvt*Classes" oMenu:AddItem( "Dialog One . New Window . Threaded" , {|| DialogWvgClassesOne( 1 ) } ) oMenu:AddItem( "Dialog One . Main Window . Primary Thread", {|| DialogWvgClassesOne( 2 ) } ) @@ -471,7 +471,7 @@ FUNCTION BuildMainMenu() oMenu:AddItem( "Exit" , {|| __keyboard( K_ESC ) } ) g_oMenuBar:addItem( { oMenu, "Wvt*Classes" } ) - oMenu := WvgMenu():new( g_oMenuBar, , .t. ):create() + oMenu := WvgMenu():new( g_oMenuBar, , .T. ):create() oMenu:caption := "Traditional" oMenu:AddItem( "Gets . GTWVG . Threaded" , {|| WvtNextGets() } ) oMenu:AddItem( "-") @@ -490,14 +490,14 @@ FUNCTION BuildMainMenu() oMenu:AddItem( "Modal Window" , {|| DoModalWindow() } ) g_oMenuBar:addItem( { oMenu, "Traditional" } ) - oMenu := WvgMenu():new( g_oMenuBar, , .t. ):create() + oMenu := WvgMenu():new( g_oMenuBar, , .T. ):create() oMenu:Caption:= "Common Dialogs" oMenu:AddItem( "Fonts" , {|| Wvt_ChooseFont() } ) oMenu:AddItem( "-") oMenu:AddItem( "Colors" , {|| Wvt_ChooseColor() } ) g_oMenuBar:addItem( { oMenu, "Common Dialogs" } ) - oMenu := WvgMenu():new( g_oMenuBar, , .t. ):create() + oMenu := WvgMenu():new( g_oMenuBar, , .T. ):create() oMenu:Caption:= "Functionality" oMenu:AddItem( "Expand" , {|| WvtWindowExpand( 1 ) } ) oMenu:AddItem( "Shrink" , {|| WvtWindowExpand( -1 ) } ) @@ -506,7 +506,7 @@ FUNCTION BuildMainMenu() oMenu:AddItem( "Maximize" , {|| hb_gtInfo( HB_GTI_SPEC, HB_GTS_WNDSTATE, HB_GTS_WS_MAXIMIZED ) } ) g_oMenuBar:addItem( { oMenu, "Functionality" } ) - oMenu := WvgMenu():new( g_oMenuBar, , .t. ):create() + oMenu := WvgMenu():new( g_oMenuBar, , .T. ):create() oMenu:Caption:= "Modeless Dialogs" oMenu:AddItem( "Dynamic Dialog . Modeless" , {|| DynWinDialog( 1 ) } ) oMenu:AddItem( "Dynamic Dialog . Modal " , {|| DynWinDialog( 2 ) } ) @@ -514,7 +514,7 @@ FUNCTION BuildMainMenu() oMenu:AddItem( "Slide Show . Modeless" , {|| DlgSlideShow() } ) g_oMenuBar:addItem( { oMenu, "Modeless Dialogs" } ) - oMenu := WvgMenu():new( g_oMenuBar, , .t. ):create() + oMenu := WvgMenu():new( g_oMenuBar, , .T. ):create() oMenu:Caption := "~XbpDialog()s" oMenu:AddItem( "Pure Xbase++" , {|| Hb_ThreadStart( {|| demoXbp() } ) } ) oMenu:AddItem( "-") @@ -580,48 +580,48 @@ FUNCTION BuildButtons() LOCAL oXbp oXbp := WvgPushButton():new() - oXbp:pointerFocus := .f. + oXbp:pointerFocus := .F. oXbp:caption := "Hi" oXbp:create( , , { {|| -( maxrow()-1 ) }, -1 }, { -2, -4 } ) oXbp:activate := {|| Wvg_MessageBox( , "Harbour!" ) } oXbp:toolTipText := "Harbour CUI/GUI Console" oXbp := WvgPushButton():new() - oXbp:pointerFocus := .f. + oXbp:pointerFocus := .F. oXbp:caption := IMAGE_VOUCH oXbp:create( , , { {|| -( maxrow()-1 ) }, -6 }, { -2, -4 } ) oXbp:activate := {|| Wvt_Keyboard( K_F2 ) } oXbp:toolTipText := "Open Another GET Screen" oXbp := WvgPushButton():new() - oXbp:pointerFocus := .f. + oXbp:pointerFocus := .F. oXbp:caption := IMAGE_BROWSE oXbp:create( , , { {|| -( maxrow()-1 ) }, -11 }, { -2, -4 } ) oXbp:activate := {|| Wvt_Keyboard( K_F5 ) } oXbp:toolTipText := "TBrowse + GUI Controls" oXbp := WvgPushButton():new() - oXbp:pointerFocus := .f. + oXbp:pointerFocus := .F. oXbp:caption := IMAGE_NOTES oXbp:create( , , { {|| -( maxrow()-1 ) }, -16 }, { -2, -4 } ) oXbp:activate := {|| Wvt_Keyboard( K_F3 ) } oXbp := WvgPushButton():new() - oXbp:pointerFocus := .f. + oXbp:pointerFocus := .F. oXbp:caption := IMAGE_TOOLS oXbp:create( , , { {|| -( maxrow()-1 ) }, -21 }, { -2, -4 } ) oXbp:activate := {|| Wvt_Keyboard( K_F6 ) } oXbp := WvgPushButton():new() - oXbp:pointerFocus := .f. + oXbp:pointerFocus := .F. oXbp:caption := IMAGE_HELP oXbp:create( , , { {|| -( maxrow()-1 ) }, -26 }, { -2, -4 } ) oXbp:activate := {|| Wvt_Keyboard( K_F7 ) } oXbp := WvgPushButton():new() - oXbp:pointerFocus := .f. + oXbp:pointerFocus := .F. oXbp:caption := IMAGE_VR - oXbp:border := .f. + oXbp:border := .F. oXbp:create( , , { {|| -( maxrow()-1 ) }, -31 }, { -2, -4 } ) oXbp:activate := {|| Hb_ThreadStart( {|| demoXbp() } ) } // {|| Wvt_Keyboard( K_F8 ) } oXbp:toolTipText := "Flat Button . Lines: press ESC when finished." diff --git a/harbour/contrib/gtwvg/tests/demowvg1.prg b/harbour/contrib/gtwvg/tests/demowvg1.prg index ea2391a391..4bf89b6257 100644 --- a/harbour/contrib/gtwvg/tests/demowvg1.prg +++ b/harbour/contrib/gtwvg/tests/demowvg1.prg @@ -38,9 +38,9 @@ FUNCTION Main() SET DATE ANSI SET( _SET_EVENTMASK, INKEY_ALL + HB_INKEY_GTEVENT ) - Wvt_SetGui( .t. ) + Wvt_SetGui( .T. ) Wvt_SetFont( "Courier New", 18, 0, 0 ) - Wvt_SetMouseMove( .t. ) + Wvt_SetMouseMove( .T. ) SetColor( "N/W" ) CLS @@ -52,7 +52,7 @@ FUNCTION 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 } } ) @@ -164,7 +164,7 @@ FUNCTION DispStatusMsg( cMsg ) // Wvt_DrawLabel( MaxRow(), 60, cMsg, 6, , 0, rgb( 198, 198, 198 ), "Arial", 18, , 900 ) - RETURN .t. + RETURN .T. // @@ -175,7 +175,7 @@ FUNCTION ClearStatusMsg() DispOutAt( MaxRow(), 42, space( 37 ), "W/W" ) SetPos( nRow, nCol ) - RETURN .t. + RETURN .T. // @@ -186,9 +186,9 @@ FUNCTION DoModalDialog() oCrt := WvgCrt():New( , , { 4,8 }, { 12,49 }, , .T. ) - oCrt:lModal := .t. - oCrt:resizable := .f. - oCrt:closable := .f. + oCrt:lModal := .T. + oCrt:resizable := .F. + oCrt:closable := .F. oCrt:title := 'Modal Dialog!' oCrt:icon := hb_dirBase() + "vr_1.ico" @@ -200,7 +200,7 @@ FUNCTION DoModalDialog() SetColor( 'N/W' ) CLS - DO WHILE .t. + DO WHILE .T. nSel := Alert( 'A modal window !;Click on parent window;Move this window', { 'OK' } ) IF nSel == 0 .OR. nSel == 1 EXIT diff --git a/harbour/contrib/gtwvg/tests/demoxbp.prg b/harbour/contrib/gtwvg/tests/demoxbp.prg index 13b650d6c5..c60efaaac7 100644 --- a/harbour/contrib/gtwvg/tests/demoxbp.prg +++ b/harbour/contrib/gtwvg/tests/demoxbp.prg @@ -36,8 +36,8 @@ FUNCTION Main() LOCAL aParts := {} //--------------------------- Dialog -------------------------------\\ - oCrt := WvgDialog():new( , , { 30,30 }, { 900,600 }, , .t. ) - oCrt:closable := .t. + oCrt := WvgDialog():new( , , { 30,30 }, { 900,600 }, , .T. ) + oCrt:closable := .T. oCrt:icon := "vr_1.ico" oCrt:create() @@ -52,7 +52,7 @@ FUNCTION Main() oTBar := ActiveXBuildToolBarXbp( oDA ) //--------------------------- StatusBar ---------------------------\\ - oSBar := WvgStatusBar():new( oCrt ):create( , , , , , .t. ) + oSBar := WvgStatusBar():new( oCrt ):create( , , , , , .T. ) oSBar:panelClick := {| oPanel | WVG_MessageBox( , oPanel:caption ) } oPanel := oSBar:getItem( 1 ) oPanel:caption := 'My Root Panel' @@ -68,7 +68,7 @@ FUNCTION Main() oStatic:caption := chr(13)+'Implemented Xbase++ Parts' oStatic:create( , , { 0, oTBar:currentSize()[2]+3 }, { 120, oCrt:currentSize()[2]-; - oTBar:currentSize()[2]-oSBar:currentSize()[2]-4 }, , .t. ) + oTBar:currentSize()[2]-oSBar:currentSize()[2]-4 }, , .T. ) oStatic:setColorBG( RGB( 200,200,200 ) ) //--------------------------- ListBox -----------------------------\\ @@ -115,7 +115,7 @@ FUNCTION Main() oTree := WvgTreeView():new( oDA, , { oCrt:currentSize()[1]-160,oTBar:currentSize()[2]+3 }, ; { 160, oCrt:currentSize()[2]-; - oTBar:currentSize()[2]-oSBar:currentSize()[2]-4 }, , .t. ) + oTBar:currentSize()[2]-oSBar:currentSize()[2]-4 }, , .T. ) oTree:hasLines := .T. oTree:hasButtons := .T. oTree:alwaysShowSelection := .T. @@ -136,9 +136,9 @@ FUNCTION Main() oItem2:addItem( "Third level C" ) #if 0 - oItem1:expand( .t. ) + oItem1:expand( .T. ) #else - oTree:showExpanded( .t., 2 ) + oTree:showExpanded( .T., 2 ) #endif oTree:setData( oItem2 ) @@ -146,11 +146,11 @@ FUNCTION Main() //--------------------------- Active-X ---------------------------\\ hb_gtInfo( HB_GTI_WINTITLE, 'http://www.harbour.vouch.info' ) #if 0 - oCom := WvgActiveXControl():New( oDA, , { 0, 0 }, { 100, 100 }, , .t. ) + oCom := WvgActiveXControl():New( oDA, , { 0, 0 }, { 100, 100 }, , .T. ) oCom:CLSID := 'Shell.Explorer.2' oCom:mapEvent( 269, {|| QOut( ' E X P L O R E R - 2 6 9' ) } ) #else - oCom := WvgHTMLViewer():New( oDA, , { 0, 0 }, { 100, 100 }, , .t. ) + oCom := WvgHTMLViewer():New( oDA, , { 0, 0 }, { 100, 100 }, , .T. ) oCom:beforeNavigate := {| cURL, x, oHTML | x := x, oHTML := oHTML, oPanel:caption := cURL } oCom:statusTextChange := {| cText | oPanel:caption := cText } #endif @@ -159,17 +159,17 @@ FUNCTION Main() oAddr := WvgSLE():new() oAddr:bufferLength := 500 - oAddr:border := .t. + oAddr:border := .T. cNavigate := 'http://www.harbour.vouch.info' oAddr:dataLink := {| x | iif( x == NIL, cNavigate, cNavigate := x ) } oAddr:setColorFG( RGB( 0,0,255 ) ) oAddr:setColorBG( RGB( 0,255,255 ) ) - oAddr:create( oDA, , { 120, oTBar:currentSize()[2] }, { 500,20 }, , .t. ) + oAddr:create( oDA, , { 120, oTBar:currentSize()[2] }, { 500,20 }, , .T. ) oAddr:setData() oAddr:killInputFocus := {| m1, m2, oS | m1:=m1, m2:=m2, oS:getData(), oCom:navigate( cNavigate ) } //----------------- Panel : Static + Radio + Checkbox ----------\\ - oStatic2:= WvgStatic():New( oDA, , { 150, 150 }, { 500,310 }, , .f. ) + oStatic2:= WvgStatic():New( oDA, , { 150, 150 }, { 500,310 }, , .F. ) //oStatic2:type := WVGSTATIC_TYPE_RAISEDBOX //BGNDFRAME oStatic2:exStyle += WS_EX_WINDOWEDGE //oStatic2:options := WVGSTATIC_FRAMETHICK @@ -192,7 +192,7 @@ FUNCTION Main() oRadio:caption := "Com 2" oRadio:create() - oCheck := WvgCheckBox():New( oStatic2, , { 10,70 }, { 100,15 }, , .t. ) + oCheck := WvgCheckBox():New( oStatic2, , { 10,70 }, { 100,15 }, , .T. ) oCheck:caption := 'Checkbox A' oCheck:create() oCheck:selected := {| m1, m2, o | m1:=m1,m2:=m2, WVG_MessageBox( , iif( o:getData(), 'I am selected','I am not selected' ) ) } @@ -238,7 +238,7 @@ FUNCTION Main() // assign data code block accessing LOCAL variable oMLE := WvgMLE():new() oMLE:wordWrap := .F. - oMLE:border := .t. + oMLE:border := .T. oMLE:dataLink := {| x | iif( x == NIL, cText, cText := x ) } oMLE:create( oStatic2, , { 180,10 }, { 310,250 } ) // Copy text from LOCAL variable into edit buffer via :dataLink @@ -257,7 +257,7 @@ FUNCTION Main() oCrt:sendMessage( WM_SIZE, 0, 0 ) oCrt:show() - DO WHILE .t. + DO WHILE .T. IF inkey() == 27 EXIT ENDIF @@ -280,15 +280,15 @@ STATIC FUNCTION ResizeDialogXbp( oCrt, oTBar, oSBar, oStatic, oCom, oTree, oAddr nH := aCrt[2] - aTBar[2] - aSBar[2] IF oStatic:isVisible - oStatic:setPosAndSize( { 0, nT+3 }, { 120, nH-4 }, .t. ) - oAddr:setPosAndSize( { 120, nT+2 }, { aCrt[1]-120-150, 20 }, .t. ) - oCom:setPosAndSize( { 120, nT+2+20 }, { aCrt[1]-120-150, nH-20 }, .t. ) - oTree:setPosAndSize( { aCrt[1]-150, nT }, { 150, nH }, .t. ) + oStatic:setPosAndSize( { 0, nT+3 }, { 120, nH-4 }, .T. ) + oAddr:setPosAndSize( { 120, nT+2 }, { aCrt[1]-120-150, 20 }, .T. ) + oCom:setPosAndSize( { 120, nT+2+20 }, { aCrt[1]-120-150, nH-20 }, .T. ) + oTree:setPosAndSize( { aCrt[1]-150, nT }, { 150, nH }, .T. ) ELSE - oAddr:setPosAndSize( { 0, nT+2 }, { aCrt[1]-150, 20 }, .t. ) - oCom:setPosAndSize( { 0, nT+2+20 }, { aCrt[1]-150, nH-20 }, .t. ) - oTree:setPosAndSize( { aCrt[1]-150, nT }, { 150, nH }, .t. ) + oAddr:setPosAndSize( { 0, nT+2 }, { aCrt[1]-150, 20 }, .T. ) + oCom:setPosAndSize( { 0, nT+2+20 }, { aCrt[1]-150, nH-20 }, .T. ) + oTree:setPosAndSize( { aCrt[1]-150, nT }, { 150, nH }, .T. ) ENDIF @@ -351,7 +351,7 @@ STATIC FUNCTION ActiveXBuildToolBarXbp( oCrt ) oTBar:imageWidth := 26 oTBar:imageHeight := 24 - oTBar:showToolTips := .t. + oTBar:showToolTips := .T. oTBar:create() @@ -410,16 +410,16 @@ STATIC FUNCTION ExeFontDialog( oCrt ) oFontDlg:title := 'Select a Screen Font' oFontDlg:aPos := { 150,150 } - oFontDlg:buttonApply := .t. + oFontDlg:buttonApply := .T. oFontDlg:activateApply := {|| NIL } oFontDlg:familyName := "Courier New" oFontDlg:strikeout := .T. - oFontDlg:underscore := .f. + oFontDlg:underscore := .F. //oFontDlg:activateOk := {|| WVG_MessageBox( , 'activateOK Event Handelled in Windows!' ) } oFontDlg:nominalPointSize := 12 - //oFontDlg:size := .f. - //oFontDlg:style := .f. + //oFontDlg:size := .F. + //oFontDlg:style := .F. oFontDlg:create() diff --git a/harbour/contrib/gtwvg/tests/dyndlgs.prg b/harbour/contrib/gtwvg/tests/dyndlgs.prg index 42ad2cec46..d00db9cce5 100644 --- a/harbour/contrib/gtwvg/tests/dyndlgs.prg +++ b/harbour/contrib/gtwvg/tests/dyndlgs.prg @@ -117,7 +117,7 @@ FUNCTION DynWinDialog( nInfo ) Wvt_AppendMenu( hMenu, MF_STRING + MF_ENABLED, ID_MNU_FILE , "File" ) Wvt_AppendMenu( hMenu, MF_STRING + MF_ENABLED, ID_MNU_CONTROL, "Controls" ) - lOnTop := .f. + lOnTop := .F. cDlgProc := "DynDlgProc" // bDlgProc := {| a, b, c, d | DYNDLGPROC( a, b, c, d ) } cDlgIcon := "v_notes.ico" @@ -239,7 +239,7 @@ FUNCTION DynDlgProc( hDlg, nMsg, wParam, lParam ) endif */ WVG_SetDlgItemText( hDlg, ID_MLE , GetEditText() ) - WVG_CheckDlgButton( hDlg, ID_CHK_SATIS, .t. ) + WVG_CheckDlgButton( hDlg, ID_CHK_SATIS, .T. ) WVG_CheckRadioButton( hDlg, ID_RDO_XH, ID_RDO_XBASE, ID_RDO_XH ) @@ -317,7 +317,7 @@ FUNCTION DlgSlideShow() aDlg := Wvt_MakeDlgTemplate( 0, 0, 20, 40, {}, "Slide Show", nStyle ) - hDlg := Wvt_CreateDialog( aDlg, .f., "DlgSlideShowProc", "vr_1.ico", 5000 ) + hDlg := Wvt_CreateDialog( aDlg, .F., "DlgSlideShowProc", "vr_1.ico", 5000 ) RETURN hDlg diff --git a/harbour/contrib/gtwvg/tests/modal.prg b/harbour/contrib/gtwvg/tests/modal.prg index 89766eba61..df6878c86e 100644 --- a/harbour/contrib/gtwvg/tests/modal.prg +++ b/harbour/contrib/gtwvg/tests/modal.prg @@ -20,11 +20,11 @@ FUNCTION MyAlert( cMsg, aOpt ) LOCAL nSel, oCrt - oCrt := WvgCrt():New( , , { -1,-1 }, { 9, MaxCol()-6 }, , .t. ) - oCrt:lModal := .t. + oCrt := WvgCrt():New( , , { -1,-1 }, { 9, MaxCol()-6 }, , .T. ) + oCrt:lModal := .T. oCrt:icon := "dia_excl.ico" oCrt:create() - oCrt:resizable := .t. + oCrt:resizable := .T. SetColor( 'N/W' ) CLS @@ -199,7 +199,7 @@ FUNCTION DialogAlert( cCaption, aText_, aButtons_, sel, aMessage_, nTop, nTime ) dispend() - lGo := .t. + lGo := .T. do while lGo IF ( nKey := Inkey() ) == 0 LOOP @@ -215,33 +215,33 @@ FUNCTION DialogAlert( cCaption, aText_, aButtons_, sel, aMessage_, nTop, nTime ) do case case nKey == K_RIGHT_DOWN sel := 0 - lGo := .f. + lGo := .F. case nKey == K_LEFT_DOWN if nMRow == nTop if nMCol >= nLeft .and. nMCol <= nLeft+3 sel := 0 - lGo := .f. + lGo := .F. endif elseif nMRow == nBtnRow for i := 1 to len( nBtnCol_ ) if nMCol >= nBtnCol_[ i ] .and. nMCol <= nBtnCol_[ i ] + len( aButtons_[ i ] )+4 sel := i - lGo := .f. + lGo := .F. endif next endif case nKey == K_ESC sel := 0 - lGo := .f. + lGo := .F. case nKey == K_ENTER - lGo := .f. + lGo := .F. case nKey == K_LEFT .or. nKey == K_DOWN sel-- case nKey == K_RIGHT .or. nKey == K_UP sel++ case ( nTrg := ascan( aTrg_, upper( chr( nKey ) ) ) ) > 0 sel := nTrg - lGo := .f. + lGo := .F. otherwise if setkey( nKey ) != nil eval( setKey( nKey ) ) @@ -329,9 +329,9 @@ FUNCTION DoModalWindow() */ oCrt := WvgCrt():New( , , { 4,8 }, { 12,49 }, , .T. ) - oCrt:lModal := .t. - oCrt:resizable := .f. - oCrt:closable := .f. + oCrt:lModal := .T. + oCrt:resizable := .F. + oCrt:closable := .F. oCrt:title := 'Information! [R:4 C:8]' oCrt:rbUp := {|| DispOutAt( maxrow(), 0, padc( 'rbUp', maxcol()+1 ),'W+/R*' ) } @@ -348,7 +348,7 @@ FUNCTION DoModalWindow() // SetColor( 'N/W' ) CLS - do while .t. + do while .T. nSel := Just_Alert( 'I am in modal window !;< Try: MMove LBUp RBUp >;Click Parent Window', { 'OK' } ) if nSel == 0 .or. nSel == 1 diff --git a/harbour/contrib/gtwvg/tests/tbrowser.prg b/harbour/contrib/gtwvg/tests/tbrowser.prg index ad5ef50caf..bd6f2d2ad8 100644 --- a/harbour/contrib/gtwvg/tests/tbrowser.prg +++ b/harbour/contrib/gtwvg/tests/tbrowser.prg @@ -46,7 +46,7 @@ FUNCTION WvtMyBrowse() oCrt:resizeMode := HB_GTI_RESIZEMODE_ROWS,; oCrt:icon := GetResource( "dia_excl.ico" ),; oCrt:create(),; - Wvt_SetGui( .t. ),; + Wvt_SetGui( .T. ),; ExecBrowser( oCrt ),; oCrt:destroy(); } ) @@ -62,7 +62,7 @@ FUNCTION WvtMyBrowse() FUNCTION ExecBrowser( oCrt ) LOCAL nKey, bBlock, oBrowse , aLastPaint, i, pGT LOCAL cFileIndex, cFileDbf, cRDD, nIndex, oTBar, cScr, info_ //, oLB - LOCAL lEnd := .f. + LOCAL lEnd := .F. LOCAL aBlocks := {} LOCAL nTop := 4 LOCAL nLeft := 3 @@ -78,7 +78,7 @@ FUNCTION ExecBrowser( oCrt ) STATIC nStyle := 0 THREAD STATIC nFactor := 200 - THREAD STATIC lActiveX := .f. + THREAD STATIC lActiveX := .F. IF oCrt == NIL cScr := SaveScreen( 0,0,maxrow(),maxcol() ) @@ -182,10 +182,10 @@ FUNCTION ExecBrowser( oCrt ) hb_gtInfo( HB_GTI_SPEC, HB_GTS_FACTOR, nFactor ) CASE nKey == K_F6 - hb_gtInfo( HB_GTI_RESIZABLE, .f. ) + hb_gtInfo( HB_GTI_RESIZABLE, .F. ) CASE nKey == K_F7 - hb_gtInfo( HB_GTI_RESIZABLE, .t. ) + hb_gtInfo( HB_GTI_RESIZABLE, .T. ) CASE nKey == K_F2 nIndex := IndexOrd() @@ -272,7 +272,7 @@ STATIC FUNCTION BrwHandleResize( oCrt, oBrw, oVBar, oHBar, oCom, oSLE, oLBx, oTr oCrt:hide() oCrt:show() - RETURN .t. + RETURN .T. // @@ -324,7 +324,7 @@ STATIC FUNCTION BrwBuildTree( oCrt /*, oBrw*/ ) oItem2:addItem( "Third level y" ) oItem2:addItem( "Third level z" ) - oTree:showExpanded( .t., 2 ) + oTree:showExpanded( .T., 2 ) oTree:setData( oItem2 ) oTree:tooltipText := "Treeview embedded onto CUI window" @@ -338,7 +338,7 @@ STATIC FUNCTION BrwBuildActiveX( oCrt, oBrw ) HB_SYMBOL_UNUSED( oBrw ) - oCom := WvgActiveXControl():new( oCrt, , { -24, -13 }, { {|| -( maxrow()-1-24 ) }, {|| -( maxcol()-1-13 ) } }, , .f. ) + oCom := WvgActiveXControl():new( oCrt, , { -24, -13 }, { {|| -( maxrow()-1-24 ) }, {|| -( maxcol()-1-13 ) } }, , .F. ) oCom:CLSID := 'Shell.Explorer.2' //oCom:mapEvent( 269, {|| uiDebug( ' E X P L O R E R - 2 6 9' ) } ) oCom:create() @@ -352,7 +352,7 @@ STATIC FUNCTION BrwBuildListBox( oCrt, oBrw ) LOCAL oXbp, i oXbp := WvgListBox():new( oCrt ) - oXbp:create( , , { -4,-1 }, { -10, -10 }, , .t. ) + oXbp:create( , , { -4,-1 }, { -10, -10 }, , .T. ) oXbp:setColorFG( "W+" ) oXbp:setColorBG( "B*" ) oXbp:itemMarked := {| m1, m2, o | m1 := m1, m2 := m2, BrwShowColumn( oBrw, o:getCurItem() ) } @@ -386,7 +386,7 @@ STATIC FUNCTION BrwBuildListBoxIdx( oCrt, oBrw ) oXbp := WvgComboBox():new( oCrt ) oXbp:type := WVGCOMBO_DROPDOWN - oXbp:create( , , { -18,-1 }, { -5, -10 }, , .t. ) + oXbp:create( , , { -18,-1 }, { -5, -10 }, , .T. ) oXbp:setColorFG( "W+" ) oXbp:setColorBG( "B*" ) oXbp:itemMarked := {| m1, m2, o | m1 := m2, BrwSetThisOrder( oBrw, o:XbpListBox:getData()-1 ) } @@ -431,13 +431,13 @@ STATIC FUNCTION BrwBuildNvg( oCrt, oBrw, oCom ) oLbl:type := WVGSTATIC_TYPE_TEXT oLbl:options := WVGSTATIC_TEXT_LEFT oLbl:caption := "Navigate" - oLbl:create( , , { -23, -13 }, { -1, -6 }, , .f. ) + oLbl:create( , , { -23, -13 }, { -1, -6 }, , .F. ) oLbl:setColorFG( "W+" ) oLbl:setColorBG( "BG" ) oXbp := WvgSLE():new( oCrt ) oXbp:bufferLength := 300 - oXbp:create( , , { -23, -19 }, { -1, {|| -( maxcol()-1-19 ) } }, , .f. ) + oXbp:create( , , { -23, -19 }, { -1, {|| -( maxcol()-1-19 ) } }, , .F. ) oXbp:setColorFG( "N" ) oXbp:setColorBG( "BG+" ) oXbp:returnPressed := {| m1, m2, o | m1:=m2, oCom:navigate( trim( o:getData() ) ) } @@ -454,10 +454,10 @@ STATIC FUNCTION BrwBuildCheckBox( oCrt, oBrw, lActiveX ) HB_SYMBOL_UNUSED( oBrw ) oXbp := WvgCheckBox():new( oCrt ) - oXbp:pointerFocus := .f. + oXbp:pointerFocus := .F. oXbp:caption := "ActiveX" oXbp:selected := {| x, y, o | x := y, lActiveX := o:getData(), Wvt_Keyboard( HB_K_RESIZE ) } - oXbp:selection := .f. + oXbp:selection := .F. oXbp:create( , , { -23,-1 }, { -1,-10 } ) oXbp:setColorFG( "R+" ) oXbp:setColorBG( "W" ) @@ -510,7 +510,7 @@ STATIC FUNCTION BrwBuildButtons( oCrt, oBrw ) FOR i := 1 TO len( aPmt ) oPB := WvgPushButton():new( oCrt ) IF i == 3 /* We do not want this button to gain focus anytime */ - oPB:pointerFocus := .f. + oPB:pointerFocus := .F. ENDIF IF i == len( aPmt ) oPB:caption := hb_dirBase() + "\" + "v_lock.bmp" @@ -595,7 +595,7 @@ STATIC FUNCTION BrwBuildToolBar( oCrt ) oTBar:imageWidth := 26 oTBar:imageHeight := 24 - oTBar:showToolTips := .t. + oTBar:showToolTips := .T. // After setting properties, create toolbar. oTBar:create() @@ -615,85 +615,85 @@ STATIC FUNCTION BrwBuildToolBar( oCrt ) // STATIC FUNCTION BrwHandleKey( oBrowse, nKey, lEnd ) - LOCAL lVMove := .f. - LOCAL lHMove := .f. - LOCAL lRet := .t. + LOCAL lVMove := .F. + LOCAL lHMove := .F. + LOCAL lRet := .T. DO CASE CASE nKey == K_ESC - lEnd := .t. + lEnd := .T. CASE nKey == K_ENTER - lEnd := .t. + lEnd := .T. CASE nKey == K_DOWN - lVMove := .t. + lVMove := .T. oBrowse:Down() CASE nKey == K_UP - lVMove := .t. + lVMove := .T. oBrowse:Up() CASE nKey == K_PGDN - lVMove := .t. + lVMove := .T. oBrowse:pageDown() CASE nKey == K_PGUP - lVMove := .t. + lVMove := .T. oBrowse:pageUp() CASE nKey == K_CTRL_PGUP - lVMove := .t. + lVMove := .T. oBrowse:goTop() CASE nKey == K_CTRL_PGDN - lVMove := .t. + lVMove := .T. oBrowse:goBottom() CASE nKey == K_LEFT - lHMove := .t. + lHMove := .T. oBrowse:Left() CASE nKey == K_RIGHT - lHMove := .t. + lHMove := .T. oBrowse:Right() CASE nKey == K_HOME - lHMove := .t. + lHMove := .T. oBrowse:home() CASE nKey == K_END - lHMove := .t. + lHMove := .T. oBrowse:end() CASE nKey == K_CTRL_LEFT - lHMove := .t. + lHMove := .T. oBrowse:panLeft() CASE nKey == K_CTRL_RIGHT - lHMove := .t. + lHMove := .T. oBrowse:panRight() CASE nKey == K_CTRL_HOME - lHMove := .t. + lHMove := .T. oBrowse:panHome() CASE nKey == K_CTRL_END - lHMove := .t. + lHMove := .T. oBrowse:panEnd() CASE nKey == K_MWBACKWARD - lVMove := .t. + lVMove := .T. oBrowse:down() CASE nKey == K_MWFORWARD - lVMove := .t. + lVMove := .T. oBrowse:up() CASE Vou_NavigateToCell( oBrowse, nKey ) OTHERWISE - lRet := .f. + lRet := .F. ENDCASE @@ -741,11 +741,11 @@ FUNCTION Vou_NavigateToCell( oBrowse ) DispEnd() oBrowse:hilite() - RETURN .t. + RETURN .T. ENDIF ENDIF - RETURN .f. + RETURN .F. // @@ -877,7 +877,7 @@ FUNCTION Vou_BrwSetVScroll( mp1, oBrowse ) // STATIC FUNCTION BrwOnEvent( oWvtBrw, cPaintID, oBrowse, nKey ) - LOCAL lRet := .t., lRefAll := .f. + LOCAL lRet := .T., lRefAll := .F. HB_SYMBOL_UNUSED( cPaintID ) @@ -896,19 +896,19 @@ STATIC FUNCTION BrwOnEvent( oWvtBrw, cPaintID, oBrowse, nKey ) CASE nKey == K_PGDN oBrowse:pageDown() - lRefAll := .t. + lRefAll := .T. CASE nKey == K_PGUP oBrowse:pageUp() - lRefAll := .t. + lRefAll := .T. CASE nKey == K_CTRL_PGUP oBrowse:goTop() - lRefAll := .t. + lRefAll := .T. CASE nKey == K_CTRL_PGDN oBrowse:goBottom() - lRefAll := .t. + lRefAll := .T. CASE nKey == K_HOME oBrowse:home() @@ -936,7 +936,7 @@ STATIC FUNCTION BrwOnEvent( oWvtBrw, cPaintID, oBrowse, nKey ) CASE nKey == K_SBTHUMBTRACKVERT OrdKeyGoTo( oWvtBrw:oVBar:GetPos() ) - lRefAll := .t. + lRefAll := .T. CASE nKey == K_SBTHUMBTRACKHORZ oBrowse:ColPos := oWvtBrw:oHBar:GetPos() @@ -966,7 +966,7 @@ STATIC FUNCTION BrwOnEvent( oWvtBrw, cPaintID, oBrowse, nKey ) oBrowse:right() OTHERWISE - lRet := .f. + lRet := .F. ENDCASE diff --git a/harbour/contrib/gtwvg/tests/utils.prg b/harbour/contrib/gtwvg/tests/utils.prg index 3561a32097..81a2bae048 100644 --- a/harbour/contrib/gtwvg/tests/utils.prg +++ b/harbour/contrib/gtwvg/tests/utils.prg @@ -258,7 +258,7 @@ FUNCTION WvtSetObjects( aObject ) FUNCTION SetMouseCheck( lYes ) LOCAL lOYes - STATIC lSYes := .t. + STATIC lSYes := .T. lOYes := lSYes IF lYes != NIL lSYes := lYes @@ -275,7 +275,7 @@ FUNCTION WvtWindowExpand( nUnits ) Wvt_setFont( "Courier New", sUnits ) - RETURN .t. + RETURN .T. // @@ -303,7 +303,7 @@ FUNCTION VouChoice( aChoices ) FUNCTION Hb_Clear() CLS - RETURN .f. + RETURN .F. // @@ -314,7 +314,7 @@ FUNCTION MyMenuProcedure( nID ) CASE nID == 102 alert( 'Procedure 102' ) ENDCASE - RETURN .t. + RETURN .T. // @@ -334,7 +334,7 @@ FUNCTION BuildWvgToolBar( oDA, nActiveX ) oTBar:imageWidth := 26 oTBar:imageHeight := 24 - oTBar:showToolTips := .t. + oTBar:showToolTips := .T. // After setting properties, create toolbar. oTBar:create() @@ -458,7 +458,7 @@ FUNCTION DispStatusMsg( cMsg ) Wvt_DrawLabel( MaxRow(), 60, cMsg, 6, , 0, rgb(198,198,198), "Arial", 18, , 900 ) - RETURN .t. + RETURN .T. // @@ -470,7 +470,7 @@ FUNCTION ClearStatusMsg() SetPos( nRow, nCol ) - RETURN .t. + RETURN .T. // diff --git a/harbour/contrib/gtwvg/tests/wvtcls.prg b/harbour/contrib/gtwvg/tests/wvtcls.prg index 361b03b0ba..77ac4ee593 100644 --- a/harbour/contrib/gtwvg/tests/wvtcls.prg +++ b/harbour/contrib/gtwvg/tests/wvtcls.prg @@ -34,7 +34,7 @@ FUNCTION DialogWvgClassesOne( nMode ) MyDialogOne() else bBlock := {| oCrt | ; - oCrt := WvgCrt():New( , , { -1,-1 }, { 54,184 }, , .f. ), ; + oCrt := WvgCrt():New( , , { -1,-1 }, { 54,184 }, , .F. ), ; oCrt:fontName := 'Courier',; oCrt:fontHeight := 13 ,; oCrt:fontWidth := 0 ,; @@ -64,8 +64,8 @@ STATIC FUNCTION MyDialogOne( oCrt ) HB_SYMBOL_UNUSED( oCrt ) - WvtSetKeys( .f. ) - lChkMouse := SetMouseCheck( .f. ) + WvtSetKeys( .F. ) + lChkMouse := SetMouseCheck( .F. ) hPopup := Wvt_SetPopupMenu() Popups() @@ -121,9 +121,9 @@ STATIC FUNCTION MyDialogOne( oCrt ) oText:nBackColor := RGB( 0, 0, 255 ) oText:nTextColorHoverOn := RGB( 255, 255, 0 ) oText:nBackColorHoverOn := RGB( 255, 100, 12 ) - oText:lItalic := .t. + oText:lItalic := .T. oText:ToolTip := "Software that GROWS with you" - oText:bOnSelect := {|| .t. } + oText:bOnSelect := {|| .T. } oDlg:AddObject( oText ) oImg := WvtImage():New( oDlg,102,20,oDlg:MaxCol()-40,37,oDlg:MaxCol()-2 ) @@ -132,7 +132,7 @@ STATIC FUNCTION MyDialogOne( oCrt ) oDlg:AddObject( oImg ) oTBar := WvtToolbar():New( oDlg,103, 0,0,2 ) - oTBar:lFloating := .f. + oTBar:lFloating := .F. oTBar:Tooltip := "Toolbar" oTBar:AddButton( aImg_[ 1 ], {|| oImg:SetImage( aImg_[ 1 ] ) } , "Lock" ) oTBar:AddButton( aImg_[ 2 ], {|| oImg:SetImage( aImg_[ 2 ] ), oText:SetText( "Harbour" ) } , "New" ) @@ -168,7 +168,7 @@ STATIC FUNCTION MyDialogOne( oCrt ) oPBar2 := WvtProgressBar():New( oDlg, , 14, 129, 25, 137 ) oPBar2:nBarColor := RGB( 240,240,0 ) oPBar2:cBackColor := "W/N*" - oPBar2:lVertical := .t. + oPBar2:lVertical := .T. oPBar2:nDirection := 0 oPBar2:cImage := GetResource( "vouch1.bmp" ) oDlg:AddObject( oPBar2 ) @@ -176,7 +176,7 @@ STATIC FUNCTION MyDialogOne( oCrt ) oPBar3 := WvtProgressBar():New( oDlg, , 26, 129, 36, 137 ) oPBar3:nBarColor := RGB( 240,240,0 ) oPBar3:cBackColor := "W/N*" - oPBar3:lVertical := .t. + oPBar3:lVertical := .T. oPBar3:nDirection := 1 oPBar3:cImage := GetResource( "vouch1.bmp" ) oDlg:AddObject( oPBar3 ) @@ -230,14 +230,14 @@ STATIC FUNCTION MyDialogOne( oCrt ) oTBx:cText := cTxt oTBx:Tooltip := "WvtTextBox():New()" oTBx:nFontHeight := 16 - oTBx:lItalic := .t. - oTBx:lUnderline := .t. + oTBx:lItalic := .T. + oTBx:lUnderline := .T. oTBx:nAlignHorz := 2 oTBx:nTextColor := RGB( 255,255,255 ) oTBx:nTextColorHoverOn := RGB( 0,0,255 ) oTBx:aPopup := {} - aadd( oTBx:aPopup, { "Getsome" , {|| .t. } } ) - aadd( oTBx:aPopup, { "Getsome2", {|| .t. } } ) + aadd( oTBx:aPopup, { "Getsome" , {|| .T. } } ) + aadd( oTBx:aPopup, { "Getsome2", {|| .T. } } ) oDlg:AddObject( oTBx ) oGetArea := WvtStatic():New( oDlg, , 4, 2, 37, 62 ) @@ -262,7 +262,7 @@ STATIC FUNCTION MyDialogOne( oCrt ) aGets_:= { pad("Pritpal",20 ), pad( "Bedi",20 ), pad( "60, New Professor Colony",30 ), ; pad( "Ludhiana, INDIA",30 ),; - "PB", pad( "141004",10 ), stod( "20040622" ), .t., 48, 17000, ; + "PB", pad( "141004",10 ), stod( "20040622" ), .T., 48, 17000, ; pad( "Wvtgui is a classical example of Harbour capabilities...",65 ) } oGet1 := WvtGets():New( oDlg, , 4, 2, 37, 62 ) @@ -292,20 +292,20 @@ STATIC FUNCTION MyDialogOne( oCrt ) oDlg:oMenu := g_oMenuBar - lOpen := .f. + lOpen := .F. cUseAlias := "TEST" USE ( hb_DirBase() + ".." + hb_ps() + ".." + hb_ps() + ".." + hb_ps() + "tests" + hb_ps() + "test.dbf" ) NEW ALIAS ( cUseAlias ) SHARED if !NetErr() - lOpen := .t. + lOpen := .T. oWvtBrw := ConfigBrowser( { 1,7,9,10,8 }, cUseAlias, { 6,67,36,120 }, "test.dbf - 1,7,9,10,8", oDlg, "N/W*,N/GR*",1001 ) oDlg:AddObject( oWvtBrw ) endif - lOpen1 := .f. + lOpen1 := .F. cUseAlias1 := "TEST1" USE ( hb_DirBase() + ".." + hb_ps() + ".." + hb_ps() + ".." + hb_ps() + "tests" + hb_ps() + "test.dbf" ) NEW ALIAS ( cUseAlias1 ) SHARED if !NetErr() - lOpen1 := .t. + lOpen1 := .T. oWvtBrw1 := ConfigBrowser( { 1,2,3,4,5,6 }, cUseAlias1, { 43,4,51,120 }, "test.dbf - 1,2,3,4,5,6",oDlg, "N/BG*,N/W*",1002 ) oDlg:AddObject( oWvtBrw1 ) endif @@ -326,7 +326,7 @@ STATIC FUNCTION MyDialogOne( oCrt ) endif WvtSetBlocks( aObjects ) - WvtSetKeys( .t. ) + WvtSetKeys( .T. ) Wvt_SetPopupMenu( hPopup ) SetMouseCheck( lChkMouse ) @@ -366,7 +366,7 @@ FUNCTION DialogWvgClassesTwo() oPBar2 := WvtProgressBar():New( oDlg, , 11, 10, 28, 19 ) oPBar2:nBarColor := RGB( 240,240,0 ) oPBar2:cBackColor := "W/N*" - oPBar2:lVertical := .t. + oPBar2:lVertical := .T. oPBar2:nDirection := 0 oPBar2:cImage := "v_notes.ico" oDlg:AddObject( oPBar2 ) @@ -374,14 +374,14 @@ FUNCTION DialogWvgClassesTwo() oPBar3 := WvtProgressBar():New( oDlg, , 11, 77, 28, 80 ) oPBar3:nBarColor := RGB( 0,0,255 ) oPBar3:cBackColor := "W/N*" - oPBar3:lVertical := .t. + oPBar3:lVertical := .T. oPBar3:nDirection := 1 oDlg:AddObject( oPBar3 ) oPBar4 := WvtProgressBar():New( oDlg, , 22, 22, 28, 74 ) oPBar4:nBarColor := RGB( 255,255,0 ) oPBar4:cBackColor := "W/N*" - oPBar4:lVertical := .t. + oPBar4:lVertical := .T. oPBar4:nDirection := 0 oDlg:AddObject( oPBar4 ) diff --git a/harbour/contrib/gtwvg/tests/xbp.prg b/harbour/contrib/gtwvg/tests/xbp.prg index 8a890ce232..6a2ef00a1d 100644 --- a/harbour/contrib/gtwvg/tests/xbp.prg +++ b/harbour/contrib/gtwvg/tests/xbp.prg @@ -34,8 +34,8 @@ FUNCTION demoxbp() LOCAL aParts := {} //--------------------------- Dialog -------------------------------\\ - oCrt := WvgDialog():new( , , { 30,30 }, { 900,600 }, , .t. ) - oCrt:closable := .t. + oCrt := WvgDialog():new( , , { 30,30 }, { 900,600 }, , .T. ) + oCrt:closable := .T. oCrt:icon := GetResource( "vr_1.ico" ) oCrt:create() @@ -50,7 +50,7 @@ FUNCTION demoxbp() oTBar := ActiveXBuildToolBarXbp( oDA ) //--------------------------- StatusBar ---------------------------\\ - oSBar := WvgStatusBar():new( oCrt ):create( , , , , , .t. ) + oSBar := WvgStatusBar():new( oCrt ):create( , , , , , .T. ) oSBar:panelClick := {| oPanel | WVG_MessageBox( , oPanel:caption ) } oPanel := oSBar:getItem( 1 ) oPanel:caption := 'My Root Panel' @@ -66,7 +66,7 @@ FUNCTION demoxbp() oStatic:caption := chr(13)+'Implemented Xbase++ Parts' oStatic:create( , , { 0, oTBar:currentSize()[2]+3 }, { 120, oCrt:currentSize()[2]-; - oTBar:currentSize()[2]-oSBar:currentSize()[2]-4 }, , .t. ) + oTBar:currentSize()[2]-oSBar:currentSize()[2]-4 }, , .T. ) oStatic:setColorBG( RGB( 200,200,200 ) ) //--------------------------- ListBox -----------------------------\\ @@ -113,7 +113,7 @@ FUNCTION demoxbp() oTree := WvgTreeView():new( oDA, , { oCrt:currentSize()[1]-160,oTBar:currentSize()[2]+3 }, ; { 160, oCrt:currentSize()[2]-; - oTBar:currentSize()[2]-oSBar:currentSize()[2]-4 }, , .t. ) + oTBar:currentSize()[2]-oSBar:currentSize()[2]-4 }, , .T. ) oTree:hasLines := .T. oTree:hasButtons := .T. oTree:alwaysShowSelection := .T. @@ -134,9 +134,9 @@ FUNCTION demoxbp() oItem2:addItem( "Third level C" ) #if 0 - oItem1:expand( .t. ) + oItem1:expand( .T. ) #else - oTree:showExpanded( .t., 2 ) + oTree:showExpanded( .T., 2 ) #endif oTree:setData( oItem2 ) @@ -144,11 +144,11 @@ FUNCTION demoxbp() //--------------------------- Active-X ---------------------------\\ hb_gtInfo( HB_GTI_WINTITLE, 'http://www.harbour.vouch.info' ) #if 0 - oCom := WvgActiveXControl():New( oDA, , { 0, 0 }, { 100, 100 }, , .t. ) + oCom := WvgActiveXControl():New( oDA, , { 0, 0 }, { 100, 100 }, , .T. ) oCom:CLSID := 'Shell.Explorer.2' oCom:mapEvent( 269, {|| QOut( ' E X P L O R E R - 2 6 9' ) } ) #else - oCom := WvgHTMLViewer():New( oDA, , { 0, 0 }, { 100, 100 }, , .t. ) + oCom := WvgHTMLViewer():New( oDA, , { 0, 0 }, { 100, 100 }, , .T. ) oCom:beforeNavigate := {| cURL, x, oHTML | x := x, oHTML := oHTML, oPanel:caption := cURL } oCom:statusTextChange := {| cText | oPanel:caption := cText } oCom:mapEvent( 112, {|| oPanel:caption := ' E X P L O R E R - 2 6 9' } ) @@ -158,17 +158,17 @@ FUNCTION demoxbp() oAddr := WvgSLE():new() oAddr:bufferLength := 500 - oAddr:border := .t. + oAddr:border := .T. cNavigate := 'http://www.harbour.vouch.info' oAddr:dataLink := {| x | iif( x == NIL, cNavigate, cNavigate := x ) } oAddr:setColorFG( RGB( 0,0,255 ) ) oAddr:setColorBG( RGB( 0,255,255 ) ) - oAddr:create( oDA, , { 120, oTBar:currentSize()[2] }, { 500,20 }, , .t. ) + oAddr:create( oDA, , { 120, oTBar:currentSize()[2] }, { 500,20 }, , .T. ) oAddr:setData() oAddr:killInputFocus := {| m1, m2, oS | m1:=m1, m2:=m2, oS:getData(), oCom:navigate( cNavigate ) } //----------------- Panel : Static + Radio + Checkbox ----------\\ - oStatic2:= WvgStatic():New( oDA, , { 150, 150 }, { 500,310 }, , .f. ) + oStatic2:= WvgStatic():New( oDA, , { 150, 150 }, { 500,310 }, , .F. ) //oStatic2:type := WVGSTATIC_TYPE_RAISEDBOX //BGNDFRAME oStatic2:exStyle += WS_EX_WINDOWEDGE //oStatic2:options := WVGSTATIC_FRAMETHICK @@ -191,7 +191,7 @@ FUNCTION demoxbp() oRadio:caption := "Com 2" oRadio:create() - oCheck := WvgCheckBox():New( oStatic2, , { 10,70 }, { 100,15 }, , .t. ) + oCheck := WvgCheckBox():New( oStatic2, , { 10,70 }, { 100,15 }, , .T. ) oCheck:caption := 'Checkbox A' oCheck:create() oCheck:selected := {| m1, m2, o | m1:=m1,m2:=m2, WVG_MessageBox( , iif( o:getData(), 'I am selected','I am not selected' ) ) } @@ -237,7 +237,7 @@ FUNCTION demoxbp() // assign data code block accessing LOCAL variable oMLE := WvgMLE():new() oMLE:wordWrap := .F. - oMLE:border := .t. + oMLE:border := .T. oMLE:dataLink := {| x | iif( x==NIL, cText, cText := x ) } oMLE:create( oStatic2, , { 180,10 }, { 310,250 } ) // Copy text from LOCAL variable into edit buffer via :dataLink @@ -256,7 +256,7 @@ FUNCTION demoxbp() oCrt:sendMessage( WM_SIZE, 0, 0 ) oCrt:show() - DO WHILE .t. + DO WHILE .T. IF inkey() == K_ESC EXIT ENDIF @@ -280,15 +280,15 @@ STATIC FUNCTION ResizeDialogXbp( oCrt, oTBar, oSBar, oStatic, oCom, oTree, oAddr nH := aCrt[2] - aTBar[2] - aSBar[2] IF oStatic:isVisible - oStatic:setPosAndSize( { 0, nT+3 }, { 120, nH-4 }, .t. ) - oAddr:setPosAndSize( { 120, nT+2 }, { aCrt[1]-120-150, 20 }, .t. ) - oCom:setPosAndSize( { 120, nT+2+20 }, { aCrt[1]-120-150, nH-20 }, .t. ) - oTree:setPosAndSize( { aCrt[1]-150, nT }, { 150, nH }, .t. ) + oStatic:setPosAndSize( { 0, nT+3 }, { 120, nH-4 }, .T. ) + oAddr:setPosAndSize( { 120, nT+2 }, { aCrt[1]-120-150, 20 }, .T. ) + oCom:setPosAndSize( { 120, nT+2+20 }, { aCrt[1]-120-150, nH-20 }, .T. ) + oTree:setPosAndSize( { aCrt[1]-150, nT }, { 150, nH }, .T. ) ELSE - oAddr:setPosAndSize( { 0, nT+2 }, { aCrt[1]-150, 20 }, .t. ) - oCom:setPosAndSize( { 0, nT+2+20 }, { aCrt[1]-150, nH-20 }, .t. ) - oTree:setPosAndSize( { aCrt[1]-150, nT }, { 150, nH }, .t. ) + oAddr:setPosAndSize( { 0, nT+2 }, { aCrt[1]-150, 20 }, .T. ) + oCom:setPosAndSize( { 0, nT+2+20 }, { aCrt[1]-150, nH-20 }, .T. ) + oTree:setPosAndSize( { aCrt[1]-150, nT }, { 150, nH }, .T. ) ENDIF @@ -351,7 +351,7 @@ STATIC FUNCTION ActiveXBuildToolBarXbp( oCrt ) oTBar:imageWidth := 26 oTBar:imageHeight := 24 - oTBar:showToolTips := .t. + oTBar:showToolTips := .T. oTBar:create() @@ -408,16 +408,16 @@ STATIC FUNCTION ExeFontDialogXbp( oCrt ) oFontDlg:title := 'Select a Screen Font' oFontDlg:aPos := { 150,150 } - oFontDlg:buttonApply := .t. + oFontDlg:buttonApply := .T. oFontDlg:activateApply := {|| NIL } oFontDlg:familyName := "Courier New" oFontDlg:strikeout := .T. - oFontDlg:underscore := .f. + oFontDlg:underscore := .F. //oFontDlg:activateOk := {|| WVG_MessageBox( , 'activateOK Event Handelled in Windows!' ) } oFontDlg:nominalPointSize := 12 - //oFontDlg:size := .f. - //oFontDlg:style := .f. + //oFontDlg:size := .F. + //oFontDlg:style := .F. oFontDlg:create() diff --git a/harbour/contrib/gtwvg/toolbar.prg b/harbour/contrib/gtwvg/toolbar.prg index 859023caa3..1c12f76a3d 100644 --- a/harbour/contrib/gtwvg/toolbar.prg +++ b/harbour/contrib/gtwvg/toolbar.prg @@ -299,7 +299,7 @@ METHOD WvgToolBar:addItem( cCaption, xImage, xDisabledImage, xHotImage, cDLL, nS #if 0 ::SendToolbarMessage( TB_SETBUTTONWIDTH, ::buttonWidth, ::buttonWidth ) #endif - ::lSized := .t. + ::lSized := .T. ENDIF oBtn := WvgToolbarButton():new( cCaption, nStyle, cKey ) @@ -313,13 +313,13 @@ METHOD WvgToolBar:addItem( cCaption, xImage, xDisabledImage, xHotImage, cDLL, nS CASE cType == "C" IF ( "." $ xImage ) .or. ( "/" $ xImage ) .or. ( "\" $ xImage ) .or. ( ":" $ xImage ) .or. file( xImage ) - pBitmap := Wvg_PrepareBitmapFromFile( xImage, ::imageWidth, ::imageHeight, .t., ::hWnd ) + pBitmap := Wvg_PrepareBitmapFromFile( xImage, ::imageWidth, ::imageHeight, .T., ::hWnd ) ELSE - pBitmap := Wvg_PrepareBitmapFromResourceName( xImage, ::imageWidth, ::imageHeight, .t., ::hWnd ) + pBitmap := Wvg_PrepareBitmapFromResourceName( xImage, ::imageWidth, ::imageHeight, .T., ::hWnd ) ENDIF CASE cType == "N" - pBitmap := Wvg_PrepareBitmapFromResourceID( xImage, ::imageWidth, ::imageHeight, .t., ::hWnd ) + pBitmap := Wvg_PrepareBitmapFromResourceID( xImage, ::imageWidth, ::imageHeight, .T., ::hWnd ) CASE cType == "P" pBitmap := xImage @@ -349,7 +349,7 @@ METHOD WvgToolBar:addItem( cCaption, xImage, xDisabledImage, xHotImage, cDLL, nS #endif ::sendToolbarMessage( TB_AUTOSIZE ) ELSE - Wvg_AddToolbarButton( ::pWnd, , , oBtn:command, 3, .f. ) + Wvg_AddToolbarButton( ::pWnd, , , oBtn:command, 3, .F. ) ENDIF diff --git a/harbour/contrib/gtwvg/treeview.prg b/harbour/contrib/gtwvg/treeview.prg index 846dd50873..a921175944 100644 --- a/harbour/contrib/gtwvg/treeview.prg +++ b/harbour/contrib/gtwvg/treeview.prg @@ -118,7 +118,7 @@ CLASS WvgTreeView INHERIT WvgWindow, WvgDataRef METHOD setColorBG( nRGB ) INLINE WVG_TreeView_SetBkColor( ::hWnd, iif( HB_ISSTRING( nRGB ), Wvt_GetRGBColorByString( nRGB, 1 ), nRGB ) ) METHOD setColorLines( nRGB ) INLINE WVG_TreeView_SetLineColor( ::hWnd, nRGB ) METHOD showExpanded( lExpanded, nLevels ) INLINE Wvg_TreeView_ShowExpanded( ::hWnd, ; - iif( HB_ISNIL( lExpanded ), .f., lExpanded ), nLevels ) + iif( HB_ISNIL( lExpanded ), .F., lExpanded ), nLevels ) ENDCLASS @@ -210,7 +210,7 @@ METHOD WvgTreeView:handleEvent( nMessage, aNM ) ELSE ::setFocus() ENDIF - RETURN .f. + RETURN .F. CASE aHdr[ NMH_code ] == TVN_SELCHANGED ::getSelectionInfo( aNM[ 2 ] ) @@ -227,10 +227,10 @@ METHOD WvgTreeView:handleEvent( nMessage, aNM ) ELSE ::setFocus() ENDIF - RETURN .t. + RETURN .T. OTHERWISE - RETURN .f. + RETURN .F. ENDCASE EXIT @@ -262,7 +262,7 @@ METHOD WvgTreeView:handleEvent( nMessage, aNM ) ::setFocus() ENDIF ENDIF - RETURN .f. + RETURN .F. ENDIF EXIT @@ -375,7 +375,7 @@ CLASS WvgTreeViewItem METHOD destroy() METHOD expand( lExpand ) INLINE WVG_TreeView_Expand( ::hTree, ::hItem, ; - iif( HB_ISLOGICAL( lExpand ), lExpand, .t. ) ) + iif( HB_ISLOGICAL( lExpand ), lExpand, .T. ) ) METHOD isExpanded() METHOD setCaption( cCaption ) METHOD setExpandedImage( nResIdoBitmap ) diff --git a/harbour/contrib/gtwvg/wnd.prg b/harbour/contrib/gtwvg/wnd.prg index df001357e5..ba349853c4 100644 --- a/harbour/contrib/gtwvg/wnd.prg +++ b/harbour/contrib/gtwvg/wnd.prg @@ -151,11 +151,11 @@ CLASS WvgWindow INHERIT WvgPartHandler DATA title INIT " " DATA icon INIT 0 DATA closable INIT .T. - DATA resizable INIT .t. + DATA resizable INIT .T. DATA resizeMode INIT 0 DATA style INIT WS_OVERLAPPEDWINDOW DATA exStyle INIT 0 - DATA lModal INIT .f. + DATA lModal INIT .F. DATA pGTp DATA pGT DATA objType INIT objTypeNone @@ -439,23 +439,23 @@ METHOD WvgWindow:captureMouse() METHOD WvgWindow:disable() - IF WVG_EnableWindow( ::hWnd, .f. ) - ::is_enabled := .f. - RETURN .t. + IF WVG_EnableWindow( ::hWnd, .F. ) + ::is_enabled := .F. + RETURN .T. ENDIF - RETURN .f. + RETURN .F. // METHOD WvgWindow:enable() - IF WVG_EnableWindow( ::hWnd, .t. ) - ::is_enabled := .t. - RETURN .t. + IF WVG_EnableWindow( ::hWnd, .T. ) + ::is_enabled := .T. + RETURN .T. ENDIF - RETURN .f. + RETURN .F. // @@ -463,7 +463,7 @@ METHOD WvgWindow:hide() IF WVG_IsWindow( ::hWnd ) WVG_ShowWindow( ::hWnd, SW_HIDE ) - ::is_hidden := .t. + ::is_hidden := .T. ENDIF RETURN Self @@ -608,19 +608,19 @@ METHOD WvgWindow:setSize( aSize, lPaint ) // METHOD WvgWindow:isDerivedFrom( cClassORoObject ) - LOCAL lTrue := .f. + LOCAL lTrue := .F. LOCAL cCls := __ObjGetClsName( self ) /* Compares without Xbp or Wvg prefixes */ IF HB_ISSTRING( cClassORoObject ) IF upper( substr( cClassORoObject,4 ) ) == upper( substr( cCls,4 ) ) - lTrue := .t. + lTrue := .T. ENDIF ELSEIF HB_ISOBJECT( cClassORoObject ) IF upper( substr( cClassORoObject:className,4 ) ) == upper( substr( cCls,4 ) ) - lTrue := .t. + lTrue := .T. ENDIF ENDIF @@ -631,8 +631,8 @@ METHOD WvgWindow:isDerivedFrom( cClassORoObject ) METHOD WvgWindow:show() WVG_ShowWindow( ::hWnd, SW_NORMAL ) - ::is_hidden := .f. - ::lHasInputFocus := .t. + ::is_hidden := .F. + ::lHasInputFocus := .T. RETURN Self diff --git a/harbour/contrib/hbct/tests/addascii.prg b/harbour/contrib/hbct/tests/addascii.prg index 06ff00313d..141182a392 100644 --- a/harbour/contrib/hbct/tests/addascii.prg +++ b/harbour/contrib/hbct/tests/addascii.prg @@ -72,7 +72,7 @@ PROCEDURE Main() // csetref() tests ? ? "CSETREF tests:" - ? " current csetref setting(should be .f.)................: ", csetref() + ? " current csetref setting(should be .F.)................: ", csetref() ? " return value of addascii([A],1,1) call(should be 'B'): ", addascii( "A",1,1 ) ? " value of cStr..........................................: ", cStr ? " return value of addascii(cStr,1,1) call...............: ", addascii( cStr,1,1 ) @@ -81,7 +81,7 @@ PROCEDURE Main() ? " value of cStr is now...................................: ", cStr ? " return value of addascii(@cStr,-1,1) call.............: ", addascii( @cStr, - 1,1 ) ? " value of cStr is now...................................: ", cStr - ? " return value of csetref(.t.)..........................: ", csetref( .T. ) + ? " return value of csetref(.T.)..........................: ", csetref( .T. ) ? " return value of addascii([A],1,1) call................: ", addascii( "A",1,1 ) ? " return value of addascii(cStr,1,1) call...............: ", addascii( cStr,1,1 ) ? " value of cStr is now...................................: ", cStr @@ -89,7 +89,7 @@ PROCEDURE Main() ? " value of cStr is now...................................: ", cStr ? " return value of addascii(@cStr,-1,1) call.............: ", addascii( @cStr, - 1,1 ) ? " value of cStr is now...................................: ", cStr - ? " return value of csetref(.f.)..........................: ", csetref( .F. ) + ? " return value of csetref(.F.)..........................: ", csetref( .F. ) // tests for the new 4th parameter ? diff --git a/harbour/contrib/hbct/tests/expomant.prg b/harbour/contrib/hbct/tests/expomant.prg index 778705f3a0..12432f9d24 100644 --- a/harbour/contrib/hbct/tests/expomant.prg +++ b/harbour/contrib/hbct/tests/expomant.prg @@ -56,21 +56,21 @@ PROCEDURE Main() LOCAL n - CTINIT() + ctinit() SET DECIMALS TO 15 - for n := 1 TO 1000 - OutStd( Str( n,20,15 ) + ": " + Str( mantissa(n ),20,15 ) + " " + Str( exponent(n ),4 ) + hb_eol() ) - OutStd( Str( Sqrt(n ),20,15 ) + ": " + Str( mantissa(Sqrt(n ) ),20,15 ) + " " + Str( exponent(Sqrt(n ) ),4 ) + hb_eol() ) - next n + FOR n := 1 TO 1000 + OutStd( Str( n, 20, 15 ) + ": " + Str( mantissa( n ), 20, 15 ) + " " + Str( exponent( n ), 4 ) + hb_eol() ) + OutStd( Str( Sqrt( n ), 20, 15 ) + ": " + Str( mantissa( Sqrt( n ) ), 20, 15 ) + " " + Str( exponent( Sqrt( n ) ), 4 ) + hb_eol() ) + NEXT n - // The call to str( infinity(.t.) ), generate a GPF. - // outstd(str(infinity(.t.))+str(mantissa( infinity(.t.) ))+str(exponent( infinity(.t.) ))) - // outstd(str(infinity(.t.)) ) + // The call to str( infinity(.T.) ), generate a GPF. +// OutStd( Str( infinity( .T. ) ) + Str( mantissa( infinity( .T. ) ) ) + Str( exponent( infinity( .T. ) ) ) ) +// OutStd( Str( infinity( .T. ) ) ) - OutStd( " infinity(.t.): " + Str( mantissa(infinity( .T. ) ),20,15 ) + " " ) - OutStd( Str( exponent(infinity( .T. ) ),4 ) + hb_eol() ) + OutStd( " infinity(.T.): " + Str( mantissa( infinity( .T. ) ), 20, 15 ) + " " ) + OutStd( Str( exponent( infinity( .T. ) ), 4 ) + hb_eol() ) CTEXIT() diff --git a/harbour/contrib/hbct/tests/finan.prg b/harbour/contrib/hbct/tests/finan.prg index dba24c8583..1f5d0ff223 100644 --- a/harbour/contrib/hbct/tests/finan.prg +++ b/harbour/contrib/hbct/tests/finan.prg @@ -56,7 +56,7 @@ PROCEDURE Main() - CTINIT() + ctinit() SET DECIMAL TO 3 CLS diff --git a/harbour/contrib/hbct/tests/math.prg b/harbour/contrib/hbct/tests/math.prg index ce70e2f70c..075e8b096b 100644 --- a/harbour/contrib/hbct/tests/math.prg +++ b/harbour/contrib/hbct/tests/math.prg @@ -56,7 +56,7 @@ PROCEDURE Main() - CTINIT() + ctinit() SET DECIMAL TO 2 CLS diff --git a/harbour/contrib/hbct/tests/num1.prg b/harbour/contrib/hbct/tests/num1.prg index a50cdad970..ea58c187bb 100644 --- a/harbour/contrib/hbct/tests/num1.prg +++ b/harbour/contrib/hbct/tests/num1.prg @@ -54,7 +54,7 @@ PROCEDURE Main() - CTINIT() + ctinit() SET DECIMAL TO 14 CLS diff --git a/harbour/contrib/hbct/tests/trig.prg b/harbour/contrib/hbct/tests/trig.prg index eeb3f36948..4589b7d7cc 100644 --- a/harbour/contrib/hbct/tests/trig.prg +++ b/harbour/contrib/hbct/tests/trig.prg @@ -65,7 +65,7 @@ PROCEDURE Main() LOCAL X, Y - CTINIT() + ctinit() SET DECIMAL TO 14 CLS diff --git a/harbour/contrib/hbct/tests/wordswap.prg b/harbour/contrib/hbct/tests/wordswap.prg index 1f550c89a1..f209c6d279 100644 --- a/harbour/contrib/hbct/tests/wordswap.prg +++ b/harbour/contrib/hbct/tests/wordswap.prg @@ -64,7 +64,7 @@ PROCEDURE Main() // simple tests ? "Simple tests:" ? [ wordswap("1234567890") == "3412785690" ? --> "] + wordswap( "1234567890" ) + ["] - ? [ wordswap("1234567890", .t.) == "4321876590" ? --> "] + wordswap( "1234567890", .T. ) + ["] + ? [ wordswap("1234567890", .T.) == "4321876590" ? --> "] + wordswap( "1234567890", .T. ) + ["] ? ? "End test of WORDSWAP()" diff --git a/harbour/contrib/hbct/token2.c b/harbour/contrib/hbct/token2.c index d55664e613..00f21dceaa 100644 --- a/harbour/contrib/hbct/token2.c +++ b/harbour/contrib/hbct/token2.c @@ -407,7 +407,7 @@ HB_FUNC( TOKENINIT ) } else { - /* nothing to rewind -> return .f. */ + /* nothing to rewind -> return .F. */ PHB_ITEM pSubst = NULL; int iArgErrorMode = ct_getargerrormode(); diff --git a/harbour/contrib/hbfimage/tests/fitest.prg b/harbour/contrib/hbfimage/tests/fitest.prg index cf70a43272..38fec2a2d9 100644 --- a/harbour/contrib/hbfimage/tests/fitest.prg +++ b/harbour/contrib/hbfimage/tests/fitest.prg @@ -13,7 +13,7 @@ #include "fileio.ch" #define IMAGES_IN "" -#define IMAGES_OUT "imgs_out/" +#define IMAGES_OUT "imgs_out" + hb_ps() PROCEDURE Main() @@ -27,15 +27,13 @@ PROCEDURE Main() LOCAL nH, nLen, cStr // LOCAL appo - //? "Press Alt-D + Enter to activate debug" - //AltD( .T. ) - //Inkey(0) +// ? "Press Alt-D + Enter to activate debug" +// AltD( .T. ) +// Inkey( 0 ) AltD() // Check output directory - IF !hb_DirExists( IMAGES_OUT ) -#ifdef HB_COMPAT_C53 + IF ! hb_DirExists( IMAGES_OUT ) hb_DirCreate( IMAGES_OUT ) -#endif ENDIF ? "Initialise" @@ -153,42 +151,42 @@ PROCEDURE Main() //bmpinfoheader:Buffer( fi_GetInfoHeader( im ), .T. ) //bmpinfoheader:Pointer( fi_GetInfoHeader( im ) ) //? "Header :", ValToPrg( bmpinfoheader ) - //? bmpinfoheader:SayMembers(" ", .t., .t.) + //? bmpinfoheader:SayMembers(" ", .T., .T. ) //bmpinfo:Pointer( fi_GetInfo( im ) ) bmpinfo := NIL // To fix warning ? "Info :", ValToPrg( bmpinfo ) - //? bmpinfo:SayMembers(" ", .t., .t.) + //? bmpinfo:SayMembers(" ", .T., .T. ) ? "-----------------------------------------------------" //? ValType( bmpinfo:Devalue() ) //Tracelog( "bmpinfoheader", ValToPrg( bmpinfoheader ), ; - // bmpinfoheader:SayMembers(, .t.), bmpinfoheader:Value(), bmpinfoheader:DeValue(), hb_dumpvar( bmpinfoheader:Array() ), hb_dumpvar( bmpinfoheader:acMembers ) ) + // bmpinfoheader:SayMembers(, .T.), bmpinfoheader:Value(), bmpinfoheader:DeValue(), hb_dumpvar( bmpinfoheader:Array() ), hb_dumpvar( bmpinfoheader:acMembers ) ) //appo := bkcolor:Value() //? bkcolor:Pointer( fi_GetBackgroundColor( im ) ) //? fi_GetBackgroundColor( im, @bkcolor:Value() ) //bkcolor:Buffer( appo ) - //? bkcolor:SayMembers(" ", .t., .t.) + //? bkcolor:SayMembers( " ", .T., .T. ) //bkcolor:rgbBlue := 205 //? fi_SetBackgroundColor( im, hb_String2Pointer( bkcolor:Value() ) ) Tracelog( "linha 168" ) //? fi_SetBackgroundColor( im, bkcolor:Value() ) Tracelog( "linha 170" ) - //? bkcolor:SayMembers(" ", .t., .t.) + //? bkcolor:SayMembers( " ", .T., .T. ) Tracelog( "linha 162" ) //? bkcolor:Pointer( fi_GetBackgroundColor( im ) ) //? fi_GetBackgroundColor( im, @bkcolor:Value() ) //bkcolor:Buffer( appo ) Tracelog( "linha 176" ) - //? bkcolor:SayMembers(" ", .t., .t.) + //? bkcolor:SayMembers( " ", .T., .T. ) Tracelog( "linha 179" ) //iccprofile:Pointer( fi_GetICCProfile( im ) ) Tracelog( "linha 181" ) //? "Header :", ValToPrg( iccprofile ) Tracelog( "linha 183" ) - //? iccprofile:SayMembers(" ", .T., .T. ) + //? iccprofile:SayMembers( " ", .T., .T. ) //bmpinfoheader:Reset() //appo := NIL diff --git a/harbour/contrib/hbmisc/stringp.prg b/harbour/contrib/hbmisc/stringp.prg index 97fab7221d..84478e9c30 100644 --- a/harbour/contrib/hbmisc/stringp.prg +++ b/harbour/contrib/hbmisc/stringp.prg @@ -128,7 +128,7 @@ FUNCTION ToChar( xTxt, cSeparator, lDebug ) IF n != nLen cOut += cSeparator ENDIF - NEXT n + NEXT IF lDebug cOut += "}" ENDIF @@ -151,7 +151,7 @@ FUNCTION ToChar( xTxt, cSeparator, lDebug ) IF n != nLen cOut += cSeparator ENDIF - NEXT n + NEXT cOut += "}" ELSE cOut := ToChar( xTxt:Run(), cSeparator, lDebug ) diff --git a/harbour/contrib/hbnf/tests/aredit.prg b/harbour/contrib/hbnf/tests/aredit.prg index 664c39eb31..b8d8826432 100644 --- a/harbour/contrib/hbnf/tests/aredit.prg +++ b/harbour/contrib/hbnf/tests/aredit.prg @@ -15,7 +15,7 @@ PROCEDURE Main() ar[ 1, i ] := i // 1 -> 26 Numeric ar[ 2, i ] := Chr( Asc( "A" ) + i - 1 ) // "A" -> "Z" Character ar[ 3, i ] := Chr( Asc( "Z" ) - i + 1 ) // "Z" -> "A" Character - NEXT i + NEXT // Set Up aHeadings[] for column headings aHeadings := { "Numbers", "Letters", "Reverse" } // Set Up Blocks Describing Individual Elements in Array ar[] diff --git a/harbour/contrib/hbpgsql/tests/cache.prg b/harbour/contrib/hbpgsql/tests/cache.prg index a145aa8509..2fb64b0da2 100644 --- a/harbour/contrib/hbpgsql/tests/cache.prg +++ b/harbour/contrib/hbpgsql/tests/cache.prg @@ -267,7 +267,7 @@ PROCEDURE SQLFetchAll() FUNCTION SQLOpen( cAlias, cQuery, xFetch, cOrder ) LOCAL cFile - LOCAL Result := .t. + LOCAL Result := .T. LOCAL x LOCAL s_oServer LOCAL oQuery @@ -348,7 +348,7 @@ FUNCTION SQLOpen( cAlias, cQuery, xFetch, cOrder ) FUNCTION SQLConnect( cServer, cDatabase, cUser, cPassword, cSchema ) - LOCAL lRetval := .t. + LOCAL lRetval := .T. s_oServer := TPQServer():New( cServer, cDatabase, cUser, cPassWord, 5432, cSchema ) IF s_oServer:NetErr() diff --git a/harbour/contrib/hbsqlit3/tests/metadata.prg b/harbour/contrib/hbsqlit3/tests/metadata.prg index cf4b8792c9..d9e6b8a2c2 100644 --- a/harbour/contrib/hbsqlit3/tests/metadata.prg +++ b/harbour/contrib/hbsqlit3/tests/metadata.prg @@ -55,7 +55,7 @@ //#define SQLITE_ENABLE_COLUMN_METADATA PROCEDURE main() - LOCAL lCreateIfNotExist := .f. + LOCAL lCreateIfNotExist := .F. LOCAL db := sqlite3_open( "new.s3db", lCreateIfNotExist ) IF ! Empty( db ) diff --git a/harbour/contrib/hbsqlit3/tests/sl3_test.prg b/harbour/contrib/hbsqlit3/tests/sl3_test.prg index c2b6d31544..c294f48e8f 100644 --- a/harbour/contrib/hbsqlit3/tests/sl3_test.prg +++ b/harbour/contrib/hbsqlit3/tests/sl3_test.prg @@ -72,7 +72,7 @@ PROCEDURE main() /* */ PROCEDURE t1() - LOCAL lCreateIfNotExist := .f. + LOCAL lCreateIfNotExist := .F. LOCAL db := sqlite3_open( "new.s3db", lCreateIfNotExist ) IF ! Empty( db ) @@ -84,7 +84,7 @@ PROCEDURE t1() /* */ PROCEDURE t2() - LOCAL lCreateIfNotExist := .t. + LOCAL lCreateIfNotExist := .T. LOCAL db := sqlite3_open( "new.s3db", lCreateIfNotExist ) LOCAL stmt LOCAL nCCount, nCType, nI, nJ @@ -94,8 +94,8 @@ PROCEDURE t2() IF ! Empty( db ) #ifdef TRACE - sqlite3_profile( db, .t. ) - sqlite3_trace( db, .t. ) + sqlite3_profile( db, .T. ) + sqlite3_trace( db, .T. ) #endif sqlite3_exec( db, "PRAGMA auto_vacuum=0" ) sqlite3_exec( db, "PRAGMA page_size=4096" ) @@ -168,25 +168,25 @@ PROCEDURE t2() ? "Column type : " + aCType[ nCType ] ? "Column value: " - SWITCH nCType - CASE SQLITE_BLOB - ?? "BLOB" //sqlite3_column_blob( stmt, nI ) - EXIT + SWITCH nCType + CASE SQLITE_BLOB + ?? "BLOB" //sqlite3_column_blob( stmt, nI ) + EXIT - CASE SQLITE_INTEGER - ?? str ( sqlite3_column_int( stmt, nI ) ) - EXIT + CASE SQLITE_INTEGER + ?? str ( sqlite3_column_int( stmt, nI ) ) + EXIT - CASE SQLITE_NULL - ?? "NULL" - EXIT + CASE SQLITE_NULL + ?? "NULL" + EXIT - CASE SQLITE_TEXT - ?? sqlite3_column_text( stmt, nI ) - EXIT - END SWITCH + CASE SQLITE_TEXT + ?? sqlite3_column_text( stmt, nI ) + EXIT + ENDSWITCH - NEXT nI + NEXT ENDIF ENDDO ? "Total records - " + str( nJ ) @@ -213,25 +213,26 @@ PROCEDURE t2() ? "Column name : " + sqlite3_column_name( stmt, nI ) ? "Column type : " + aCType[ nCType ] ? "Column value: " - SWITCH nCType - CASE SQLITE_BLOB - ?? "BLOB" //sqlite3_column_blob( stmt, nI ) - EXIT - CASE SQLITE_INTEGER - ?? str( sqlite3_column_int( stmt, nI ) ) - EXIT + SWITCH nCType + CASE SQLITE_BLOB + ?? "BLOB" //sqlite3_column_blob( stmt, nI ) + EXIT - CASE SQLITE_NULL - ?? "NULL" - EXIT + CASE SQLITE_INTEGER + ?? str( sqlite3_column_int( stmt, nI ) ) + EXIT - CASE SQLITE_TEXT - ?? sqlite3_column_text( stmt, nI ) - EXIT - END SWITCH + CASE SQLITE_NULL + ?? "NULL" + EXIT - NEXT nI + CASE SQLITE_TEXT + ?? sqlite3_column_text( stmt, nI ) + EXIT + ENDSWITCH + + NEXT ENDIF ENDDO ? "Total records - " + str( nJ ) @@ -265,11 +266,11 @@ PROCEDURE t2() ? aTable := sqlite3_get_table( db, "SELECT name, age FROM t1 WHERE age BETWEEN 10 AND 20" ) FOR nI := 1 TO Len( aTable ) - FOR nJ := 1 TO Len( aTable[nI] ) - ?? aTable[nI][nJ], " " - NEXT nJ + FOR nJ := 1 TO Len( aTable[ nI ] ) + ?? aTable[ nI ][ nJ ], " " + NEXT ? - NEXT nI + NEXT sqlite3_sleep( 3000 ) ENDIF diff --git a/harbour/contrib/hbtip/popcli.prg b/harbour/contrib/hbtip/popcli.prg index 4bebda2bf9..9de05a88c5 100644 --- a/harbour/contrib/hbtip/popcli.prg +++ b/harbour/contrib/hbtip/popcli.prg @@ -146,7 +146,7 @@ METHOD OpenDigest( cUrl ) CLASS tIPClientPOP METHOD Close( lAutoQuit ) CLASS tIPClientPOP IF ! HB_ISLOGICAL( lAutoQuit ) - lAutoQuit := .t. + lAutoQuit := .T. ENDIF ::InetTimeOut( ::SocketCon ) diff --git a/harbour/contrib/hbwin/tests/olesrv4.prg b/harbour/contrib/hbwin/tests/olesrv4.prg index 7d4e0045b7..a0af7a3a95 100644 --- a/harbour/contrib/hbwin/tests/olesrv4.prg +++ b/harbour/contrib/hbwin/tests/olesrv4.prg @@ -41,7 +41,7 @@ RETURN infoCls():new() METHOD ref( p1, p2, p3, p4, p5, p6, p7 ) CLASS OleObjServer p1 := date() p2 := hb_datetime() - p3 := .t. + p3 := .T. p4 := { "A", "B", "C" } p5 := timerCls():new() p6 := 123.456 diff --git a/harbour/contrib/hbwin/tests/oletst3.prg b/harbour/contrib/hbwin/tests/oletst3.prg index 7e7c6165cd..f96adefd53 100644 --- a/harbour/contrib/hbwin/tests/oletst3.prg +++ b/harbour/contrib/hbwin/tests/oletst3.prg @@ -16,7 +16,7 @@ PROCEDURE Main() BEGIN SEQUENCE WITH {|| break() } oObject := CreateObject( "MyOleServer" ) - ? oObject:MyMethod( "Hello", 123, .t., ; + ? oObject:MyMethod( "Hello", 123, .T., ; { hb_datetime(), 123.45, { date(), 2, 3 } } ) ? oObject:Property1 oObject:Property1 := "!!! >>>" + upper( oObject:Property1 ) + "<<< !!!" diff --git a/harbour/contrib/rddads/tests/datad.prg b/harbour/contrib/rddads/tests/datad.prg index 2919b85662..ad8af44b63 100644 --- a/harbour/contrib/rddads/tests/datad.prg +++ b/harbour/contrib/rddads/tests/datad.prg @@ -139,7 +139,7 @@ PROCEDURE Main() NEXT - // AdsUseDictionary(.t.) this function no longer is needed; the system knows if it's using a Data Dictionary connection + // AdsUseDictionary( .T. ) this function no longer is needed; the system knows if it's using a Data Dictionary connection // Open the "long table name" for Table2 dbUseArea( .T. , , "Customer Data", "custom", .T. , .F. ) diff --git a/harbour/contrib/xhb/hbstruct.ch b/harbour/contrib/xhb/hbstruct.ch index f987cbd574..5e16579dc9 100644 --- a/harbour/contrib/xhb/hbstruct.ch +++ b/harbour/contrib/xhb/hbstruct.ch @@ -59,24 +59,24 @@ #undef _TSTRUCT_ ;; #endif ;; #define _TSTRUCT_ ;; - := HB_Hash() ;; - HB_HCaseMatch( , .f. ) + := hb_Hash() ;; + hb_HCaseMatch( , .F. ) #xcommand MEMBER ; [ AS ] ; [ INIT ] ; => ; - HB_HashAddMember( {<(cName)>}, <(type)>, , _TSTRUCT_ ) + hb_HashAddMember( {<(cName)>}, <(type)>, , _TSTRUCT_ ) #xcommand MEMBER ; [ AS ] ; [ INIT ] ; => ; - HB_HashAddMember( {<(cName)>}, <(type)>, , _TSTRUCT_ ) + hb_HashAddMember( {<(cName)>}, <(type)>, , _TSTRUCT_ ) -#xcommand ENDSTRUCTURE => HB_HAutoAdd( _TSTRUCT_, .f. ) +#xcommand ENDSTRUCTURE => hb_HAutoAdd( _TSTRUCT_, .F. ) -#translate DESTROY STRUCTURE => := nil +#translate DESTROY STRUCTURE => := NIL #endif diff --git a/harbour/contrib/xhb/tcgi.prg b/harbour/contrib/xhb/tcgi.prg index 52c4f4d944..0211fb3daa 100644 --- a/harbour/contrib/xhb/tcgi.prg +++ b/harbour/contrib/xhb/tcgi.prg @@ -240,7 +240,7 @@ FUNCTION ParseString( cString, cDelim, nRet ) cBuf := Substr( cBuf, nPosFim + 1, Len( cBuf ) ) - NEXT i + NEXT RETURN aElem[ nRet ] diff --git a/harbour/contrib/xhb/tedit.prg b/harbour/contrib/xhb/tedit.prg index 4737b168f1..e7518a281b 100644 --- a/harbour/contrib/xhb/tedit.prg +++ b/harbour/contrib/xhb/tedit.prg @@ -94,7 +94,7 @@ CLASS THtmlControl DATA MaxChars // length on screen DATA Checked INIT .F. // checkboxes... - DATA lLabel INIT .f. + DATA lLabel INIT .F. DATA Source, Align // images... DATA Wrap // textarea diff --git a/harbour/contrib/xhb/thtm.prg b/harbour/contrib/xhb/thtm.prg index 3198568b8e..1ef73f09b4 100644 --- a/harbour/contrib/xhb/thtm.prg +++ b/harbour/contrib/xhb/thtm.prg @@ -72,43 +72,44 @@ CLASS THtml DATA FontSize INIT 1 DATA FontColor INIT "black" DATA aImages - Data lCgi INIT .F. - Data cStr Init "" + DATA lCgi INIT .F. + DATA cStr Init "" DATA BaseURL, BaseTarget DATA lFont INIT .F. - //METHOD New( cFile, cTitle, cLinkTitle, cCharSet, cScriptSRC, ; - //BGIMAGE, BGCOLOR, txtColor, cJavaCode, ; - //onLoad, onUnload, cLinkClr, cVLinkClr, cALinkClr, ; - //cStyle, aimages, baseURL, baseTarget, ; - //nRefresh, cRefreshURL, cStyleScr, lnocache ) - METHOD Newalt(cType) +// METHOD New( cFile, cTitle, cLinkTitle, cCharSet, cScriptSRC, ; +// BGIMAGE, BGCOLOR, txtColor, cJavaCode, ; +// onLoad, onUnload, cLinkClr, cVLinkClr, cALinkClr, ; +// cStyle, aimages, baseURL, baseTarget, ; +// nRefresh, cRefreshURL, cStyleScr, lnocache ) + + METHOD Newalt( cType ) METHOD cgiNew( cTitle, cLinkTitle, cCharSet, aScriptSRC, ; - BGIMAGE, BGCOLOR, txtColor, aJsCode, ; - onLoad, onUnload, ; - cLinkClr, cVLinkClr, cALinkClr, ; - cStyle, aImages, aServerSrc, ; - cBaseURL, cBaseTarget, ; - nRefresh, cRefreshURL, cStyleScr, ; - lNocache, NOF, nMarginTop, nMarginHeight, ; - nMarginWidth, nMarginLeft, lCgi, cFile ) + BGIMAGE, BGCOLOR, txtColor, aJsCode, ; + onLoad, onUnload, ; + cLinkClr, cVLinkClr, cALinkClr, ; + cStyle, aImages, aServerSrc, ; + cBaseURL, cBaseTarget, ; + nRefresh, cRefreshURL, cStyleScr, ; + lNocache, NOF, nMarginTop, nMarginHeight, ; + nMarginWidth, nMarginLeft, lCgi, cFile ) METHOD New( cTitle, cLinkTitle, cCharSet, aScriptSRC, ; - BGIMAGE, BGCOLOR, txtColor, aJsCode, ; - onLoad, onUnload, ; - cLinkClr, cVLinkClr, cALinkClr, ; - cStyle, aImages, aServerSrc, ; - cBaseURL, cBaseTarget, ; - nRefresh, cRefreshURL, cStyleScr, ; - lNocache, NOF, nMarginTop, nMarginHeight, ; - nMarginWidth, nMarginLeft, lCgi, cFile ) + BGIMAGE, BGCOLOR, txtColor, aJsCode, ; + onLoad, onUnload, ; + cLinkClr, cVLinkClr, cALinkClr, ; + cStyle, aImages, aServerSrc, ; + cBaseURL, cBaseTarget, ; + nRefresh, cRefreshURL, cStyleScr, ; + lNocache, NOF, nMarginTop, nMarginHeight, ; + nMarginWidth, nMarginLeft, lCgi, cFile ) METHOD CGIClose() - METHOD SetPageColor( cColor, lBody ) INLINE DEFAULT(lBody ,.T.),::cStr += iif( lBody, '', ' BGCOLOR="' + cColor + '" ' ) + METHOD SetPageColor( cColor, lBody ) INLINE DEFAULT( lBody , .T. ), ::cStr += iif( lBody, '', ' BGCOLOR="' + cColor + '" ' ) - METHOD SetTextColor( cColor, lBody ) INLINE DEFAULT(lBody ,.T.),::cStr += iif( lBody, '', ' TEXT="' + cColor + '" ' ) + METHOD SetTextColor( cColor, lBody ) INLINE DEFAULT( lBody , .T. ), ::cStr += iif( lBody, '', ' TEXT="' + cColor + '" ' ) - METHOD SetBgImage( cImage, lBody ) INLINE DEFAULT(lBody ,.T.),::cStr += iif( lBody, '', ' BACKGROUND="' + cImage + '" ' ) + METHOD SetBgImage( cImage, lBody ) INLINE DEFAULT( lBody , .T. ), ::cStr += iif( lBody, '', ' BACKGROUND="' + cImage + '" ' ) METHOD CLOSE() @@ -124,32 +125,32 @@ CLASS THtml METHOD SAY( str, font, size, type, color, style ) - METHOD Qqout( c ) INLINE DEFAULT( c, "" ), ::cStr += c + METHOD QQOut( c ) INLINE DEFAULT( c, "" ), ::cStr += c - METHOD Qout( c ) INLINE DEFAULT( c, "" ), ::cStr += CRLF() + c + '
' + CRLF() + METHOD QOut( c ) INLINE DEFAULT( c, "" ), ::cStr += CRLF() + c + '
' + CRLF() METHOD Write( c ) INLINE DEFAULT( c, "" ), ::cStr += c METHOD WriteLN( c ) INLINE DEFAULT( c, "" ), ::cStr += CRLF() + c + '
' + CRLF() - METHOD SayColor( t, c ) INLINE DEFAULT( t, "" ), DEFAULT( c, "black" ),; - ::cStr += '' + t + '' + METHOD SayColor( t, c ) INLINE DEFAULT( t, "" ), DEFAULT( c, "black" ), ; + ::cStr += '' + t + '' METHOD Space( n ) INLINE DEFAULT( n, 1 ), ::cStr += Replicate( " ", n ) METHOD PutImage( cImage, nBorder, nHeight, cOnclick, cOnMsOver, cOnMsOut, ; - cName, cAlt, cTarget, nWidth, lBreak, ID, MAP, ALING, HSPACE ) + cName, cAlt, cTarget, nWidth, lBreak, ID, MAP, ALING, HSPACE ) - METHOD TEXT( cText, nCols, lWrap ) INLINE DEFAULT( lWrap, .T. ), DEFAULT( nCols, 80 ),; - ::cStr += "", ">" ) + CRLF() + cText + CRLF() + "" + CRLF() + METHOD TEXT( cText, nCols, lWrap ) INLINE DEFAULT( lWrap, .T. ), DEFAULT( nCols, 80 ), ; + ::cStr += "", ">" ) + CRLF() + cText + CRLF() + "" + CRLF() - METHOD MultiCol( txt, cols, gutter, width ) INLINE DEFAULT( txt, "" ),; - DEFAULT( cols, 2 ),; - DEFAULT( gutter, 5 ),; - DEFAULT( width, 100 ),; - ::cStr += '' ,; - ::cStr += txt ,; - ::cStr += "" + METHOD MultiCol( txt, cols, gutter, width ) INLINE DEFAULT( txt, "" ), ; + DEFAULT( cols, 2 ), ; + DEFAULT( gutter, 5 ), ; + DEFAULT( width, 100 ), ; + ::cStr += '' , ; + ::cStr += txt , ; + ::cStr += "" METHOD PutHeading( cText, nWeight, lCentered ) @@ -162,24 +163,24 @@ CLASS THtml METHOD PutBreak() INLINE ::cStr += "
" + CRLF() METHOD Marquee( cText, cFont, cFntColor, nFntSize, cAlign, nWidth, nHeight, cbgColor, ; - cBehavior, cDirection, nScrollAmt, nScrollDelay, LOOP, ; - onMsOver, onMsOut, onClick, onStart, onFinish ) + cBehavior, cDirection, nScrollAmt, nScrollDelay, LOOP, ; + onMsOver, onMsOut, onClick, onStart, onFinish ) METHOD StartMarquee( cFont, cFntColor, nFntSize, cAlign, nWidth, nHeight, cbgColor, ; - cBehavior, cDirection, nScrollAmt, nScrollDelay, LOOP, ; - onMsOver, onMsOut, onClick, onStart, onFinish ) - METHOD EndMarquee() + cBehavior, cDirection, nScrollAmt, nScrollDelay, LOOP, ; + onMsOver, onMsOut, onClick, onStart, onFinish ) + METHOD EndMarquee() METHOD PutTextUrl( cText, cUrl, cOnClick, cOnMsOver, cOnMsout, cTarget, font, clr, size, style, bld, lbreak, cClass ) METHOD PutImageUrl( cImage, nBorder, nHeight, cUrl, ; - cOnclick, cOnMsOver, cOnMsOut, cName, cAlt, cTarget, nWidth, lbreak, cClass, ; - Id, hSpace, Aling ) + cOnclick, cOnMsOver, cOnMsOut, cName, cAlt, cTarget, nWidth, lbreak, cClass, ; + Id, hSpace, Aling ) METHOD DefineTable( nCols, nBorder, nWidth, nHeight, ColorFore, ColorBG, ; - l3d, lRuleCols, lRuleRows, cClrDark, cClrLight, cClrBorder, ; - nCellPadding, nCellSpacing, cAling, lRules, ; - bgImage, cStyle, Id, NOF ) + l3d, lRuleCols, lRuleRows, cClrDark, cClrLight, cClrBorder, ; + nCellPadding, nCellSpacing, cAling, lRules, ; + bgImage, cStyle, Id, NOF ) METHOD TableHead( cHead, cColor, cAlign, cFont, nSize, cFntColor, nHeight, cBgPic ) @@ -188,8 +189,8 @@ CLASS THtml METHOD EndTableRow() METHOD NewTableCell( cAlign, cColor, cFont, nSize, cFntColor, nHeight, ; - cBgPic, nWidth, lWrap, nColspan, nRowspan, cValign, ; - clrdrk, clrlt, cBdrClr, cClass, lNoFont ) + cBgPic, nWidth, lWrap, nColspan, nRowspan, cValign, ; + clrdrk, clrlt, cBdrClr, cClass, lNoFont ) METHOD EndTableCell() @@ -217,7 +218,7 @@ CLASS THtml METHOD EndForm() INLINE ::cStr += CRLF() + "" + CRLF() - METHOD Pushbutton( cName, cCaption, cCgiApp, cOnClick, cOnFocus, cOnBlur, cOnMsOver, cOnMsOut, style, ID ) + METHOD PushButton( cName, cCaption, cCgiApp, cOnClick, cOnFocus, cOnBlur, cOnMsOver, cOnMsOut, style, ID ) METHOD endButton() @@ -235,19 +236,19 @@ CLASS THtml METHOD serverCode( c ) INLINE ::cStr += "" + Space( 9 ) + c + CRLF() + "" + CRLF() - METHOD Fwrite( c ) INLINE Fwrite( ::nH, c ) + METHOD FWrite( c ) INLINE FWrite( ::nH, c ) - METHOD FWriteLN( c ) INLINE Fwrite( ::nH, c + CRLF() ) + METHOD FWriteLN( c ) INLINE FWrite( ::nH, c + CRLF() ) METHOD Span( c, Style ) METHOD PutTextImageUrl( cImage, nBorder, nHeight, cUrl, cOnclick, ; - cOnMsOver, cOnMsOut, cName, cAlt, cTarget, nWidth, lbreak, cClass, cText ) + cOnMsOver, cOnMsOut, cName, cAlt, cTarget, nWidth, lbreak, cClass, cText ) METHOD Comment( cText ) METHOD ADDoBJECT( cType, cClassid, cAling, cCode, lDisable, cCodeBase, ; - cName, nWidth, nHeight ) + cName, nWidth, nHeight ) METHOD ADDPARAM( cType, cValue ) @@ -259,7 +260,7 @@ CLASS THtml METHOD MapArea( Shape, Alt, Coord, Url ) INLINE ; - ::cStr += " + alt + " + CRLF() + ::cStr += " + alt + " + CRLF() METHOD EndMap() INLINE ::cStr += "" @@ -272,76 +273,74 @@ ENDCLASS * Starts a new CGI-HTML stream file. */ - METHOD cgiNew( cTitle, cLinkTitle, cCharSet, aScriptSRC, ; - BGIMAGE, BGCOLOR, txtColor, aJsCode, ; - onLoad, onUnload, ; - cLinkClr, cVLinkClr, cALinkClr, ; - cStyle, aImages, aServerSrc, ; - cBaseURL, cBaseTarget, ; - nRefresh, cRefreshURL, cStyleScr, ; - lNocache, NOF, nMarginTop, nMarginHeight, ; - nMarginWidth, nMarginLeft, lCgi, cFile ) CLASS THtml + BGIMAGE, BGCOLOR, txtColor, aJsCode, ; + onLoad, onUnload, ; + cLinkClr, cVLinkClr, cALinkClr, ; + cStyle, aImages, aServerSrc, ; + cBaseURL, cBaseTarget, ; + nRefresh, cRefreshURL, cStyleScr, ; + lNocache, NOF, nMarginTop, nMarginHeight, ; + nMarginWidth, nMarginLeft, lCgi, cFile ) CLASS THtml HB_SYMBOL_UNUSED( lCgi ) return ::new( cTitle, cLinkTitle, cCharSet, aScriptSRC, ; - BGIMAGE, BGCOLOR, txtColor, aJsCode, ; - onLoad, onUnload, ; - cLinkClr, cVLinkClr, cALinkClr, ; - cStyle, aImages, aServerSrc, ; - cBaseURL, cBaseTarget, ; - nRefresh, cRefreshURL, cStyleScr, ; - lNocache, NOF, nMarginTop, nMarginHeight, ; - nMarginWidth, nMarginLeft ,.T.,cFile) - - + BGIMAGE, BGCOLOR, txtColor, aJsCode, ; + onLoad, onUnload, ; + cLinkClr, cVLinkClr, cALinkClr, ; + cStyle, aImages, aServerSrc, ; + cBaseURL, cBaseTarget, ; + nRefresh, cRefreshURL, cStyleScr, ; + lNocache, NOF, nMarginTop, nMarginHeight, ; + nMarginWidth, nMarginLeft , .T. , cFile ) METHOD New( cTitle, cLinkTitle, cCharSet, aScriptSRC, ; - BGIMAGE, BGCOLOR, txtColor, aJsCode, ; - onLoad, onUnload, ; - cLinkClr, cVLinkClr, cALinkClr, ; - cStyle, aImages, aServerSrc, ; - cBaseURL, cBaseTarget, ; - nRefresh, cRefreshURL, cStyleScr, ; - lNocache, NOF, nMarginTop, nMarginHeight, ; - nMarginWidth, nMarginLeft, lCgi, cFile ) CLASS THtml + BGIMAGE, BGCOLOR, txtColor, aJsCode, ; + onLoad, onUnload, ; + cLinkClr, cVLinkClr, cALinkClr, ; + cStyle, aImages, aServerSrc, ; + cBaseURL, cBaseTarget, ; + nRefresh, cRefreshURL, cStyleScr, ; + lNocache, NOF, nMarginTop, nMarginHeight, ; + nMarginWidth, nMarginLeft, lCgi, cFile ) CLASS THtml LOCAL i - DEFAULT lCgi to .F. + + DEFAULT lCgi TO .F. ::lCgi := lCgi - if lCgi + IF lCgi DEFAULT cTitle TO "New CGI-HTML page" DEFAULT cLinkTitle TO cTitle DEFAULT cRefreshURL TO "" DEFAULT cCharset TO "windows-1251" - DEFAULT lNocache TO .f. - else + DEFAULT lNocache TO .F. + ELSE DEFAULT cFile TO "file1.htm" DEFAULT cTitle TO "New HTML page" DEFAULT cLinkTitle TO cTitle DEFAULT cRefreshURL TO "" DEFAULT cCharset TO "windows-1251" - DEFAULT lNocache TO .f. - endif + DEFAULT lNocache TO .F. + ENDIF ::nH := STD_OUT ::Title := cTitle - if lCgi + IF lCgi ::FName := "cgiout.htm" - else + ELSE ::FName := cFile - endif - if lCgi + ENDIF + IF lCgi ::cStr += 'Content-Type: text/html' + CRLF() + CRLF() - fwrite(::nh,::cStr) - endif - ::cStr:='' + FWrite( ::nh, ::cStr ) + ENDIF + ::cStr := '' ::cStr += '' + CRLF() + ; - '' + CRLF() + ; - ' ' + cTitle + ' ' + CRLF() + '' + CRLF() + ; + ' ' + cTitle + ' ' + CRLF() IF cBaseURL != NIL ::cStr += "' + CRLF() + '' + CRLF() NEXT ENDIF @@ -386,16 +385,16 @@ METHOD New( cTitle, cLinkTitle, cCharSet, aScriptSRC, ; FOR i := 1 TO Len( aServerSrc ) ::cStr += ; - '' + CRLF() + '' + CRLF() NEXT ENDIF - // preload images... +// preload images... IF aImages != NIL ::aImages := aImages ::cStr += ; - '" + CRLF() + "" + CRLF() FWrite( nH, cStr ) + RETURN /**** @@ -2193,9 +2222,10 @@ PROCEDURE HtmlJsCmd( nH, cCmd ) */ FUNCTION HtmlLinkStyle( cHoverStyle, cHoverClr, cHoverBG, ; - cLinkStyle, cLinkClr, cLinkBG ) + cLinkStyle, cLinkClr, cLinkBG ) LOCAL cStr + DEFAULT cHoverStyle TO "normal" DEFAULT cLinkStyle TO "normal" DEFAULT cHoverClr TO "white" @@ -2251,17 +2281,18 @@ FUNCTION HtmlPadR( cStr, n ) nSpaces := n - Len( cStr ) IF n <= 0 - cRet := LEFT( cStr, n ) + cRet := Left( cStr, n ) ELSE cRet := cStr + Replicate( _HTML_SPACE, nSpaces ) ENDIF RETURN cRet - //---------------------------------------------------------------------------- -function ANY2STR( xVal ) -return HTMLANY2STR( xVal ) + +FUNCTION ANY2STR( xVal ) + + RETURN HTMLANY2STR( xVal ) FUNCTION HTMLANY2STR( xVal ) @@ -2271,13 +2302,13 @@ FUNCTION HTMLANY2STR( xVal ) xRet := iif( Empty( xVal ), ".", xVal ) ELSEIF HB_ISNUMERIC( xVal ) - xRet := Alltrim( Str( xVal ) ) + xRet := AllTrim( Str( xVal ) ) ELSEIF HB_ISOBJECT( xVal ) xRet := "<" + xVal:CLASSNAME() + ">" ELSEIF HB_ISDATE( xVal ) - xRet := Dtoc( xVal ) + xRet := DToC( xVal ) ELSEIF HB_ISLOGICAL( xVal ) xRet := iif( xVal, "T", "F" ) @@ -2285,12 +2316,12 @@ FUNCTION HTMLANY2STR( xVal ) ELSEIF HB_ISBLOCK( xVal ) xRet := "{||...}" - ELSEIF Valtype( xVal ) == NIL + ELSEIF ValType( xVal ) == NIL xRet := "NIL" - ELSEIF Valtype( xVal ) == "U" + ELSEIF ValType( xVal ) == "U" xRet := "" ENDIF -RETURN xRet + RETURN xRet diff --git a/harbour/contrib/xhb/ttable.prg b/harbour/contrib/xhb/ttable.prg index 446c1eb98b..a332c34f0e 100644 --- a/harbour/contrib/xhb/ttable.prg +++ b/harbour/contrib/xhb/ttable.prg @@ -71,77 +71,78 @@ #include "dbinfo.ch" #include "error.ch" -STATIC saTables := {} +STATIC s_aTables := {} + /* NetWork Functions */ -STATIC snNetDelay := 30 -STATIC slNetOk := .F. -STATIC scNetMsgColor := "GR+/R" +STATIC s_nNetDelay := 30 +STATIC s_lNetOk := .F. +STATIC s_cNetMsgColor := "GR+/R" FUNCTION NetDbUse( cDataBase, cAlias, nSeconds, cDriver, ; - lNew, lOpenMode, lReadOnly ) + lNew, lOpenMode, lReadOnly ) + LOCAL nKey LOCAL lForever - LOCAL cOldScreen := SAVESCREEN( MAXROW(), 0, MAXROW(), MAXCOL() + 1 ) + LOCAL cOldScreen := SaveScreen( MaxRow(), 0, MaxRow(), MaxCol() + 1 ) LOCAL lFirstPass := .T. DEFAULT cDriver TO "DBFCDX" DEFAULT lNew TO .T. DEFAULT lOpenMode TO NET_OPEN_MODE DEFAULT lReadOnly TO .F. - DEFAULT nSeconds TO snNetDelay + DEFAULT nSeconds TO s_nNetDelay - slNetOk := .F. + s_lNetOk := .F. nSeconds *= 1.00 lforever := ( nSeconds == 0 ) hb_keyIns( 255 ) - INKEY() + Inkey() - DO WHILE ( lforever .or. nSeconds > 0 ) .and. LASTKEY() != K_ESC + DO WHILE ( lforever .OR. nSeconds > 0 ) .AND. LastKey() != K_ESC IF !lfirstPass - DISPOUTAT( MAXROW(), 0, ; - PADC( "Network retry | " + ; - LTRIM( STR( nSeconds, 4, 1 ) ) + " | ESCape = Exit ", ; - MAXCOL() + 1 ), ; - scNetMsgColor ) + DispOutAt( MaxRow(), 0, ; + PadC( "Network retry | " + ; + LTrim( Str( nSeconds, 4, 1 ) ) + " | ESCape = Exit ", ; + MaxCol() + 1 ), ; + s_cNetMsgColor ) lFirstPass := .F. ENDIF - DBUSEAREA( lNew, ; - ( cDriver ), ( cDatabase ), ( cAlias ), ; - lOpenMode, ; - .F. ) + dbUseArea( lNew, ; + ( cDriver ), ( cDatabase ), ( cAlias ), ; + lOpenMode, ; + .F. ) - IF !NETERR() // USE SUCCEEDS - RESTSCREEN( MAXROW(), 0, MAXROW(), MAXCOL() + 1, cOldScreen ) - slNetOk := .T. + IF !NetErr() // USE SUCCEEDS + RestScreen( MaxRow(), 0, MaxRow(), MaxCol() + 1, cOldScreen ) + s_lNetOk := .T. ELSE lFirstPass := .F. ENDIF - IF !slNetOK - nKey := INKEY( .5 ) // WAIT 1 SECOND + IF !s_lNetOk + nKey := Inkey( .5 ) // WAIT 1 SECOND nSeconds -= .5 ELSE - RESTSCREEN( MAXROW(), 0, MAXROW(), MAXCOL() + 1, cOldScreen ) + RestScreen( MaxRow(), 0, MaxRow(), MaxCol() + 1, cOldScreen ) EXIT ENDIF IF nKey == K_ESC - RESTSCREEN( MAXROW(), 0, MAXROW(), MAXCOL() + 1, cOldScreen ) + RestScreen( MaxRow(), 0, MaxRow(), MaxCol() + 1, cOldScreen ) EXIT ENDIF ENDDO - RESTSCREEN( MAXROW(), 0, MAXROW(), MAXCOL() + 1, cOldScreen ) - -RETURN slNetOk + RestScreen( MaxRow(), 0, MaxRow(), MaxCol() + 1, cOldScreen ) + RETURN s_lNetOk FUNCTION NetLock( nType, lReleaseLocks, nSeconds ) - LOCAL cSave := SAVESCREEN( MAXROW(), 0, MAXROW(), MAXCOL() + 1 ) + LOCAL cSave := SaveScreen( MaxRow(), 0, MaxRow(), MaxCol() + 1 ) LOCAL lContinue := .T. LOCAL lSuccess := .F. LOCAL nWaitTime @@ -151,34 +152,34 @@ FUNCTION NetLock( nType, lReleaseLocks, nSeconds ) LOCAL nCh LOCAL cWord - IF ! HB_ISNUMERIC( nType ) .or. ; - ( ( nType != 1 ) .and. ; - ( nType != 2 ) .and. ; - ( nType != 3 ) ) - ALERT( "Invalid Argument passed to NETLOCK()" ) + IF ! HB_ISNUMERIC( nType ) .OR. ; + ( ( nType != 1 ) .AND. ; + ( nType != 2 ) .AND. ; + ( nType != 3 ) ) + Alert( "Invalid Argument passed to NETLOCK()" ) RETURN lSuccess ENDIF DEFAULT lReleaseLocks TO .F. - DEFAULT nSeconds TO snNetDelay + DEFAULT nSeconds TO s_nNetDelay nWaitTime := nSeconds SWITCH nType CASE NET_RECLOCK // 1 = Record Lock... - xIdentifier := iif( lReleaseLocks, NIL, RECNO() ) - bOperation := {| x | DBRLOCK( x ) } - exit + xIdentifier := iif( lReleaseLocks, NIL, RecNo() ) + bOperation := {| x | dbRLock( x ) } + EXIT CASE NET_FILELOCK // 2 = File Lock... - bOperation := {|| FLOCK() } - exit + bOperation := {|| FLock() } + EXIT CASE NET_APPEND // 3 = Append Blank... xIdentifier := lReleaseLocks - bOperation := {| x | DBAPPEND( x ), !NETERR() } - exit + bOperation := {| x | dbAppend( x ), !NetErr() } + EXIT ENDSWITCH - slNetOk := .F. + s_lNetOk := .F. WHILE lContinue == .T. @@ -189,45 +190,45 @@ FUNCTION NetLock( nType, lReleaseLocks, nSeconds ) ENDIF */ - WHILE nSeconds > 0 .and. lContinue == .T. - IF EVAL( bOperation, xIdentifier ) + WHILE nSeconds > 0 .AND. lContinue == .T. + IF Eval( bOperation, xIdentifier ) nSeconds := 0 lSuccess := .T. lContinue := .F. - slNetOK := .T. + s_lNetOk := .T. EXIT ELSE IF nType == 1 - cWord := "( " + DBINFO( 33 ) + " - Record Lock )" + cWord := "( " + dbInfo( 33 ) + " - Record Lock )" ELSEIF nType == 2 - cWord := "( " + DBINFO( 33 ) + " - File Lock )" + cWord := "( " + dbInfo( 33 ) + " - File Lock )" ELSEIF nType == 3 - cWord := "( " + DBINFO( 33 ) + " - File Append )" + cWord := "( " + dbInfo( 33 ) + " - File Append )" ELSE - cWord := "( " + DBINFO( 33 ) + " - ??? " + cWord := "( " + dbInfo( 33 ) + " - ??? " ENDIF - DISPOUTAT( MAXROW(), 0, ; - PADC( "Network Retry " + cWord + " | " + STR( nSeconds, 3 ) + " | ESC Exit", MAXCOL() + 1 ), ; - scNetMsgColor ) + DispOutAt( MaxRow(), 0, ; + PadC( "Network Retry " + cWord + " | " + Str( nSeconds, 3 ) + " | ESC Exit", MaxCol() + 1 ), ; + s_cNetMsgColor ) - nKey := INKEY( 1 ) //TONE( 1,1 ) + nKey := Inkey( 1 ) //TONE( 1,1 ) nSeconds -- //.5 IF nKey == K_ESC - RESTSCREEN( MAXROW(), 0, MAXROW(), MAXCOL() + 1, cSave ) + RestScreen( MaxRow(), 0, MaxRow(), MaxCol() + 1, cSave ) EXIT ENDIF ENDIF ENDDO - IF LASTKEY() == K_ESC - RESTSCREEN( MAXROW(), 0, MAXROW(), MAXCOL() + 1, cSave ) + IF LastKey() == K_ESC + RestScreen( MaxRow(), 0, MaxRow(), MaxCol() + 1, cSave ) EXIT ENDIF IF !lSuccess nSeconds := nWaitTime - nCh := ALERT( RETRY_MSG, { " YES ", " NO " } ) + nCh := Alert( RETRY_MSG, { " YES ", " NO " } ) IF nCh == 1 lContinue := .T. @@ -237,38 +238,36 @@ FUNCTION NetLock( nType, lReleaseLocks, nSeconds ) IF lContinue == .F. //EXIT - RESTSCREEN( MAXROW(), 0, MAXROW(), MAXCOL() + 1, cSave ) + RestScreen( MaxRow(), 0, MaxRow(), MaxCol() + 1, cSave ) RETURN lSuccess ENDIF ENDIF ENDDO - RESTSCREEN( MAXROW(), 0, MAXROW(), MAXCOL() + 1, cSave ) - -RETURN lSuccess + RestScreen( MaxRow(), 0, MaxRow(), MaxCol() + 1, cSave ) + RETURN lSuccess FUNCTION NetFunc( bBlock, nSeconds ) LOCAL lForever // Retry forever? - DEFAULT nSeconds TO snNetDelay + DEFAULT nSeconds TO s_nNetDelay lForever := ( nSeconds == 0 ) - // Keep trying as long as specified or default - DO WHILE ( lForever .or. ( nSeconds > 0 ) ) +// Keep trying as long as specified or default + DO WHILE ( lForever .OR. ( nSeconds > 0 ) ) - IF EVAL( bBlock ) + IF Eval( bBlock ) RETURN .T. // NOTE ENDIF - INKEY( 1 ) // Wait 0.5 seconds + Inkey( 1 ) // Wait 0.5 seconds nSeconds -= 0.5 ENDDO -RETURN .F. // Not locked - + RETURN .F. // Not locked // { DBFName, Alias, { idx Names } } // Returns: 0 All Ok @@ -288,11 +287,11 @@ FUNCTION NetOpenFiles( aFiles ) EXIT ENDIF - IF NetDbUse( xFile[ 1 ], xFile[ 2 ], snNetDelay, "DBFCDX" ) + IF NetDbUse( xFile[ 1 ], xFile[ 2 ], s_nNetDelay, "DBFCDX" ) IF HB_ISARRAY( xFile[ 3 ] ) FOR EACH cIndex IN xFile[ 3 ] IF hb_FileExists( cIndex ) - ORDLISTADD( cIndex ) + ordListAdd( cIndex ) ELSE nRet := - 3 EXIT @@ -307,138 +306,136 @@ FUNCTION NetOpenFiles( aFiles ) RETURN nRet - -/* NETWORK METHODS */ + /* NETWORK METHODS */ FUNCTION NetDelete() - slNetOK := .F. + s_lNetOk := .F. IF NetLock( NET_RECLOCK ) == .T. - DBDELETE() - slNetOK := .T. + dbDelete() + s_lNetOk := .T. ENDIF - IF !NETERR() - DBSKIP( 0 ) - DBCOMMIT() + IF !NetErr() + dbSkip( 0 ) + dbCommit() ELSE - slNetOK := .T. - ALERT( " Failed to DELETE Record -> " + STR( RECNO() ) ) + s_lNetOk := .T. + Alert( " Failed to DELETE Record -> " + Str( RecNo() ) ) ENDIF -RETURN slNetOk + RETURN s_lNetOk FUNCTION NetReCall() - slNetOk := .F. + s_lNetOk := .F. IF NetLock( NET_RECLOCK ) == .T. - DBRECALL() - slNetOk := .T. + dbRecall() + s_lNetOk := .T. ENDIF - IF !NETERR() - DBSKIP( 0 ) - DBCOMMIT() + IF !NetErr() + dbSkip( 0 ) + dbCommit() ELSE - slNetOK := .T. - ALERT( " Failed to RECALL Record -> " + STR( RECNO() ) ) + s_lNetOk := .T. + Alert( " Failed to RECALL Record -> " + Str( RecNo() ) ) ENDIF -RETURN slNetOk - + RETURN s_lNetOk FUNCTION NetRecLock( nSeconds ) - DEFAULT nSeconds TO snNetDelay + DEFAULT nSeconds TO s_nNetDelay - slNetOK := .F. + s_lNetOk := .F. - IF NetLock( NET_RECLOCK,, nSeconds ) // 1 - slNetOK := .T. + IF NetLock( NET_RECLOCK, , nSeconds ) // 1 + s_lNetOk := .T. ENDIF -RETURN slNetOK - + RETURN s_lNetOk FUNCTION NetFileLock( nSeconds ) - slNetOK := .F. - DEFAULT nSeconds TO snNetDelay + s_lNetOk := .F. + DEFAULT nSeconds TO s_nNetDelay - IF NetLock( NET_FILELOCK,, nSeconds ) - slNetOK := .T. + IF NetLock( NET_FILELOCK, , nSeconds ) + s_lNetOk := .T. ENDIF -RETURN slNetOK - + RETURN s_lNetOk FUNCTION NetAppend( nSeconds, lReleaseLocks ) LOCAL nOrd - DEFAULT lReleaseLocks TO .T. - DEFAULT nSeconds TO snNetDelay - slNetOK := .F. - nOrd := ORDSETFOCUS( 0 ) // --> set order to 0 to append ??? - IF NetLock( NET_APPEND,, nSeconds ) + DEFAULT lReleaseLocks TO .T. + DEFAULT nSeconds TO s_nNetDelay + s_lNetOk := .F. + nOrd := ordSetFocus( 0 ) // --> set order to 0 to append ??? + + IF NetLock( NET_APPEND, , nSeconds ) //DbGoBottom() - slNetOK := .T. + s_lNetOk := .T. ENDIF - ORDSETFOCUS( nOrd ) - -RETURN slNetOK + ordSetFocus( nOrd ) + RETURN s_lNetOk PROCEDURE NetFlush() - DBCOMMITALL() - DBUNLOCKALL() - DBSKIP( 0 ) -RETURN + dbCommitAll() + dbUnlockAll() + dbSkip( 0 ) + RETURN FUNCTION NetCommitAll() LOCAL n FOR n := 1 TO MAX_TABLE_AREAS - IF !EMPTY( ALIAS( n ) ) - ( ALIAS( n ) )->( DBCOMMIT(), DBUNLOCK() ) + IF !Empty( Alias( n ) ) + ( Alias( n ) )->( dbCommit(), dbUnlock() ) ENDIF NEXT -RETURN n - + RETURN n FUNCTION IsLocked( nRecId ) -DEFAULT nRecID TO recno() -RETURN ASCAN( DBRLOCKLIST(), {| n | n == nRecID } ) > 0 + DEFAULT nRecID TO RecNo() + RETURN AScan( dbRLockList(), {| n | n == nRecID } ) > 0 FUNCTION NetError() -RETURN !slNetOK + RETURN !s_lNetOk FUNCTION SetNetDelay( nSecs ) - LOCAL nTemp := snNetDelay - IF nSecs != NIL - snNetDelay := nSecs - ENDIF -RETURN nTemp + LOCAL nTemp := s_nNetDelay + IF nSecs != NIL + s_nNetDelay := nSecs + ENDIF + + RETURN nTemp FUNCTION SetNetMsgColor( cColor ) - LOCAL cTemp := scNetMsgColor + LOCAL cTemp := s_cNetMsgColor + IF cColor != NIL - scNetmsgColor := cColor + s_cNetMsgColor := cColor ENDIF -RETURN cTemp + + RETURN cTemp /**** @@ -450,11 +447,13 @@ RETURN cTemp */ FUNCTION TableNew( cDBF, cALIAS, cOrderBag, cDRIVER, ; - lNET, cPATH, lNEW, lREADONLY ) + lNET, cPATH, lNEW, lREADONLY ) + LOCAL nPos LOCAL lAuto LOCAL oDB LOCAL o + DEFAULT lNET TO .T. DEFAULT lNEW TO .T. DEFAULT lREADONLY TO .F. @@ -463,36 +462,37 @@ FUNCTION TableNew( cDBF, cALIAS, cOrderBag, cDRIVER, ; DEFAULT cAlias TO FixExt( cDbf ) DEFAULT cOrderBag TO FixExt( cDbf ) //+".CDX" - lAuto := SET( _SET_AUTOPEN, .F. ) + lAuto := Set( _SET_AUTOPEN, .F. ) - IF ( nPos := ASCAN( saTables, {| e | e[ 1 ] == UPPER( cALIAS ) } ) ) > 0 + IF ( nPos := AScan( s_aTables, {| e | e[ 1 ] == Upper( cALIAS ) } ) ) > 0 - oDB := saTables[ nPos, 2 ] + oDB := s_aTables[ nPos, 2 ] ELSE o := HBTable():New( cDBF, cALIAS, cOrderBag, cDRIVER, ; - lNET, cPATH, lNEW, lREADONLY ) + lNET, cPATH, lNEW, lREADONLY ) IF o:Open() oDB := o:FldInit() ENDIF - AADD( saTables, { UPPER( cAlias ), oDB } ) + AAdd( s_aTables, { Upper( cAlias ), oDB } ) ENDIF SET( _SET_AUTOPEN, lAuto ) -RETURN oDB - + RETURN oDB FUNCTION GetTable( cAlias ) LOCAL nPos LOCAL oDB - IF ( nPos := ASCAN( saTables, {| e | e[ 1 ] == UPPER( cALIAS ) } ) ) > 0 - oDB := saTables[ nPos, 2 ] + + IF ( nPos := AScan( s_aTables, {| e | e[ 1 ] == Upper( cALIAS ) } ) ) > 0 + oDB := s_aTables[ nPos, 2 ] ENDIF -RETURN oDB + + RETURN oDB /**** @@ -505,17 +505,17 @@ RETURN oDB CLASS HBField - DATA Alias INIT ALIAS() + DATA ALIAS INIT Alias() DATA Name INIT "" - DATA Type INIT "C" + DATA TYPE INIT "C" DATA Len INIT 0 DATA Dec INIT 0 - DATA order INIT 0 + DATA ORDER INIT 0 DATA Value - METHOD GET() INLINE ::value := ( ::alias )->( FIELDGET( ::order ) ) - METHOD Put( x ) INLINE ::value := x ,; - ( ::alias )->( FIELDPUT( ::order, x ) ) + METHOD Get() INLINE ::value := ( ::alias )->( FieldGet( ::order ) ) + METHOD Put( x ) INLINE ::value := x , ; + ( ::alias )->( FieldPut( ::order, x ) ) ENDCLASS @@ -530,17 +530,16 @@ ENDCLASS CLASS HBRecord DATA Buffer INIT {} - DATA Alias INIT ALIAS() + DATA ALIAS INIT Alias() DATA Number INIT 0 DATA aFields INIT {} METHOD New( cAlias ) - METHOD GET() + METHOD Get() METHOD Put() ENDCLASS - METHOD NEW( cAlias ) CLASS HBRecord LOCAL i @@ -548,19 +547,19 @@ METHOD NEW( cAlias ) CLASS HBRecord LOCAL aStruc LOCAL aItem - DEFAULT cAlias TO ALIAS() + DEFAULT cAlias TO Alias() ::Alias := cAlias ::Buffer := {} - ::aFields := ARRAY( ( ::alias )->( FCOUNT() ) ) + ::aFields := Array( ( ::alias )->( FCount() ) ) - aStruc := ( ::alias )->( DBSTRUCT() ) + aStruc := ( ::alias )->( dbStruct() ) FOR EACH aItem in ::aFields i := aItem:__EnumIndex() oFld := HBField() oFld:order := i - oFld:Name := ( ::alias )->( FIELDNAME( i ) ) + oFld:Name := ( ::alias )->( FieldName( i ) ) oFld:Type := aStruc[ i, 2 ] oFld:LEN := aStruc[ i, 3 ] oFld:Dec := aStruc[ i, 4 ] @@ -568,20 +567,18 @@ METHOD NEW( cAlias ) CLASS HBRecord aItem := oFld NEXT -RETURN Self + RETURN Self - -METHOD PROCEDURE GET() CLASS HBRecord +METHOD PROCEDURE Get() CLASS HBRecord LOCAL xField FOR EACH xField IN ::aFields - xField:GET() + xField:Get() ::buffer[ xField:__EnumIndex() ] := xField:value NEXT -RETURN - + RETURN METHOD PROCEDURE Put() CLASS HBRecord @@ -594,7 +591,7 @@ METHOD PROCEDURE Put() CLASS HBRecord ENDIF NEXT -RETURN + RETURN /**** * @@ -604,27 +601,28 @@ RETURN * */ - //METHOD SetFocus() INLINE (::Alias)->(Select( ::Area )) - // - // - //encapsulated methods - // - // - //Methods - // - // - //table movement - // - // - //RELATION - // - // - //ORDER Management - // +//METHOD SetFocus() INLINE ( ::Alias )->( Select( ::Area ) ) +// +// +//encapsulated methods +// +// +//Methods +// +// +//table movement +// +// +//RELATION +// +// +//ORDER Management +// + CLASS HBTable DATA Buffer INIT {} // 1 - DATA Alias INIT ALIAS() // 2 + DATA ALIAS INIT Alias() // 2 DATA Area INIT 0 // 3 DATA oRec @@ -651,87 +649,88 @@ CLASS HBTable METHOD EOF() INLINE ( ::Alias )->( EOF() ) METHOD BOF() INLINE ( ::Alias )->( BOF() ) - METHOD RECNO() INLINE ( ::Alias )->( RECNO() ) - METHOD LASTREC() INLINE ( ::Alias )->( LASTREC() ) - METHOD SKIP( n ) INLINE ( ::Alias )->( DBSKIP( n ) ),; - ::nRecno := ( ::Alias )->( RECNO() ) + METHOD RecNo() INLINE ( ::Alias )->( RecNo() ) + METHOD LastRec() INLINE ( ::Alias )->( LastRec() ) + METHOD SKIP( n ) INLINE ( ::Alias )->( dbSkip( n ) ), ; + ::nRecno := ( ::Alias )->( RecNo() ) - METHOD GOTO( n ) INLINE ( ::Alias )->( DBGOTO( n ) ) - METHOD goTop() INLINE ( ::Alias )->( DBGOTOP() ) - METHOD goBottom() INLINE ( ::Alias )->( DBGOBOTTOM() ) - METHOD SetFocus() INLINE ( ::Alias )->( SELECT( ::ALias ) ) - METHOD Append( l ) INLINE iif( ::isNet, ( ::Alias )->( NetAppend( l ) ), ; - ( ::alias )->( DBAPPEND() ) ) + METHOD GOTO( n ) INLINE ( ::Alias )->( dbGoto( n ) ) + METHOD goTop() INLINE ( ::Alias )->( dbGoTop() ) + METHOD goBottom() INLINE ( ::Alias )->( dbGoBottom() ) + METHOD SetFocus() INLINE ( ::Alias )->( Select( ::ALias ) ) + METHOD APPEND( l ) INLINE iif( ::isNet, ( ::Alias )->( NetAppend( l ) ), ; + ( ::alias )->( dbAppend() ) ) METHOD RECALL( ) INLINE ( ::Alias )->( NetRecall( ) ) METHOD LOCATE( bFor, bWhile, nNext, nRec, lRest ) INLINE ; - ( ::Alias )->( __dbLocate( bFor, bWhile, ; - nNext, nRec, lRest ) ) + ( ::Alias )->( __dbLocate( bFor, bWhile, ; + nNext, nRec, lRest ) ) METHOD CONTINUE() INLINE ( ::Alias )->( __dbContinue() ) - METHOD FOUND() INLINE ( ::Alias )->( FOUND() ) - METHOD Kill() INLINE ( ::Alias )->( DBCOMMIT() ),; - ( ::Alias )->( DBUNLOCK() ) ,; - ( ::Alias )->( DBCLOSEAREA() ),; - ::ClearBuffers() - METHOD ClearBuffers() INLINE ::ReadBuffers := {},; - ::WriteBuffers := {},; - ::DeleteBuffers := {} + METHOD Found() INLINE ( ::Alias )->( Found() ) + METHOD Kill() INLINE ( ::Alias )->( dbCommit() ), ; + ( ::Alias )->( dbUnlock() ) , ; + ( ::Alias )->( dbCloseArea() ), ; + ::ClearBuffers() + METHOD ClearBuffers() INLINE ::ReadBuffers := {}, ; + ::WriteBuffers := {}, ; + ::DeleteBuffers := {} - METHOD dbIsShared() INLINE ( ::Alias )->( DBINFO( DBI_SHARED ) ) + METHOD dbIsShared() INLINE ( ::Alias )->( dbInfo( DBI_SHARED ) ) - METHOD dbIsFLocked( ) INLINE ( ::Alias )->( DBINFO( DBI_ISFLOCK ) ) + METHOD dbIsFLocked( ) INLINE ( ::Alias )->( dbInfo( DBI_ISFLOCK ) ) - METHOD dbLockCount() INLINE ( ::Alias )->( DBINFO( DBI_LOCKCOUNT ) ) + METHOD dbLockCount() INLINE ( ::Alias )->( dbInfo( DBI_LOCKCOUNT ) ) - METHOD DBINFO( n, x ) INLINE ( ::Alias )->( DBINFO( n, x ) ) + METHOD dbInfo( n, x ) INLINE ( ::Alias )->( dbInfo( n, x ) ) METHOD dbGetAlias() INLINE ( ::Alias ) - METHOD dbFullPath() INLINE ( ::Alias )->( DBINFO( DBI_FULLPATH ) ) + METHOD dbFullPath() INLINE ( ::Alias )->( dbInfo( DBI_FULLPATH ) ) - METHOD IsRLocked( n ) INLINE ( ::Alias )->( DBRECORDINFO( DBRI_LOCKED, n ) ) + METHOD IsRLocked( n ) INLINE ( ::Alias )->( dbRecordInfo( DBRI_LOCKED, n ) ) - METHOD IsRUpdated( n ) INLINE ( ::Alias )->( DBRECORDINFO( DBRI_UPDATED, n ) ) + METHOD IsRUpdated( n ) INLINE ( ::Alias )->( dbRecordInfo( DBRI_UPDATED, n ) ) - METHOD DBRECORDINFO( n, x ) INLINE ( ::Alias )->( DBRECORDINFO( n,, x ) ) + METHOD dbRecordInfo( n, x ) INLINE ( ::Alias )->( dbRecordInfo( n,, x ) ) - METHOD DBORDERINFO( n, x, u ) INLINE ( ::Alias )->( DBORDERINFO( n, ::cOrderFile, x, u ) ) + METHOD dbOrderInfo( n, x, u ) INLINE ( ::Alias )->( dbOrderInfo( n, ::cOrderFile, x, u ) ) METHOD OrderCount() INLINE ; - ( ::Alias )->( DBORDERINFO( DBOI_ORDERCOUNT, ::cOrderFile ) ) + ( ::Alias )->( dbOrderInfo( DBOI_ORDERCOUNT, ::cOrderFile ) ) METHOD AutoOpen( l ) INLINE ; - ( ::Alias )->( DBORDERINFO( DBOI_AUTOOPEN, ::cOrderFile,, l ) ) + ( ::Alias )->( dbOrderInfo( DBOI_AUTOOPEN, ::cOrderFile,, l ) ) METHOD AutoShare( l ) INLINE ; - ( ::Alias )->( DBORDERINFO( DBOI_AUTOSHARE, ::cOrderFile,, l ) ) + ( ::Alias )->( dbOrderInfo( DBOI_AUTOSHARE, ::cOrderFile,, l ) ) - METHOD USED() INLINE SELECT( ::Alias ) > 0 + METHOD Used() INLINE Select( ::Alias ) > 0 - METHOD ORDSETFOCUS( ncTag ) INLINE ( ::Alias )->( ORDSETFOCUS( ncTag ) ) - METHOD ORDNAME( nOrder ) INLINE ; - ( ::Alias )->( ORDNAME( nOrder, ::cOrderBag ) ) ; + METHOD ordSetFocus( ncTag ) INLINE ( ::Alias )->( ordSetFocus( ncTag ) ) - METHOD ORDNUMBER( cOrder ) INLINE ; - ( ::Alias )->( ORDNUMBER( cOrder, ::cOrderBag ) ) ; + METHOD ordName( nOrder ) INLINE ; + ( ::Alias )->( ordName( nOrder, ::cOrderBag ) ) ; - METHOD ORDSCOPE( n, u ) INLINE ( ::Alias )->( ORDSCOPE( n, u ) ) + METHOD ordNumber( cOrder ) INLINE ; + ( ::Alias )->( ordNumber( cOrder, ::cOrderBag ) ) ; - METHOD ORDISUNIQUE( nc ) INLINE ( ::Alias )->( ORDISUNIQUE( nc, ; - ::cOrderBag ) ) ; + METHOD ordScope( n, u ) INLINE ( ::Alias )->( ordScope( n, u ) ) - METHOD ORDSKIPUNIQUE( n ) INLINE ( ::Alias )->( ORDSKIPUNIQUE( n ) ) - METHOD ORDSETRELATION( n, b, c ) INLINE ( ::Alias )->( ORDSETRELATION( n, b, c ) ) + METHOD ordIsUnique( nc ) INLINE ( ::Alias )->( ordIsUnique( nc, ; + ::cOrderBag ) ) ; + + METHOD ordSkipUnique( n ) INLINE ( ::Alias )->( ordSkipUnique( n ) ) + METHOD ordSetRelation( n, b, c ) INLINE ( ::Alias )->( ordSetRelation( n, b, c ) ) METHOD SetTopScope( xScope ) INLINE ; - ( ::alias )->( ORDSCOPE( TOPSCOPE, xScope ) ) + ( ::alias )->( ordScope( TOPSCOPE, xScope ) ) METHOD SetBottomScope( xScope ) INLINE ; - ( ::alias )->( ORDSCOPE( BOTTOMSCOPE, xScope ) ) - METHOD KillScope() INLINE ( ::alias )->( ORDSCOPE( TOPSCOPE, NIL ) ) ,; - ( ::alias )->( ORDSCOPE( BOTTOMSCOPE, NIL ) ) + ( ::alias )->( ordScope( BOTTOMSCOPE, xScope ) ) + METHOD KillScope() INLINE ( ::alias )->( ordScope( TOPSCOPE, NIL ) ) , ; + ( ::alias )->( ordScope( BOTTOMSCOPE, NIL ) ) METHOD New( cDBF, cALIAS, cOrderBag, cDRIVER, ; - lNET, cPATH, lNEW, lREADONLY ) + lNET, cPATH, lNEW, lREADONLY ) METHOD OPEN() @@ -745,28 +744,28 @@ CLASS HBTable METHOD SetMonitor( l ) METHOD Undo( nBuffer, nLevel ) - METHOD DBSKIP( n ) INLINE ( ::Alias )->( DBSKIP( n ) ),; - ::nRecno := ( ::alias )->( RECNO() ) + METHOD dbSkip( n ) INLINE ( ::Alias )->( dbSkip( n ) ), ; + ::nRecno := ( ::alias )->( RecNo() ) - METHOD DBGOTO( n ) INLINE ( ::Alias )->( DBGOTO( n ) ) + METHOD dbGoto( n ) INLINE ( ::Alias )->( dbGoto( n ) ) - METHOD DBEVAL( a, b, c, d, e, f ) INLINE ( ::Alias )->( DBEVAL( a, b, c, d, e, f ) ) - METHOD DBSEEK( a, b, c ) INLINE ( ::Alias )->( DBSEEK( a, b, c ) ) + METHOD dbEval( a, b, c, d, e, f ) INLINE ( ::Alias )->( dbEval( a, b, c, d, e, f ) ) + METHOD dbSeek( a, b, c ) INLINE ( ::Alias )->( dbSeek( a, b, c ) ) - METHOD DBFILTER() INLINE ( ::Alias )->( DBFILTER() ) + METHOD dbFilter() INLINE ( ::Alias )->( dbFilter() ) METHOD SetFilter( c ) INLINE ; - iif( c != NIL, ( ::Alias )->( DBSETFILTER( hb_macroBlock( c ), c ) ), ; - ( ::Alias )->( DBCLEARFILTER() ) ) + iif( c != NIL, ( ::Alias )->( dbSetFilter( hb_macroBlock( c ), c ) ), ; + ( ::Alias )->( dbClearFilter() ) ) METHOD AddChild( oChild, cKey ) METHOD AddOrder( cTag, cKey, cLabel, ; - cFor, cWhile, ; - lUnique, ; - bEval, nInterval, cOrderFile ) + cFor, cWhile, ; + lUnique, ; + bEval, nInterval, cOrderFile ) METHOD GetOrderLabels() METHOD SetOrder( xTag ) METHOD GetOrder( xOrder ) @@ -780,14 +779,15 @@ CLASS HBTable ENDCLASS - - //--------------------- - // Constructor... - //--------------------- +//--------------------- +// Constructor... +//--------------------- METHOD New( cDBF, cALIAS, cOrderBag, cDRIVER, ; - lNET, cPATH, lNEW, lREADONLY ) CLASS HBTable - Local cOldRdd + lNET, cPATH, lNEW, lREADONLY ) CLASS HBTable + + LOCAL cOldRdd + DEFAULT lNET TO .F. DEFAULT lNEW TO .T. DEFAULT lREADONLY TO .F. @@ -803,49 +803,47 @@ METHOD New( cDBF, cALIAS, cOrderBag, cDRIVER, ; ::cDBF := cDBF ::cPath := cPATH ::cOrderBag := FixExt( cOrderBag ) - cOldRdd := rddsetdefault( ::driver ) + cOldRdd := rddSetDefault( ::driver ) - ::cOrderFile := ::cOrderBag + ORDBAGEXT() //".CDX" - rddsetdefault( cOldRdd ) + ::cOrderFile := ::cOrderBag + ordBagExt() //".CDX" + rddSetDefault( cOldRdd ) ::Driver := cDRIVER ::aOrders := {} ::Area := 0 ::Alias := cALIAS - ::nDataOffset := LEN( self ) //66 - -RETURN Self + ::nDataOffset := Len( self ) //66 + RETURN Self METHOD OPEN() CLASS HBTable LOCAL lSuccess := .T. - DBUSEAREA( ::IsNew, ::Driver, ::cDBF, ::Alias, ::IsNET, ::IsREADONLY ) + dbUseArea( ::IsNew, ::Driver, ::cDBF, ::Alias, ::IsNET, ::IsREADONLY ) IF ::IsNET == .T. - IF NETERR() - ALERT( _NET_USE_FAIL_MSG ) + IF NetErr() + Alert( _NET_USE_FAIL_MSG ) lSuccess := .F. RETURN lSuccess ENDIF ENDIF SELECT( ::Alias ) - ::Area := SELECT() - IF ::cOrderBag != NIL .and. hb_FileExists( ::cPath + ::cOrderFile ) + ::Area := Select() + IF ::cOrderBag != NIL .AND. hb_FileExists( ::cPath + ::cOrderFile ) SET INDEX TO ( ::cPath + ::cOrderBag ) - ( ::Alias )->( ORDSETFOCUS( 1 ) ) + ( ::Alias )->( ordSetFocus( 1 ) ) ENDIF - ::Buffer := ARRAY( ( ::Alias )->( FCOUNT() ) ) - ::aStruc := ( ::Alias )->( DBSTRUCT() ) + ::Buffer := Array( ( ::Alias )->( FCount() ) ) + ::aStruc := ( ::Alias )->( dbStruct() ) ::dbMove( _DB_TOP ) -RETURN lSuccess - + RETURN lSuccess METHOD PROCEDURE DBMove( nDirection ) CLASS HBTable @@ -853,22 +851,22 @@ METHOD PROCEDURE DBMove( nDirection ) CLASS HBTable DO CASE CASE nDirection == 0 - ( ::Alias )->( DBSKIP( 0 ) ) + ( ::Alias )->( dbSkip( 0 ) ) CASE nDirection == _DB_TOP - ( ::Alias )->( DBGOTOP() ) + ( ::Alias )->( dbGoTop() ) CASE nDirection == _DB_BOTTOM - ( ::Alias )->( DBGOBOTTOM() ) + ( ::Alias )->( dbGoBottom() ) CASE nDirection == _DB_BOF - ( ::Alias )->( DBGOTOP() ) - ( ::Alias )->( DBSKIP( - 1 ) ) + ( ::Alias )->( dbGoTop() ) + ( ::Alias )->( dbSkip( - 1 ) ) CASE nDirection == _DB_EOF - ( ::Alias )->( DBGOBOTTOM() ) - ( ::Alias )->( DBSKIP( 1 ) ) + ( ::Alias )->( dbGoBottom() ) + ( ::Alias )->( dbSkip( 1 ) ) OTHERWISE - ( ::Alias )->( DBGOTO( nDirection ) ) + ( ::Alias )->( dbGoto( nDirection ) ) ENDCASE -RETURN + RETURN // --> // --> @@ -883,19 +881,19 @@ METHOD FldInit() CLASS HBTable LOCAL oNew LOCAL nScope := 1 - ::nDataOffset := LEN( self ) - 1 + ::nDataOffset := Len( self ) - 1 - ::Buffer := ARRAY( ( ::Alias )->( FCOUNT() ) ) - IF EMPTY( ::Buffer ) + ::Buffer := Array( ( ::Alias )->( FCount() ) ) + IF Empty( ::Buffer ) ::Read() ENDIF - // --> create new oObject class from this one... +// --> create new oObject class from this one... - adb := hbclass():new( ::alias, { "hbtable" } ) + adb := HBClass():new( ::alias, { "hbtable" } ) - FOR i := 1 TO FCOUNT() - adb:AddData( ( ::Alias )->( FIELDNAME( i ) ),,, nScope ) + FOR i := 1 TO FCount() + adb:AddData( ( ::Alias )->( FieldName( i ) ), , , nScope ) NEXT aDB:create() @@ -920,108 +918,107 @@ METHOD FldInit() CLASS HBTable SELECT( oNew:Alias ) - oNew:Area := SELECT() + oNew:Area := Select() oNew:Read() - IF oNew:cOrderBag != NIL .and. hb_FileExists( oNew:cPath + oNew:cOrderFile ) + IF oNew:cOrderBag != NIL .AND. hb_FileExists( oNew:cPath + oNew:cOrderFile ) SET INDEX TO ( oNew:cPath + oNew:cOrderBag ) - ( oNew:Alias )->( ORDSETFOCUS( 1 ) ) + ( oNew:Alias )->( ordSetFocus( 1 ) ) ENDIF - oNew:buffer := ARRAY( ( oNew:alias )->( FCOUNT() ) ) - oNew:aStruc := ( oNew:alias )->( DBSTRUCT() ) + oNew:buffer := Array( ( oNew:alias )->( FCount() ) ) + oNew:aStruc := ( oNew:alias )->( dbStruct() ) IF oNew:Used() oNew:dbMove( _DB_TOP ) oNew:Read() ENDIF -RETURN oNew - + RETURN oNew METHOD PROCEDURE READ( lKeepBuffer ) CLASS HBTable LOCAL i - LOCAL nSel := SELECT( ::Alias ) - LOCAL adata := ARRAY( 1, 2 ) + LOCAL nSel := Select( ::Alias ) + LOCAL adata := Array( 1, 2 ) LOCAL Buffer + DEFAULT lKeepBuffer TO .F. - //? len( ::Buffer ) +//? len( ::Buffer ) - FOR Each Buffer in ::Buffer + FOR EACH Buffer in ::Buffer i := Buffer:__EnumIndex() - Buffer := ( ::Alias )->( FIELDGET( i ) ) + Buffer := ( ::Alias )->( FieldGet( i ) ) - adata[ 1, 1 ] := ( ::Alias )->( FIELDNAME( i ) ) - adata[ 1, 2 ] := ( ::Alias )->( FIELDGET( i ) ) - __ObjSetValueList( Self, aData ) + adata[ 1, 1 ] := ( ::Alias )->( FieldName( i ) ) + adata[ 1, 2 ] := ( ::Alias )->( FieldGet( i ) ) + __objSetValueList( Self, aData ) NEXT - IF ( lKeepBuffer == .T. ) .or. ( ::lMonitor == .T. ) - AADD( ::ReadBuffers, { ( ::Alias )->( RECNO() ), ::Buffer } ) + IF ( lKeepBuffer == .T. ) .OR. ( ::lMonitor == .T. ) + AAdd( ::ReadBuffers, { ( ::Alias )->( RecNo() ), ::Buffer } ) ENDIF SELECT( nSel ) -RETURN - + RETURN METHOD PROCEDURE ReadBlank( lKeepBuffer ) CLASS HBTable LOCAL i - LOCAL nSel := SELECT( ::Alias ) - LOCAL nRec := ( ::Alias )->( RECNO() ) - LOCAL adata := ARRAY( 1, 2 ) + LOCAL nSel := Select( ::Alias ) + LOCAL nRec := ( ::Alias )->( RecNo() ) + LOCAL adata := Array( 1, 2 ) LOCAL Buffer + DEFAULT lKeepBuffer TO .F. - ( ::Alias )->( DBGOBOTTOM() ) - ( ::Alias )->( DBSKIP( 1 ) ) // go EOF + ( ::Alias )->( dbGoBottom() ) + ( ::Alias )->( dbSkip( 1 ) ) // go EOF - FOR each Buffer in ::Buffer + FOR EACH Buffer in ::Buffer i := Buffer:__EnumIndex() - Buffer := ( ::Alias )->( FIELDGET( i ) ) + Buffer := ( ::Alias )->( FieldGet( i ) ) - adata[ 1, 1 ] := ( ::Alias )->( FIELDNAME( i ) ) - adata[ 1, 2 ] := ( ::Alias )->( FIELDGET( i ) ) - __ObjSetValueList( Self, aData ) + adata[ 1, 1 ] := ( ::Alias )->( FieldName( i ) ) + adata[ 1, 2 ] := ( ::Alias )->( FieldGet( i ) ) + __objSetValueList( Self, aData ) NEXT - IF ( lKeepBuffer == .T. ) .or. ( ::lMonitor == .T. ) - AADD( ::ReadBuffers, { ( ::Alias )->( RECNO() ), ::Buffer } ) + IF ( lKeepBuffer == .T. ) .OR. ( ::lMonitor == .T. ) + AAdd( ::ReadBuffers, { ( ::Alias )->( RecNo() ), ::Buffer } ) ENDIF - ( ::Alias )->( DBGOTO( nRec ) ) + ( ::Alias )->( dbGoto( nRec ) ) SELECT( nSel ) -RETURN - + RETURN METHOD Write( lKeepBuffer ) CLASS HBTable LOCAL i - LOCAL aOldBuffer := ARRAY( ( ::Alias )->( FCOUNT() ) ) - LOCAL nSel := SELECT( ::Alias ) - LOCAL nOrd := ( ::Alias )->( ORDSETFOCUS() ) - LOCAL aData := __objGetValueList( Self ) + LOCAL aOldBuffer := Array( ( ::Alias )->( FCount() ) ) + LOCAL nSel := Select( ::Alias ) + LOCAL nOrd := ( ::Alias )->( ordSetFocus() ) + LOCAL aData := __objGetValueLIST( Self ) LOCAL xBuffer LOCAL n DEFAULT lKeepBuffer TO .F. - IF ( lKeepBuffer == .T. ) .or. ( ::lMonitor == .T. ) + IF ( lKeepBuffer == .T. ) .OR. ( ::lMonitor == .T. ) // --> save old record in temp buffer FOR EACH xBuffer IN aOldBuffer - xBuffer := ( ::Alias )->( FIELDGET( xBuffer:__EnumIndex() ) ) + xBuffer := ( ::Alias )->( FieldGet( xBuffer:__EnumIndex() ) ) NEXT - AADD( ::WriteBuffers, { ( ::Alias )->( RECNO() ), aOldBuffer } ) + AAdd( ::WriteBuffers, { ( ::Alias )->( RecNo() ), aOldBuffer } ) ENDIF @@ -1031,28 +1028,28 @@ METHOD Write( lKeepBuffer ) CLASS HBTable ENDIF ENDIF - ( ::Alias )->( ORDSETFOCUS( 0 ) ) + ( ::Alias )->( ordSetFocus( 0 ) ) - FOR i := 1 TO ( ::Alias )->( FCOUNT() ) - n := ASCAN( adata, {| a | a[ 1 ] == ( ::Alias )->( FIELDNAME( i ) ) } ) - ( ::Alias )->( FIELDPUT( i, adata[ n, 2 ] ) ) + FOR i := 1 TO ( ::Alias )->( FCount() ) + n := AScan( adata, {| a | a[ 1 ] == ( ::Alias )->( FieldName( i ) ) } ) + ( ::Alias )->( FieldPut( i, adata[ n, 2 ] ) ) NEXT - ( ::Alias )->( DBSKIP( 0 ) ) // same as commit + ( ::Alias )->( dbSkip( 0 ) ) // same as commit IF ::isNet - ( ::Alias )->( DBRUNLOCK() ) + ( ::Alias )->( dbRUnlock() ) ENDIF - ( ::Alias )->( ORDSETFOCUS( nOrd ) ) + ( ::Alias )->( ordSetFocus( nOrd ) ) SELECT( nSel ) -RETURN .T. - + RETURN .T. METHOD BUFWrite( aBuffer ) CLASS HBTable - LOCAL nSel := SELECT( ::Alias ) - LOCAL nOrd := ( ::Alias )->( ORDSETFOCUS() ) + LOCAL nSel := Select( ::Alias ) + LOCAL nOrd := ( ::Alias )->( ordSetFocus() ) LOCAL Buffer + DEFAULT aBuffer TO ::Buffer IF ::isNet @@ -1061,56 +1058,57 @@ METHOD BUFWrite( aBuffer ) CLASS HBTable ENDIF ENDIF - ( ::Alias )->( ORDSETFOCUS( 0 ) ) + ( ::Alias )->( ordSetFocus( 0 ) ) - FOR each Buffer in aBuffer - ( ::Alias )->( FIELDPUT( Buffer:__EnumIndex(), Buffer ) ) + FOR EACH Buffer in aBuffer + ( ::Alias )->( FieldPut( Buffer:__EnumIndex(), Buffer ) ) NEXT - ( ::Alias )->( DBSKIP( 0 ) ) + ( ::Alias )->( dbSkip( 0 ) ) IF ::isNet - ( ::Alias )->( DBRUNLOCK() ) + ( ::Alias )->( dbRUnlock() ) ENDIF - ( ::Alias )->( ORDSETFOCUS( nOrd ) ) + ( ::Alias )->( ordSetFocus( nOrd ) ) SELECT( nSel ) -RETURN .T. - + RETURN .T. METHOD __oTDelete( lKeepBuffer ) // ::Delete() LOCAL lRet - LOCAL lDeleted := SET( _SET_DELETED, .F. ) // make deleted records visible - // temporarily... + LOCAL lDeleted := Set( _SET_DELETED, .F. ) // make deleted records visible + +// temporarily... DEFAULT lKeepBuffer TO .F. ::Read() IF ::isNet - lRet := iif( ( ::Alias )->( NetDelete() ), .T., .F. ) + lRet := iif( ( ::Alias )->( NetDelete() ), .T. , .F. ) ELSE - ( ::alias )->( DBDELETE() ) ; lRet := .T. + ( ::alias )->( dbDelete() ) ; lRet := .T. ENDIF - IF ( ( lKeepBuffer == .T. ) .or. ( ::lMonitor == .T. ) ) .and. ; - ( lRet == .T. ) - AADD( ::DeleteBuffers, { ( ::Alias )->( RECNO() ), ::Buffer } ) + IF ( ( lKeepBuffer == .T. ) .OR. ( ::lMonitor == .T. ) ) .AND. ; + ( lRet == .T. ) + AAdd( ::DeleteBuffers, { ( ::Alias )->( RecNo() ), ::Buffer } ) ENDIF IF ::isNet - ( ::Alias )->( DBUNLOCK() ) + ( ::Alias )->( dbUnlock() ) ENDIF SET( _SET_DELETED, lDeleted ) -RETURN lRet - + RETURN lRet METHOD SetMonitor( l ) CLASS HBTable LOCAL lTemp := ::lMonitor + ::lMonitor := !( l ) -RETURN lTemp + + RETURN lTemp // // Transaction control subsystem... @@ -1118,11 +1116,10 @@ RETURN lTemp METHOD Undo( nBuffer, nLevel ) CLASS HBTable - LOCAL nLen LOCAL lRet := .F. - LOCAL lDelState := SET( _SET_DELETED ) - LOCAL nRec :=::RECNO() + LOCAL lDelState := Set( _SET_DELETED ) + LOCAL nRec := ::RecNo() LOCAL aBuffers DEFAULT nBuffer TO _WRITE_BUFFER @@ -1135,18 +1132,18 @@ METHOD Undo( nBuffer, nLevel ) CLASS HBTable CASE _DELETE_BUFFER - IF !EMPTY( ::DeleteBuffers ) + IF !Empty( ::DeleteBuffers ) SET( _SET_DELETED, .F. ) // make deleted records visible temporarily... - nLen := LEN( ::deleteBuffers ) + nLen := Len( ::deleteBuffers ) DEFAULT nLevel TO nLen IF nLevel == 0 .OR. nLevel == nLen // DO ALL... FOR EACH aBuffers IN ::deleteBuffers - ( ::Alias )->( DBGOTO( aBuffers[ 1 ] ) ) + ( ::Alias )->( dbGoto( aBuffers[ 1 ] ) ) IF ( ::Alias )->( NetRecall() ) lRet := .T. @@ -1165,7 +1162,7 @@ METHOD Undo( nBuffer, nLevel ) CLASS HBTable FOR EACH aBuffers IN ::deleteBuffers IF aBuffers:__EnumIndex() > ( nLen - nLevel ) - ( ::Alias )->( DBGOTO( aBuffers[ 1 ] ) ) + ( ::Alias )->( dbGoto( aBuffers[ 1 ] ) ) IF ( ::Alias )->( NetRecall() ) lRet := .T. @@ -1176,7 +1173,7 @@ METHOD Undo( nBuffer, nLevel ) CLASS HBTable NEXT IF lRet - ASIZE( ::deleteBuffers, ( nLen - nLevel ) ) + ASize( ::deleteBuffers, ( nLen - nLevel ) ) ENDIF ENDIF @@ -1187,21 +1184,21 @@ METHOD Undo( nBuffer, nLevel ) CLASS HBTable EXIT CASE _WRITE_BUFFER - IF !EMPTY( ::WriteBuffers ) + IF !Empty( ::WriteBuffers ) - nLen := LEN( ::WriteBuffers ) + nLen := Len( ::WriteBuffers ) DEFAULT nLevel TO nLen IF nLevel == 0 .OR. nLen == nLevel // Do All... FOR EACH aBuffers IN ::writeBuffers - ( ::Alias )->( DBGOTO( aBuffers[ 1 ] ) ) + ( ::Alias )->( dbGoto( aBuffers[ 1 ] ) ) IF ::BufWrite( aBuffers[ 2 ] ) lRet := .T. ELSE - ALERT( "Rollback Failed..." ) + Alert( "Rollback Failed..." ) lRet := .F. ENDIF NEXT @@ -1216,20 +1213,20 @@ METHOD Undo( nBuffer, nLevel ) CLASS HBTable FOR EACH aBuffers IN ::writeBuffers IF aBuffers:__EnumIndex() > ( nLen - nLevel ) - ( ::Alias )->( DBGOTO( aBuffers[ 1 ] ) ) + ( ::Alias )->( dbGoto( aBuffers[ 1 ] ) ) IF ::BufWrite( aBuffers[ 2 ] ) lRet := .T. ELSE - ALERT( "Rollback Failed..." ) + Alert( "Rollback Failed..." ) lRet := .F. ENDIF ENDIF NEXT // erase entries - IF lRet == .t. - ASIZE( ::WriteBuffers, ( nLen - nLevel ) ) + IF lRet + ASize( ::WriteBuffers, ( nLen - nLevel ) ) ENDIF ENDIF @@ -1241,53 +1238,52 @@ METHOD Undo( nBuffer, nLevel ) CLASS HBTable ENDSWITCH - ( ::Alias )->( DBUNLOCK() ) - ( ::Alias )->( DBGOTO( nRec ) ) + ( ::Alias )->( dbUnlock() ) + ( ::Alias )->( dbGoto( nRec ) ) ::Read() -RETURN lRet - + RETURN lRet // // ORDER MANAGEMENT // METHOD AddOrder( cTag, cKey, cLabel, ; - cFor, cWhile, ; - lUnique, ; - bEval, nInterval, cOrderFile ) CLASS HBTable + cFor, cWhile, ; + lUnique, ; + bEval, nInterval, cOrderFile ) CLASS HBTable + LOCAL oOrd + DEFAULT cOrderFile TO ::cOrderBag oOrd := HBOrder():New( cTag, cKey, cLabel, ; - cFor, cWhile, ; - lUnique, ; - bEval, nInterval ) + cFor, cWhile, ; + lUnique, ; + bEval, nInterval ) oOrd:oTable := Self oOrd:cOrderBag := ::cOrderBag - AADD( ::aOrders, oOrd ) + AAdd( ::aOrders, oOrd ) -RETURN oOrd + RETURN oOrd +METHOD REINDEX() CLASS HBTable -METHOD Reindex() CLASS HBTable + LOCAL nSel := Select( ::Alias ) + LOCAL nOrd := ( ::Alias )->( ordSetFocus( 0 ) ) + IF Len( ::aOrders ) > 0 - LOCAL nSel := SELECT( ::Alias ) - LOCAL nOrd := ( ::Alias )->( ORDSETFOCUS( 0 ) ) - - IF LEN( ::aOrders ) > 0 - - IF ::USED() + IF ::Used() ::Kill() ENDIF ::Isnet := .F. IF hb_FileExists( ::cPath + ::cOrderFile ) - IF FERASE( ::cPath + ::cOrderFile ) != 0 + IF FErase( ::cPath + ::cOrderFile ) != 0 // --> ALERT(".CDX *NOT* Deleted !!!" ) ENDIF ENDIF @@ -1296,7 +1292,7 @@ METHOD Reindex() CLASS HBTable RETURN .F. ENDIF - AEVAL( ::aOrders, {| o | o:Create() } ) + AEval( ::aOrders, {| o | o:Create() } ) ::Kill() ::IsNet := .T. @@ -1307,28 +1303,26 @@ METHOD Reindex() CLASS HBTable ENDIF - ( ::Alias )->( DBSETINDEX( ::cOrderBag ) ) - ( ::Alias )->( ORDSETFOCUS( nOrd ) ) - ( ::Alias )->( DBGOTOP() ) - ( ::Alias )->( DBUNLOCK() ) + ( ::Alias )->( dbSetIndex( ::cOrderBag ) ) + ( ::Alias )->( ordSetFocus( nOrd ) ) + ( ::Alias )->( dbGoTop() ) + ( ::Alias )->( dbUnlock() ) SELECT( nSel ) -RETURN .T. - + RETURN .T. METHOD FastReindex() CLASS HBTable + LOCAL nSel := Select( ::Alias ) + LOCAL nOrd := ( ::Alias )->( ordSetFocus( 0 ) ) - LOCAL nSel := SELECT( ::Alias ) - LOCAL nOrd := ( ::Alias )->( ORDSETFOCUS( 0 ) ) - - IF LEN( ::aOrders ) > 0 + IF Len( ::aOrders ) > 0 ::Kill() ::Isnet := .F. IF hb_FileExists( ::cPath + ::cOrderFile ) - IF FERASE( ::cPath + ::cOrderFile ) != 0 + IF FErase( ::cPath + ::cOrderFile ) != 0 // --> ALERT(".CDX *NOT* Deleted !!!" ) ENDIF ENDIF @@ -1337,7 +1331,7 @@ METHOD FastReindex() CLASS HBTable RETURN .F. ENDIF - ( ::Alias )->( ORDLISTREBUILD() ) + ( ::Alias )->( ordListRebuild() ) ::Kill() ::IsNet := .T. @@ -1348,23 +1342,22 @@ METHOD FastReindex() CLASS HBTable ENDIF - ( ::Alias )->( DBSETINDEX( ::cOrderBag ) ) - ( ::Alias )->( ORDSETFOCUS( nOrd ) ) - ( ::Alias )->( DBGOTOP() ) - ( ::Alias )->( DBUNLOCK() ) + ( ::Alias )->( dbSetIndex( ::cOrderBag ) ) + ( ::Alias )->( ordSetFocus( nOrd ) ) + ( ::Alias )->( dbGoTop() ) + ( ::Alias )->( dbUnlock() ) SELECT( nSel ) -RETURN .T. - + RETURN .T. METHOD GetOrder( xOrder ) CLASS HBTable LOCAL nPos - LOCAL xType := VALTYPE( xOrder ) + LOCAL xType := ValType( xOrder ) IF xType == "C" - nPos := ASCAN( ::aOrders, {| e | e:Tag == xOrder } ) - ELSEIF xType == "N" .and. xOrder > 0 + nPos := AScan( ::aOrders, {| e | e:Tag == xOrder } ) + ELSEIF xType == "N" .AND. xOrder > 0 nPos := xOrder ELSE nPos := 0 @@ -1374,20 +1367,19 @@ METHOD GetOrder( xOrder ) CLASS HBTable nPos := 1 ENDIF -RETURN ::aOrders[ nPos ] // returns oOrder - + RETURN ::aOrders[ nPos ] // returns oOrder METHOD SetOrder( xTag ) CLASS HBTable - LOCAL nOldOrd := ( ::Alias )->( ORDSETFOCUS() ) + LOCAL nOldOrd := ( ::Alias )->( ordSetFocus() ) - SWITCH VALTYPE( xTag ) + SWITCH ValType( xTag ) CASE "C" // we have an Order-TAG - ( ::Alias )->( ORDSETFOCUS( xTag ) ) + ( ::Alias )->( ordSetFocus( xTag ) ) EXIT CASE "N" // we have an Order-Number IF xTag <= 0 - ( ::Alias )->( ORDSETFOCUS( 0 ) ) + ( ::Alias )->( ordSetFocus( 0 ) ) ELSE ::Getorder( xTag ):SetFocus() ENDIF @@ -1396,18 +1388,20 @@ METHOD SetOrder( xTag ) CLASS HBTable xTag:SetFocus() EXIT OTHERWISE - ( ::Alias )->( ORDSETFOCUS( 0 ) ) + ( ::Alias )->( ordSetFocus( 0 ) ) ENDSWITCH -RETURN nOldOrd + RETURN nOldOrd METHOD GetOrderLabels() CLASS HBTable LOCAL aRet := {} - IF !EMPTY( ::aOrders ) - AEVAL( ::aOrders, {| e | AADD( aRet, e:Label ) } ) + + IF !Empty( ::aOrders ) + AEval( ::aOrders, {| e | AAdd( aRet, e:Label ) } ) ENDIF -RETURN aRet + + RETURN aRet // // Relation Methods @@ -1415,10 +1409,11 @@ RETURN aRet PROCEDURE AddChild( oChild, cKey ) CLASS HBTable // ::addChild() - AADD( ::aChildren, { oChild, cKey } ) + AAdd( ::aChildren, { oChild, cKey } ) oChild:oParent := Self - ( ::Alias )->( ORDSETRELATION( oChild:Alias, hb_macroBlock( cKey ), cKey ) ) -RETURN + ( ::Alias )->( ordSetRelation( oChild:Alias, hb_macroBlock( cKey ), cKey ) ) + + RETURN /**** * FixExt( cFileName ) @@ -1427,33 +1422,33 @@ RETURN STATIC FUNCTION FixExt( cFileName ) - LOCAL nLeft := AT( ".", cFilename ) -RETURN LEFT( cFileName, iif( nLeft == 0, ; - LEN( cFilename ), ; - nLeft - 1 ) ) + LOCAL nLeft := At( ".", cFilename ) + RETURN Left( cFileName, iif( nLeft == 0, ; + Len( cFilename ), ; + nLeft - 1 ) ) METHOD CreateTable( cFile ) CLASS HBTable ::cDbf := cFile - IF LEN( ::aStruc ) > 0 + IF Len( ::aStruc ) > 0 ::aStruc := {} ::aOrders := {} ENDIF -RETURN Self + RETURN Self METHOD PROCEDURE AddField( f, t, l, d ) CLASS HBTable - AADD( ::aStruc, { f, t, l, d } ) -RETURN + AAdd( ::aStruc, { f, t, l, d } ) + RETURN METHOD PROCEDURE Gentable() CLASS HBTable - DBCREATE( ::cDbf, ::aStruc, ::Driver ) -RETURN + dbCreate( ::cDbf, ::aStruc, ::Driver ) + RETURN METHOD OnError( uParam ) CLASS HBTable @@ -1461,14 +1456,14 @@ METHOD OnError( uParam ) CLASS HBTable LOCAL nPos LOCAL uRet, oErr - if uParam != nil .and. LEFT( cMsg, 1 ) == '_' + IF uParam != nil .AND. Left( cMsg, 1 ) == '_' cMsg := SubStr( cMsg, 2 ) - endif - nPos := (::Alias)->( FieldPos(cMsg) ) + ENDIF + nPos := ( ::Alias )->( FieldPos( cMsg ) ) - if nPos != 0 - uRet := (::Alias)->( iif( uParam == nil, FieldGet(nPos), FieldPut(nPos, uParam)) ) - else + IF nPos != 0 + uRet := ( ::Alias )->( iif( uParam == nil, FieldGet(nPos ), FieldPut(nPos, uParam ) ) ) + ELSE oErr := ErrorNew() oErr:Args := { Self, cMsg, uParam } @@ -1479,15 +1474,14 @@ METHOD OnError( uParam ) CLASS HBTable oErr:GenCode := EG_NOVARMETHOD oErr:Operation := "HBTable:" + cMsg oErr:Severity := ES_ERROR - oErr:SubCode := -1 + oErr:SubCode := - 1 oErr:SubSystem := "HBTable" uRet := Eval( ErrorBlock(), oErr ) - endif + ENDIF RETURN uRet - CLASS HBOrder DATA oTable @@ -1496,24 +1490,24 @@ CLASS HBOrder DATA cKey, bKey DATA cFor, bFor DATA cWhile, bWhile - DATA Unique INIT .F. + DATA UNIQUE INIT .F. DATA bEval DATA nInterval - METHOD ALIAS() INLINE ::oTable:Alias + METHOD Alias() INLINE ::oTable:Alias METHOD New( cTag, cKey, cLabel, cFor, cWhile, lUnique, bEval, nInterval, cOrderBag ) - METHOD Create() + METHOD CREATE() - METHOD SetFocus() INLINE ( ::alias )->( ORDSETFOCUS( ::Tag, ::cOrderBag ) ) - METHOD Destroy() INLINE ( ::alias )->( ORDDESTROY( ::Tag, ::cOrderBag ) ) - METHOD ORDDESTROY() INLINE ( ::alias )->( ORDDESTROY( ::Tag, ::cOrderBag ) ) - METHOD ORDBAGEXT() INLINE ( ::alias )->( ORDBAGEXT() ) - METHOD ORDKEYCOUNT() INLINE ( ::alias )->( ORDKEYCOUNT( ::Tag, ::cOrderBag ) ) - METHOD ORDFOR() INLINE ( ::alias )->( ORDFOR( ::Tag, ::cOrderBag ) ) - METHOD ORDISUNIQUE() INLINE ( ::alias )->( ORDISUNIQUE( ::Tag, ::cOrderBag ) ) - METHOD ORDKEY() INLINE ( ::alias )->( ORDKEY( ::Tag, ::cOrderBag ) ) - METHOD ORDKEYNO() INLINE ( ::alias )->( ORDKEYNO( ::Tag, ::cOrderBag ) ) - METHOD ORDKEYVAL() INLINE ( ::alias )->( ORDKEYVAL( ::Tag, ::cOrderBag ) ) + METHOD SetFocus() INLINE ( ::alias )->( ordSetFocus( ::Tag, ::cOrderBag ) ) + METHOD Destroy() INLINE ( ::alias )->( ordDestroy( ::Tag, ::cOrderBag ) ) + METHOD ordDestroy() INLINE ( ::alias )->( ordDestroy( ::Tag, ::cOrderBag ) ) + METHOD ordBagExt() INLINE ( ::alias )->( ordBagExt() ) + METHOD ordKeyCount() INLINE ( ::alias )->( ordKeyCount( ::Tag, ::cOrderBag ) ) + METHOD ordFor() INLINE ( ::alias )->( ordFor( ::Tag, ::cOrderBag ) ) + METHOD ordIsUnique() INLINE ( ::alias )->( ordIsUnique( ::Tag, ::cOrderBag ) ) + METHOD ordKey() INLINE ( ::alias )->( ordKey( ::Tag, ::cOrderBag ) ) + METHOD ordKeyNo() INLINE ( ::alias )->( ordKeyNo( ::Tag, ::cOrderBag ) ) + METHOD ordKeyVal() INLINE ( ::alias )->( ordKeyVal( ::Tag, ::cOrderBag ) ) ENDCLASS @@ -1537,18 +1531,21 @@ METHOD New( cTag, cKey, cLabel, cFor, cWhile, lUnique, bEval, nInterval, cOrderB ::bEval := bEval ::nInterval := nInterval ::Label := cLabel -RETURN Self + RETURN Self -METHOD PROCEDURE Create() CLASS HBOrder +METHOD PROCEDURE CREATE() CLASS HBOrder DEFAULT ::cOrderBag TO ::oTable:cOrderBag - //? "<<<",::alias, ::cOrderBag - ( ::alias )->( ORDCONDSET( ::cFor, ::bFor, ; - .T., ; - ::bWhile, ; - ::bEval, ::nInterval ) ) - ( ::alias )->( ORDCREATE( ::cOrderBag, ::Tag, ::cKey, ; - ::bKey, ::Unique ) ) -RETURN +// ? "<<<", ::alias, ::cOrderBag + + ( ::alias )->( ordCondSet( ::cFor, ::bFor, ; + .T. , ; + ::bWhile, ; + ::bEval, ::nInterval ) ) + + ( ::alias )->( ordCreate( ::cOrderBag, ::Tag, ::cKey, ; + ::bKey, ::Unique ) ) + + RETURN diff --git a/harbour/contrib/xhb/txml.prg b/harbour/contrib/xhb/txml.prg index 41949f1a8c..0b45576eec 100644 --- a/harbour/contrib/xhb/txml.prg +++ b/harbour/contrib/xhb/txml.prg @@ -303,17 +303,17 @@ RETURN Self METHOD MatchCriteria( oFound ) CLASS TXmlIteratorRegex IF ::cName != NIL .and. ; - ( oFound:cName == NIL .or. ! HB_REGEXLIKE( ::cName, oFound:cName, .t. ) ) + ( oFound:cName == NIL .or. ! HB_REGEXLIKE( ::cName, oFound:cName, .T. ) ) RETURN .F. ENDIF IF ::cAttribute != NIL .and. ; - hb_hScan( oFound:aAttributes, {| cKey | HB_REGEXLIKE( ::cAttribute, cKey, .t. ) } ) == 0 + hb_hScan( oFound:aAttributes, {| cKey | HB_REGEXLIKE( ::cAttribute, cKey, .T. ) } ) == 0 RETURN .F. ENDIF IF ::cValue != NIL .and. ; - hb_hScan( oFound:aAttributes, {| xKey, cValue | HB_SYMBOL_UNUSED( xKey ), HB_REGEXLIKE( ::cValue, cValue, .t. ) } ) == 0 + hb_hScan( oFound:aAttributes, {| xKey, cValue | HB_SYMBOL_UNUSED( xKey ), HB_REGEXLIKE( ::cValue, cValue, .T. ) } ) == 0 RETURN .F. ENDIF diff --git a/harbour/contrib/xhb/xhbcls.ch b/harbour/contrib/xhb/xhbcls.ch index dd6db0c06f..662a703857 100644 --- a/harbour/contrib/xhb/xhbcls.ch +++ b/harbour/contrib/xhb/xhbcls.ch @@ -64,10 +64,10 @@ #include "hboo.ch" - #xtranslate __xhb_cls_scope( , .t. ) => + HB_OO_CLSTP_PERSIST - #xtranslate __xhb_cls_scope( , .f. ) => - #xtranslate __xhb_cls_scope( , .t. ) => HB_OO_CLSTP_PERSIST - #xtranslate __xhb_cls_scope( , .f. ) => + #xtranslate __xhb_cls_scope( , .T. ) => + HB_OO_CLSTP_PERSIST + #xtranslate __xhb_cls_scope( , .F. ) => + #xtranslate __xhb_cls_scope( , .T. ) => HB_OO_CLSTP_PERSIST + #xtranslate __xhb_cls_scope( , .F. ) => #xcommand OVERRIDE METHOD [IN] CLASS ; WITH [METHOD] [SCOPE ] => ; diff --git a/harbour/contrib/xhb/xhberr.prg b/harbour/contrib/xhb/xhberr.prg index a9585637c2..e146c51b65 100644 --- a/harbour/contrib/xhb/xhberr.prg +++ b/harbour/contrib/xhb/xhberr.prg @@ -66,8 +66,6 @@ * LogError() */ -/* #pragma LINENUMBER=ON */ - #include "common.ch" #include "error.ch" #include "fileio.ch" @@ -79,6 +77,7 @@ STATIC s_cErrorLog := "error.log" STATIC s_lErrorLogAppend := .F. FUNCTION xhb_ErrorLog( cErrorLog, lErrorLogAppend ) + LOCAL aValueOld := { s_cErrorLog, s_lErrorLogAppend } IF HB_ISSTRING( cErrorLog ) @@ -91,22 +90,28 @@ FUNCTION xhb_ErrorLog( cErrorLog, lErrorLogAppend ) RETURN aValueOld PROCEDURE xhb_ErrorSys() + ErrorBlock( {| oError | xhb_DefError( oError ) } ) + RETURN STATIC FUNCTION err_ModuleName( oError, n ) + RETURN iif( __objHasMsg( oError, "MODULENAME" ), oError:ModuleName, ; - iif( n != NIL, ProcFile( n ), NIL ) ) + iif( n != NIL, ProcFile( n ), NIL ) ) STATIC FUNCTION err_ProcName( oError, n ) + RETURN iif( __objHasMsg( oError, "PROCNAME" ), oError:ProcName, ; - iif( n != NIL, ProcName( n ), NIL ) ) + iif( n != NIL, ProcName( n ), NIL ) ) STATIC FUNCTION err_ProcLine( oError, n ) + RETURN iif( __objHasMsg( oError, "PROCLINE" ), oError:ProcLine, ; - iif( n != NIL, ProcLine( n ), NIL ) ) + iif( n != NIL, ProcLine( n ), NIL ) ) STATIC FUNCTION xhb_DefError( oError ) + LOCAL cMessage LOCAL cDOSError @@ -133,22 +138,22 @@ STATIC FUNCTION xhb_DefError( oError ) // By default, retry on RDD lock error failure */ IF oError:genCode == EG_LOCK .AND. ; - oError:canRetry + oError:canRetry // oError:tries++ RETURN .T. ENDIF // Set NetErr() of there was a database open error IF oError:genCode == EG_OPEN .AND. ; - oError:osCode == 32 .AND. ; - oError:canDefault + oError:osCode == 32 .AND. ; + oError:canDefault NetErr( .T. ) RETURN .F. ENDIF // Set NetErr() if there was a lock error on dbAppend() IF oError:genCode == EG_APPENDLOCK .AND. ; - oError:canDefault + oError:canDefault NetErr( .T. ) RETURN .F. ENDIF @@ -159,14 +164,14 @@ STATIC FUNCTION xhb_DefError( oError ) ENDDO cMessage := ErrorMessage( oError ) - If !Empty( oError:osCode ) - cDOSError := "(DOS Error " + Ltrim( Str( oError:osCode ) ) + ")" - Endif + IF !Empty( oError:osCode ) + cDOSError := "(DOS Error " + LTrim( Str( oError:osCode ) ) + ")" + ENDIF - If HB_ISARRAY( oError:Args ) - cMessage += " Arguments: (" + Arguments( oError ) + ")" - Endif + IF HB_ISARRAY( oError:Args ) + cMessage += " Arguments: (" + Arguments( oError ) + ")" + ENDIF // Build buttons @@ -174,15 +179,15 @@ STATIC FUNCTION xhb_DefError( oError ) aOptions := {} // AAdd( aOptions, "Break" ) - Aadd( aOptions, "Quit" ) + AAdd( aOptions, "Quit" ) - If oError:canRetry - Aadd( aOptions, "Retry" ) - Endif + IF oError:canRetry + AAdd( aOptions, "Retry" ) + ENDIF - If oError:canDefault - Aadd( aOptions, "Default" ) - Endif + IF oError:canDefault + AAdd( aOptions, "Default" ) + ENDIF // Show alert box //TraceLog( cMessage ) @@ -190,13 +195,13 @@ STATIC FUNCTION xhb_DefError( oError ) nChoice := 0 DO WHILE nChoice == 0 - If Empty( oError:osCode ) + IF Empty( oError:osCode ) nChoice := Alert( cMessage, aOptions ) - Else + ELSE nChoice := Alert( cMessage + ";" + cDOSError, aOptions ) - Endif + ENDIF - Enddo + ENDDO IF ! Empty( nChoice ) DO CASE @@ -229,406 +234,407 @@ STATIC FUNCTION xhb_DefError( oError ) n := 2 WHILE ! Empty( ProcName( ++n ) ) ? "Called from :", ProcName( n ) + ; - "(" + LTrim( Str( ProcLine( n ) ) ) + ") in Module:", ProcFile( n ) + "(" + LTrim( Str( ProcLine( n ) ) ) + ") in Module:", ProcFile( n ) ENDDO -/// For some strange reason, the DOS prompt gets written on the first line -/// *of* the message instead of on the first line *after* the message after -/// the program quits, unless the screen has scrolled. - dgh + // For some strange reason, the DOS prompt gets written on the first line + // *of* the message instead of on the first line *after* the message after + // the program quits, unless the screen has scrolled. - dgh LogError( oError ) ErrorLevel( 1 ) ? QUIT -RETURN .F. + RETURN .F. // [vszakats] STATIC FUNCTION ErrorMessage( oError ) - LOCAL cMessage + LOCAL cMessage - // start error message - cMessage := iif( oError:severity > ES_WARNING, "Error", "Warning" ) + " " + // start error message + cMessage := iif( oError:severity > ES_WARNING, "Error", "Warning" ) + " " - // add subsystem name if available - If HB_ISSTRING( oError:subsystem ) - cMessage += oError:subsystem() - Else - cMessage += "???" - Endif + // add subsystem name if available + IF HB_ISSTRING( oError:subsystem ) + cMessage += oError:subsystem() + ELSE + cMessage += "???" + ENDIF - // add subsystem's error code if available - If HB_ISNUMERIC( oError:subCode ) - cMessage += "/" + Ltrim( Str( oError:subCode ) ) - Else - cMessage += "/???" - Endif + // add subsystem's error code if available + IF HB_ISNUMERIC( oError:subCode ) + cMessage += "/" + LTrim( Str( oError:subCode ) ) + ELSE + cMessage += "/???" + ENDIF - // add error description if available - If HB_ISSTRING( oError:description ) - cMessage += " " + oError:description - Endif + // add error description if available + IF HB_ISSTRING( oError:description ) + cMessage += " " + oError:description + ENDIF - // add either filename or operation - Do Case - Case !Empty( oError:filename ) - cMessage += ": " + oError:filename - Case !Empty( oError:operation ) - cMessage += ": " + oError:operation - Endcase + // add either filename or operation + DO CASE + CASE ! Empty( oError:filename ) + cMessage += ": " + oError:filename + CASE ! Empty( oError:operation ) + cMessage += ": " + oError:operation + ENDCASE -Return cMessage + RETURN cMessage STATIC FUNCTION LogError( oerr ) - LOCAL cScreen - LOCAL cLogFile := s_cErrorLog // error log file name - LOCAL lAppendLog := s_lErrorLogAppend // .F. = create a new error log (default) .t. = append to a existing one. - LOCAL nStart := 1 - LOCAL nCellSize - LOCAL nRange - LOCAL nCols - LOCAL nRows + LOCAL cScreen + LOCAL cLogFile := s_cErrorLog // error log file name + LOCAL lAppendLog := s_lErrorLogAppend // .F. = create a new error log (default) .T. = append to a existing one. + LOCAL nStart := 1 + LOCAL nCellSize + LOCAL nRange + LOCAL nCols + LOCAL nRows - LOCAL nCount + LOCAL nCount - LOCAL nForLoop - LOCAL cOutString - LOCAL cSubString + LOCAL nForLoop + LOCAL cOutString + LOCAL cSubString - LOCAL nHandle - LOCAL nBytes + LOCAL nHandle + LOCAL nBytes - LOCAL nHandle2 := -1 - LOCAL cLogFile2 := "_error.log" - LOCAL cBuff := "" - LOCAL nRead + LOCAL nHandle2 := - 1 + LOCAL cLogFile2 := "_error.log" + LOCAL cBuff := "" + LOCAL nRead + + nCols := MaxCol() + IF nCols > 0 + nRows := MaxRow() + cScreen := SaveScreen() + ENDIF + +// Alert( "An error occured, Information will be ;written to error.log" ) + + IF ! lAppendLog + nHandle := FCreate( cLogFile, FC_NORMAL ) + ELSE + IF !File( cLogFile ) + nHandle := FCreate( cLogFile, FC_NORMAL ) + ELSE + nHandle := FCreate( cLogFile2, FC_NORMAL ) + nHandle2 := FOpen( cLogFile, FO_READ ) + ENDIF + ENDIF - nCols := MaxCol() - IF nCols > 0 - nRows := MaxRow() - cScreen := Savescreen() - ENDIF - //Alert( 'An error occured, Information will be ;written to error.log' ) + IF nHandle < 3 .AND. !( Lower( cLogFile ) == "error.log" ) + // Force creating error.log in case supplied log file cannot + // be created for any reason + cLogFile := "error.log" + nHandle := FCreate( cLogFile, FC_NORMAL ) + ENDIF - If !lAppendLog - nHandle := FCreate( cLogFile, FC_NORMAL ) - Else - If !File( cLogFile ) - nHandle := FCreate( cLogFile, FC_NORMAL ) - Else - nHandle := FCreate( cLogFile2, FC_NORMAL ) - nHandle2 := FOpen( cLogFile, FO_READ ) - Endif - Endif + IF nHandle < 3 + ELSE + FWriteLine( nHandle, PadC( " xHarbour Error Log " , 79, "-" ) ) + FWriteLine( nHandle, "" ) - If nHandle < 3 .and. !( lower( cLogFile ) == "error.log" ) - // Force creating error.log in case supplied log file cannot - // be created for any reason - cLogFile := "error.log" - nHandle := FCreate( cLogFile, FC_NORMAL ) - Endif + FWriteLine( nHandle, "Date...............: " + DToC( Date() ) ) + FWriteLine( nHandle, "Time...............: " + Time() ) - If nHandle < 3 - Else + FWriteLine( nHandle, "" ) + FWriteLine( nHandle, "Application name...: " + hb_cmdargargv() ) + FWriteLine( nHandle, "Workstation name...: " + NetName() ) + FWriteLine( nHandle, "Available memory...: " + strvalue( Memory(0 ) ) ) + FWriteLine( nHandle, "Current disk.......: " + DiskName() ) + FWriteLine( nHandle, "Current directory..: " + CurDir() ) + FWriteLine( nHandle, "Free disk space....: " + strvalue( DiskSpace() ) ) + FWriteLine( nHandle, "" ) + FWriteLine( nHandle, "Operating system...: " + OS() ) + FWriteLine( nHandle, "xHarbour version...: " + Version() ) + FWriteLine( nHandle, "xHarbour built on..: " + hb_BuildDate() ) + FWriteLine( nHandle, "C/C++ compiler.....: " + hb_Compiler() ) - FWriteLine( nHandle, Padc( " xHarbour Error Log " , 79, "-" ) ) - FWriteLine( nHandle, "" ) + FWriteLine( nHandle, "Multi Threading....: " + iif( hb_mtvm(), "YES", "NO" ) ) + FWriteLine( nHandle, "VM Optimization....: " + strvalue( Hb_VmMode() ) ) - FWriteLine( nHandle, "Date...............: " + dtoc( date() ) ) - FWriteLine( nHandle, "Time...............: " + time() ) + IF hb_IsFunction( "Select" ) + FWriteLine( nHandle, "" ) + FWriteLine( nHandle, "Current Area ......:" + strvalue( &("Select()" ) ) ) + ENDIF - FWriteLine( nHandle, "" ) - FWriteLine( nHandle, "Application name...: " + hb_cmdargargv() ) - FWriteLine( nHandle, "Workstation name...: " + netname() ) - FWriteLine( nHandle, "Available memory...: " + strvalue( Memory(0) ) ) - FWriteLine( nHandle, "Current disk.......: " + diskname() ) - FWriteLine( nHandle, "Current directory..: " + curdir() ) - FWriteLine( nHandle, "Free disk space....: " + strvalue( DiskSpace() ) ) - FWriteLine( nHandle, "" ) - FWriteLine( nHandle, "Operating system...: " + os() ) - FWriteLine( nHandle, "xHarbour version...: " + version() ) - FWriteLine( nHandle, "xHarbour built on..: " + hb_builddate() ) - FWriteLine( nHandle, "C/C++ compiler.....: " + hb_compiler() ) + FWriteLine( nHandle, "" ) + FWriteLine( nHandle, PadC( " Environmental Information ", 79, "-" ) ) + FWriteLine( nHandle, "" ) - FWriteLine( nHandle, "Multi Threading....: " + iif( hb_mtvm(),"YES","NO" ) ) - FWriteLine( nHandle, "VM Optimization....: " + strvalue( Hb_VmMode() ) ) - - IF hb_IsFunction( "Select" ) - FWriteLine( nHandle, "" ) - FWriteLine( nHandle, "Current Area ......:" + strvalue( &("Select()") ) ) - ENDIF - - FWriteLine( nHandle, "" ) - FWriteLine( nHandle, Padc( " Environmental Information ", 79, "-" ) ) - FWriteLine( nHandle, "" ) - - FWriteLine( nHandle, "SET ALTERNATE......: " + strvalue( Set( _SET_ALTERNATE ), .T. ) ) - FWriteLine( nHandle, "SET ALTFILE........: " + strvalue( Set( _SET_ALTFILE ) ) ) - FWriteLine( nHandle, "SET AUTOPEN........: " + strvalue( Set( _SET_AUTOPEN ), .T. ) ) - FWriteLine( nHandle, "SET AUTORDER.......: " + strvalue( Set( _SET_AUTORDER ) ) ) - FWriteLine( nHandle, "SET AUTOSHARE......: " + strvalue( Set( _SET_AUTOSHARE ) ) ) + FWriteLine( nHandle, "SET ALTERNATE......: " + strvalue( Set( _SET_ALTERNATE ), .T. ) ) + FWriteLine( nHandle, "SET ALTFILE........: " + strvalue( Set( _SET_ALTFILE ) ) ) + FWriteLine( nHandle, "SET AUTOPEN........: " + strvalue( Set( _SET_AUTOPEN ), .T. ) ) + FWriteLine( nHandle, "SET AUTORDER.......: " + strvalue( Set( _SET_AUTORDER ) ) ) + FWriteLine( nHandle, "SET AUTOSHARE......: " + strvalue( Set( _SET_AUTOSHARE ) ) ) #ifdef __XHARBOUR__ - FWriteLine( nHandle, "SET BACKGROUNDTASKS: " + strvalue( Set( _SET_BACKGROUNDTASKS ), .T. ) ) - FWriteLine( nHandle, "SET BACKGROUNDTICK.: " + strvalue( Set( _SET_BACKGROUNDTICK ), .T. ) ) + FWriteLine( nHandle, "SET BACKGROUNDTASKS: " + strvalue( Set( _SET_BACKGROUNDTASKS ), .T. ) ) + FWriteLine( nHandle, "SET BACKGROUNDTICK.: " + strvalue( Set( _SET_BACKGROUNDTICK ), .T. ) ) #endif - FWriteLine( nHandle, "SET BELL...........: " + strvalue( Set( _SET_BELL ), .T. ) ) - FWriteLine( nHandle, "SET BLINK..........: " + strvalue( SetBlink() ) ) + FWriteLine( nHandle, "SET BELL...........: " + strvalue( Set( _SET_BELL ), .T. ) ) + FWriteLine( nHandle, "SET BLINK..........: " + strvalue( SetBlink() ) ) - FWriteLine( nHandle, "SET CANCEL.........: " + strvalue( Set( _SET_CANCEL ), .T. ) ) - FWriteLine( nHandle, "SET CENTURY........: " + strvalue( __SetCentury(), .T. ) ) - FWriteLine( nHandle, "SET COLOR..........: " + strvalue( Set( _SET_COLOR ) ) ) - FWriteLine( nHandle, "SET CONFIRM........: " + strvalue( Set( _SET_CONFIRM ), .T. ) ) - FWriteLine( nHandle, "SET CONSOLE........: " + strvalue( Set( _SET_CONSOLE ), .T. ) ) - FWriteLine( nHandle, "SET COUNT..........: " + strvalue( Set( _SET_COUNT ) ) ) - FWriteLine( nHandle, "SET CURSOR.........: " + strvalue( Set( _SET_CURSOR ) ) ) + FWriteLine( nHandle, "SET CANCEL.........: " + strvalue( Set( _SET_CANCEL ), .T. ) ) + FWriteLine( nHandle, "SET CENTURY........: " + strvalue( __SetCentury(), .T. ) ) + FWriteLine( nHandle, "SET COLOR..........: " + strvalue( Set( _SET_COLOR ) ) ) + FWriteLine( nHandle, "SET CONFIRM........: " + strvalue( Set( _SET_CONFIRM ), .T. ) ) + FWriteLine( nHandle, "SET CONSOLE........: " + strvalue( Set( _SET_CONSOLE ), .T. ) ) + FWriteLine( nHandle, "SET COUNT..........: " + strvalue( Set( _SET_COUNT ) ) ) + FWriteLine( nHandle, "SET CURSOR.........: " + strvalue( Set( _SET_CURSOR ) ) ) - FWriteLine( nHandle, "SET DATE FORMAT....: " + strvalue( Set( _SET_DATEFORMAT ) ) ) - FWriteLine( nHandle, "SET DBFLOCKSCHEME..: " + strvalue( Set( _SET_DBFLOCKSCHEME ) ) ) - FWriteLine( nHandle, "SET DEBUG..........: " + strvalue( Set( _SET_DEBUG ), .T. ) ) - FWriteLine( nHandle, "SET DECIMALS.......: " + strvalue( Set( _SET_DECIMALS ) ) ) - FWriteLine( nHandle, "SET DEFAULT........: " + strvalue( Set( _SET_DEFAULT ) ) ) - FWriteLine( nHandle, "SET DEFEXTENSIONS..: " + strvalue( Set( _SET_DEFEXTENSIONS ), .T. ) ) - FWriteLine( nHandle, "SET DELETED........: " + strvalue( Set( _SET_DELETED ), .T. ) ) - FWriteLine( nHandle, "SET DELIMCHARS.....: " + strvalue( Set( _SET_DELIMCHARS ) ) ) - FWriteLine( nHandle, "SET DELIMETERS.....: " + strvalue( Set( _SET_DELIMITERS ), .T. ) ) - FWriteLine( nHandle, "SET DEVICE.........: " + strvalue( Set( _SET_DEVICE ) ) ) - FWriteLine( nHandle, "SET DIRCASE........: " + strvalue( Set( _SET_DIRCASE ) ) ) - FWriteLine( nHandle, "SET DIRSEPARATOR...: " + strvalue( Set( _SET_DIRSEPARATOR ) ) ) + FWriteLine( nHandle, "SET DATE FORMAT....: " + strvalue( Set( _SET_DATEFORMAT ) ) ) + FWriteLine( nHandle, "SET DBFLOCKSCHEME..: " + strvalue( Set( _SET_DBFLOCKSCHEME ) ) ) + FWriteLine( nHandle, "SET DEBUG..........: " + strvalue( Set( _SET_DEBUG ), .T. ) ) + FWriteLine( nHandle, "SET DECIMALS.......: " + strvalue( Set( _SET_DECIMALS ) ) ) + FWriteLine( nHandle, "SET DEFAULT........: " + strvalue( Set( _SET_DEFAULT ) ) ) + FWriteLine( nHandle, "SET DEFEXTENSIONS..: " + strvalue( Set( _SET_DEFEXTENSIONS ), .T. ) ) + FWriteLine( nHandle, "SET DELETED........: " + strvalue( Set( _SET_DELETED ), .T. ) ) + FWriteLine( nHandle, "SET DELIMCHARS.....: " + strvalue( Set( _SET_DELIMCHARS ) ) ) + FWriteLine( nHandle, "SET DELIMETERS.....: " + strvalue( Set( _SET_DELIMITERS ), .T. ) ) + FWriteLine( nHandle, "SET DEVICE.........: " + strvalue( Set( _SET_DEVICE ) ) ) + FWriteLine( nHandle, "SET DIRCASE........: " + strvalue( Set( _SET_DIRCASE ) ) ) + FWriteLine( nHandle, "SET DIRSEPARATOR...: " + strvalue( Set( _SET_DIRSEPARATOR ) ) ) - FWriteLine( nHandle, "SET EOL............: " + strvalue( Asc( Set( _SET_EOL ) ) ) ) - FWriteLine( nHandle, "SET EPOCH..........: " + strvalue( Set( _SET_EPOCH ) ) ) - FWriteLine( nHandle, "SET ERRORLOG.......: " + strvalue( cLogFile ) + "," + strvalue( lAppendLog ) ) + FWriteLine( nHandle, "SET EOL............: " + strvalue( Asc( Set( _SET_EOL ) ) ) ) + FWriteLine( nHandle, "SET EPOCH..........: " + strvalue( Set( _SET_EPOCH ) ) ) + FWriteLine( nHandle, "SET ERRORLOG.......: " + strvalue( cLogFile ) + "," + strvalue( lAppendLog ) ) #ifdef __XHARBOUR__ - FWriteLine( nHandle, "SET ERRORLOOP......: " + strvalue( Set( _SET_ERRORLOOP ) ) ) + FWriteLine( nHandle, "SET ERRORLOOP......: " + strvalue( Set( _SET_ERRORLOOP ) ) ) #endif - FWriteLine( nHandle, "SET ESCAPE.........: " + strvalue( Set( _SET_ESCAPE ), .T. ) ) - FWriteLine( nHandle, "SET EVENTMASK......: " + strvalue( Set( _SET_EVENTMASK ) ) ) - FWriteLine( nHandle, "SET EXACT..........: " + strvalue( Set( _SET_EXACT ), .T. ) ) - FWriteLine( nHandle, "SET EXCLUSIVE......: " + strvalue( Set( _SET_EXCLUSIVE ), .T. ) ) - FWriteLine( nHandle, "SET EXIT...........: " + strvalue( Set( _SET_EXIT ), .T. ) ) - FWriteLine( nHandle, "SET EXTRA..........: " + strvalue( Set( _SET_EXTRA ), .T. ) ) - FWriteLine( nHandle, "SET EXTRAFILE......: " + strvalue( Set( _SET_EXTRAFILE ) ) ) + FWriteLine( nHandle, "SET ESCAPE.........: " + strvalue( Set( _SET_ESCAPE ), .T. ) ) + FWriteLine( nHandle, "SET EVENTMASK......: " + strvalue( Set( _SET_EVENTMASK ) ) ) + FWriteLine( nHandle, "SET EXACT..........: " + strvalue( Set( _SET_EXACT ), .T. ) ) + FWriteLine( nHandle, "SET EXCLUSIVE......: " + strvalue( Set( _SET_EXCLUSIVE ), .T. ) ) + FWriteLine( nHandle, "SET EXIT...........: " + strvalue( Set( _SET_EXIT ), .T. ) ) + FWriteLine( nHandle, "SET EXTRA..........: " + strvalue( Set( _SET_EXTRA ), .T. ) ) + FWriteLine( nHandle, "SET EXTRAFILE......: " + strvalue( Set( _SET_EXTRAFILE ) ) ) - FWriteLine( nHandle, "SET FILECASE.......: " + strvalue( Set( _SET_FILECASE ) ) ) - FWriteLine( nHandle, "SET FIXED..........: " + strvalue( Set( _SET_FIXED ), .T. ) ) - FWriteLine( nHandle, "SET FORCEOPT.......: " + strvalue( Set( _SET_FORCEOPT ), .T. ) ) + FWriteLine( nHandle, "SET FILECASE.......: " + strvalue( Set( _SET_FILECASE ) ) ) + FWriteLine( nHandle, "SET FIXED..........: " + strvalue( Set( _SET_FIXED ), .T. ) ) + FWriteLine( nHandle, "SET FORCEOPT.......: " + strvalue( Set( _SET_FORCEOPT ), .T. ) ) - FWriteLine( nHandle, "SET HARDCOMMIT.....: " + strvalue( Set( _SET_HARDCOMMIT ), .T. ) ) + FWriteLine( nHandle, "SET HARDCOMMIT.....: " + strvalue( Set( _SET_HARDCOMMIT ), .T. ) ) - FWriteLine( nHandle, "SET IDLEREPEAT.....: " + strvalue( Set( _SET_IDLEREPEAT ), .T. ) ) - FWriteLine( nHandle, "SET INSERT.........: " + strvalue( Set( _SET_INSERT ), .T. ) ) - FWriteLine( nHandle, "SET INTENSITY......: " + strvalue( Set( _SET_INTENSITY ), .T. ) ) + FWriteLine( nHandle, "SET IDLEREPEAT.....: " + strvalue( Set( _SET_IDLEREPEAT ), .T. ) ) + FWriteLine( nHandle, "SET INSERT.........: " + strvalue( Set( _SET_INSERT ), .T. ) ) + FWriteLine( nHandle, "SET INTENSITY......: " + strvalue( Set( _SET_INTENSITY ), .T. ) ) - FWriteLine( nHandle, "SET LANGUAGE.......: " + strvalue( Set( _SET_LANGUAGE ) ) ) + FWriteLine( nHandle, "SET LANGUAGE.......: " + strvalue( Set( _SET_LANGUAGE ) ) ) - FWriteLine( nHandle, "SET MARGIN.........: " + strvalue( Set( _SET_MARGIN ) ) ) - FWriteLine( nHandle, "SET MBLOCKSIZE.....: " + strvalue( Set( _SET_MBLOCKSIZE ) ) ) - FWriteLine( nHandle, "SET MCENTER........: " + strvalue( Set( _SET_MCENTER ), .T. ) ) - FWriteLine( nHandle, "SET MESSAGE........: " + strvalue( Set( _SET_MESSAGE ) ) ) - FWriteLine( nHandle, "SET MFILEEXT.......: " + strvalue( Set( _SET_MFILEEXT ) ) ) + FWriteLine( nHandle, "SET MARGIN.........: " + strvalue( Set( _SET_MARGIN ) ) ) + FWriteLine( nHandle, "SET MBLOCKSIZE.....: " + strvalue( Set( _SET_MBLOCKSIZE ) ) ) + FWriteLine( nHandle, "SET MCENTER........: " + strvalue( Set( _SET_MCENTER ), .T. ) ) + FWriteLine( nHandle, "SET MESSAGE........: " + strvalue( Set( _SET_MESSAGE ) ) ) + FWriteLine( nHandle, "SET MFILEEXT.......: " + strvalue( Set( _SET_MFILEEXT ) ) ) - FWriteLine( nHandle, "SET OPTIMIZE.......: " + strvalue( Set( _SET_OPTIMIZE ), .T. ) ) + FWriteLine( nHandle, "SET OPTIMIZE.......: " + strvalue( Set( _SET_OPTIMIZE ), .T. ) ) #ifdef __XHARBOUR__ - FWriteLine( nHandle, "SET OUTPUTSAFETY...: " + strvalue( Set( _SET_OUTPUTSAFETY ), .T. ) ) + FWriteLine( nHandle, "SET OUTPUTSAFETY...: " + strvalue( Set( _SET_OUTPUTSAFETY ), .T. ) ) #endif - FWriteLine( nHandle, "SET PATH...........: " + strvalue( Set( _SET_PATH ) ) ) - FWriteLine( nHandle, "SET PRINTER........: " + strvalue( Set( _SET_PRINTER ), .T. ) ) + FWriteLine( nHandle, "SET PATH...........: " + strvalue( Set( _SET_PATH ) ) ) + FWriteLine( nHandle, "SET PRINTER........: " + strvalue( Set( _SET_PRINTER ), .T. ) ) #ifdef __XHARBOUR__ - FWriteLine( nHandle, "SET PRINTERJOB.....: " + strvalue( Set( _SET_PRINTERJOB ) ) ) + FWriteLine( nHandle, "SET PRINTERJOB.....: " + strvalue( Set( _SET_PRINTERJOB ) ) ) #endif - FWriteLine( nHandle, "SET PRINTFILE......: " + strvalue( Set( _SET_PRINTFILE ) ) ) + FWriteLine( nHandle, "SET PRINTFILE......: " + strvalue( Set( _SET_PRINTFILE ) ) ) - FWriteLine( nHandle, "SET SCOREBOARD.....: " + strvalue( Set( _SET_SCOREBOARD ), .T. ) ) - FWriteLine( nHandle, "SET SCROLLBREAK....: " + strvalue( Set( _SET_SCROLLBREAK ), .T. ) ) - FWriteLine( nHandle, "SET SOFTSEEK.......: " + strvalue( Set( _SET_SOFTSEEK ), .T. ) ) - FWriteLine( nHandle, "SET STRICTREAD.....: " + strvalue( Set( _SET_STRICTREAD ), .T. ) ) + FWriteLine( nHandle, "SET SCOREBOARD.....: " + strvalue( Set( _SET_SCOREBOARD ), .T. ) ) + FWriteLine( nHandle, "SET SCROLLBREAK....: " + strvalue( Set( _SET_SCROLLBREAK ), .T. ) ) + FWriteLine( nHandle, "SET SOFTSEEK.......: " + strvalue( Set( _SET_SOFTSEEK ), .T. ) ) + FWriteLine( nHandle, "SET STRICTREAD.....: " + strvalue( Set( _SET_STRICTREAD ), .T. ) ) #ifdef __XHARBOUR__ - FWriteLine( nHandle, "SET TRACE..........: " + strvalue( Set( _SET_TRACE ), .T. ) ) - FWriteLine( nHandle, "SET TRACEFILE......: " + strvalue( Set( _SET_TRACEFILE ) ) ) - FWriteLine( nHandle, "SET TRACESTACK.....: " + strvalue( Set( _SET_TRACESTACK ) ) ) + FWriteLine( nHandle, "SET TRACE..........: " + strvalue( Set( _SET_TRACE ), .T. ) ) + FWriteLine( nHandle, "SET TRACEFILE......: " + strvalue( Set( _SET_TRACEFILE ) ) ) + FWriteLine( nHandle, "SET TRACESTACK.....: " + strvalue( Set( _SET_TRACESTACK ) ) ) #endif - FWriteLine( nHandle, "SET TRIMFILENAME...: " + strvalue( Set( _SET_TRIMFILENAME ) ) ) + FWriteLine( nHandle, "SET TRIMFILENAME...: " + strvalue( Set( _SET_TRIMFILENAME ) ) ) - FWriteLine( nHandle, "SET TYPEAHEAD......: " + strvalue( Set( _SET_TYPEAHEAD ) ) ) + FWriteLine( nHandle, "SET TYPEAHEAD......: " + strvalue( Set( _SET_TYPEAHEAD ) ) ) - FWriteLine( nHandle, "SET UNIQUE.........: " + strvalue( Set( _SET_UNIQUE ), .T. ) ) + FWriteLine( nHandle, "SET UNIQUE.........: " + strvalue( Set( _SET_UNIQUE ), .T. ) ) - FWriteLine( nHandle, "SET VIDEOMODE......: " + strvalue( Set( _SET_VIDEOMODE ) ) ) + FWriteLine( nHandle, "SET VIDEOMODE......: " + strvalue( Set( _SET_VIDEOMODE ) ) ) - FWriteLine( nHandle, "SET WRAP...........: " + strvalue( Set( _SET_WRAP ), .T. ) ) + FWriteLine( nHandle, "SET WRAP...........: " + strvalue( Set( _SET_WRAP ), .T. ) ) - FWriteLine( nHandle, "" ) + FWriteLine( nHandle, "" ) - IF nCols > 0 - FWriteLine( nHandle, Padc( "Detailed Work Area Items", nCols, "-" ) ) - ELSE - FWriteLine( nHandle, "Detailed Work Area Items " ) - ENDIF - FWriteLine( nHandle, "" ) + IF nCols > 0 + FWriteLine( nHandle, PadC( "Detailed Work Area Items", nCols, "-" ) ) + ELSE + FWriteLine( nHandle, "Detailed Work Area Items " ) + ENDIF + FWriteLine( nHandle, "" ) - HB_WAEval( {|| - IF hb_IsFunction( "Select" ) - FWriteLine( nHandle, "Work Area No ......: " + strvalue( &("Select()") ) ) - ENDIF - IF hb_IsFunction( "Alias" ) - FWriteLine( nHandle, "Alias .............: " + &("Alias()") ) - ENDIF - IF hb_IsFunction( "RecNo" ) - FWriteLine( nHandle, "Current Recno .....: " + strvalue( &("RecNo()") ) ) - ENDIF - IF hb_IsFunction( "DbFilter" ) - FWriteLine( nHandle, "Current Filter ....: " + &("DbFilter()") ) - ENDIF - IF hb_IsFunction( "DbRelation" ) - FWriteLine( nHandle, "Relation Exp. .....: " + &("DbRelation()") ) - ENDIF - IF hb_IsFunction( "IndexOrd" ) - FWriteLine( nHandle, "Index Order .......: " + strvalue( &("IndexOrd(0)") ) ) - ENDIF - IF hb_IsFunction( "IndexKey" ) - FWriteLine( nHandle, "Active Key ........: " + strvalue( &("IndexKey(0)") ) ) - ENDIF - FWriteLine( nHandle, "" ) - Return .T. - } ) - FWriteLine( nHandle, "" ) - IF nCols > 0 - FWriteLine( nHandle, Padc( " Internal Error Handling Information ", nCols, "-" ) ) - ELSE - FWriteLine( nHandle, " Internal Error Handling Information " ) - ENDIF - FWriteLine( nHandle, "" ) - FWriteLine( nHandle, "Subsystem Call ....: " + oErr:subsystem() ) - FWriteLine( nHandle, "System Code .......: " + strvalue( oErr:suBcode() ) ) - FWriteLine( nHandle, "Default Status ....: " + strvalue( oerr:candefault() ) ) - FWriteLine( nHandle, "Description .......: " + oErr:description() ) - FWriteLine( nHandle, "Operation .........: " + oErr:operation() ) - FWriteLine( nHandle, "Arguments .........: " + Arguments( oErr ) ) - FWriteLine( nHandle, "Involved File .....: " + oErr:filename() ) - FWriteLine( nHandle, "Dos Error Code ....: " + strvalue( oErr:oscode() ) ) + hb_WAeval( {|| + IF hb_IsFunction( "Select" ) + FWriteLine( nHandle, "Work Area No ......: " + strvalue( &("Select()" ) ) ) + ENDIF + IF hb_IsFunction( "Alias" ) + FWriteLine( nHandle, "Alias .............: " + &( "Alias()" ) ) + ENDIF + IF hb_IsFunction( "RecNo" ) + FWriteLine( nHandle, "Current Recno .....: " + strvalue( &("RecNo()" ) ) ) + ENDIF + IF hb_IsFunction( "DbFilter" ) + FWriteLine( nHandle, "Current Filter ....: " + &( "DbFilter()" ) ) + ENDIF + IF hb_IsFunction( "DbRelation" ) + FWriteLine( nHandle, "Relation Exp. .....: " + &( "DbRelation()" ) ) + ENDIF + IF hb_IsFunction( "IndexOrd" ) + FWriteLine( nHandle, "Index Order .......: " + strvalue( &("IndexOrd(0)" ) ) ) + ENDIF + IF hb_IsFunction( "IndexKey" ) + FWriteLine( nHandle, "Active Key ........: " + strvalue( &("IndexKey(0)" ) ) ) + ENDIF + FWriteLine( nHandle, "" ) + RETURN .T. + } ) + + FWriteLine( nHandle, "" ) + IF nCols > 0 + FWriteLine( nHandle, PadC( " Internal Error Handling Information ", nCols, "-" ) ) + ELSE + FWriteLine( nHandle, " Internal Error Handling Information " ) + ENDIF + FWriteLine( nHandle, "" ) + FWriteLine( nHandle, "Subsystem Call ....: " + oErr:subsystem() ) + FWriteLine( nHandle, "System Code .......: " + strvalue( oErr:suBcode() ) ) + FWriteLine( nHandle, "Default Status ....: " + strvalue( oerr:candefault() ) ) + FWriteLine( nHandle, "Description .......: " + oErr:description() ) + FWriteLine( nHandle, "Operation .........: " + oErr:operation() ) + FWriteLine( nHandle, "Arguments .........: " + Arguments( oErr ) ) + FWriteLine( nHandle, "Involved File .....: " + oErr:filename() ) + FWriteLine( nHandle, "Dos Error Code ....: " + strvalue( oErr:oscode() ) ) #ifdef __XHARBOUR__ - #ifdef HB_THREAD_SUPPORT - FWriteLine( nHandle, "Running threads ...: " + strvalue( oErr:RunningThreads() ) ) - FWriteLine( nHandle, "VM thread ID ......: " + strvalue( oErr:VmThreadId() ) ) - FWriteLine( nHandle, "OS thread ID ......: " + strvalue( oErr:OsThreadId() ) ) - #endif +#ifdef HB_THREAD_SUPPORT + FWriteLine( nHandle, "Running threads ...: " + strvalue( oErr:RunningThreads() ) ) + FWriteLine( nHandle, "VM thread ID ......: " + strvalue( oErr:VmThreadId() ) ) + FWriteLine( nHandle, "OS thread ID ......: " + strvalue( oErr:OsThreadId() ) ) +#endif #endif - FWriteLine( nHandle, "" ) - FWriteLine( nHandle, " Trace Through:" ) - FWriteLine( nHandle, "----------------" ) + FWriteLine( nHandle, "" ) + FWriteLine( nHandle, " Trace Through:" ) + FWriteLine( nHandle, "----------------" ) - FWriteLine( nHandle, Padr( ProcName(), 21 ) + " : " + Transform( ProcLine(), "999,999" ) + " in Module: " + ProcFile() ) + FWriteLine( nHandle, PadR( ProcName(), 21 ) + " : " + Transform( ProcLine(), "999,999" ) + " in Module: " + ProcFile() ) - nCount := 3 - While !Empty( Procname( ++ nCount ) ) - FWriteLine( nHandle, Padr( Procname( nCount ), 21 ) + " : " + Transform( Procline( nCount ), "999,999" ) + " in Module: " + ProcFile( nCount ) ) - Enddo + nCount := 3 + WHILE !Empty( ProcName( ++ nCount ) ) + FWriteLine( nHandle, PadR( ProcName( nCount ), 21 ) + " : " + Transform( ProcLine( nCount ), "999,999" ) + " in Module: " + ProcFile( nCount ) ) + ENDDO - FWriteLine( nHandle, "" ) - FWriteLine( nHandle, "" ) + FWriteLine( nHandle, "" ) + FWriteLine( nHandle, "" ) - IF HB_ISSTRING( cScreen ) - FWriteLine( nHandle, Padc( " Video Screen Dump ", nCols, "#" ) ) - FWriteLine( nHandle, "" ) - //FWriteLine( nHandle, "" ) - FWriteLine( nHandle, "+" + Replicate( "-", nCols + 1 ) + "+" ) - //FWriteLine( nHandle, "" ) - nCellSize := len( Savescreen( 0, 0, 0, 0 ) ) - nRange := ( nCols + 1 ) * nCellSize - For nCount := 1 To nRows + 1 - cOutString := "" - cSubString := Substr( cScreen, nStart, nRange ) - For nForLoop := 1 To nRange step nCellSize - cOutString += Substr( cSubString, nForLoop, 1 ) - Next - FWriteLine( nHandle, "|" + cOutString + "|" ) - nStart += nRange - Next - FWriteLine( nHandle, "+" + Replicate( "-", nCols + 1 ) + "+" ) - FWriteLine( nHandle, "" ) - FWriteLine( nHandle, "" ) - ELSE - FWriteLine( nHandle, " Video Screen Dump not available" ) - ENDIF + IF HB_ISSTRING( cScreen ) + FWriteLine( nHandle, PadC( " Video Screen Dump ", nCols, "#" ) ) + FWriteLine( nHandle, "" ) + //FWriteLine( nHandle, "" ) + FWriteLine( nHandle, "+" + Replicate( "-", nCols + 1 ) + "+" ) + //FWriteLine( nHandle, "" ) + nCellSize := Len( SaveScreen( 0, 0, 0, 0 ) ) + nRange := ( nCols + 1 ) * nCellSize + FOR nCount := 1 TO nRows + 1 + cOutString := "" + cSubString := SubStr( cScreen, nStart, nRange ) + FOR nForLoop := 1 TO nRange STEP nCellSize + cOutString += SubStr( cSubString, nForLoop, 1 ) + NEXT + FWriteLine( nHandle, "|" + cOutString + "|" ) + nStart += nRange + NEXT + FWriteLine( nHandle, "+" + Replicate( "-", nCols + 1 ) + "+" ) + FWriteLine( nHandle, "" ) + FWriteLine( nHandle, "" ) + ELSE + FWriteLine( nHandle, " Video Screen Dump not available" ) + ENDIF +#if 0 + FWriteLine( nHandle, PadC( " Available Memory Variables ", nCols, "+" ) ) + FWriteLine( nHandle, "" ) + SAVE ALL Like * TO errormem + nMemHandle := FOpen( "errormem.mem", FO_READWRITE ) + nMemLength := FSeek( nMemHandle, 0, FS_END ) + FSeek( nMemHandle, 0 ) + nCount := 1 + WHILE FSeek( nMemHandle, 0, 1 ) + 1 < nMemLength + nMemWidth := Space( 18 ) + FRead( nMemHandle, @nMemWidth, 18 ) + cVarName := Left( nMemWidth, At( Chr( 0 ), nMemWidth ) - 1 ) + cVarType := SubStr( nMemWidth, 12, 1 ) + cVarRec := Bin2W( Right( nMemWidth, 2 ) ) + nMemCount := iif( cVarType $ Chr( 195 ) + Chr( 204 ), 14 + cVarRec, 22 ) + FSeek( nMemHandle, nMemCount, FS_RELATIVE ) + cTemp := Left( cVarName + Space( 10 ), 10 ) + cTemp += " TYPE " + Type( cVarName ) + cTemp += " " + iif( Type( cVarName ) == "C", '"' + &cVarName + '"', strvalue( &cVarName ) ) + nBytes := 0 + Switch ValType( cVarName ) + CASE "C" + nBytes += ( nLenTemp := Len( &cVarName ) ) + EXIT + CASE "N" + nBytes += ( nLenTemp := 9 ) + EXIT + CASE "L" + nBytes += ( nLenTemp := 2 ) + EXIT + CASE "D" + nBytes += ( nLenTemp := 9 ) + EXIT + End + FWrite( nFhandle, " " + Transform( nLenTemp, "999999" ) + "bytes -> " ) + FWriteLine( nHandle, " " + cTemp ) + ENDDO + FClose( nMemHandle ) + FErase( "errormem.mem" ) +#endif - /* - * FWriteLine( nHandle, padc(" Available Memory Variables ",nCols,"+") ) - * FWriteLine( nHandle, "" ) - * Save All Like * To errormem - * nMemHandle := Fopen( "errormem.mem", FO_READWRITE ) - * nMemLength := Fseek( nMemHandle, 0, 2 ) - * Fseek( nMemHandle, 0 ) - * nCount := 1 - * While Fseek( nMemHandle, 0, 1 ) + 1 < nMemLength - * nMemWidth := Space( 18 ) - * Fread( nMemHandle, @nMemWidth, 18 ) - * cVarName := Left( nMemWidth, At( Chr( 0 ), nMemWidth ) - 1 ) - * cVarType := Substr( nMemWidth, 12, 1 ) - * cVarRec := Bin2w( Right( nMemWidth, 2 ) ) - * nMemCount := iif( cVarType IN Chr( 195 ) + Chr( 204 ), 14 + cVarRec, 22 ) - * Fseek( nMemHandle, nMemCount, 1 ) - * cTemp := Left( cVarName + Space( 10 ), 10 ) - * cTemp += " TYPE " + Type( cVarName ) - * cTemp += " " + iif( Type( cVarName ) == "C", '"' + &cVarName + '"', strvalue( &cVarName ) ) - * nBytes := 0 - * Switch ValType( cVarName ) - * Case "C" - * nBytes += ( nLenTemp := Len( &cVarName ) ) - * exit - * Case "N" - * nBytes += ( nLenTemp := 9 ) - * exit - * Case "L" - * nBytes += ( nLenTemp := 2 ) - * exit - * Case "D" - * nBytes += ( nLenTemp := 9 ) - * exit - * End - * Fwrite( nFhandle, " " + Transform( nLenTemp, "999999" ) + "bytes -> " ) - * FWriteLine( nHandle, " " + cTemp ) - * Enddo - * Fclose( nMemHandle ) - * Ferase( "errormem.mem" ) - */ - if lAppendLog .and. nHandle2 != -1 + IF lAppendLog .AND. nHandle2 != - 1 - nBytes := FSeek( nHandle2, 0, FS_END ) + nBytes := FSeek( nHandle2, 0, FS_END ) - cBuff := Space( 10 ) - FSeek( nHandle2, 0, FS_SET ) + cBuff := Space( 10 ) + FSeek( nHandle2, 0, FS_SET ) - while nBytes > 0 - nRead := FRead( nHandle2, @cBuff, hb_BLen( cBuff ) ) - FWrite( nHandle, cBuff, nRead ) - nBytes -= nRead - cBuff := Space( 10 ) - enddo + WHILE nBytes > 0 + nRead := FRead( nHandle2, @cBuff, hb_BLen( cBuff ) ) + FWrite( nHandle, cBuff, nRead ) + nBytes -= nRead + cBuff := Space( 10 ) + ENDDO - FClose( nHandle2 ) - FClose( nHandle ) + FClose( nHandle2 ) + FClose( nHandle ) - FErase( cLogFile ) - FRename( cLogFile2, cLogFile ) - else - FClose( nHandle ) - endif + FErase( cLogFile ) + FRename( cLogFile2, cLogFile ) + ELSE + FClose( nHandle ) + ENDIF - endif + ENDIF -Return .f. + RETURN .F. STATIC FUNCTION strvalue( c, l ) @@ -638,29 +644,30 @@ STATIC FUNCTION strvalue( c, l ) SWITCH ValType( c ) CASE "C" - cr := c - EXIT + cr := c + EXIT CASE "N" - cr := hb_ntos( c ) - EXIT + cr := hb_ntos( c ) + EXIT CASE "M" - cr := c - EXIT + cr := c + EXIT CASE "D" - cr := DToC( c ) - EXIT + cr := DToC( c ) + EXIT CASE "L" -// cr := iif( l, iif( c, "On", "Off" ), iif( c, "True", "False" ) ) - cr := iif( l, iif( c, "On", "Off" ), iif( c, ".t.", ".f." ) ) - EXIT + // cr := iif( l, iif( c, "On", "Off" ), iif( c, "True", "False" ) ) + cr := iif( l, iif( c, "On", "Off" ), iif( c, ".t.", ".f." ) ) + EXIT ENDSWITCH RETURN Upper( cr ) STATIC PROCEDURE FWriteLine( nh, c ) - Fwrite( nh, c + hb_eol() ) - //HB_OutDebug( c + hb_eol() ) + FWrite( nh, c + hb_eol() ) +// HB_OutDebug( c + hb_eol() ) + RETURN STATIC FUNCTION Arguments( oErr ) @@ -680,9 +687,11 @@ STATIC FUNCTION Arguments( oErr ) RETURN cArguments FUNCTION __BreakBlock() + RETURN {| e | Break( e ) } FUNCTION __ErrorBlock( ) + RETURN {| e | __MinimalErrorHandler( e ) } PROCEDURE __MinimalErrorHandler( oError ) @@ -719,8 +728,8 @@ PROCEDURE __MinimalErrorHandler( oError ) RETURN FUNCTION xhb_ErrorNew( cSubSystem, nGenCode, nSubCode, ; - cOperation, cDescription, aArgs, ; - cModuleName, cProcName, nProcLine ) + cOperation, cDescription, aArgs, ; + cModuleName, cProcName, nProcLine ) LOCAL oError := ErrorNew() LOCAL aStack, n diff --git a/harbour/contrib/xhb/xhbtedit.prg b/harbour/contrib/xhb/xhbtedit.prg index a7b290e2b8..d7c7414d98 100644 --- a/harbour/contrib/xhb/xhbtedit.prg +++ b/harbour/contrib/xhb/xhbtedit.prg @@ -134,7 +134,7 @@ DATA nTabWidth INIT 5 // Size of Tab chars DATA lEditAllow INIT .T. // Are changes to text allowed? DATA lSaved INIT .F. // True if user exited editor with K_CTRL_W - DATA lWordWrap INIT .T. // .f. earlier, True if word wrapping is active + DATA lWordWrap INIT .T. // .F. earlier, True if word wrapping is active DATA nWordWrapCol INIT 0 // At which column word wrapping occurs DATA lChanged INIT .F. // .T. if there are changes not saved DATA lExitEdit INIT .F. // .T. if user requested to end Edit() method @@ -361,7 +361,7 @@ METHOD New( cString, nTop, nLeft, nBottom, nRight, lEditMode, nLineLength, nTabS // Load text to internal array. // TODO: if at ME_INIT mode (when udf is called), the ::lWordWrap is toggled - // to .F. (default is .t.), the should not be splitted, but + // to .F. (default is .T.), the should not be splitted, but // in the Text2Array function the will be splitted in // accordance with nLineLength. // diff --git a/harbour/doc/en/set.txt b/harbour/doc/en/set.txt index 78352c5d84..bf55df2dc4 100644 --- a/harbour/doc/en/set.txt +++ b/harbour/doc/en/set.txt @@ -168,8 +168,8 @@ * * _SET_DEBUG * - * When set to .t., pressing Alt+D activates the debugger. - * When set to .f., which is the default, Alt+D can be read + * When set to .T., pressing Alt+D activates the debugger. + * When set to .F., which is the default, Alt+D can be read * by INKEY(). (Also affected by AltD(1) and AltD(0)) * * _SET_DECIMALS diff --git a/harbour/extras/gtwvw/tests/cbtest1.prg b/harbour/extras/gtwvw/tests/cbtest1.prg index c72d7a40c4..3b18893646 100644 --- a/harbour/extras/gtwvw/tests/cbtest1.prg +++ b/harbour/extras/gtwvw/tests/cbtest1.prg @@ -36,7 +36,7 @@ local ch,ncursor setcolor("N/W") WVW_SetTitle(NIL,"Quick Survey") WVW_NoClose(NIL) - WVW_SetAltF4Close(.f.) + WVW_SetAltF4Close(.F.) WVW_SetLineSpacing(NIL,4) //WVW_SetLSpaceColor(NIL,7) WVW_cbSetFont(NIL, "Arial", 16) @@ -89,8 +89,8 @@ local ch,ncursor endcase enddo - wvw_cbEnable(NIL, nCBid, .f.) - wvw_pbEnable(NIL, nPBid, .f.) + wvw_cbEnable(NIL, nCBid, .F.) + wvw_pbEnable(NIL, nPBid, .F.) @ 6,1 say "Your response is:" @ 7,1 say wvw_cbGetCurText(NIL, nCBid) @ 9,1 say s_cThankYou @@ -105,17 +105,17 @@ static function CBhandler(nWinNum,nId,nEvent,nIndex, nPBid) case nEvent==4 //CBN_KILLFOCUS * none if nIndex==0 - wvw_pbEnable(nWinNum, nPBid, .t.) + wvw_pbEnable(nWinNum, nPBid, .T.) else - wvw_pbEnable(nWinNum, nPBid, .f.) + wvw_pbEnable(nWinNum, nPBid, .F.) endif case nEvent==1 //CBN_SELCHANGE if !wvw_cbIsDropped(nWinNum, nId) * nIndex is 0-based if nIndex==0 - wvw_pbEnable(nWinNum, nPBid, .t.) + wvw_pbEnable(nWinNum, nPBid, .T.) else - wvw_pbEnable(nWinNum, nPBid, .f.) + wvw_pbEnable(nWinNum, nPBid, .F.) endif wvw_cbSetFocus(nWinNum, nId) endif diff --git a/harbour/extras/gtwvw/tests/cbtest6.prg b/harbour/extras/gtwvw/tests/cbtest6.prg index 89e0514f98..4752412a19 100644 --- a/harbour/extras/gtwvw/tests/cbtest6.prg +++ b/harbour/extras/gtwvw/tests/cbtest6.prg @@ -62,7 +62,7 @@ local __nCBid__,__temp__ //these two are temporary var required by CB get creat WVW_cbSetFont(NIL, "Arial", 14) //std: 20-2 //set(_SET_TRACESTACK, 0) - //wvw_setmousemove(,.t.) + //wvw_setmousemove(,.T.) CLS @@ -78,7 +78,7 @@ local __nCBid__,__temp__ //these two are temporary var required by CB get creat read * disable all comboboxes: - aeval(s_aComboList, {| x | wvw_cbenable(NIL, x[1], .f.)}) + aeval(s_aComboList, {| x | wvw_cbenable(NIL, x[1], .F.)}) devpos(5,0) ? "name: '" + mname + "'" @@ -271,14 +271,14 @@ local oGet oGet:updatebuffer() else //oGet:undo() - return .f. + return .F. endif endif oGet:exitstate := GE_MOUSEHIT oGetList:nNextGet := nPos - oGetList:settle(,.f.) + oGetList:settle(,.F.) endif -return .t. +return .T. */ /* miscellaneous **********************************/ diff --git a/harbour/extras/gtwvw/tests/drawimg.prg b/harbour/extras/gtwvw/tests/drawimg.prg index 40a489e8b5..6e7a2c08fd 100644 --- a/harbour/extras/gtwvw/tests/drawimg.prg +++ b/harbour/extras/gtwvw/tests/drawimg.prg @@ -80,14 +80,14 @@ local ntop := 7,; nmidver:=INT((ntop+nbot)/2),; nmidhor:=INT((nleft+nrig)/2) local cpict := "vouch1.gif",; - ltransp := .f.,; + ltransp := .F.,; nMaxCache := wvw_SetMaxBMcache() local i,j,oWPaint local getlist := {} setcolor("N/W,N/GR*,,,N/W*") wvw_setcodepage(,255) wg_ResetWPaintObj( 0 ) - do while .t. + do while .T. CLS setcursor(1) cpict := padr(cpict,40) @@ -147,7 +147,7 @@ local getlist := {} * delete all image objects wg_DelWPaintObj(0, WPAINTOBJ_IMAGE, NIL) - enddo //while .t. + enddo //while .T. setcursor(1) return @@ -182,10 +182,10 @@ ENDCLASS //wPaintOBJ METHOD New(nWinNum, nType, cId, nRow1, nCol1, nRow2, nCol2, aOffTLBR, lTransp) CLASS wPaintObj default aOffTLBR to {0,0,0,0} - default lTransp to .f. + default lTransp to .F. ::nWinNum := nWinNum - ::lVisible := .t. + ::lVisible := .T. ::nType := nType ::cId := cId @@ -223,7 +223,7 @@ RETURN NIL //DRAW() METHOD Undraw() CLASS wPaintObj * undraw the object -* normally this is called with ::lVisible == .f., +* normally this is called with ::lVisible == .F., * otherwise the object will be redrawn by WVW_PAINT local cScreen local nRow1, nCol1, nRow2, nCol2, nMaxRow, nMaxCol @@ -252,13 +252,13 @@ RETURN NIL //undraw() METHOD Hide() CLASS wPaintObj * temporarily hides the object - ::lVisible := .f. + ::lVisible := .F. ::Undraw() RETURN NIL METHOD Show() CLASS wPaintObj * show the object - ::lVisible := .t. + ::lVisible := .T. ::draw() RETURN NIL @@ -269,7 +269,7 @@ function wg_ResetWPaintObj( nWinNum, nObjNum, lStrict ) * if nObjNum specified, clears object >= nObjNum local i default nObjNum to 0 - default lStrict to .f. + default lStrict to .F. do while len(s_aPObjList) < nWinNum+1 aadd( s_aPObjList, {} ) @@ -277,14 +277,14 @@ local i asize(s_aPObjList[ nWinNum+1 ], nObjNum) -return .t. +return .T. function wg_AddWPaintObj( nWinNum, oWPaint, lStrict, nOperation ) * adds a WPaint object oWPaint into window nWinNum * returns ::cId if successful. "" if failed. local i local nLen, aRect //20050720 - default lStrict to .f. + default lStrict to .F. default nOperation to WOBJ_ADD_OVERWRITE * simplified: @@ -303,7 +303,7 @@ local nLen, aRect //20050720 if lStrict s_aPObjList[ nWinNum+1 ][i]:Hide() else - s_aPObjList[ nWinNum+1 ][i]:lVisible := .f. + s_aPObjList[ nWinNum+1 ][i]:lVisible := .F. endif s_aPObjList[ nWinNum+1 ][i] := oWPaint @@ -315,7 +315,7 @@ local nLen, aRect //20050720 if oWPaint:lVisible oWPaint:draw() endif -return oWPaint:cId //20040811 was .t. +return oWPaint:cId //20040811 was .T. function wg_DelWPaintObj( nWinNum, nType, cId, lStrict ) * deletes a WPaint object oWPaint from window nWinNum @@ -327,7 +327,7 @@ local lDelAll := (cId == NIL) local nDeleted := 0 local nLen local cCurId - default lStrict to .f. + default lStrict to .F. * is nType set? if nType < 1 @@ -343,7 +343,7 @@ local cCurId if lStrict s_aPObjList[ nWinNum+1 ][i]:Hide() else - s_aPObjList[ nWinNum+1 ][i]:lVisible := .f. + s_aPObjList[ nWinNum+1 ][i]:lVisible := .F. endif cCurId := s_aPObjList[ nWinNum+1 ][i]:cId adel(s_aPObjList[ nWinNum+1 ], i) diff --git a/harbour/extras/gtwvw/tests/ebtest7.prg b/harbour/extras/gtwvw/tests/ebtest7.prg index 0b06b2dd82..190cda1d0a 100644 --- a/harbour/extras/gtwvw/tests/ebtest7.prg +++ b/harbour/extras/gtwvw/tests/ebtest7.prg @@ -55,7 +55,7 @@ proc main local nOpen, nClose -local lClosepermitted := .f. +local lClosepermitted := .F. local bSetKey := SETKEY(K_F8, {|| MyHelp()}) SET CENTURY ON SET DATE ANSI @@ -66,9 +66,9 @@ local bSetKey := SETKEY(K_F8, {|| MyHelp()}) WVW_PBSetFont(0, "Arial") //font for pushbuttons Wvw_SetCodePage(0, 255) - wvw_allownontopEvent(.t.) //this will make pushbuttons to work + wvw_allownontopEvent(.T.) //this will make pushbuttons to work //even on non-topmost window - wvw_recurseCblock(.t.) //this will allow recursed execution + wvw_recurseCblock(.T.) //this will allow recursed execution //of control's codeblocks //eg. multiple executions of pushbutton's codeblock // invoking "GetSession()" @@ -174,7 +174,7 @@ return NIL * 20070525 function AddEBGet(aEBGets, mnrow, mncol, mxValue, mcVarName, mbAssign, mcLabel, mlMultiline, mcPict) * adding one EBGet variable into aEBGets array -* returns .t. if successful +* returns .T. if successful local mcVarType, mbText mcVarType := valtype(mxValue) do case @@ -189,7 +189,7 @@ local mcVarType, mbText mbText := {|| dtoc(mxValue)} otherwise * unsupported valtype - return .f. + return .F. endcase if !(valtype(aEBGets)=="A") @@ -198,7 +198,7 @@ local mcVarType, mbText if !(valtype(mlMultiline)=="L") .or.; !(valtype(mxValue)=="C") - mlMultiline := .f. + mlMultiline := .F. endif if !(valtype(mcLabel)=="C") mcLabel := mcVarName + ":" @@ -214,17 +214,17 @@ local mcVarType, mbText mbText,; //__GET_BTEXT mbAssign,; //__GET_BASSIGN NIL,; //__GET_NEBID - .f. }) //__GET_LFOCUSED + .F. }) //__GET_LFOCUSED -return .t. +return .T. procedure EBReadGets(nwinnum, aEBGets) * generic procedure to run aEBGets, array of editboxes local nmaxrow, nmincol local i, nlen, lmultiline, clabel, ; nrow1,ncol1,nrow2,ncol2 -local creport, nOKbutton, nCancelbutton, nClosebutton, ldone := .f. -local lclosePermitted := .f. +local creport, nOKbutton, nCancelbutton, nClosebutton, ldone := .F. +local lclosePermitted := .F. local nNumGets := len(aEBGets) local ch local nfocus, lchangefocus @@ -278,7 +278,7 @@ local nfocus, lchangefocus ncol1 := ncol1+10+1 nClosebutton := wvw_pbcreate(nwinnum, nrow1, ncol1, nrow1, ncol1+10-1, "Close", NIL, ; {|| ToCloseWindow(nwinnum, @lClosepermitted)}) - wvw_pbenable(nwinnum, nclosebutton, .f.) + wvw_pbenable(nwinnum, nclosebutton, .F.) * register a keyhandler for WVW_INPFOCUS inp_handler(nwinnum, {| n, ch | InpKeyHandler(n, ch, aEBGets, nOKbutton, nCancelbutton)}) @@ -291,7 +291,7 @@ local nfocus, lchangefocus if valtype(setkey(ch))=="B" eval(setkey(ch)) elseif ch!=0 - lchangefocus := .t. + lchangefocus := .T. do case case ch==K_TAB .or. ch==K_DOWN .or. ch==K_ENTER if nFocus<(nNumGets+2) //incl buttons @@ -306,7 +306,7 @@ local nfocus, lchangefocus nFocus := nNumGets+2 endif otherwise - lchangefocus := .f. //!wvw_ebisfocused(nwinnum, aEBGets[nFocus][__GET_NEBID]) + lchangefocus := .F. //!wvw_ebisfocused(nwinnum, aEBGets[nFocus][__GET_NEBID]) endcase if lchangefocus if nFocus<=nNumGets @@ -354,7 +354,7 @@ local nFocus, lchangefocus else nFocus := nFocused(aEBGets) endif - lchangefocus := .t. + lchangefocus := .T. do case case ch==K_TAB .and. !lShiftPressed() if nFocus<(nNumGets+2) //incl buttons @@ -369,7 +369,7 @@ local nFocus, lchangefocus nFocus := nNumGets+2 endif otherwise - lchangefocus := .f. + lchangefocus := .F. endcase if lchangefocus if nFocus<=nNumGets @@ -386,16 +386,16 @@ static procedure EndGets(nwinnum, aEBGets, nOKbutton, nCancelbutton, nCloseButto local i * session ended for i := 1 to len(aEBGets) - wvw_ebenable(nwinnum, aEBGets[i][__GET_NEBID], .f.) + wvw_ebenable(nwinnum, aEBGets[i][__GET_NEBID], .F.) next - wvw_pbenable(nwinnum, nOKbutton, .f.) - wvw_pbenable(nwinnum, nCancelbutton, .f.) + wvw_pbenable(nwinnum, nOKbutton, .F.) + wvw_pbenable(nwinnum, nCancelbutton, .F.) * clear the getlist asize(aEBGets,0) * wait until user click the close button - wvw_pbenable(nwinnum, nclosebutton, .t.) + wvw_pbenable(nwinnum, nclosebutton, .T.) return static procedure SaveVar(nwinnum, aEBGets, lDone) @@ -406,7 +406,7 @@ local i, cdebugreport eval(aEBGets[i][__GET_BASSIGN], ; GetValFromText(wvw_ebgettext(nwinnum, aEBGets[i][__GET_NEBID]), aEBGets[i][__GET_CVALTYPE])) next - lDone := .t. + lDone := .T. * debugging text cdebugreport := "Get session in window "+alltrim(str(nwinnum))+" is ended with confirmation"+ chr(13)+chr(10)+; @@ -421,7 +421,7 @@ local i, cdebugreport eval(aEBGets[i][__GET_BASSIGN], ; aEBGets[i][__GET_XINIT]) next - lDone := .t. + lDone := .T. * debugging text cdebugreport := "Get session in window "+alltrim(str(nwinnum))+" is ended with cancellation"+ chr(13)+chr(10)+; @@ -444,7 +444,7 @@ return ascan(aEBGets, {| x | x[__GET_NEBID]==nEBId}) static function nFocused(aEBGets) * returns index to aEBGets array containing editbox that is/was in focus -return ascan(aEBGets, {| x | x[__GET_LFOCUSED]==.t.}) +return ascan(aEBGets, {| x | x[__GET_LFOCUSED]==.T.}) @@ -482,7 +482,7 @@ return ascan(aEBGets, {| x | x[__GET_LFOCUSED]==.t.}) static function MaskEditBox(nWinNum,nId,nEvent,aEBGets) * callback function called by GTWVW during some events on editbox -static bBusy := .f. +static bBusy := .F. local ctext local nIndex := nGetIndex(aEBGets, nId) local mcvaltype, mcpict, mlmultiline @@ -493,7 +493,7 @@ local nwasfocus if nIndex==0 return NIL endif - bBusy := .t. + bBusy := .T. mcvaltype := aEBGets[nIndex][__GET_CVALTYPE] mcpict := aEBGets[nIndex][__GET_CPICT] mlmultiline := aEBGets[nIndex][__GET_LMULTILINE] @@ -517,15 +517,15 @@ local nwasfocus wvw_ebsetsel(nwinnum, nid, 0, -1) nwasFocus := nFocused(aEBGets) if nwasFocus!=0 - aEBGets[nwasFocus][__GET_LFOCUSED] := .f. + aEBGets[nwasFocus][__GET_LFOCUSED] := .F. endif - aEBGets[nIndex][__GET_LFOCUSED] := .t. + aEBGets[nIndex][__GET_LFOCUSED] := .T. case nEvent==EN_CHANGE if !mlmultiline ProcessCharMask(nwinnum, nId, mcvaltype, mcpict) endif endcase - bBusy := .f. + bBusy := .F. return NIL /************* borrowed and modified from minigui *************/ @@ -557,7 +557,7 @@ Local ol := 0 InBuffer := wvw_ebgettext(mnwinnum, mnebid) pc := 0 //x for clarity - pFlag := .f. //x for clarity + pFlag := .F. //x for clarity if mcvaltype=="N" // RL 104 If Left ( AllTrim(InBuffer) , 1 ) == '-' .And. Val(InBuffer) == 0 @@ -731,7 +731,7 @@ RETURN //from h_textbox.prg static Function CharMaskTekstOK( cString, cvaltype, cMask ) -Local lPassed:=.t.,CB,CM,x +Local lPassed:=.T.,CB,CM,x //x BEGIN if cvaltype=="D" For x := 1 To min(Len(cString),Len(cMask)) @@ -740,15 +740,15 @@ Local lPassed:=.t.,CB,CM,x Do Case Case CM == '9' If IsDigit ( CB ) .Or. CB == ' ' - * lPassed:=.t. + * lPassed:=.T. Else - Return .f. + Return .F. EndIf OtherWise - * lPassed:=.t. + * lPassed:=.T. EndCase next i - return .t. + return .T. endif //x END @@ -759,27 +759,27 @@ Local lPassed:=.t.,CB,CM,x // JK Case (CM) == 'A' .or. (CM) == '!' If IsAlpha ( CB ) .Or. CB == ' ' - * lPassed:=.t. + * lPassed:=.T. Else - Return .f. + Return .F. EndIf Case CM == '9' If IsDigit ( CB ) .Or. CB == ' ' - * lPassed:=.t. + * lPassed:=.T. Else - Return .f. + Return .F. EndIf Case CM == ' ' If CB == ' ' - * lPassed:=.t. + * lPassed:=.T. Else - Return .f. + Return .F. EndIf OtherWise - * lPassed:=.t. + * lPassed:=.T. EndCase next i -Return .t. //lPassed +Return .T. //lPassed //from h_textbox.prg static Function GetValFromText ( Text , mcvaltype ) @@ -878,7 +878,7 @@ local bhandler * did user perform a menu/toolbar action on Main Window? //if message==WM_COMMAND .and. nWinNum==0 //menu,toolbar,pushbutton - // return .f. + // return .F. //endif * now we handle input on other non-topmost windows @@ -889,16 +889,16 @@ local bhandler bhandler := inp_handler(nWinNum) if valtype(bhandler)=="B" eval( bhandler, nWinNum, ch ) - return .t. + return .T. else - return .f. + return .F. endif otherwise * ignore - return .t. + return .T. endcase -return .f.//WVW_INPUTFOCUS() +return .F.//WVW_INPUTFOCUS() function inp_handler(nwinnum, bhandler) static sbhandlers := {} diff --git a/harbour/extras/gtwvw/tests/inpfocus.prg b/harbour/extras/gtwvw/tests/inpfocus.prg index fb2fb58826..acf89e34be 100644 --- a/harbour/extras/gtwvw/tests/inpfocus.prg +++ b/harbour/extras/gtwvw/tests/inpfocus.prg @@ -75,7 +75,7 @@ return //main static function CreateToolbar(nWinNum) //for toolbar: local nSysBitmap := 1 //0:none 1:small 2:large -local lDisplayText := .f. //text will be displayed as tooltip instead +local lDisplayText := .F. //text will be displayed as tooltip instead local hWndTB local ldefault @@ -85,14 +85,14 @@ local ldefault if hWndTB==0 wvw_messagebox(nWinNum, "FAILED to create toolbar", "Error", MB_OK+MB_ICONEXCLAMATION) - return .f. + return .F. endif /* using system std & view bitmaps */ wvw_tbAddButton(nWinNum, IDM_OPENWIN, STD_FILENEW, "Open a new typewriter window", 1 /*system std bitmap*/) wvw_tbAddButton(nWinNum, IDM_CLOSEWIN, STD_DELETE, "Close last window", 1 /*system std bitmap*/) wvw_tbAddButton(nWinNum, IDM_ARRANGEWIN, VIEW_PARENTFOLDER, "Reposition all windows", 2 /*system view bitmap*/) -return .t. //CreateToolbar() +return .T. //CreateToolbar() static function CreateStatusbar(nWinNum) local hWndSB @@ -102,9 +102,9 @@ local ldefault hWndSB := wvw_sbcreate(nWinNum) if hWndSB==0 wvw_messagebox(nWinNum, "FAILED to create statusbar", "Error", MB_OK+MB_ICONEXCLAMATION) - return .f. + return .F. endif -return .t. //CreateStatusbar() +return .T. //CreateStatusbar() static function MenuAction(nWinNum, nCommand) * Handle Menu/Toolbar actions @@ -131,7 +131,7 @@ local ch if nWinNum > _MAX_WINNUM wvw_messagebox(nWinNum-1, "Sorry, I don't think you can handle that many of windows :-)",; "Sorry", MB_OK+MB_ICONASTERISK) - return .f. + return .F. endif * prepare titles and coordinates @@ -173,7 +173,7 @@ local ch elseif nWinNum==1 setcursor(SC_NONE) endif -return .t.//OpenNewWindow() +return .T.//OpenNewWindow() static function CloseLastWindow() * closes the last window. If no window left, Main Window will be closed too. @@ -215,8 +215,8 @@ return NIL * Parameter passed to this function is somewhat 'raw', so their handling * is a bit tricky. * - * This function should return .t. if it has handled the event, - * otherwise return .f. to sign GTWVW that the input is considered invalid. + * This function should return .T. if it has handled the event, + * otherwise return .F. to sign GTWVW that the input is considered invalid. * */ @@ -230,12 +230,12 @@ local nCommand, ch if message==WM_COMMAND .and. nWinNum==0 //menu,toolbar,pushbutton nCommand := wParamLow MenuAction(0, nCommand) - return .t. + return .T. endif * other types of input on main window is not handled here if nWinNum==0 - return .f. + return .F. endif * now we handle input on other non-topmost windows @@ -247,10 +247,10 @@ local nCommand, ch case message==WM_CHAR ch := wParam eval( s_akeyhandlers[nWinNum], nWinNum, ch ) - return .t. + return .T. otherwise * let it be ignored - return .t. + return .T. endcase /* @@ -264,7 +264,7 @@ local nCommand, ch wvw_messagebox(0, cdebug, "Debug", MB_OK) */ -return .f.//WVW_INPUTFOCUS() +return .F.//WVW_INPUTFOCUS() //******************************************************************** // SUPPORTING FUNCTIONS diff --git a/harbour/extras/gtwvw/tests/maincoor.prg b/harbour/extras/gtwvw/tests/maincoor.prg index ea61f0b458..5bb58621aa 100644 --- a/harbour/extras/gtwvw/tests/maincoor.prg +++ b/harbour/extras/gtwvw/tests/maincoor.prg @@ -13,10 +13,10 @@ proc main setcolor("N/W") - WVW_SetMainCoord(.f.) //Standard Mode + WVW_SetMainCoord(.F.) //Standard Mode fillscreen() - WVW_SetMainCoord(.t.) //MainCoord Mode + WVW_SetMainCoord(.T.) //MainCoord Mode fillscreen() return diff --git a/harbour/extras/gtwvw/tests/maximize.prg b/harbour/extras/gtwvw/tests/maximize.prg index d89fc9debf..665b56c661 100644 --- a/harbour/extras/gtwvw/tests/maximize.prg +++ b/harbour/extras/gtwvw/tests/maximize.prg @@ -18,14 +18,14 @@ STATIC s_lSizeReady := .F. procedure main local ch * activate WVW_SIZE() - s_lSizeReady := .t. + s_lSizeReady := .T. * the biggest possible window setcolor("N/W") setmode(wvw_maxmaxrow()+1, wvw_maxmaxcol()+1) * enable MAXIMIZE button - wvw_enablemaximize(0, .t.) + wvw_enablemaximize(0, .T.) * set the window to MAXIMIZED state wvw_maximize(0) @@ -69,7 +69,7 @@ function WVW_SIZE(nWinNum, hWnd, message, wParam, lParam) * this function is called by gtwvw AFTER the size is changed * WARNING: screen repainting is not performed completely by gtwvw at this point of call local cScreen -local lNeedReset := .f., ; +local lNeedReset := .F., ; maxsavedscrrow, maxsavedscrcol if !s_lSizeReady * program is not ready to handle window resizing @@ -82,7 +82,7 @@ local lNeedReset := .f., ; endif * avoid reentrance - s_lSizeReady := .f. + s_lSizeReady := .F. do case case wParam == 2 //SIZE_MAXIMIZED @@ -118,5 +118,5 @@ local lNeedReset := .f., ; endcase * allow next call - s_lSizeReady := .t. + s_lSizeReady := .T. return NIL diff --git a/harbour/extras/gtwvw/tests/prog0.prg b/harbour/extras/gtwvw/tests/prog0.prg index f83845a292..18544263e3 100644 --- a/harbour/extras/gtwvw/tests/prog0.prg +++ b/harbour/extras/gtwvw/tests/prog0.prg @@ -60,7 +60,7 @@ local cName := padr("Name",20) local cAddr := padr("Address",25) local cPhone:= padr("Phone",15) local cFax := padr("Fax",15) -local lDone := .f. +local lDone := .F. local getlist := {} local oldCurs := setcursor(SC_NORMAL) @@ -89,7 +89,7 @@ return //xGet1() for illustration purposes only */ FUNCTION xBrowse1() LOCAL nKey, bBlock, oBrowse , i - LOCAL lEnd := .f. + LOCAL lEnd := .F. LOCAL info_ := {} LOCAL nTop := 6 LOCAL nLeft := 3 @@ -220,14 +220,14 @@ RETURN {|| fieldget( i ) } // supporting functions *************************** function lMessage(cMsg) -* displays a message on maxrow() and returns .t. +* displays a message on maxrow() and returns .T. local cOldColor := setcolor(s_cStdColor) @ maxrow(), 0 say padc(cMsg, maxcol()+1) setcolor(cOldColor) -return .t. +return .T. function lYesNo(cMsg) -* display cmsg with Yes/No option, returns .t. if Yes selected +* display cmsg with Yes/No option, returns .T. if Yes selected local nTopLine, ; nLeft := 5, ; nBotLine := maxrow()-2,; @@ -304,7 +304,7 @@ local oldColor := setcolor(s_cStdColor) setcursor(oldCurs) setcolor(oldColor) -return .t. +return .T. FUNCTION ZNEWWINDOW(wtype,r1,c1,r2,c2,ctitle, ccolor) * Draw a new window on screen and register it in window list diff --git a/harbour/extras/gtwvw/tests/prog1.prg b/harbour/extras/gtwvw/tests/prog1.prg index 0fdc9386c8..34cf4b60cb 100644 --- a/harbour/extras/gtwvw/tests/prog1.prg +++ b/harbour/extras/gtwvw/tests/prog1.prg @@ -48,7 +48,7 @@ static s_cStdColor := "N/W,N/GR*,,,N/W*" proc main local i,j #ifdef __GTWVW__ -local lMainCoord := WVW_SetMainCoord( .t. ) +local lMainCoord := WVW_SetMainCoord( .T. ) WVW_SetCodePage(,255) #endif SET SCOREBOARD OFF @@ -84,7 +84,7 @@ local cName := padr("Name",20) local cAddr := padr("Address",25) local cPhone:= padr("Phone",15) local cFax := padr("Fax",15) -local lDone := .f. +local lDone := .F. local getlist := {} local oldCurs := setcursor(SC_NORMAL) @@ -113,7 +113,7 @@ return //xGet1() for illustration purposes only */ FUNCTION xBrowse1() LOCAL nKey, bBlock, oBrowse , i - LOCAL lEnd := .f. + LOCAL lEnd := .F. LOCAL info_ := {} LOCAL nTop := 6 LOCAL nLeft := 3 @@ -244,14 +244,14 @@ RETURN {|| fieldget( i ) } // supporting functions *************************** function lMessage(cMsg) -* displays a message on maxrow() and returns .t. +* displays a message on maxrow() and returns .T. local cOldColor := setcolor(s_cStdColor) @ maxrow(), 0 say padc(cMsg, maxcol()+1) setcolor(cOldColor) -return .t. +return .T. function lYesNo(cMsg) -* display cmsg with Yes/No option, returns .t. if Yes selected +* display cmsg with Yes/No option, returns .T. if Yes selected local nTopLine, ; nLeft := 5, ; nBotLine := maxrow()-2,; @@ -328,7 +328,7 @@ local oldColor := setcolor(s_cStdColor) setcursor(oldCurs) setcolor(oldColor) -return .t. +return .T. FUNCTION ZNEWWINDOW(wtype,r1,c1,r2,c2,ctitle, ccolor) * Draw a new window on screen and register it in window list diff --git a/harbour/extras/gtwvw/tests/prog2.prg b/harbour/extras/gtwvw/tests/prog2.prg index bbc0c89c04..0f1968b4ae 100644 --- a/harbour/extras/gtwvw/tests/prog2.prg +++ b/harbour/extras/gtwvw/tests/prog2.prg @@ -40,7 +40,7 @@ static s_amiscobjlist := {} //x misc object list (actually: list of codeblo proc main local i,j #ifdef __GTWVW__ -local lMainCoord := WVW_SetMainCoord( .t. ) +local lMainCoord := WVW_SetMainCoord( .T. ) local nMaxRow := maxrow(), nMaxCol := maxcol() WVW_SetFont(,"Lucida Console",16,-8) WVW_SetCodePage(,255) @@ -85,7 +85,7 @@ local cName := padr("Name",20) local cAddr := padr("Address",25) local cPhone:= padr("Phone",15) local cFax := padr("Fax",15) -local lDone := .f. +local lDone := .F. local getlist := {} local oldCurs := setcursor(SC_NORMAL) #ifdef __GTWVW__ @@ -121,7 +121,7 @@ return //xGet1() for illustration purposes only */ FUNCTION xBrowse1() LOCAL nKey, bBlock, oBrowse , i - LOCAL lEnd := .f. + LOCAL lEnd := .F. LOCAL info_ := {} LOCAL nTop := 6 LOCAL nLeft := 3 @@ -277,22 +277,22 @@ function lMessage(cMsg) #ifndef __GTWVW__ -* displays a message on maxrow() and returns .t. +* displays a message on maxrow() and returns .T. local cOldColor := setcolor(s_cStdColor) @ maxrow(), 0 say padc(cMsg, maxcol()+1) setcolor(cOldColor) #ELSE -* displays a message on status bar of Main Window and returns .t. +* displays a message on status bar of Main Window and returns .T. wvw_SBsettext(0, 0, cMsg) #endif -return .t. +return .T. function lYesNo(cMsg) -* display cmsg with Yes/No option, returns .t. if Yes selected +* display cmsg with Yes/No option, returns .T. if Yes selected local nTopLine, ; nLeft := 5, ; nBotLine := maxrow()-2,; @@ -369,7 +369,7 @@ local oldColor := setcolor(s_cStdColor) setcursor(oldCurs) setcolor(oldColor) -return .t. +return .T. FUNCTION ZNEWWINDOW(wtype,r1,c1,r2,c2,ctitle, ccolor) * Draw a new window on screen and register it in window list @@ -463,11 +463,11 @@ function ResetMiscObjects( nWinNum ) aadd( s_amiscobjlist, {} ) enddo s_amiscobjlist[ nWinNum+1 ] := {} -return .t. +return .T. function AddMiscObjects( nWinNum, bAction ) aadd( s_amiscobjlist[ nWinNum+1 ], bAction ) -return .t. +return .T. #endif diff --git a/harbour/extras/gtwvw/tests/wvwmouse.prg b/harbour/extras/gtwvw/tests/wvwmouse.prg index 2bb58918e2..53a0e2f66a 100644 --- a/harbour/extras/gtwvw/tests/wvwmouse.prg +++ b/harbour/extras/gtwvw/tests/wvwmouse.prg @@ -130,7 +130,7 @@ METHOD New(cCaption, nRow1, nCol1, nRow2, nCol2, bClickBlock, nType, lDraw, nWin default nRow2 to nRow1 default nCol2 to nCol1 + max(10, len(cCaption) + 2) -1 default nType to _BUTTON_NORMAL //20040303 - default lDraw to .t. + default lDraw to .T. default nWinId to wvw_nNumWindows()-1 //20040303 //TODO: ::nId := iif(empty(s_amouseobjlist), 1, s_amouseobjlist[len(s_amouseobjlist)]:nGetId()+1) @@ -145,10 +145,10 @@ METHOD New(cCaption, nRow1, nCol1, nRow2, nCol2, bClickBlock, nType, lDraw, nWin ::bClickBlock := iif(valtype(bClickBlock)=="B", bClickBlock, NIL) ::bPressBlock := NIL - ::lRepeatPress := .f. + ::lRepeatPress := .F. - ::lPressed := .f. - ::lHover := .f. //20040303 + ::lPressed := .F. + ::lHover := .F. //20040303 ::cCaption := cCaption ::cCaptionFont := _DEFAULT_CAPTION_FONT ::nCaptionHeight := _DEFAULT_CAPTION_HEIGHT @@ -159,9 +159,9 @@ METHOD New(cCaption, nRow1, nCol1, nRow2, nCol2, bClickBlock, nType, lDraw, nWin ::cNormalColor := "W" ::cPressedColor := "W" - ::lVisible := .t. - ::lEnable := .t. - ::lTight := .f. + ::lVisible := .T. + ::lEnable := .T. + ::lTight := .F. ::nType := nType if lDraw //20040304 @@ -199,14 +199,14 @@ local lWasPressed endif lWasPressed := ::lPressed - ::lPressed := .t. + ::lPressed := .T. ::Draw() if ::lRepeatPress //.and. ::lPressed if !lWasPressed - xKeyRepeater(.t.) //init it + xKeyRepeater(.T.) //init it endif - wvwm_SetKeyRepeater( .t. ) //activate key repeater + wvwm_SetKeyRepeater( .T. ) //activate key repeater endif if valtype(::bPressBlock) == "B" @@ -232,11 +232,11 @@ local lWasPressed := ::lPressed return Self endif - ::lPressed := .f. + ::lPressed := .F. ::Draw() if ::lRepeatPress //.and. ::lPressed - wvwm_SetKeyRepeater( .f. ) //deactivate key repeater + wvwm_SetKeyRepeater( .F. ) //deactivate key repeater endif if lWasPressed @@ -250,10 +250,10 @@ METHOD OnReleaseOut() CLASS WVWMouseButton return Self endif - ::lPressed := .f. + ::lPressed := .F. ::Draw() - //NOTE: no need to do SetKeyRepeater( .f. ), + //NOTE: no need to do SetKeyRepeater( .F. ), // because it was already handled by onMouseOut return Self @@ -265,10 +265,10 @@ METHOD OnMouseOut() CLASS WVWMouseButton endif if ::lRepeatPress .and. ::lPressed - wvwm_SetKeyRepeater( .f. ) //stop key repeater + wvwm_SetKeyRepeater( .F. ) //stop key repeater endif - ::lHover := .f. + ::lHover := .F. ::Draw() return Self @@ -280,10 +280,10 @@ METHOD OnMouseOver() CLASS WVWMouseButton endif if ::lRepeatPress .and. ::lPressed - wvwm_SetKeyRepeater( .t. ) //activate key repeater + wvwm_SetKeyRepeater( .T. ) //activate key repeater endif - ::lHover := .t. + ::lHover := .T. ::Draw() return Self @@ -324,7 +324,7 @@ local lUseImage := (valtype(::cImage)=="C") //20040325 endif if !empty(::cCaption) - Wvw_DrawLabel(nWinNum, ::nRow1, nCeiling((::nCol2+::nCol1)/2), ::cCaption, 6,, nLabelColor, rgb(198,198,198), ::cCaptionFont, iif(valtype(afontinfo)=="A",afontinfo[2],::nCaptionHeight), 0, , , , .f., .f. ) + Wvw_DrawLabel(nWinNum, ::nRow1, nCeiling((::nCol2+::nCol1)/2), ::cCaption, 6,, nLabelColor, rgb(198,198,198), ::cCaptionFont, iif(valtype(afontinfo)=="A",afontinfo[2],::nCaptionHeight), 0, , , , .F., .F. ) endif else if lMouseOver .or. (::nType==_BUTTON_NORMAL) .or. (::nType==_BUTTON_HARD) @@ -348,7 +348,7 @@ local lUseImage := (valtype(::cImage)=="C") //20040325 endif if !empty(::cCaption) - Wvw_DrawLabel(nWinNum, ::nRow1, nCeiling((::nCol2+::nCol1)/2), ::cCaption, 6,, nLabelColor, rgb(198,198,198), ::cCaptionFont, iif(valtype(afontinfo)=="A",afontinfo[2],::nCaptionHeight), 0, , , , .f., .f. ) + Wvw_DrawLabel(nWinNum, ::nRow1, nCeiling((::nCol2+::nCol1)/2), ::cCaption, 6,, nLabelColor, rgb(198,198,198), ::cCaptionFont, iif(valtype(afontinfo)=="A",afontinfo[2],::nCaptionHeight), 0, , , , .F., .F. ) endif endif setcursor(nOldCursor) @@ -371,13 +371,13 @@ function wvwm_ResetMouseObjects( nWinNum ) aadd( s_amouseobjlist, {} ) enddo s_amouseobjlist[ nWinNum+1 ] := {} -return .t. +return .T. function wvwm_AddMouseObjects( nWinNum, oMouse, nObjType ) * adds a mouse object oMouse into window nWinNum default nObjType to _MOBJECT_BUTTON aadd( s_amouseobjlist[ nWinNum+1 ], {nObjType, oMouse} ) -return .t. +return .T. function wvwm_nNumMouseObjects( nWinNum ) * returns number of mouse objects in window nWinNum @@ -388,7 +388,7 @@ function wvwm_nObjectType( nWinNum, nObjNum ) return s_amouseobjlist[ nWinNum+1 ][nObjNum][1] function wvwm_SetKeyRepeater( lSet ) -* returns .t. if KeyRepeater is active +* returns .T. if KeyRepeater is active * if lSet is supplied, KeyRepeater is enable/disable accordingly local lWasSet := (s_nkeyrepeater != NIL) if !(lSet==NIL) @@ -501,14 +501,14 @@ return nKey //wvwm_nMouseChecker(nkey) static procedure xKeyRepeater(lInit) static nLastValidCheck := 0 -static lFirstRepeat := .t. +static lFirstRepeat := .T. local nNow local nRepeatInterval - default lInit to .f. + default lInit to .F. if lInit * simply init the locally static var - lFirstRepeat := .t. + lFirstRepeat := .T. nLastValidCheck := seconds() return endif @@ -534,7 +534,7 @@ local nRepeatInterval nLastValidCheck := seconds() //nNow * next repeat will be quicker - lFirstRepeat := .f. + lFirstRepeat := .F. return //xKeyRepeater() diff --git a/harbour/extras/gtwvw/tests/wvwtest9.prg b/harbour/extras/gtwvw/tests/wvwtest9.prg index 5e70e0efeb..77ae26b3f5 100644 --- a/harbour/extras/gtwvw/tests/wvwtest9.prg +++ b/harbour/extras/gtwvw/tests/wvwtest9.prg @@ -180,7 +180,7 @@ local ch SET DATE ANSI SET SCOREBOARD OFF //wvw_SetPaintRefresh(0) - wvw_SetVertCaret(.t.) + wvw_SetVertCaret(.T.) wvw_pbSetFont(, "Tahoma", 14) nCursor := setcursor(0) @@ -199,7 +199,7 @@ local ch s_afontinfo := WVW_getfontinfo() hb_gtInfo( HB_GTI_INKEYFILTER, {| nkey | nAfterInkey(nkey) } ) - WVW_SETMOUSEMOVE(,.t.) //required by wvwmouse + WVW_SETMOUSEMOVE(,.T.) //required by wvwmouse kF1 := SetKey( K_F1, {|| xHelp() } ) kF2 := SetKey( K_F2, {|| xDebugInfo() } ) kF3 := SetKey( K_F3, {|| Demo_Console() } ) @@ -251,7 +251,7 @@ local ch CreateToolbar(nCurWindow) ResetMiscObjects( nCurWindow ) - AddMiscObjects( nCurWindow, {| nWindow | WVW_DrawLabel( nWindow, 1,40, cLabel,6,, rgb(255,255,255), rgb(198,198,198), 'Arial', s_afontinfo[2], , , , , .t., .t. ) } ) + AddMiscObjects( nCurWindow, {| nWindow | WVW_DrawLabel( nWindow, 1,40, cLabel,6,, rgb(255,255,255), rgb(198,198,198), 'Arial', s_afontinfo[2], , , , , .T., .T. ) } ) wvwm_ResetMouseObjects( nCurWindow ) wvwm_AddMouseObjects( nCurWindow, WVWMouseButton():New("Info!", maxrow()-2,67, , , {|| xDebugInfo() } )) @@ -262,16 +262,16 @@ local ch wvwm_AddMouseObjects( nCurWindow, oMouse ) oMouse := WVWMouseButton():New("None", maxrow()-2,67-11-11, , , {|| lboxmessage("none") }, 2, NIL ) - oMouse:Enable(.t.) + oMouse:Enable(.T.) wvwm_AddMouseObjects( nCurWindow, oMouse ) wvwm_AddMouseObjects( nCurWindow, WVWMouseButton():New("Hard", maxrow()-2,67-11-11-11, , , {|| lboxmessage("hard") }, 3, NIL )) oMouse := WVWMouseButton():New("Disabled", maxrow()-2,67-11-11-11-11, , , {|| xDebugInfo() } ) - oMouse:Enable(.f.) + oMouse:Enable(.F.) wvwm_AddMouseObjects( nCurWindow, oMouse ) oMouse := WVWMouseButton():New("Tight", maxrow()-2,67-11-11-11-11-11, , , {|| lboxmessage("tight") } ) - oMouse:lTight := .t. + oMouse:lTight := .T. wvwm_AddMouseObjects( nCurWindow, oMouse ) * 20070525 the real pushbutton, easier and better looking. Nothing to do with wvwmouse.prg. @@ -350,7 +350,7 @@ local nCursor local cColor local ch local lMouseMove -local lEchoing := .f. +local lEchoing := .F. default nTop to 2 default nLeft to 2 default nBottom to nTop+10 @@ -367,7 +367,7 @@ local lEchoing := .f. nCursor := setcursor(SC_NORMAL) cColor := setcolor("W+/N") - lMouseMove := WVW_SETMOUSEMOVE(,.f.) + lMouseMove := WVW_SETMOUSEMOVE(,.F.) nMaxrow := maxrow(); nMaxcol := maxcol() ResetMiscObjects( nCurWindow ) @@ -449,7 +449,7 @@ memvar x WVW_SetIcon(, 'vr_1.ico' ) ResetMiscObjects( nCurWindow ) - AddMiscObjects( nCurWindow, {| nWindow | WVW_DrawLabel( nWindow, 1,nRight-nLeft, cLabel,2,, rgb(255,255,255), rgb(198,198,198), 'Arial', s_afontinfo[2], , , , , .t., .t. ) } ) + AddMiscObjects( nCurWindow, {| nWindow | WVW_DrawLabel( nWindow, 1,nRight-nLeft, cLabel,2,, rgb(255,255,255), rgb(198,198,198), 'Arial', s_afontinfo[2], , , , , .T., .T. ) } ) AddMiscObjects( nCurWindow, {| nWindow | WVW_DrawBoxRecessed( nWindow, 7-nTop, 61-nLeft, 13-nTop, 70-nLeft ) } ) AddMiscObjects( nCurWindow, {| nWindow | WVW_DrawBoxGroup( nWindow, 15-nTop, 59-nLeft, 18-nTop, 72-nLeft ) } ) AddMiscObjects( nCurWindow, {| nWindow | WVW_DrawBoxGroup( nWindow, 5-nTop, 6-nLeft, 19-nTop, 44-nLeft ) } ) @@ -496,7 +496,7 @@ RETURN //Demo_Get() FUNCTION DEMO_Browse() LOCAL nKey, bBlock, oBrowse , i - LOCAL lEnd := .f. + LOCAL lEnd := .F. LOCAL info_ := {} //WVW_nOpenWindow() has not been performed, so... LOCAL nTop := 3 //pls notice that this is relative to PARENT window! LOCAL nLeft := 3 //pls notice that this is relative to PARENT window! @@ -583,7 +583,7 @@ FUNCTION DEMO_Browse() do case case nKey == K_ESC .or. nKey == K_ENTER - lEnd := .t. + lEnd := .T. loop case nKey == K_DOWN @@ -677,8 +677,8 @@ local lNeedStabilize nOldWin := wvw_nSetCurWindow(nWinNum) - lNeedStabilize := .f. - do while .t. //dummy loop + lNeedStabilize := .F. + do while .T. //dummy loop do case case XBmsg == 0 //SB_LINEUP if ordKeyNo() == 1; exit; endif @@ -694,10 +694,10 @@ local lNeedStabilize oBrowse:pagedown() otherwise * ignore - lNeedStabilize := .f. + lNeedStabilize := .F. exit endcase - lNeedStabilize := .t. + lNeedStabilize := .T. exit enddo //dummy loop @@ -720,8 +720,8 @@ local lNeedStabilize nOldWin := wvw_nSetCurWindow(nWinNum) - lNeedStabilize := .f. - do while .t. //dummy loop + lNeedStabilize := .F. + do while .T. //dummy loop do case case XBmsg == 0 //SB_LINELEFT if oBrowse:colPos== 1; exit; endif @@ -737,10 +737,10 @@ local lNeedStabilize oBrowse:panright() otherwise * ignore - lNeedStabilize := .f. + lNeedStabilize := .F. exit endcase - lNeedStabilize := .t. + lNeedStabilize := .T. exit enddo //dummy loop if lNeedStabilize @@ -910,7 +910,7 @@ return NIL function CreateToolbar(nWinNum) //for toolbar: local nSysBitmap := 1 //0:none 1:small 2:large -local lDisplayText := .f. //text will be displayed as tooltip instead +local lDisplayText := .F. //text will be displayed as tooltip instead local hWndTB local ldefault @@ -960,14 +960,14 @@ return NIL function xDisableToolbar(nWinNum) local i for i := 0 to wvw_tbButtonCount(nWinNum)-1 - WVW_TBEnableButton(nWinNum, i, .f.) + WVW_TBEnableButton(nWinNum, i, .F.) next return NIL function xEnableToolbar(nWinNum) local i for i := 0 to wvw_tbButtonCount(nWinNum)-1 - WVW_TBEnableButton(nWinNum, i, .t.) + WVW_TBEnableButton(nWinNum, i, .T.) next return NIL @@ -978,11 +978,11 @@ function ResetMiscObjects( nWinNum ) aadd( s_amiscobjlist, {} ) enddo s_amiscobjlist[ nWinNum+1 ] := {} -return .t. +return .T. function AddMiscObjects( nWinNum, bAction ) aadd( s_amiscobjlist[ nWinNum+1 ], bAction ) -return .t. +return .T. // inkey() handler ************************************** @@ -1065,7 +1065,7 @@ return nkey //nMenuChecker() function lBoxMessage(cMsg, cTitle) default cTitle to "Info" win_messagebox(WVW_GETWINDOWHANDLE(), cMsg, cTitle, MB_OK + MB_ICONINFORMATION + MB_SYSTEMMODAL) -return .t. +return .T. function lYesNo(cMsg, cTitle) default cTitle to "Konfirmasi" @@ -1079,7 +1079,7 @@ function xDebugInfo() static s_nfh := 0 MSETPOS(maxrow(), maxcol()) - //SETMOUSE(.t., maxrow(), maxcol()) + //SETMOUSE(.T., maxrow(), maxcol()) //WVW_SETMOUSEPOS(WVW_nNumWindows()-1, maxrow(), maxcol()) @@ -1160,7 +1160,7 @@ return nNumber /* Note: width < 0 appears better, but mouse caption will look bad */ FUNCTION SetDefaultWindowSize() //x was: LOCAL Result:= SetMode(32,98), ScreenWidth - LOCAL Result:= .t., ScreenWidth + LOCAL Result:= .T., ScreenWidth SetMode(25,80) IF Result screenWidth := Wvw_GetScreenWidth() diff --git a/harbour/extras/guestbk/testcgi.prg b/harbour/extras/guestbk/testcgi.prg index 723dc452da..d3bdd27106 100644 --- a/harbour/extras/guestbk/testcgi.prg +++ b/harbour/extras/guestbk/testcgi.prg @@ -222,12 +222,12 @@ STATIC FUNCTION Generate() /* TODO: Clear remaining (not matched) tags */ /* cRes := "" - FOR i := 1 TO len( ::cContent ) + FOR i := 1 TO Len( ::cContent ) IF SubStr( ::cContent, i, 1 ) == "<" .AND. ; SubStr( ::cContent, i + 1, 1 ) == "#" - lFlag := .t. + lFlag := .T. ELSEIF SubStr( ::cContent, i, 1 ) == ">" .AND. lFlag - lFlag := .f. + lFlag := .F. ELSEIF ! lFlag cRes += SubStr( ::cContent, i, 1 ) ENDIF @@ -304,9 +304,9 @@ STATIC FUNCTION ProcessCGI() IF i > Len( cQuery ) .OR. SubStr( cQuery, i, 1 ) == "&" - AAdd( ::aQueryFields, ; + AAdd( ::aQueryFields, ; { SubStr( cBuff, 1, At( "=", cBuff ) - 1 ), ; - StrTran( SubStr( cBuff, At( "=", cBuff ) + 1, ; + StrTran( SubStr( cBuff, At( "=", cBuff ) + 1, ; Len( cBuff ) - At( "=", cBuff ) + 1 ), "+", " " ) } ) cBuff := "" ELSE diff --git a/harbour/extras/hbvpdf/fonts.dat b/harbour/extras/hbvpdf/fonts.dat new file mode 100644 index 0000000000..37957e64ab Binary files /dev/null and b/harbour/extras/hbvpdf/fonts.dat differ diff --git a/harbour/extras/hbvpdf/hbvpdf.prg b/harbour/extras/hbvpdf/hbvpdf.prg index cba349c33a..7a3027271b 100644 --- a/harbour/extras/hbvpdf/hbvpdf.prg +++ b/harbour/extras/hbvpdf/hbvpdf.prg @@ -35,7 +35,7 @@ local _nFont, lReverse, nAt DEFAULT nRow to t_aReport[ REPORTLINE ] DEFAULT cUnits to "R" -DEFAULT lExact to .f. +DEFAULT lExact to .F. DEFAULT cId to "" IF t_aReport[ HEADEREDIT ] @@ -46,7 +46,7 @@ DEFAULT cId to "" cString := left( cString, nAt - 1 ) + ltrim(str( pdfPageNumber())) + substr( cString, nAt + 12 ) ENDIF - lReverse := .f. + lReverse := .F. IF cUnits == "M" nRow := pdfM2Y( nRow ) nCol := pdfM2X( nCol ) @@ -66,7 +66,7 @@ DEFAULT cId to "" cString := left( cString, len( cString ) - 1 ) pdfBox( t_aReport[ PAGEY ] - nRow - t_aReport[ FONTSIZE ] + 2.0 , nCol, t_aReport[ PAGEY ] - nRow + 2.0, nCol + pdfM2X( pdfLen( cString )) + 1,,100, "D") t_aReport[ PAGEBUFFER ] += " 1 g " - lReverse := .t. + lReverse := .T. ELSEIF right( cString, 1 ) == chr(254) //underline cString := left( cString, len( cString ) - 1 ) pdfBox( t_aReport[ PAGEY ] - nRow + 0.5, nCol, t_aReport[ PAGEY ] - nRow + 1, nCol + pdfM2X( pdfLen( cString )) + 1,,100, "D") @@ -347,7 +347,7 @@ function pdfCenter( cString, nRow, nCol, cUnits, lExact, cId ) /* local nLen, nAt DEFAULT nRow to t_aReport[ REPORTLINE ] DEFAULT cUnits to "R" -DEFAULT lExact to .f. +DEFAULT lExact to .F. DEFAULT nCol to iif( cUnits == "R", t_aReport[ REPORTWIDTH ] / 2, t_aReport[ PAGEX ] / 72 * 25.4 / 2 ) IF t_aReport[ HEADEREDIT ] @@ -883,7 +883,7 @@ function pdfOpen( cFile, nLen, lOptimize ) /* ========================================== */ local cTemp, nI, nJ, n1, n2 := 896, n12 DEFAULT nLen to 200 -DEFAULT lOptimize to .f. +DEFAULT lOptimize to .F. t_aReport[ FONTNAME ] := 1 t_aReport[ FONTSIZE ] := 10 @@ -901,8 +901,8 @@ DEFAULT lOptimize to .f. t_aReport[ REPORTOBJ ] := 1//2 t_aReport[ DOCLEN ] := 0 t_aReport[ TYPE1 ] := { "Times-Roman", "Times-Bold", "Times-Italic", "Times-BoldItalic", "Helvetica", "Helvetica-Bold", "Helvetica-Oblique", "Helvetica-BoldOblique", "Courier", "Courier-Bold", "Courier-Oblique", "Courier-BoldOblique" } // 0.04 - t_aReport[ MARGINS ] := .t. - t_aReport[ HEADEREDIT ] := .f. + t_aReport[ MARGINS ] := .T. + t_aReport[ HEADEREDIT ] := .F. t_aReport[ NEXTOBJ ] := 0 t_aReport[ PDFTOP ] := 1 // top t_aReport[ PDFLEFT ] := 10 // left & right @@ -1050,7 +1050,7 @@ function pdfRJust( cString, nRow, nCol, cUnits, lExact, cId ) /* local nLen, nAdj := 1.0, nAt DEFAULT nRow to t_aReport[ REPORTLINE ] DEFAULT cUnits to "R" -DEFAULT lExact to .f. +DEFAULT lExact to .F. IF t_aReport[ HEADEREDIT ] return pdfHeader( "PDFRJUST", cId, { cString, nRow, nCol, cUnits, lExact } ) @@ -1123,7 +1123,7 @@ return cString ==============================================================================*/ function pdfTextCount( cString, nTop, nLeft, nLength, nTab, nJustify, cUnits )/* ==============================================================================*/ -return pdfText( cString, nTop, nLeft, nLength, nTab, nJustify, cUnits, .f. ) +return pdfText( cString, nTop, nLeft, nLength, nTab, nJustify, cUnits, .F. ) /* =================================================================================*/ function pdfText( cString, nTop, nLeft, nLength, nTab, nJustify, cUnits, cColor, lPrint )/* @@ -1134,7 +1134,7 @@ local lParagraph, nSpace, nNew, nTokenLen, nCRLF, nTokens, nLen DEFAULT nTab to -1 DEFAULT cUnits to 'R' DEFAULT nJustify to 4 // justify -DEFAULT lPrint to .t. +DEFAULT lPrint to .T. DEFAULT cColor to "" IF cUnits == "M" @@ -1169,7 +1169,7 @@ DEFAULT cColor to "" nL += nNew * nSpace // first always paragraph nLineLen := nSpace * nNew - nSpace - lParagraph := .t. + lParagraph := .T. nI := 1 while nI <= nTokens @@ -1189,7 +1189,7 @@ DEFAULT cColor to "" IF nJustify != 2 nL += nSpace * nNew ENDIF - lParagraph := .f. + lParagraph := .F. ENDIF IF nJustify == 2 nL := nLeft + ( nLength - pdfLen( cTemp ) ) / 2 @@ -1278,7 +1278,7 @@ local nFinish, nL, nB, nJ, cToken, nRow nStart := nFinish + 1 - lParagraph := .f. + lParagraph := .F. nLineLen := 0.00 nLineLen += nSpace * nNew @@ -1340,22 +1340,22 @@ DEFAULT cFile to "" ELSE t_aReport[ HEADER ] := {} ENDIF - t_aReport[ MARGINS ] := .t. + t_aReport[ MARGINS ] := .T. return nil function pdfEditOnHeader() - t_aReport[ HEADEREDIT ] := .t. - t_aReport[ MARGINS ] := .t. + t_aReport[ HEADEREDIT ] := .T. + t_aReport[ MARGINS ] := .T. return nil function pdfEditOffHeader() - t_aReport[ HEADEREDIT ] := .f. - t_aReport[ MARGINS ] := .t. + t_aReport[ HEADEREDIT ] := .F. + t_aReport[ MARGINS ] := .T. return nil function pdfCloseHeader() t_aReport[ HEADER ] := {} - t_aReport[ MARGINS ] := .f. + t_aReport[ MARGINS ] := .F. return nil function pdfDeleteHeader( cId ) @@ -1366,7 +1366,7 @@ local nRet := -1, nId nRet := len( t_aReport[ HEADER ] ) - 1 aDel( t_aReport[ HEADER ], nId ) aSize( t_aReport[ HEADER ], nRet ) - t_aReport[ MARGINS ] := .t. + t_aReport[ MARGINS ] := .T. ENDIF return nRet @@ -1375,8 +1375,8 @@ local nId cId := upper( cId ) nId := ascan( t_aReport[ HEADER ], {| arr | arr[ 3 ] == cId }) IF nId > 0 - t_aReport[ HEADER ][ nId ][ 1 ] := .t. - t_aReport[ MARGINS ] := .t. + t_aReport[ HEADER ][ nId ][ 1 ] := .T. + t_aReport[ MARGINS ] := .T. ENDIF return nil @@ -1385,8 +1385,8 @@ local nId cId := upper( cId ) nId := ascan( t_aReport[ HEADER ], {| arr | arr[ 3 ] == cId }) IF nId > 0 - t_aReport[ HEADER ][ nId ][ 1 ] := .f. - t_aReport[ MARGINS ] := .t. + t_aReport[ HEADER ][ nId ][ 1 ] := .F. + t_aReport[ MARGINS ] := .T. ENDIF return nil @@ -1417,7 +1417,7 @@ local nId, nI, nLen, nIdLen ++nId cId += ltrim(str(nId)) ENDIF - aadd( t_aReport[ HEADER ], { .t., cFunction, cId } ) + aadd( t_aReport[ HEADER ], { .T., cFunction, cId } ) ++nLen for nI := 1 to len( arr ) aadd( t_aReport[ HEADER ][ nLen ], arr[ nI ] ) @@ -1476,7 +1476,7 @@ local nI, _nFont, _nSize, nLen := len( t_aReport[ HEADER ] ) t_aReport[ PDFLEFT ] := 10 // left & right t_aReport[ PDFBOTTOM ] := t_aReport[ PAGEY ] / 72 * t_aReport[ LPI ] - 1 // bottom, default "LETTER", "P", 6 - t_aReport[ MARGINS ] := .f. + t_aReport[ MARGINS ] := .F. ENDIF ENDIF return nil @@ -1650,7 +1650,7 @@ local nI, nLen := len( t_aReport[ HEADER ] ), nTemp, aTemp, nHeight ENDIF next - t_aReport[ MARGINS ] := .f. + t_aReport[ MARGINS ] := .F. return nil @@ -1726,22 +1726,22 @@ DEFAULT _width to 200 ENDIF pdfSetFont("Helvetica", BOLD, 10) // 0.04 - pdfAtSay( "Test Line 1", t_aReportStyle[ nStyle ][ 1 ], 1, "R", .t. ) + pdfAtSay( "Test Line 1", t_aReportStyle[ nStyle ][ 1 ], 1, "R", .T. ) pdfSetFont("Times", BOLD, 18) - pdfCenter( "Test Line 2", t_aReportStyle[ nStyle ][ 2 ],,"R", .t. ) + pdfCenter( "Test Line 2", t_aReportStyle[ nStyle ][ 2 ],,"R", .T. ) pdfSetFont("Times", BOLD, 12) - pdfCenter( "Test Line 3", t_aReportStyle[ nStyle ][ 3 ],,"R", .t. ) + pdfCenter( "Test Line 3", t_aReportStyle[ nStyle ][ 3 ],,"R", .T. ) pdfSetFont("Helvetica", BOLD, 10) // 0.04 - pdfAtSay( "Test Line 4", t_aReportStyle[ nStyle ][ 4 ], 1, "R", .t. ) + pdfAtSay( "Test Line 4", t_aReportStyle[ nStyle ][ 4 ], 1, "R", .T. ) pdfSetFont("Helvetica", BOLD, 10) // 0.04 - pdfAtSay( "Test Line 5", t_aReportStyle[ nStyle ][ 5 ], 1, "R", .t. ) + pdfAtSay( "Test Line 5", t_aReportStyle[ nStyle ][ 5 ], 1, "R", .T. ) - pdfAtSay( dtoc( date()) + " " + TimeAsAMPM( time() ), t_aReportStyle[ nStyle ][ 6 ], 1, "R", .t. ) - pdfRJust( "Page: #pagenumber#", t_aReportStyle[ nStyle ][ 6 ], t_aReport[ REPORTWIDTH ], "R", .t. ) + pdfAtSay( dtoc( date()) + " " + TimeAsAMPM( time() ), t_aReportStyle[ nStyle ][ 6 ], 1, "R", .T. ) + pdfRJust( "Page: #pagenumber#", t_aReportStyle[ nStyle ][ 6 ], t_aReport[ REPORTWIDTH ], "R", .T. ) pdfEditOffHeader() pdfSaveHeader( _file ) diff --git a/harbour/extras/hbvpdf/hbvpdft.prg b/harbour/extras/hbvpdf/hbvpdft.prg index 54ddaac76c..28cdb320ad 100644 --- a/harbour/extras/hbvpdf/hbvpdft.prg +++ b/harbour/extras/hbvpdf/hbvpdft.prg @@ -133,7 +133,7 @@ METHOD Init( cFile, nLen, lOptimize ) local cTemp, nI, nJ, n1, n2 := 896, n12 DEFAULT nLen TO 200 -DEFAULT lOptimize TO .f. +DEFAULT lOptimize TO .F. ::aReport := array( PARAMLEN ) @@ -155,8 +155,8 @@ DEFAULT lOptimize TO .f. ::aReport[ TYPE1 ] := { "Times-Roman", "Times-Bold", "Times-Italic", "Times-BoldItalic", ; "Helvetica", "Helvetica-Bold", "Helvetica-Oblique", "Helvetica-BoldOblique", ; "Courier", "Courier-Bold", "Courier-Oblique", "Courier-BoldOblique" } -::aReport[ MARGINS ] := .t. -::aReport[ HEADEREDIT ] := .f. +::aReport[ MARGINS ] := .T. +::aReport[ HEADEREDIT ] := .F. ::aReport[ NEXTOBJ ] := 0 ::aReport[ PDFTOP ] := 1 // top ::aReport[ PDFLEFT ] := 10 // left & right @@ -205,7 +205,7 @@ local _nFont, lReverse, nAt DEFAULT nRow TO ::aReport[ REPORTLINE ] DEFAULT cUnits TO "R" -DEFAULT lExact TO .f. +DEFAULT lExact TO .F. DEFAULT cId TO "" IF ::aReport[ HEADEREDIT ] @@ -216,7 +216,7 @@ DEFAULT cId TO "" cString := left( cString, nAt - 1 ) + ltrim(str( ::PageNumber())) + substr( cString, nAt + 12 ) ENDIF - lReverse := .f. + lReverse := .F. IF cUnits == "M" nRow := ::M2Y( nRow ) nCol := ::M2X( nCol ) @@ -236,7 +236,7 @@ DEFAULT cId TO "" cString := left( cString, len( cString ) - 1 ) ::Box( ::aReport[ PAGEY ] - nRow - ::aReport[ FONTSIZE ] + 2.0 , nCol, ::aReport[ PAGEY ] - nRow + 2.0, nCol + ::M2X( ::length( cString )) + 1,,100, "D") ::aReport[ PAGEBUFFER ] += " 1 g " - lReverse := .t. + lReverse := .T. ELSEIF right( cString, 1 ) == chr(254) //underline cString := left( cString, len( cString ) - 1 ) ::Box( ::aReport[ PAGEY ] - nRow + 0.5, nCol, ::aReport[ PAGEY ] - nRow + 1, nCol + ::M2X( ::length( cString )) + 1,,100, "D") @@ -503,7 +503,7 @@ METHOD Center( cString, nRow, nCol, cUnits, lExact, cId ) local nLen, nAt DEFAULT nRow TO ::aReport[ REPORTLINE ] DEFAULT cUnits TO "R" -DEFAULT lExact TO .f. +DEFAULT lExact TO .F. DEFAULT nCol TO iif( cUnits == "R", ::aReport[ REPORTWIDTH ] / 2, ::aReport[ PAGEX ] / 72 * 25.4 / 2 ) IF ::aReport[ HEADEREDIT ] @@ -893,7 +893,7 @@ local nLen, nAdj := 1.0, nAt DEFAULT nRow TO ::aReport[ REPORTLINE ] DEFAULT cUnits TO "R" -DEFAULT lExact TO .f. +DEFAULT lExact TO .F. IF ::aReport[ HEADEREDIT ] return ::Header( "PDFRJUST", cId, { cString, nRow, nCol, cUnits, lExact } ) @@ -986,7 +986,7 @@ METHOD tPdf:TextCount( cString, nTop, nLeft, nLength, nTab, nJustify, cUnits ) METHOD TextCount( cString, nTop, nLeft, nLength, nTab, nJustify, cUnits ) #endif -RETURN ::Text( cString, nTop, nLeft, nLength, nTab, nJustify, cUnits, .f. ) +RETURN ::Text( cString, nTop, nLeft, nLength, nTab, nJustify, cUnits, .F. ) //-------------------------\\ @@ -1003,7 +1003,7 @@ local lParagraph, nSpace, nNew, nTokenLen, nCRLF, nTokens, nLen DEFAULT nTab TO -1 DEFAULT cUnits TO "R" DEFAULT nJustify TO 4 -DEFAULT lPrint TO .t. +DEFAULT lPrint TO .T. DEFAULT cColor TO "" IF cUnits == "M" @@ -1037,7 +1037,7 @@ DEFAULT cColor TO "" nL += nNew * nSpace nLineLen := nSpace * nNew - nSpace - lParagraph := .t. + lParagraph := .T. nI := 1 while nI <= nTokens @@ -1057,7 +1057,7 @@ DEFAULT cColor TO "" IF nJustify != 2 nL += nSpace * nNew ENDIF - lParagraph := .f. + lParagraph := .F. ENDIF IF nJustify == 2 nL := nLeft + ( nLength - ::length( cTemp ) ) / 2 @@ -1146,7 +1146,7 @@ DEFAULT cFile TO "" ELSE ::aReport[ HEADER ] := {} ENDIF - ::aReport[ MARGINS ] := .t. + ::aReport[ MARGINS ] := .T. RETURN self @@ -1158,8 +1158,8 @@ METHOD tPdf:EditOnHeader() METHOD EditOnHeader() #endif -::aReport[ HEADEREDIT ] := .t. -::aReport[ MARGINS ] := .t. +::aReport[ HEADEREDIT ] := .T. +::aReport[ MARGINS ] := .T. RETURN self @@ -1171,8 +1171,8 @@ METHOD tPdf:EditOffHeader() METHOD EditOffHeader() #endif -::aReport[ HEADEREDIT ] := .f. -::aReport[ MARGINS ] := .t. +::aReport[ HEADEREDIT ] := .F. +::aReport[ MARGINS ] := .T. RETURN self @@ -1185,7 +1185,7 @@ METHOD CloseHeader() #endif ::aReport[ HEADER ] := {} - ::aReport[ MARGINS ] := .f. + ::aReport[ MARGINS ] := .F. RETURN self //-------------------------\\ @@ -1203,7 +1203,7 @@ local nRet := -1, nId nRet := len( ::aReport[ HEADER ] ) - 1 aDel( ::aReport[ HEADER ], nId ) aSize( ::aReport[ HEADER ], nRet ) - ::aReport[ MARGINS ] := .t. + ::aReport[ MARGINS ] := .T. ENDIF RETURN nRet @@ -1219,8 +1219,8 @@ local nId cId := upper( cId ) nId := ascan( ::aReport[ HEADER ], {| arr | arr[ 3 ] == cId }) IF nId > 0 - ::aReport[ HEADER ][ nId ][ 1 ] := .t. - ::aReport[ MARGINS ] := .t. + ::aReport[ HEADER ][ nId ][ 1 ] := .T. + ::aReport[ MARGINS ] := .T. ENDIF RETURN self @@ -1236,8 +1236,8 @@ local nId cId := upper( cId ) nId := ascan( ::aReport[ HEADER ], {| arr | arr[ 3 ] == cId }) IF nId > 0 - ::aReport[ HEADER ][ nId ][ 1 ] := .f. - ::aReport[ MARGINS ] := .t. + ::aReport[ HEADER ][ nId ][ 1 ] := .F. + ::aReport[ MARGINS ] := .T. ENDIF RETURN self @@ -1287,7 +1287,7 @@ local nId, nI, nLen, nIdLen ++nId cId += ltrim(str(nId)) ENDIF - aadd( ::aReport[ HEADER ], { .t., cFunction, cId } ) + aadd( ::aReport[ HEADER ], { .T., cFunction, cId } ) ++nLen for nI := 1 to len( arr ) aadd( ::aReport[ HEADER ][ nLen ], arr[ nI ] ) @@ -1353,7 +1353,7 @@ local nI, _nFont, _nSize, nLen := len( ::aReport[ HEADER ] ) ::aReport[ PDFLEFT ] := 10 // left & right ::aReport[ PDFBOTTOM ] := ::aReport[ PAGEY ] / 72 * ::aReport[ LPI ] - 1 // bottom, default "LETTER", "P", 6 - ::aReport[ MARGINS ] := .f. + ::aReport[ MARGINS ] := .F. ENDIF ENDIF RETURN self @@ -1532,7 +1532,7 @@ local nI, nLen := len( ::aReport[ HEADER ] ), nTemp, aTemp, nHeight ::aReport[ PDFBOTTOM ] := nBottom ENDIF - ::aReport[ MARGINS ] := .f. + ::aReport[ MARGINS ] := .F. RETURN self @@ -1615,22 +1615,22 @@ DEFAULT _width TO 200 ENDIF ::SetFont("Arial", BOLD, 10) - ::AtSay( "Test Line 1", aReportStyle[ nStyle ][ 1 ], 1, "R", .t. ) + ::AtSay( "Test Line 1", aReportStyle[ nStyle ][ 1 ], 1, "R", .T. ) ::SetFont("Times", BOLD, 18) - ::Center( "Test Line 2", aReportStyle[ nStyle ][ 2 ],,"R", .t. ) + ::Center( "Test Line 2", aReportStyle[ nStyle ][ 2 ],,"R", .T. ) ::SetFont("Times", BOLD, 12) - ::Center( "Test Line 3", aReportStyle[ nStyle ][ 3 ],,"R", .t. ) + ::Center( "Test Line 3", aReportStyle[ nStyle ][ 3 ],,"R", .T. ) ::SetFont("Arial", BOLD, 10) - ::AtSay( "Test Line 4", aReportStyle[ nStyle ][ 4 ], 1, "R", .t. ) + ::AtSay( "Test Line 4", aReportStyle[ nStyle ][ 4 ], 1, "R", .T. ) ::SetFont("Arial", BOLD, 10) - ::AtSay( "Test Line 5", aReportStyle[ nStyle ][ 5 ], 1, "R", .t. ) + ::AtSay( "Test Line 5", aReportStyle[ nStyle ][ 5 ], 1, "R", .T. ) - ::AtSay( dtoc( date()) + " " + TimeAsAMPM( time() ), aReportStyle[ nStyle ][ 6 ], 1, "R", .t. ) - ::RJust( "Page: #pagenumber#", aReportStyle[ nStyle ][ 6 ], ::aReport[ REPORTWIDTH ], "R", .t. ) + ::AtSay( dtoc( date()) + " " + TimeAsAMPM( time() ), aReportStyle[ nStyle ][ 6 ], 1, "R", .T. ) + ::RJust( "Page: #pagenumber#", aReportStyle[ nStyle ][ 6 ], ::aReport[ REPORTWIDTH ], "R", .T. ) ::EditOffHeader() ::SaveHeader( _file ) @@ -2140,7 +2140,7 @@ local nFinish, nL, nB, nJ, cToken, nRow nStart := nFinish + 1 - lParagraph := .f. + lParagraph := .F. nLineLen := 0.00 nLineLen += nSpace * nNew @@ -2621,7 +2621,7 @@ RETURN n //-------------------------\\ static function RunExternal( cCmd, cVerb, cFile ) -local lRet := .t. +local lRet := .T. #ifdef __CLP__ lRet := SwpRunCmd( cCmd, 0, "", "" ) @@ -2639,7 +2639,7 @@ local lRet := .t. #endif #ifdef __XPP__ - RunShell( cCmd, , .t., .t. ) + RunShell( cCmd, , .T., .T. ) #endif return lRet diff --git a/harbour/extras/hbvpdf/hbvpsup.prg b/harbour/extras/hbvpdf/hbvpsup.prg index dd73d6db2f..8097ac1159 100644 --- a/harbour/extras/hbvpdf/hbvpsup.prg +++ b/harbour/extras/hbvpdf/hbvpsup.prg @@ -3,99 +3,4 @@ */ FUNCTION vpdf_FontsDat() - RETURN hb_base64Decode( ; - "+gD6APoA+gBNAU0BTQGFAZgBKwKkASsC9AH0AfQB9AH0AfQB9AH0AUED6ANBA0EDCgNBAwoDCgNN" +; - "AU0BTQFNAU0BTQFNAU0BTQFNAU0BTQH0AfQB9AH0ATQCOgKjAjoC+gD6APoA+gBNAU0BTQFNAfoA" +; - "+gD6APoAFgEWARYBFgH0AfQB9AH0AfQB9AH0AfQB9AH0AfQB9AH0AfQB9AH0AfQB9AH0AfQB9AH0" +; - "AfQB9AH0AfQB9AH0AfQB9AH0AfQB9AH0AfQB9AH0AfQB9AH0ARYBTQFNAU0BFgFNAU0BTQE0AjoC" +; - "owI6AjQCOgKjAjoCNAI6AqMCOgK8AfQB9AH0AZkDogOYA0AD0gLSAmMCmwKbApsCYwKbApsC0gKb" +; - "ApsC0gLSAtIC0gJjApsCYwKbAiwCYwJjApsC0gIKA9IC0gLSAgoD0gIKA00BhQFNAYUBhQH0AbwB" +; - "9AHSAgoDmwKbAmMCmwIsAmMCeQOwA0EDeQPSAtICmwLSAtICCgPSAtICLAJjAmMCYwLSAgoD0gLS" +; - "ApsC0gJjApsCLAIsAvQBLAJjApsCLAJjAtIC0gLSAtIC0gLSAmMCmwKwA+gDQQN5A9IC0gJjApsC" +; - "0gLSAiwCYwJjApsCLAJjAk0BTQGFAU0BFgEWARYBFgFNAU0BhQFNAdUBRQKmAToC9AH0AfQB9AFN" +; - "AU0BTQFNAbwB9AH0AfQB9AEsAvQB9AG8AbwBvAG8AfQBLAL0AfQBvAG8AbwBvAFNAU0BFgFNAfQB" +; - "9AH0AfQB9AEsAvQBLAIWARYBFgEWARYBTQEWARYB9AEsArwB9AEWARYBFgEWAQoDQQPSAgoD9AEs" +; - "AvQBLAL0AfQB9AH0AfQBLAL0AfQB9AEsAvQB9AFNAbwBhQGFAYUBhQGFAYUBFgFNARYBFgH0ASwC" +; - "9AEsAvQB9AG8AbwB0gLSApsCmwL0AfQBvAH0AfQB9AG8AbwBvAG8AYUBhQHgAYoBkAFcAcgA3AAT" +; - "AdwA4AGKAZABXAEdAggCHQI6AgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" +; - "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" +; - "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" +; - "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" +; - "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" +; - "AAAAAAAATQFNAYUBhQH0AfQB9AH0AfQB9AH0AfQBpwCnAKcApwD0AfQB9AH0AfQB9AH0AfQB9AH0" +; - "AfQB9AH0AfQB9AH0AbQAFgHWABYBvAH0ASwC9AH0AfQB9AH0AU0BTQFNAU0BTQFNAU0BTQEsAiwC" +; - "9AEsAiwCLAL0ASwCAAAAAAAAAAD0AfQB9AH0AfQB9AH0AfQB9AH0AfQB9AH6APoA+gD6AAAAAAAA" +; - "AAAAxQEcAgsC9AFeAV4BXgFeAU0BTQFNAU0BvAH0ASwC9AG8AfQBLAL0AfQB9AH0AfQB6APoA3kD" +; - "6APoA+gD6APoAwAAAAAAAAAAvAH0AfQB9AEAAAAAAAAAAE0BTQFNAU0BTQFNAU0BTQFNAU0BTQFN" +; - "AU0BTQFNAU0BTQFNAU0BTQFNAU0BTQFNAU0BTQFNAU0BTQFNAU0BTQEAAAAAAAAAAE0BTQFNAU0B" +; - "TQFNAU0BTQEAAAAAAAAAAE0BTQFNAU0BTQFNAU0BTQFNAU0BTQFNAegD6AN5A+gDAAAAAAAAAAAA" +; - "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" +; - "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" +; - "AAAAAAB5A+gDeQOwAwAAAAAAAAAAFAEsARQBCgEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" +; - "AAAAAGMCmwIsAmMC0gIKA9IC0gJ5A+gDsAOwAzYBSgE2ASwBAAAAAAAAAAAAAAAAAAAAAAAAAAAA" +; - "AAAAAAAAAAAAAAAAAAAAAAAAAJsC0gKbAtICAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFgEWARYB" +; - "FgEAAAAAAAAAAAAAAAAAAAAAFgEWARYBFgH0AfQB9AH0AdIC0gKbAtIC9AEsAvQB9AEAAAAAAAAA" +; - "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABYBFgEWARYBFgFNARYBTQFjAdoBYwHaASwCLAIsAiwC" +; - "LAIsAiwCLAJ5A3kDeQN5A5sC0gKbAtIC3gAWAd4AFgFNAU0BTQFNAU0BTQFNAU0BhQGFAYUBhQFI" +; - "AkgCSAJIAhYBFgEWARYBTQFNAU0BTQEWARYBFgEWARYBFgEWARYBLAIsAiwCLAIsAiwCLAIsAiwC" +; - "LAIsAiwCLAIsAiwCLAIsAiwCLAIsAiwCLAIsAiwCLAIsAiwCLAIsAiwCLAIsAiwCLAIsAiwCLAIs" +; - "AiwCLAIWAU0BFgFNARYBTQEWAU0BSAJIAkgCSAJIAkgCSAJIAkgCSAJIAkgCLAJjAiwCYwL3A88D" +; - "9wPPA5sC0gKbAtICmwLSApsC0gLSAtIC0gLSAtIC0gLSAtICmwKbApsCmwJjAmMCYwJjAgoDCgMK" +; - "AwoD0gLSAtIC0gIWARYBFgEWAfQBLAL0ASwCmwLSApsC0gIsAmMCLAJjAkEDQQNBA0ED0gLSAtIC" +; - "0gIKAwoDCgMKA5sCmwKbApsCCgMKAwoDCgPSAtIC0gLSApsCmwKbApsCYwJjAmMCYwLSAtIC0gLS" +; - "ApsCmwKbApsCsAOwA7ADsAObApsCmwKbApsCmwKbApsCYwJjAmMCYwIWAU0BFgFNARYBFgEWARYB" +; - "FgFNARYBTQHVAUgC1QFIAiwCLAIsAiwC3gAWAd4AFgEsAiwCLAIsAiwCYwIsAmMC9AEsAvQBLAIs" +; - "AmMCLAJjAiwCLAIsAiwCFgFNARYBTQEsAmMCLAJjAiwCYwIsAmMC3gAWAd4AFgHeABYB3gAWAfQB" +; - "LAL0ASwC3gAWAd4AFgFBA3kDQQN5AywCYwIsAmMCLAJjAiwCYwIsAmMCLAJjAiwCYwIsAmMCTQGF" +; - "AU0BhQH0ASwC9AEsAhYBTQEWAU0BLAJjAiwCYwL0ASwC9AEsAtICCgPSAgoD9AEsAvQBLAL0ASwC" +; - "9AEsAvQB9AH0AfQBTgGFAU4BhQEEARgBBAEYAU4BhQFOAYUBSAJIAkgCSAIAAAAAAAAAAAAAAAAA" +; - "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" +; - "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" +; - "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" +; - "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" +; - "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE0BTQFNAU0BLAIsAiwCLAIsAiwCLAIsAqcA" +; - "pwCnAKcALAIsAiwCLAIsAiwCLAIsAiwCLAIsAiwCLAIsAiwCLAK/AO4AvwDuAE0B9AFNAfQBLAIs" +; - "AiwCLAJNAU0BTQFNAU0BTQFNAU0B9AFjAvQBYwL0AWMC9AFjAgAAAAAAAAAALAIsAiwCLAIsAiwC" +; - "LAIsAiwCLAIsAiwCFgEWARYBFgEAAAAAAAAAABkCLAIZAiwCXgFeAV4BXgHeABYB3gAWAU0B9AFN" +; - "AfQBTQH0AU0B9AEsAiwCLAIsAugD6APoA+gD6APoA+gD6AMAAAAAAAAAAGMCYwJjAmMCAAAAAAAA" +; - "AABNAU0BTQFNAU0BTQFNAU0BTQFNAU0BTQFNAU0BTQFNAU0BTQFNAU0BTQFNAU0BTQFNAU0BTQFN" +; - "AU0BTQFNAU0BAAAAAAAAAABNAU0BTQFNAU0BTQFNAU0BAAAAAAAAAABNAU0BTQFNAU0BTQFNAU0B" +; - "TQFNAU0BTQHoA+gD6APoAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" +; - "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" +; - "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA6APoA+gD6AMAAAAAAAAAAHIBcgFyAXIBAAAA" +; - "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAsAmMCLAJjAgoDCgMKAwoD6APoA+gD6ANtAW0B" +; - "bQFtAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB5A3kDeQN5AwAAAAAA" +; - "AAAAAAAAAAAAAAAAAAAAAAAAABYBFgEWARYBAAAAAAAAAAAAAAAAAAAAAN4AFgHeABYBYwJjAmMC" +; - "YwKwA7ADsAOwA2MCYwJjAmMCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABYAlgCWAJY" +; - "AlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgC" +; - "WAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJY" +; - "AlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgC" +; - "WAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJY" +; - "AlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgC" +; - "WAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJY" +; - "AlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgC" +; - "WAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJY" +; - "AlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgC" +; - "WAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJY" +; - "AlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgC" +; - "WAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJY" +; - "AlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgC" +; - "WAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJY" +; - "AlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgC" +; - "WAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJY" +; - "AlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgC" +; - "WAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJY" +; - "AlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgC" +; - "WAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJY" +; - "AlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgC" +; - "WAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJY" +; - "AlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgC" +; - "WAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJY" +; - "AlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgC" +; - "WAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJY" +; - "AlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgC" +; - "WAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJY" +; - "AlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgC" +; - "WAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJY" +; - "AlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgC" +; - "WAJYAlgCWAJYAlgCWAJYAlgC" ) + #pragma __streaminclude "fonts.dat" | RETURN { %s } diff --git a/harbour/extras/hbvpdf/tests/pdf_demo.prg b/harbour/extras/hbvpdf/tests/pdf_demo.prg index 821f503eb9..6a035e34f9 100644 --- a/harbour/extras/hbvpdf/tests/pdf_demo.prg +++ b/harbour/extras/hbvpdf/tests/pdf_demo.prg @@ -4,36 +4,37 @@ #include "hbvpdf.ch" -procedure main() +PROCEDURE Main() - local aReport - local nWidth, nTab, nI, nJ, nK, nCol, nRow, aStyle, aFonts - local nTop, nLeft, nBottom, nRight, cTestFile - local aColor := { ; - "FF0000", "8B0000", "800000", "FF4500", "D2691E", "B8860B", "FF8C00", "FFA500", "DAA520", "808000", "FFD700", "FFFF00", "ADFF2F", "9ACD32", "7FFF00", "7CFC00", "00FF00", "32CD32", "008000", "006400",; - "66CDAA", "7FFFD4", "87CEFA", "87CEEB", "F0F8FF", "E0FFFF", "B0C4DE", "B0E0E6", "AFEEEE", "ADD8E6", "8FBC8F", "90EE90", "98FB98", "00FA9A", "00FF7F", "3CB371", "2E8B57", "228B22", "556B2F", "6B8E23",; - "5F9EA0", "40E0D0", "48D1CC", "00CED1", "20B2AA", "008B8B", "008080", "2F4F4F", "00BFFF", "00FFFF", "00FFFF", "0000FF", "0000CD", "00008B", "000080", "1E90FF", "4169E1", "4682B4", "6495ED", "7B68EE",; - "C71585", "FF1493", "FF00FF", "FF00FF", "9370DB", "DDADDD", "DB7093", "FF69B4", "DA70D6", "EE82EE", "BA55D3", "9932CC", "8A2BE2", "9400D3", "8B008B", "800080", "4B0082", "191970", "483D8B", "6A5ACD",; - "DC143C", "B22222", "A52A2A", "CD5C5C", "FA8072", "E9967A", "FFA07A", "F5DEB3", "FFDEAD", "EEE8AA", "FFDAB9", "FFE4C4", "FFEFD5", "FFE4E1", "FFE4B5", "D2B48C", "DEB887", "F0E68C", "BDB76B", "F4A460",; - "FDF5E6", "FFF8DC", "FAF0E6", "FAFAD2", "FFFACD", "FFEBCD", "FFFFE0", "FAEBD7", "FFF5EE", "FFF0F5", "D8BFD8", "FFC0CB", "FFB6C1", "BC8F8F", "F08080", "FF7F50", "FF6347", "8B4513", "A0522D", "CD853F",; - "FFFAFA", "FFFFF0", "E6E6FA", "FFFAF0", "F8F8FF", "F0FFF0", "F5F5DC", "F0FFFF", "F5FFFA", "708090", "778899", "F5F5F5", "DCDCDC", "D3D3D3", "C0C0C0", "A9A9A9", "808080", "696969", "000000", "FFFFFF"} + LOCAL aReport + LOCAL nWidth, nTab, nI, nJ, nK, nCol, nRow, aStyle, aFonts + LOCAL nTop, nLeft, nBottom, nRight, cTestFile + LOCAL aColor := { ; + "FF0000", "8B0000", "800000", "FF4500", "D2691E", "B8860B", "FF8C00", "FFA500", "DAA520", "808000", "FFD700", "FFFF00", "ADFF2F", "9ACD32", "7FFF00", "7CFC00", "00FF00", "32CD32", "008000", "006400", ; + "66CDAA", "7FFFD4", "87CEFA", "87CEEB", "F0F8FF", "E0FFFF", "B0C4DE", "B0E0E6", "AFEEEE", "ADD8E6", "8FBC8F", "90EE90", "98FB98", "00FA9A", "00FF7F", "3CB371", "2E8B57", "228B22", "556B2F", "6B8E23", ; + "5F9EA0", "40E0D0", "48D1CC", "00CED1", "20B2AA", "008B8B", "008080", "2F4F4F", "00BFFF", "00FFFF", "00FFFF", "0000FF", "0000CD", "00008B", "000080", "1E90FF", "4169E1", "4682B4", "6495ED", "7B68EE", ; + "C71585", "FF1493", "FF00FF", "FF00FF", "9370DB", "DDADDD", "DB7093", "FF69B4", "DA70D6", "EE82EE", "BA55D3", "9932CC", "8A2BE2", "9400D3", "8B008B", "800080", "4B0082", "191970", "483D8B", "6A5ACD", ; + "DC143C", "B22222", "A52A2A", "CD5C5C", "FA8072", "E9967A", "FFA07A", "F5DEB3", "FFDEAD", "EEE8AA", "FFDAB9", "FFE4C4", "FFEFD5", "FFE4E1", "FFE4B5", "D2B48C", "DEB887", "F0E68C", "BDB76B", "F4A460", ; + "FDF5E6", "FFF8DC", "FAF0E6", "FAFAD2", "FFFACD", "FFEBCD", "FFFFE0", "FAEBD7", "FFF5EE", "FFF0F5", "D8BFD8", "FFC0CB", "FFB6C1", "BC8F8F", "F08080", "FF7F50", "FF6347", "8B4513", "A0522D", "CD853F", ; + "FFFAFA", "FFFFF0", "E6E6FA", "FFFAF0", "F8F8FF", "F0FFF0", "F5F5DC", "F0FFFF", "F5FFFA", "708090", "778899", "F5F5F5", "DCDCDC", "D3D3D3", "C0C0C0", "A9A9A9", "808080", "696969", "000000", "FFFFFF" } aReport := PdfInit() - set date format "YYYY/MM/DD" // important for save/load array function!!! + SET DATE FORMAT "YYYY/MM/DD" // important for save/load array function!!! aStyle := { "Normal", "Bold", "Italic", "BoldItalic" } - aFonts := { { "Times", .t., .t., .t., .t. },; - { "Helvetica", .t., .t., .t., .t. },; - { "Courier", .t., .t., .t., .t. } } + aFonts := {; + { "Times", .T. , .T. , .T. , .T. }, ; + { "Helvetica", .T. , .T. , .T. , .T. }, ; + { "Courier", .T. , .T. , .T. , .T. } } - pdfOpen("test.pdf", 200, .t.) + pdfOpen( "test.pdf", 200, .T. ) pdfEditOnHeader() pdfImage( "files" + hb_ps() + "color.tif", 0, 0, "M" ) // file, row, col, units, height, width pdfEditOffHeader() - pdfSaveHeader("test.hea") + pdfSaveHeader( "test.hea" ) pdfCloseHeader() pdfBookOpen() @@ -43,12 +44,12 @@ procedure main() pdfBookAdd( "Grids & Borders", 1, aReport[ REPORTPAGE ], 0 ) pdfBookAdd( "Simple Grid", 2, aReport[ REPORTPAGE ], 0 ) - for nI := 0 to 792 step 36 - pdfBox( nI, 0, nI, 612, 0.01, , "D" ) - next - for nI := 0 to 612 step 36 - pdfBox( 0, nI, 792, nI, 0.01, , "D" ) - next + FOR nI := 0 TO 792 STEP 36 + pdfBox( nI, 0, nI, 612, 0.01, , "D" ) + NEXT + FOR nI := 0 TO 612 STEP 36 + pdfBox( 0, nI, 792, nI, 0.01, , "D" ) + NEXT pdfNewPage( "LETTER", "P", 6 ) pdfBookAdd( "10 dots border ", 2, aReport[ REPORTPAGE ], 0 ) @@ -71,111 +72,112 @@ procedure main() pdfBox( nRow + 80, ( nCol * 2 ) + 80, ( nRow * 3 ) + 80, ( nCol * 4 ) + 80, 0.01, 95, "D" ) pdfBox( nRow + 90, ( nCol * 2 ) + 90, ( nRow * 3 ) + 90, ( nCol * 4 ) + 90, 0.01, 100, "D" ) - for nI := 1 to 7 - nRow := 150 + nI * 10 - for nJ := 1 to 20 - nCol := nJ * 10 - 3 - pdfBox( nRow, nCol, nRow + 10, nCol + 10, 0.01, nI * 10,"M", chr(253) + chr( cton( substr( aColor[ ( nI - 1 ) * 20 + nJ ], 1, 2 ), 16) ) + chr( cton( substr( aColor[ ( nI - 1 ) * 20 + nJ ], 3, 2 ), 16) ) + chr( cton( substr( aColor[ ( nI - 1 ) * 20 + nJ ], 5, 2 ), 16) ) ) - next - next + FOR nI := 1 TO 7 + nRow := 150 + nI * 10 + FOR nJ := 1 TO 20 + nCol := nJ * 10 - 3 + pdfBox( nRow, nCol, nRow + 10, nCol + 10, 0.01, nI * 10, "M", Chr( 253 ) + Chr( cton( SubStr( aColor[ ( nI - 1 ) * 20 + nJ ], 1, 2 ), 16 ) ) + Chr( cton( SubStr( aColor[ ( nI - 1 ) * 20 + nJ ], 3, 2 ), 16 ) ) + Chr( cton( SubStr( aColor[ ( nI - 1 ) * 20 + nJ ], 5, 2 ), 16 ) ) ) + NEXT + NEXT pdfNewPage( "LETTER", "P", 6 ) pdfBookAdd( "Color Boxes ", 2, aReport[ REPORTPAGE ], 0 ) - for nI := 1 to 140 - nTop := ( nI - 1 ) * 2.4 - nLeft := ( nI - 1 ) * 2.1 - nBottom := aReport[ PAGEY ] - ( nI - 1 ) * 2.47 - nRight := aReport[ PAGEX ] - ( nI - 1 ) * 2.18 - pdfBox1( nTop, nLeft, nBottom, nRight, 10, chr( cton( substr( aColor[ nI ], 1, 2 ), 16) ) + chr( cton( substr( aColor[ nI ], 3, 2 ), 16) ) + chr( cton( substr( aColor[ nI ], 5, 2 ), 16) )) - next + FOR nI := 1 TO 140 + nTop := ( nI - 1 ) * 2.4 + nLeft := ( nI - 1 ) * 2.1 + nBottom := aReport[ PAGEY ] - ( nI - 1 ) * 2.47 + nRight := aReport[ PAGEX ] - ( nI - 1 ) * 2.18 + pdfBox1( nTop, nLeft, nBottom, nRight, 10, Chr( cton( SubStr( aColor[ nI ], 1, 2 ), 16 ) ) + Chr( cton( SubStr( aColor[ nI ], 3, 2 ), 16 ) ) + Chr( cton( SubStr( aColor[ nI ], 5, 2 ), 16 ) ) ) + NEXT pdfNewPage( "LETTER", "P", 6 ) - pdfBox1( 0, 0, 100, 200, 10, chr(0) + chr(255) + chr(0), chr(255) + chr(255) + chr(0) ) + pdfBox1( 0, 0, 100, 200, 10, Chr( 0 ) + Chr( 255 ) + Chr( 0 ), Chr( 255 ) + Chr( 255 ) + Chr( 0 ) ) pdfBookAdd( "Memos", 1, aReport[ REPORTPAGE ], 0 ) pdfBookAdd( "Different Styles & Colors", 2, aReport[ REPORTPAGE ], 0 ) nWidth := 90 nTab := 0 - cTestFile := memoread("files" + hb_ps() + "test.txt") + cTestFile := MemoRead( "files" + hb_ps() + "test.txt" ) - pdfText( cTestFile, 28, 107.95, nWidth, nTab, 3, "M", chr(253) + chr(0) + chr(0) + chr(255) )//, pdfTextCount( memoread("test.txt"), 28, 107.95, nWidth, nTab, 3, "M" ) - pdfText( cTestFile, 58, 107.95, nWidth, nTab, 2, "M", chr(253) + chr(0) + chr(255) + chr(0) )//, pdfTextCount( memoread("test.txt"), 58, 107.95, nWidth, nTab, 2, "M" ) - pdfText( cTestFile, 88, 107.95, nWidth, nTab, 1, "M", chr(253) + chr(255) + chr(0) + chr(0) )//, pdfTextCount( memoread("test.txt"), 88, 107.95, nWidth, nTab, 1, "M" ) - pdfText( cTestFile, 118, 107.95 - nWidth / 2, nWidth, nTab, 4, "M", chr(253) + chr(255) + chr(255) + chr(0) )//, pdfTextCount( memoread("test.txt"), 118, 107.95 - nWidth / 2, nWidth, nTab, 4, "M" ) + pdfText( cTestFile, 28, 107.95, nWidth, nTab, 3, "M", Chr( 253 ) + Chr( 0 ) + Chr( 0 ) + Chr( 255 ) )//, pdfTextCount( memoread("test.txt"), 28, 107.95, nWidth, nTab, 3, "M" ) + pdfText( cTestFile, 58, 107.95, nWidth, nTab, 2, "M", Chr( 253 ) + Chr( 0 ) + Chr( 255 ) + Chr( 0 ) )//, pdfTextCount( memoread("test.txt"), 58, 107.95, nWidth, nTab, 2, "M" ) + pdfText( cTestFile, 88, 107.95, nWidth, nTab, 1, "M", Chr( 253 ) + Chr( 255 ) + Chr( 0 ) + Chr( 0 ) )//, pdfTextCount( memoread("test.txt"), 88, 107.95, nWidth, nTab, 1, "M" ) + pdfText( cTestFile, 118, 107.95 - nWidth / 2, nWidth, nTab, 4, "M", Chr( 253 ) + Chr( 255 ) + Chr( 255 ) + Chr( 0 ) )//, pdfTextCount( memoread("test.txt"), 118, 107.95 - nWidth / 2, nWidth, nTab, 4, "M" ) - pdfText( cTestFile, 34, 100, nWidth, nTab, 3, "R", chr(253) + chr(0) + chr(128) + chr(128) )//, pdfTextCount( memoread("test.txt"), 33, 100, nWidth, nTab, 3, "R" ) - pdfText( cTestFile, 41, 100, nWidth, nTab, 2, "R", chr(253) + chr(0) + chr(191) + chr(255) )//, pdfTextCount( memoread("test.txt"), 40, 100, nWidth, nTab, 2, "R" ) - pdfText( cTestFile, 48, 100, nWidth, nTab, 1, "R", chr(253) + chr(244) + chr(164) + chr(96) )//, pdfTextCount( memoread("test.txt"), 47, 100, nWidth, nTab, 1, "R" ) - pdfText( cTestFile, 55, 35, nWidth, nTab, 4, "R", chr(253) + chr(0) + chr(0) + chr(0) )//, pdfTextCount( memoread("test.txt"), 54, 35, nWidth, nTab, 4, "R" ) + pdfText( cTestFile, 34, 100, nWidth, nTab, 3, "R", Chr( 253 ) + Chr( 0 ) + Chr( 128 ) + Chr( 128 ) )//, pdfTextCount( memoread("test.txt"), 33, 100, nWidth, nTab, 3, "R" ) + pdfText( cTestFile, 41, 100, nWidth, nTab, 2, "R", Chr( 253 ) + Chr( 0 ) + Chr( 191 ) + Chr( 255 ) )//, pdfTextCount( memoread("test.txt"), 40, 100, nWidth, nTab, 2, "R" ) + pdfText( cTestFile, 48, 100, nWidth, nTab, 1, "R", Chr( 253 ) + Chr( 244 ) + Chr( 164 ) + Chr( 96 ) )//, pdfTextCount( memoread("test.txt"), 47, 100, nWidth, nTab, 1, "R" ) + pdfText( cTestFile, 55, 35, nWidth, nTab, 4, "R", Chr( 253 ) + Chr( 0 ) + Chr( 0 ) + Chr( 0 ) )//, pdfTextCount( memoread("test.txt"), 54, 35, nWidth, nTab, 4, "R" ) pdfNewPage( "LETTER", "P", 6 ) pdfBookAdd( "Fonts", 1, aReport[ REPORTPAGE ], 0 ) pdfBookAdd( "Different Styles", 2, aReport[ REPORTPAGE ], 0 ) nK := 6 - for nI := 1 to len( aFonts ) + FOR nI := 1 TO Len( aFonts ) ++nK - for nJ := 1 to 4 - if aFonts[ nI ][ nJ + 1 ] + FOR nJ := 1 TO 4 + IF aFonts[ nI ][ nJ + 1 ] pdfSetFont( aFonts[ nI ][ 1 ], nJ - 1, aReport[ FONTSIZE ] ) - pdfRJust("0123456789 This is a test for " + aFonts[ nI ][ 1 ] + " " + ; - aStyle[ nJ ], nK++, aReport[ REPORTWIDTH ], "R") - endif - next - pdfRJust(pdfUnderline("Underline"), nK++, aReport[ REPORTWIDTH ], "R") - pdfRJust(pdfReverse("Test"), nK, aReport[ REPORTWIDTH ], "R") - next + pdfRJust( "0123456789 This is a test for " + aFonts[ nI ][ 1 ] + " " + ; + aStyle[ nJ ], nK++, aReport[ REPORTWIDTH ], "R" ) + ENDIF + NEXT + pdfRJust( pdfUnderline( "Underline" ), nK++, aReport[ REPORTWIDTH ], "R" ) + pdfRJust( pdfReverse( "Test" ), nK, aReport[ REPORTWIDTH ], "R" ) + NEXT pdfNewPage( "LETTER", "P", 6 ) pdfBookAdd( "Pictures", 1, aReport[ REPORTPAGE ], 0 ) pdfBookAdd( "TIFF", 2, aReport[ REPORTPAGE ], 0 ) pdfImage( "files" + hb_ps() + "color.tif", 0, 0, "M" ) // file, row, col, units, height, width - pdfRJust(pdfUnderline("TIFF"), nK++, aReport[ REPORTWIDTH ], "R") + pdfRJust( pdfUnderline( "TIFF" ), nK++, aReport[ REPORTWIDTH ], "R" ) pdfNewPage( "LETTER", "P", 6 ) pdfBookAdd( "JPEG", 2, aReport[ REPORTPAGE ], 0 ) pdfImage( "files" + hb_ps() + "color.jpg", 0, 0, "M" ) // file, row, col, units, height, width - pdfRJust(pdfUnderline("JPEG"), nK, aReport[ REPORTWIDTH ], "R") + pdfRJust( pdfUnderline( "JPEG" ), nK, aReport[ REPORTWIDTH ], "R" ) - pdfOpenHeader("test.hea") + pdfOpenHeader( "test.hea" ) pdfNewPage( "LETTER", "P", 6 ) pdfBookAdd( "Headers", 1, aReport[ REPORTPAGE ], 0 ) pdfBookAdd( "Picture Header Page 8", 2, aReport[ REPORTPAGE ], 0 ) // version 0.01 - pdfAtSay( chr(253) + chr(255) + chr(0) + chr(0) + "Red Sample of header repeating on pages 8-10", 1, 20, "R" ) + pdfAtSay( Chr( 253 ) + Chr( 255 ) + Chr( 0 ) + Chr( 0 ) + "Red Sample of header repeating on pages 8-10", 1, 20, "R" ) pdfNewPage( "LETTER", "P", 6 ) pdfBookAdd( "Picture Header Page 9", 2, aReport[ REPORTPAGE ], 0 ) // version 0.01 - pdfAtSay( chr(253) + chr(0) + chr(255) + chr(0) + "Green Sample of header repeating on pages 8-10", 1, 20, "R" ) + pdfAtSay( Chr( 253 ) + Chr( 0 ) + Chr( 255 ) + Chr( 0 ) + "Green Sample of header repeating on pages 8-10", 1, 20, "R" ) pdfNewPage( "LETTER", "P", 6 ) pdfBookAdd( "Picture Header Page 10", 2, aReport[ REPORTPAGE ], 0 ) // version 0.01 - pdfAtSay( chr(253) + chr(0) + chr(0) + chr(255) + "Blue Sample of header repeating on pages 8-10", 1, 20, "R" ) + pdfAtSay( Chr( 253 ) + Chr( 0 ) + Chr( 0 ) + Chr( 255 ) + "Blue Sample of header repeating on pages 8-10", 1, 20, "R" ) pdfClose() -static function cton( cString, nBase ) // this function called only used in pdf_demo.prg -local cTemp, nI, cChar, n := 0, nLen +STATIC FUNCTION cton( cString, nBase ) // this function called only used in pdf_demo.prg - nLen := len( cString ) + LOCAL cTemp, nI, cChar, n := 0, nLen + + nLen := Len( cString ) cTemp := "" - for nI := nLen to 1 step -1 - cTemp += substr( cString, nI, 1 ) - next - cTemp := upper( cTemp ) + FOR nI := nLen TO 1 step - 1 + cTemp += SubStr( cString, nI, 1 ) + NEXT + cTemp := Upper( cTemp ) - for nI := 1 to nLen - cChar := substr( cTemp, nI, 1 ) - if .not. IsDigit( cChar ) - n := n + ((Asc( cChar ) - 65) + 10) * ( nBase ^ ( nI - 1 ) ) - else - n := n + (( nBase ^ ( nI - 1 )) * val( cChar )) - endif - next + FOR nI := 1 TO nLen + cChar := SubStr( cTemp, nI, 1 ) + IF .NOT. IsDigit( cChar ) + n := n + ( ( Asc( cChar ) - 65 ) + 10 ) * ( nBase ^ ( nI - 1 ) ) + ELSE + n := n + ( ( nBase ^ ( nI - 1 ) ) * Val( cChar ) ) + ENDIF + NEXT -return n + RETURN n diff --git a/harbour/extras/hbvpdf/tests/tstpdf.prg b/harbour/extras/hbvpdf/tests/tstpdf.prg index 7cc3040fd5..cb70e89b16 100644 --- a/harbour/extras/hbvpdf/tests/tstpdf.prg +++ b/harbour/extras/hbvpdf/tests/tstpdf.prg @@ -2,50 +2,47 @@ * $Id$ */ -//-------------------------\\ +#include "hbvpdf.ch" -#include "hbvpdf.ch" +PROCEDURE Main() -//-------------------------\\ + LOCAL nWidth, nTab, nI, nJ, nK, nCol, nRow, aStyle, aFonts + LOCAL nTop, nLeft, nBottom, nRight, cText, oPdf + LOCAL aColor := { ; + "FF0000", "8B0000", "800000", "FF4500", "D2691E", "B8860B", "FF8C00", "FFA500", "DAA520", "808000", "FFD700", "FFFF00", "ADFF2F", "9ACD32", "7FFF00", "7CFC00", "00FF00", "32CD32", "008000", "006400", ; + "66CDAA", "7FFFD4", "87CEFA", "87CEEB", "F0F8FF", "E0FFFF", "B0C4DE", "B0E0E6", "AFEEEE", "ADD8E6", "8FBC8F", "90EE90", "98FB98", "00FA9A", "00FF7F", "3CB371", "2E8B57", "228B22", "556B2F", "6B8E23", ; + "5F9EA0", "40E0D0", "48D1CC", "00CED1", "20B2AA", "008B8B", "008080", "2F4F4F", "00BFFF", "00FFFF", "00FFFF", "0000FF", "0000CD", "00008B", "000080", "1E90FF", "4169E1", "4682B4", "6495ED", "7B68EE", ; + "C71585", "FF1493", "FF00FF", "FF00FF", "9370DB", "DDADDD", "DB7093", "FF69B4", "DA70D6", "EE82EE", "BA55D3", "9932CC", "8A2BE2", "9400D3", "8B008B", "800080", "4B0082", "191970", "483D8B", "6A5ACD", ; + "DC143C", "B22222", "A52A2A", "CD5C5C", "FA8072", "E9967A", "FFA07A", "F5DEB3", "FFDEAD", "EEE8AA", "FFDAB9", "FFE4C4", "FFEFD5", "FFE4E1", "FFE4B5", "D2B48C", "DEB887", "F0E68C", "BDB76B", "F4A460", ; + "FDF5E6", "FFF8DC", "FAF0E6", "FAFAD2", "FFFACD", "FFEBCD", "FFFFE0", "FAEBD7", "FFF5EE", "FFF0F5", "D8BFD8", "FFC0CB", "FFB6C1", "BC8F8F", "F08080", "FF7F50", "FF6347", "8B4513", "A0522D", "CD853F", ; + "FFFAFA", "FFFFF0", "E6E6FA", "FFFAF0", "F8F8FF", "F0FFF0", "F5F5DC", "F0FFFF", "F5FFFA", "708090", "778899", "F5F5F5", "DCDCDC", "D3D3D3", "C0C0C0", "A9A9A9", "808080", "696969", "000000", "FFFFFF" } -function Main() - - local nWidth, nTab, nI, nJ, nK, nCol, nRow, aStyle, aFonts - local nTop, nLeft, nBottom, nRight, cText, oPdf - local aColor := { ; - "FF0000", "8B0000", "800000", "FF4500", "D2691E", "B8860B", "FF8C00", "FFA500", "DAA520", "808000", "FFD700", "FFFF00", "ADFF2F", "9ACD32", "7FFF00", "7CFC00", "00FF00", "32CD32", "008000", "006400",; - "66CDAA", "7FFFD4", "87CEFA", "87CEEB", "F0F8FF", "E0FFFF", "B0C4DE", "B0E0E6", "AFEEEE", "ADD8E6", "8FBC8F", "90EE90", "98FB98", "00FA9A", "00FF7F", "3CB371", "2E8B57", "228B22", "556B2F", "6B8E23",; - "5F9EA0", "40E0D0", "48D1CC", "00CED1", "20B2AA", "008B8B", "008080", "2F4F4F", "00BFFF", "00FFFF", "00FFFF", "0000FF", "0000CD", "00008B", "000080", "1E90FF", "4169E1", "4682B4", "6495ED", "7B68EE",; - "C71585", "FF1493", "FF00FF", "FF00FF", "9370DB", "DDADDD", "DB7093", "FF69B4", "DA70D6", "EE82EE", "BA55D3", "9932CC", "8A2BE2", "9400D3", "8B008B", "800080", "4B0082", "191970", "483D8B", "6A5ACD",; - "DC143C", "B22222", "A52A2A", "CD5C5C", "FA8072", "E9967A", "FFA07A", "F5DEB3", "FFDEAD", "EEE8AA", "FFDAB9", "FFE4C4", "FFEFD5", "FFE4E1", "FFE4B5", "D2B48C", "DEB887", "F0E68C", "BDB76B", "F4A460",; - "FDF5E6", "FFF8DC", "FAF0E6", "FAFAD2", "FFFACD", "FFEBCD", "FFFFE0", "FAEBD7", "FFF5EE", "FFF0F5", "D8BFD8", "FFC0CB", "FFB6C1", "BC8F8F", "F08080", "FF7F50", "FF6347", "8B4513", "A0522D", "CD853F",; - "FFFAFA", "FFFFF0", "E6E6FA", "FFFAF0", "F8F8FF", "F0FFF0", "F5F5DC", "F0FFFF", "F5FFFA", "708090", "778899", "F5F5F5", "DCDCDC", "D3D3D3", "C0C0C0", "A9A9A9", "808080", "696969", "000000", "FFFFFF"} - - set date format "YYYY/MM/DD" + SET DATE FORMAT "YYYY/MM/DD" aStyle := { "Normal", "Bold", "Italic", "BoldItalic" } - aFonts := { { "Times", .t., .t., .t., .t. }, ; - { "Helvetica", .t., .t., .t., .t. }, ; - { "Courier", .t., .t., .t., .t. } } + aFonts := {; + { "Times", .T. , .T. , .T. , .T. }, ; + { "Helvetica", .T. , .T. , .T. , .T. }, ; + { "Courier", .T. , .T. , .T. , .T. } } - oPdf := tPdf():New( 'test.pdf', 200, .t. ) + oPdf := tPdf():New( "test.pdf", 200, .T. ) oPdf:EditOnHeader() - oPdf:Image( 'files\color.tif', 0, 0, "M" ) + oPdf:Image( "files" + hb_ps() + "color.tif", 0, 0, "M" ) oPdf:EditOffHeader() - oPdf:SaveHeader( 'test.hea' ) + oPdf:SaveHeader( "test.hea" ) oPdf:CloseHeader() oPdf:BookOpen() oPdf:NewPage( "LETTER", "P", 6 ) oPdf:BookAdd( "Grids & Borders", 1, oPdf:aReport[ REPORTPAGE ], 0 ) oPdf:BookAdd( "Simple Grid", 2, oPdf:aReport[ REPORTPAGE ], 0 ) - for nI := 0 to 792 step 36 - oPdf:Box( nI, 0, nI, 612, 0.01, , "D" ) - next - for nI := 0 to 612 step 36 - oPdf:Box( 0, nI, 792, nI, 0.01, , "D" ) - next + FOR nI := 0 TO 792 STEP 36 + oPdf:Box( nI, 0, nI, 612, 0.01, , "D" ) + NEXT + FOR nI := 0 TO 612 STEP 36 + oPdf:Box( 0, nI, 792, nI, 0.01, , "D" ) + NEXT oPdf:NewPage( "LETTER", "P", 6 ) @@ -69,121 +66,120 @@ function Main() oPdf:Box( nRow + 80, ( nCol * 2 ) + 80, ( nRow * 3 ) + 80, ( nCol * 4 ) + 80, 0.01, 95, "D" ) oPdf:Box( nRow + 90, ( nCol * 2 ) + 90, ( nRow * 3 ) + 90, ( nCol * 4 ) + 90, 0.01, 100, "D" ) - for nI := 1 to 7 + FOR nI := 1 TO 7 nRow := 150 + nI * 10 - for nJ := 1 to 20 - nCol := nJ * 10 - 3 - oPdf:Box( nRow, nCol, nRow + 10, nCol + 10, 0.01, nI * 10,"M", chr(253) + chr( cton( substr( aColor[ ( nI - 1 ) * 20 + nJ ], 1, 2 ), 16) ) + chr( cton( substr( aColor[ ( nI - 1 ) * 20 + nJ ], 3, 2 ), 16) ) + chr( cton( substr( aColor[ ( nI - 1 ) * 20 + nJ ], 5, 2 ), 16) ) ) - next - next + FOR nJ := 1 TO 20 + nCol := nJ * 10 - 3 + oPdf:Box( nRow, nCol, nRow + 10, nCol + 10, 0.01, nI * 10, "M", Chr( 253 ) + Chr( cton( SubStr( aColor[ ( nI - 1 ) * 20 + nJ ], 1, 2 ), 16 ) ) + Chr( cton( SubStr( aColor[ ( nI - 1 ) * 20 + nJ ], 3, 2 ), 16 ) ) + Chr( cton( SubStr( aColor[ ( nI - 1 ) * 20 + nJ ], 5, 2 ), 16 ) ) ) + NEXT + NEXT oPdf:NewPage( "LETTER", "P", 6 ) oPdf:BookAdd( "Color Boxes ", 2, oPdf:aReport[ REPORTPAGE ], 0 ) - for nI := 1 to 140 - nTop := ( nI - 1 ) * 2.4 - nLeft := ( nI - 1 ) * 2.1 - nBottom := oPdf:aReport[ PAGEY ] - ( nI - 1 ) * 2.47 - nRight := oPdf:aReport[ PAGEX ] - ( nI - 1 ) * 2.18 - oPdf:Box1( nTop, nLeft, nBottom, nRight, 10, chr( cton( substr( aColor[ nI ], 1, 2 ), 16) ) + chr( cton( substr( aColor[ nI ], 3, 2 ), 16) ) + chr( cton( substr( aColor[ nI ], 5, 2 ), 16) )) - next + FOR nI := 1 TO 140 + nTop := ( nI - 1 ) * 2.4 + nLeft := ( nI - 1 ) * 2.1 + nBottom := oPdf:aReport[ PAGEY ] - ( nI - 1 ) * 2.47 + nRight := oPdf:aReport[ PAGEX ] - ( nI - 1 ) * 2.18 + oPdf:Box1( nTop, nLeft, nBottom, nRight, 10, Chr( cton( SubStr( aColor[ nI ], 1, 2 ), 16 ) ) + Chr( cton( SubStr( aColor[ nI ], 3, 2 ), 16 ) ) + Chr( cton( SubStr( aColor[ nI ], 5, 2 ), 16 ) ) ) + NEXT oPdf:NewPage( "LETTER", "P", 6 ) oPdf:BookAdd( "Memos", 1, oPdf:aReport[ REPORTPAGE ], 0 ) oPdf:BookAdd( "Different Styles & Colors", 2, oPdf:aReport[ REPORTPAGE ], 0 ) nWidth := 90 nTab := 0 - cText := memoread('files\test.txt') + cText := MemoRead( "files" + hb_ps() + "test.txt" ) - oPdf:Text( cText, 28, 107.95, nWidth, nTab, 3, 'M', chr(253) + chr(0) + chr(0) + chr(255) ) - oPdf:Text( cText, 58, 107.95, nWidth, nTab, 2, 'M', chr(253) + chr(0) + chr(255) + chr(0) ) - oPdf:Text( cText, 88, 107.95, nWidth, nTab, 1, 'M', chr(253) + chr(255) + chr(0) + chr(0) ) - oPdf:Text( cText, 118, 107.95 - nWidth / 2, nWidth, nTab, 4, 'M', chr(253) + chr(255) + chr(255) + chr(0) ) + oPdf:Text( cText, 28, 107.95, nWidth, nTab, 3, "M", Chr( 253 ) + Chr( 0 ) + Chr( 0 ) + Chr( 255 ) ) + oPdf:Text( cText, 58, 107.95, nWidth, nTab, 2, "M", Chr( 253 ) + Chr( 0 ) + Chr( 255 ) + Chr( 0 ) ) + oPdf:Text( cText, 88, 107.95, nWidth, nTab, 1, "M", Chr( 253 ) + Chr( 255 ) + Chr( 0 ) + Chr( 0 ) ) + oPdf:Text( cText, 118, 107.95 - nWidth / 2, nWidth, nTab, 4, "M", Chr( 253 ) + Chr( 255 ) + Chr( 255 ) + Chr( 0 ) ) - oPdf:Text( cText, 34, 100, nWidth, nTab, 3, 'R', chr(253) + chr(0) + chr(128) + chr(128) )//, pdfTextCount( memoread('files\test.txt'), 33, 100, nWidth, nTab, 3, 'R' ) - oPdf:Text( cText, 41, 100, nWidth, nTab, 2, 'R', chr(253) + chr(0) + chr(191) + chr(255) )//, pdfTextCount( memoread('files\test.txt'), 40, 100, nWidth, nTab, 2, 'R' ) - oPdf:Text( cText, 48, 100, nWidth, nTab, 1, 'R', chr(253) + chr(244) + chr(164) + chr(96) )//, pdfTextCount( memoread('files\test.txt'), 47, 100, nWidth, nTab, 1, 'R' ) - oPdf:Text( cText, 55, 35, nWidth, nTab, 4, 'R', chr(253) + chr(0) + chr(0) + chr(0) )//, pdfTextCount( memoread('files\test.txt'), 54, 35, nWidth, nTab, 4, 'R' ) + oPdf:Text( cText, 34, 100, nWidth, nTab, 3, "R", Chr( 253 ) + Chr( 0 ) + Chr( 128 ) + Chr( 128 ) ) //, pdfTextCount( memoread( "files" + hb_ps() + "test.txt" ), 33, 100, nWidth, nTab, 3, "R" ) + oPdf:Text( cText, 41, 100, nWidth, nTab, 2, "R", Chr( 253 ) + Chr( 0 ) + Chr( 191 ) + Chr( 255 ) ) //, pdfTextCount( memoread( "files" + hb_ps() + "test.txt" ), 40, 100, nWidth, nTab, 2, "R" ) + oPdf:Text( cText, 48, 100, nWidth, nTab, 1, "R", Chr( 253 ) + Chr( 244 ) + Chr( 164 ) + Chr( 96 ) ) //, pdfTextCount( memoread( "files" + hb_ps() + "test.txt" ), 47, 100, nWidth, nTab, 1, "R" ) + oPdf:Text( cText, 55, 35, nWidth, nTab, 4, "R", Chr( 253 ) + Chr( 0 ) + Chr( 0 ) + Chr( 0 ) ) //, pdfTextCount( memoread( "files" + hb_ps() + "test.txt" ), 54, 35, nWidth, nTab, 4, "R" ) oPdf:NewPage( "LETTER", "P", 6 ) oPdf:BookAdd( "Fonts", 1, oPdf:aReport[ REPORTPAGE ], 0 ) oPdf:BookAdd( "Different Styles", 2, oPdf:aReport[ REPORTPAGE ], 0 ) nK := 6 - for nI := 1 to len( aFonts ) // Fonts + FOR nI := 1 TO Len( aFonts ) // Fonts ++nk - for nJ := 1 to 4 // Styles - if aFonts[ nI ][ nJ + 1 ] + FOR nJ := 1 TO 4 // Styles + IF aFonts[ nI ][ nJ + 1 ] oPdf:SetFont( aFonts[ nI ][ 1 ], nJ - 1, oPdf:aReport[ FONTSIZE ] ) - oPdf:RJust("This is a test for " + aFonts[ nI ][ 1 ] + " " + ; - aStyle[ nJ ], nK++, oPdf:aReport[ REPORTWIDTH ], "R") - endif - next - oPdf:RJust(oPdf:Underline("Underline"), nK++, oPdf:aReport[ REPORTWIDTH ], "R") - oPdf:RJust(oPdf:Reverse("Test"), nK, oPdf:aReport[ REPORTWIDTH ], "R") - next + oPdf:RJust( "This is a test for " + aFonts[ nI ][ 1 ] + " " + ; + aStyle[ nJ ], nK++, oPdf:aReport[ REPORTWIDTH ], "R" ) + ENDIF + NEXT + oPdf:RJust( oPdf:Underline( "Underline" ), nK++, oPdf:aReport[ REPORTWIDTH ], "R" ) + oPdf:RJust( oPdf:Reverse( "Test" ), nK, oPdf:aReport[ REPORTWIDTH ], "R" ) + NEXT oPdf:NewPage( "LETTER", "P", 6 ) oPdf:BookAdd( "Pictures", 1, oPdf:aReport[ REPORTPAGE ], 0 ) oPdf:BookAdd( "TIFF", 2, oPdf:aReport[ REPORTPAGE ], 0 ) - // file, row, col, units, height, width - oPdf:Image( 'files\color.tif', 0, 0, "M" ) - oPdf:RJust( oPdf:Underline("TIFF"), nK++, oPdf:aReport[ REPORTWIDTH ], "R") + // file, row, col, units, height, width + oPdf:Image( "files" + hb_ps() + "color.tif", 0, 0, "M" ) + oPdf:RJust( oPdf:Underline( "TIFF" ), nK++, oPdf:aReport[ REPORTWIDTH ], "R" ) oPdf:NewPage( "LETTER", "P", 6 ) oPdf:BookAdd( "JPEG", 2, oPdf:aReport[ REPORTPAGE ], 0 ) - oPdf:Image( 'files\color.jpg', 0, 0, "M" ) // file, row, col, units, height, width - oPdf:RJust(oPdf:Underline("JPEG"), nK, oPdf:aReport[ REPORTWIDTH ], "R") + oPdf:Image( "files" + hb_ps() + "color.jpg", 0, 0, "M" ) // file, row, col, units, height, width + oPdf:RJust( oPdf:Underline( "JPEG" ), nK, oPdf:aReport[ REPORTWIDTH ], "R" ) - oPdf:OpenHeader('test.hea') + oPdf:OpenHeader( "test.hea" ) oPdf:NewPage( "LETTER", "P", 6 ) oPdf:BookAdd( "Headers", 1, oPdf:aReport[ REPORTPAGE ], 0 ) oPdf:BookAdd( "Picture Header Page 8", 2, oPdf:aReport[ REPORTPAGE ], 0 ) - oPdf:AtSay( chr(253) + chr(255) + chr(0) + chr(0) + 'Red Sample of header repeating on pages 8-10', 1, 20, "R" ) + oPdf:AtSay( Chr( 253 ) + Chr( 255 ) + Chr( 0 ) + Chr( 0 ) + "Red Sample of header repeating on pages 8-10", 1, 20, "R" ) oPdf:NewPage( "LETTER", "P", 6 ) oPdf:BookAdd( "Picture Header Page 9", 2, oPdf:aReport[ REPORTPAGE ], 0 ) - oPdf:AtSay( chr(253) + chr(0) + chr(255) + chr(0) + 'Green Sample of header repeating on pages 8-10', 1, 20, "R" ) + oPdf:AtSay( Chr( 253 ) + Chr( 0 ) + Chr( 255 ) + Chr( 0 ) + "Green Sample of header repeating on pages 8-10", 1, 20, "R" ) oPdf:NewPage( "LETTER", "P", 6 ) oPdf:BookAdd( "Picture Header Page 10", 2, oPdf:aReport[ REPORTPAGE ], 0 ) - oPdf:AtSay( chr(253) + chr(0) + chr(0) + chr(255) + 'Blue Sample of header repeating on pages 8-10', 1, 20, "R" ) + oPdf:AtSay( Chr( 253 ) + Chr( 0 ) + Chr( 0 ) + Chr( 255 ) + "Blue Sample of header repeating on pages 8-10", 1, 20, "R" ) oPdf:Close() #ifndef __XPP__ - oPdf:Execute( 'test.pdf' ) + oPdf:Execute( "test.pdf" ) #endif - // oPdf:FilePrint() +// oPdf:FilePrint() -return nil + RETURN -//-------------------------\\ // // This function called only used in tstPdf.prg // -static function cton( cString, nBase ) -local cTemp, nI, cChar, n := 0, nLen - nLen := len( cString ) +STATIC FUNCTION cton( cString, nBase ) + + LOCAL cTemp, nI, cChar, n := 0, nLen + + nLen := Len( cString ) cTemp := "" - for nI := nLen to 1 step -1 - cTemp += substr( cString, nI, 1 ) - next - cTemp := upper( cTemp ) + FOR nI := nLen TO 1 step - 1 + cTemp += SubStr( cString, nI, 1 ) + NEXT + cTemp := Upper( cTemp ) - for nI := 1 to nLen - cChar := substr( cTemp, nI, 1 ) - if .not. IsDigit( cChar ) - n := n + ((Asc( cChar ) - 65) + 10) * ( nBase ^ ( nI - 1 ) ) - else - n := n + (( nBase ^ ( nI - 1 )) * val( cChar )) - endif - next + FOR nI := 1 TO nLen + cChar := SubStr( cTemp, nI, 1 ) + IF .NOT. IsDigit( cChar ) + n := n + ( ( Asc( cChar ) - 65 ) + 10 ) * ( nBase ^ ( nI - 1 ) ) + ELSE + n := n + ( ( nBase ^ ( nI - 1 ) ) * Val( cChar ) ) + ENDIF + NEXT -return n - -//-------------------------\\ + RETURN n diff --git a/harbour/src/compiler/hbopt.c b/harbour/src/compiler/hbopt.c index c61f7c6ef3..21b2c50c95 100644 --- a/harbour/src/compiler/hbopt.c +++ b/harbour/src/compiler/hbopt.c @@ -970,9 +970,9 @@ static HB_BOOL hb_compIsUncondJump( HB_BYTE bPCode ) return bPCode == HB_P_JUMPNEAR || bPCode == HB_P_JUMP || bPCode == HB_P_JUMPFAR; -/* || bPCode == HB_P_SEQEND; +/* || bPCode == HB_P_SEQEND; BEGIN SEQUENCE/END SEQUENCE logic could not be processed using conditional/unconditional - jumps. I set HB_P_SEQEND as conditional jump though this PCode instruction is processed + jumps. I set HB_P_SEQEND as conditional jump though this PCode instruction is processed as unconditional jump by Harbour VM. This hack solves 'Variable is assigned but not used' warning in code: BEGIN SEQUENCE @@ -1604,7 +1604,7 @@ void hb_compPCodeTraceOptimizer( HB_COMP_DECL ) * code like: * proc main() * local x - * if .f. + * if .F. * x := 1 * endif * return diff --git a/harbour/src/rtl/gtsln/gtsln.c b/harbour/src/rtl/gtsln/gtsln.c index 655a172e5a..01f76adefb 100644 --- a/harbour/src/rtl/gtsln/gtsln.c +++ b/harbour/src/rtl/gtsln/gtsln.c @@ -771,7 +771,7 @@ static void hb_gt_sln_SetBlink( PHB_GT pGT, HB_BOOL fBlink ) * outstd( ) * The only one thing I can make in portable way which will always * work is disabling sending BLINK attribute to remote terminal. So - * in GTSLN like in GTCRS the function SetBlink( .f. ) does it, [Druzus] + * in GTSLN like in GTCRS the function SetBlink( .F. ) does it, [Druzus] */ SLtt_Blink_Mode = fBlink ? 1 : 0; diff --git a/harbour/src/rtl/tlabel.prg b/harbour/src/rtl/tlabel.prg index e9fa77d36c..a4f0a961ae 100644 --- a/harbour/src/rtl/tlabel.prg +++ b/harbour/src/rtl/tlabel.prg @@ -319,7 +319,7 @@ METHOD SampleLabels() CLASS HBLabelForm // Add the spaces between the label lines FOR nField := 1 TO ::aLabelData[ LBL_LINES ] PrintIt() - NEXT nField + NEXT ENDIF // Prompt for more @@ -382,7 +382,7 @@ METHOD LoadLabel( cLblFile ) CLASS HBLabelForm ENDIF - NEXT nPathIndex + NEXT ENDIF diff --git a/harbour/src/rtl/treport.prg b/harbour/src/rtl/treport.prg index 0ab4677eb9..2d3b09863d 100644 --- a/harbour/src/rtl/treport.prg +++ b/harbour/src/rtl/treport.prg @@ -274,7 +274,7 @@ METHOD New( cFrmName AS STRING,; ::nLinesLeft := ::aReportData[ RPT_LINES ] - QOUT() // output additional line on first page (S87 compatibility) + QOut() // output additional line on first page (S87 compatibility) ::nLinesLeft-- // Check to see if a "before report" eject, or TO FILE has been specified @@ -305,7 +305,7 @@ METHOD New( cFrmName AS STRING,; ::aGroupTotals := Array( Len( ::aReportData[ RPT_GROUPS ] ) ) // Execute the actual report based on matching records - DBEval( {|| ::ExecuteReport() }, bFor, bWhile, nNext, nRecord, lRest ) + dbEval( {|| ::ExecuteReport() }, bFor, bWhile, nNext, nRecord, lRest ) // Generate any totals that may have been identified // Make a pass through all the groups @@ -367,7 +367,7 @@ METHOD New( cFrmName AS STRING,; lAnyTotals := .T. EXIT ENDIF - NEXT nCol + NEXT IF lAnyTotals @@ -397,7 +397,7 @@ METHOD New( cFrmName AS STRING,; ELSE QQOut( Space( ::aReportData[ RPT_COLUMNS, nCol, RCT_WIDTH ] ) ) ENDIF - NEXT nCol + NEXT // Send a cr/lf for the last line QOut() @@ -489,8 +489,8 @@ METHOD ReportHeader() CLASS HBReportForm PadC( RTrim( XMEMOLINE( LTrim( aTempPgHeader[ nLine ] ),; nHeadingLength, nHeadLine ) ), nHeadingLength ) ) - NEXT nHeadLine - NEXT nLine + NEXT + NEXT aPageHeader[ 1 ] := Stuff(aPageHeader[ 1 ], 1, 14, ; __NatMsg( _RFRM_PAGENO ) + Str( ::nPageNumber, 6 ) ) @@ -509,9 +509,9 @@ METHOD ReportHeader() CLASS HBReportForm AAdd( aPageHeader, Space( ( nRPageSize - ::aReportData[ RPT_LMARGIN ] -; Len( cHeader ) ) / 2 ) + cHeader ) - NEXT nHeadLine + NEXT - NEXT nLine + NEXT AADD( aPageHeader, "" ) // S87 compat. @@ -939,7 +939,7 @@ METHOD LoadReportFile( cFrmFile AS STRING ) CLASS HBReportForm EXIT ENDIF - NEXT nPathIndex + NEXT ENDIF @@ -1126,7 +1126,7 @@ METHOD LoadReportFile( cFrmFile AS STRING ) CLASS HBReportForm AAdd( aReport[ RPT_COLUMNS ], ::GetColumn( cFieldsBuff, @nFieldOffset ) ) - NEXT nCount + NEXT ENDIF diff --git a/harbour/tests/and_or.prg b/harbour/tests/and_or.prg index 00f7055b2c..7e74d6d098 100644 --- a/harbour/tests/and_or.prg +++ b/harbour/tests/and_or.prg @@ -11,13 +11,13 @@ PROCEDURE Main() IF .F. .AND. DispAndReturnNIL() // and it should not break! ENDIF - ? "Testing .t. .t." + ? "Testing .T. .T." AndOr( .T. , .T. ) - ? "Testing .t. .f." + ? "Testing .T. .F." AndOr( .T. , .F. ) - ? "Testing .f. .f." + ? "Testing .F. .F." AndOr( .F. , .F. ) ? "Testing errors..." diff --git a/harbour/tests/db_brows.prg b/harbour/tests/db_brows.prg index 84966bf7ec..083c398606 100644 --- a/harbour/tests/db_brows.prg +++ b/harbour/tests/db_brows.prg @@ -92,7 +92,7 @@ PROCEDURE Main( filename ) LOCAL vybkey := 1 - IF filename == Nil + IF filename == NIL ? "Dbf browse demo" ? "Syntax:" ? "", "db_brows filename" @@ -142,11 +142,11 @@ FUNCTION DBFLIST( mslist, x1, y1, x2, y2, title, maskey ) MEMVAR str_barbox MEMVAR str_bar - IF mslist == Nil + IF mslist == NIL mslist := InitList() ENDIF IF !( Type( "str_barbox" ) == "C" ) - PRIVATE str_barbox := hb_UTF8ToStrBox( "│" ) + PRIVATE str_barbox := hb_UTF8ToStrBox( "░" ) ENDIF IF !( Type( "str_bar" ) == "C" ) PRIVATE str_bar := /* LOW-ASCII "▼▲" */ Chr( 31 ) + Chr( 30 ) + hb_UTF8ToStr( "■" ) @@ -155,7 +155,7 @@ FUNCTION DBFLIST( mslist, x1, y1, x2, y2, title, maskey ) LI_X1 := x1 LI_Y2 := y2 LI_X2 := x2 - IF LI_MSF == Nil + IF LI_MSF == NIL LI_COLCOUNT := FCount() LI_MSTYP := Array( LI_COLCOUNT ) LI_MSLEN := Array( LI_COLCOUNT ) @@ -163,7 +163,7 @@ FUNCTION DBFLIST( mslist, x1, y1, x2, y2, title, maskey ) AFields( , LI_MSTYP, LI_MSLEN, LI_MSDEC ) ELSE LI_COLCOUNT := Len( LI_MSF ) - IF LI_MSTYP == Nil + IF LI_MSTYP == NIL LI_MSTYP := Array( LI_COLCOUNT ) LI_MSLEN := Array( LI_COLCOUNT ) LI_MSDEC := Array( LI_COLCOUNT ) @@ -201,10 +201,10 @@ FUNCTION DBFLIST( mslist, x1, y1, x2, y2, title, maskey ) oldcolors := SetColor() SetColor( LI_CLR ) @ LI_Y1, LI_X1, LI_Y2, LI_X2 BOX hb_UTF8ToStrBox( "┌─┐│┘─└│ " ) - IF title != Nil + IF title != NIL @ LI_Y1, ( LI_X2 - LI_X1 - 1 - Len( title ) ) / 2 + LI_X1 SAY " " + title + " " ENDIF - IF title != Nil .AND. LI_NAMES != Nil + IF title != NIL .AND. LI_NAMES != NIL LI_Y1 ++ ENDIF razmer := LI_Y2 - LI_Y1 - 1 @@ -282,7 +282,7 @@ FUNCTION DBFLIST( mslist, x1, y1, x2, y2, title, maskey ) KEYBOARD Chr( iif( ym == LI_Y1, 5, 24 ) ) M_HIDE() LOOP - ELSEIF ctrl_ar != Nil + ELSEIF ctrl_ar != NIL FOR i := 1 TO Len( ctrl_ar ) IF ValType( ctrl_ar[ i ] ) == "C" SetColor( ctrl_ar[ i ] ) @@ -423,7 +423,7 @@ FUNCTION DBFLIST( mslist, x1, y1, x2, y2, title, maskey ) CASE ( xkey == 13 .OR. ( xkey > 47 .AND. xkey < 58 ) .OR. ( xkey > 64 .AND. xkey < 91 ) ; .OR. ( xkey > 96 .AND. xkey < 123 ) .OR. ( xkey > 127 .AND. xkey < 176 ) .OR. ( xkey > 223 .AND. xkey < 240 ) ) .AND. predit > 1 // Enter fipos := LI_COLPOS + LI_NLEFT - 1 - LI_FREEZE - IF LI_WHEN == Nil .OR. Len( LI_WHEN ) < fipos .OR. LI_WHEN[ fipos ] == Nil .OR. Eval( LI_WHEN[ fipos ] ) + IF LI_WHEN == NIL .OR. Len( LI_WHEN ) < fipos .OR. LI_WHEN[ fipos ] == NIL .OR. Eval( LI_WHEN[ fipos ] ) IF ValType( LI_MSED ) != "N" vartmp := iif( Len( LI_MSED ) < fipos, 1, LI_MSED[ fipos ] ) IF ValType( vartmp ) == "N" @@ -442,7 +442,7 @@ FUNCTION DBFLIST( mslist, x1, y1, x2, y2, title, maskey ) vartmp := ReadExit( .T. ) varbuf := FieldGet( fipos ) @ LI_NSTR + LI_Y1, LI_XPOS GET varbuf PICTURE Defpict( mslist, fipos, LI_X2 - LI_X1 - 3 ) - IF LI_VALID != Nil .AND. Len( LI_VALID ) >= fipos .AND. LI_VALID[ fipos ] != Nil + IF LI_VALID != NIL .AND. Len( LI_VALID ) >= fipos .AND. LI_VALID[ fipos ] != NIL Getlist[ 1 ] :postBlock := LI_VALID[ fipos ] ENDIF READ @@ -458,7 +458,7 @@ FUNCTION DBFLIST( mslist, x1, y1, x2, y2, title, maskey ) ENDIF ENDIF ENDIF - IF LI_BDESHOUT != Nil .AND. ValType( varbuf ) == "C" + IF LI_BDESHOUT != NIL .AND. ValType( varbuf ) == "C" varbuf := Eval( LI_BDESHOUT, mslist, varbuf ) ENDIF FieldPut( fipos, varbuf ) @@ -482,14 +482,14 @@ FUNCTION DBFLIST( mslist, x1, y1, x2, y2, title, maskey ) CASE xkey == 27 // Esc rez := .F. rezproc := 0 - CASE xkey == - 1 .AND. ( maskey == Nil .OR. AScan( maskey, xkey ) == 0 ) // F2 + CASE xkey == - 1 .AND. ( maskey == NIL .OR. AScan( maskey, xkey ) == 0 ) // F2 IF predit == 1 predit := predxx ELSEIF predit > 1 predit := 1 ENDIF OTHERWISE - IF maskey != Nil + IF maskey != NIL IF AScan( maskey, xkey ) != 0 rez := .F. rezproc := xkey @@ -532,7 +532,7 @@ FUNCTION DBFLIST( mslist, x1, y1, x2, y2, title, maskey ) ENDDO IF LI_LSOHR - RestScreen( iif( title != Nil .AND. LI_NAMES != Nil, LI_Y1 - 1, LI_Y1 ), LI_X1, LI_Y2, LI_X2, wndbuf ) + RestScreen( iif( title != NIL .AND. LI_NAMES != NIL, LI_Y1 - 1, LI_Y1 ), LI_X1, LI_Y2, LI_X2, wndbuf ) ELSE SetColor( LI_CLRV ) VIVSTR( mslist, LI_NSTR + LI_Y1, iif( predit > 1, LI_COLPOS, 0 ) ) @@ -556,7 +556,7 @@ FUNCTION FLDCOUNT( mslist, xstrt, xend, fld1 ) LOCAL klf := 0, i := iif( LI_FREEZE > 0, 1, fld1 ) DO WHILE .T. - xstrt += Max( Len( FLDSTR( mslist, i ) ), iif( LI_NAMES != Nil .AND. Len( LI_NAMES ) >= i, Len( LI_NAMES[ i ] ), 0 ) ) - 1 + xstrt += Max( Len( FLDSTR( mslist, i ) ), iif( LI_NAMES != NIL .AND. Len( LI_NAMES ) >= i, Len( LI_NAMES[ i ] ), 0 ) ) - 1 IF xstrt > xend EXIT ENDIF @@ -583,16 +583,16 @@ FUNCTION VIVNAMES( mslist ) LOCAL i := 1, x, oldc, fif - IF LI_NAMES != Nil + IF LI_NAMES != NIL x := LI_X1 + 2 - IF LI_NMCLR != Nil + IF LI_NMCLR != NIL oldc := SetColor( LI_NMCLR ) ENDIF @ LI_Y1, x - 1 CLEAR TO LI_Y1, LI_X2 - 1 fif := iif( LI_FREEZE > 0, 1, LI_NLEFT ) // DO MSFNEXT WITH mslist,fif DO WHILE i <= LI_NCOLUMNS .AND. fif <= Len( LI_NAMES ) - IF LI_NAMES[ fif ] != Nil + IF LI_NAMES[ fif ] != NIL @ LI_Y1, x SAY LI_NAMES[ fif ] ENDIF x := x + Max( Len( FLDSTR( mslist, fif ) ), Len( LI_NAMES[ fif ] ) ) + 1 @@ -600,12 +600,12 @@ FUNCTION VIVNAMES( mslist ) // DO MSFNEXT WITH mslist,fif i ++ ENDDO - IF LI_NMCLR != Nil + IF LI_NMCLR != NIL SetColor( oldc ) ENDIF ENDIF - RETURN Nil + RETURN NIL //+-------------------------------------------------------------------- //+ @@ -677,7 +677,7 @@ STATIC PROCEDURE VIVSTR( mslist, nstroka, vybfld ) sviv := FLDSTR( mslist, fif ) sviv := iif( Len( sviv ) < LI_X2 - 1 - x, sviv, SubStr( sviv, 1, LI_X2 - 1 - x ) ) ENDIF - x := x + Max( Len( sviv ), iif( LI_NAMES != Nil .AND. Len( LI_NAMES ) >= fif, Len( LI_NAMES[ fif ] ), 0 ) ) + 1 + x := x + Max( Len( sviv ), iif( LI_NAMES != NIL .AND. Len( LI_NAMES ) >= fif, Len( LI_NAMES[ fif ] ), 0 ) ) + 1 fif := iif( fif == LI_FREEZE, LI_NLEFT, fif + 1 ) NEXT // DO MSFNEXT WITH mslist,fif @@ -708,7 +708,7 @@ FUNCTION FLDSTR( mslist, numf ) LOCAL fldtype, rez, vartmp - IF LI_MSF != Nil + IF LI_MSF != NIL IF numf <= Len( LI_MSF ) vartmp := LI_MSF[ numf ] IF ( fldtype := ValType( vartmp ) ) == "B" @@ -742,7 +742,7 @@ FUNCTION FLDSTR( mslist, numf ) CASE fldtype == "M" rez := " " ENDCASE - IF LI_BDESHIN != Nil + IF LI_BDESHIN != NIL rez := Eval( LI_BDESHIN, mslist, rez ) ENDIF @@ -796,7 +796,7 @@ FUNCTION InitList LI_BGOTO := {| a, n | HB_SYMBOL_UNUSED( a ), dbGoto( n ) } LI_PRFLT := LI_LVIEW := .F. LI_LSOHR := .T. - LI_BDESHIN := LI_BDESHOUT := LI_MSF := LI_MSTYP := LI_NAMES := Nil + LI_BDESHIN := LI_BDESHOUT := LI_MSF := LI_MSTYP := LI_NAMES := NIL LI_TEKZP := 1 RETURN mslist @@ -816,7 +816,7 @@ FUNCTION Defpict( mslist, i, maxlen ) LOCAL spict, fldd, fldtype := LI_MSTYP[ i ], fldlen := LI_MSLEN[ i ] DO CASE CASE fldtype == "C" - spict := iif( maxlen == Nil, Replicate( "X", fldlen ), "@S" + NUM_STR( maxlen, 2 ) ) + spict := iif( maxlen == NIL, Replicate( "X", fldlen ), "@S" + NUM_STR( maxlen, 2 ) ) CASE fldtype == "N" fldd := LI_MSDEC[ i ] spict := iif( fldd == 0, Replicate( "9", fldlen ), Replicate( "9", fldlen - 1 - fldd ) + "." + Replicate( "9", fldd ) ) diff --git a/harbour/tests/gtchars.prg b/harbour/tests/gtchars.prg index 9f2e3432e5..f966ce40c2 100644 --- a/harbour/tests/gtchars.prg +++ b/harbour/tests/gtchars.prg @@ -55,7 +55,7 @@ PROCEDURE Main( cTermCP, cHostCP, lBoxChar ) ? "Host codpage: " + cHostCP + ", terminal codepage: " + cTermCP ? - //HB_GTINFO(HB_GTI_COMPATBUFFER,.f.) +// hb_gtInfo( HB_GTI_COMPATBUFFER, .F. ) ? FOR i := 0 TO 15 FOR j := 0 TO 15 diff --git a/harbour/tests/mt/mttest04.prg b/harbour/tests/mt/mttest04.prg index 5e3c8fb72e..61f9949b90 100644 --- a/harbour/tests/mt/mttest04.prg +++ b/harbour/tests/mt/mttest04.prg @@ -35,7 +35,7 @@ proc main() aFill( s_aCounters, 0 ) aThreads := {} s_hMutex := hb_mutexCreate() - lEnd := .f. + lEnd := .F. ? "Starting threads: " for i := 1 to N_THREADS aadd( aThreads, hb_threadStart( @thFunc(), i, @lEnd ) ) @@ -43,7 +43,7 @@ proc main() next ? "Wait 5 seconds or hit any key..." inkey( 5 ) - lEnd := .t. + lEnd := .T. ? "Waiting for threads..." aEval( aThreads, {| x | hb_threadJoin( x ) } ) ? "Threads joined" diff --git a/harbour/tests/mt/mttest10.prg b/harbour/tests/mt/mttest10.prg index 114e6de85d..644e68d5a7 100644 --- a/harbour/tests/mt/mttest10.prg +++ b/harbour/tests/mt/mttest10.prg @@ -39,7 +39,7 @@ proc main() ? "Waiting for threads" while inkey() != K_ESC - if hb_threadWait( aThreads, 0.1, .t. ) == len( aThreads ) + if hb_threadWait( aThreads, 0.1, .T. ) == len( aThreads ) wait exit endif diff --git a/harbour/tests/parexpr.prg b/harbour/tests/parexpr.prg index 2f1ef2ae8e..4488f53741 100644 --- a/harbour/tests/parexpr.prg +++ b/harbour/tests/parexpr.prg @@ -47,7 +47,7 @@ PROCEDURE Main() // Now mix with statements and functions ? ( 1, 2, 3 ) - IF ( y := .t. ) + IF ( y := .T. ) ? "Working" ELSE ? "Borken" diff --git a/harbour/tests/rddtest/rddtst.prg b/harbour/tests/rddtest/rddtst.prg index 3add3019cd..1110ee9c58 100644 --- a/harbour/tests/rddtest/rddtst.prg +++ b/harbour/tests/rddtest/rddtst.prg @@ -187,7 +187,7 @@ elseif valtype( itm ) == "C" elseif valtype( itm ) == "N" cStr += ltrim( str( itm ) ) elseif valtype( itm ) == "L" - cStr += iif( itm, ".t.", ".f." ) + cStr += iif( itm, ".T.", ".F." ) elseif valtype( itm ) == "D" cStr += "CTOD(" + DTOC( itm ) + ")" elseif valtype( itm ) == "B" @@ -223,7 +223,7 @@ return cStr #else //rddtst_tst( #, , , ) static function rddtst_tst( cAction, aExState, xRet, xExRet ) - local aState, lOK := ( .t. ), s1, s2, i + local aState, lOK := ( .T. ), s1, s2, i aState := rdd_state() if pcount() >= 4 @@ -232,7 +232,7 @@ return cStr endif if ! valtype( xRet ) == valtype( xExRet ) .or.; ! iif( valtype( xRet ) == "B", eval( xRet ) == eval( xExRet ), xRet == xExRet ) - lOK:= ( .f. ) + lOK := ( .F. ) endif s1 := itm2str( xRet ) s2 := itm2str( xExRet ) @@ -244,7 +244,7 @@ return cStr if !empty( aExState ) .and. lOK for i := 1 to len( aExState ) if ! valtype( aState[ i ] ) == valtype( aExState[ i ] ) .or. ! aState[ i ] == aExState[ i ] - lOK := ( .f. ) + lOK := ( .F. ) exit endif next diff --git a/harbour/tests/vec1.prg b/harbour/tests/vec1.prg index 3841eb13b2..67d69f4c6a 100644 --- a/harbour/tests/vec1.prg +++ b/harbour/tests/vec1.prg @@ -1,4 +1,3 @@ -//NOTEST /* * $Id$ */ @@ -8,7 +7,7 @@ PROCEDURE Main() - QOut( ["'/* bumbulda */45]="k" ) + ? ["'/* bumbulda */45]="k" TEXT any text is allowed here diff --git a/harbour/utils/hbtest/rt_misc.prg b/harbour/utils/hbtest/rt_misc.prg index 3a0f6d1a12..dfca5f8b60 100644 --- a/harbour/utils/hbtest/rt_misc.prg +++ b/harbour/utils/hbtest/rt_misc.prg @@ -84,7 +84,7 @@ PROCEDURE Main_MISC() TEST_LINE( Len( oError ) , 12 ) #endif - /* SET()s */ + /* Set()s */ TEST_LINE( Set( _SET_MARGIN ) , 0 ) TEST_LINE( Set( _SET_MARGIN , -1 ) , "E 1 BASE 2020 Argument error (SET) OS:0 #:0 A:2:N:25;N:-1 " ) diff --git a/harbour/utils/hbtest/rt_stra.prg b/harbour/utils/hbtest/rt_stra.prg index 5495518589..905c763cb2 100644 --- a/harbour/utils/hbtest/rt_stra.prg +++ b/harbour/utils/hbtest/rt_stra.prg @@ -254,7 +254,7 @@ PROCEDURE Main_STRA() RETURN PROCEDURE Comp_Str() - LOCAL old_exact := SET( _SET_EXACT, .F. ) + LOCAL old_exact := Set( _SET_EXACT, .F. ) TEST_LINE( "ABC" == "", .F. ) TEST_LINE( "ABC" = "", .T. ) @@ -362,11 +362,11 @@ PROCEDURE Comp_Str() TEST_LINE( "DEF" > "ABCD", .T. ) TEST_LINE( "DEF" >= "ABCD", .T. ) - SET( _SET_EXACT, old_exact ) + Set( _SET_EXACT, old_exact ) RETURN PROCEDURE Exact_Str() - LOCAL old_exact := SET( _SET_EXACT, .T. ) + LOCAL old_exact := Set( _SET_EXACT, .T. ) TEST_LINE( "ABC" == "", .F. ) TEST_LINE( "ABC" = "", .F. ) @@ -474,7 +474,7 @@ PROCEDURE Exact_Str() TEST_LINE( "DEF" > "ABCD", .T. ) TEST_LINE( "DEF" >= "ABCD", .T. ) - SET( _SET_EXACT, old_exact ) + Set( _SET_EXACT, old_exact ) RETURN diff --git a/harbour/utils/hbtest/rt_trans.prg b/harbour/utils/hbtest/rt_trans.prg index 848035d388..c109e7e04d 100644 --- a/harbour/utils/hbtest/rt_trans.prg +++ b/harbour/utils/hbtest/rt_trans.prg @@ -454,7 +454,7 @@ PROCEDURE Main_TRANS() TEST_LINE( Transform(sdDate, "") , "84.03.25" ) TEST_LINE( Transform(sdDate, "@Z") , " " ) - SET(_SET_DATEFORMAT, "DD/MMM/YYYY") + Set( _SET_DATEFORMAT, "DD/MMM/YYYY" ) TEST_LINE( Transform( .T., "#") , "T" ) TEST_LINE( Transform( .F., "#") , "F" ) @@ -675,20 +675,20 @@ PROCEDURE Main_TRANS() TEST_LINE( Transform( 1234567890123456789, "99999999999999999999" ) , " 1234567890123457000" ) TEST_LINE( Transform( -1234567890123456789, "99999999999999999999" ) , "-1234567890123457000" ) #endif - SET( _SET_DATEFORMAT, "YYYY/MM/DD" ) + Set( _SET_DATEFORMAT, "YYYY/MM/DD" ) TEST_LINE( Transform( 12345678, "@D" ), "1234/56/78" ) - SET( _SET_DATEFORMAT, "YYYY.MM.DD" ) + Set( _SET_DATEFORMAT, "YYYY.MM.DD" ) TEST_LINE( Transform( 1234.56789, "@D" ), "1234.56.9 " ) - SET( _SET_DATEFORMAT, "YYYY.MM:DD" ) + Set( _SET_DATEFORMAT, "YYYY.MM:DD" ) TEST_LINE( Transform( 1234.56789, "@D" ), "1234.56:79" ) TEST_LINE( Transform( 123.345678912, "@D" ), " 123.34:57" ) - SET( _SET_DATEFORMAT, "MM-DD-YYYY" ) - TEST_LINE( Transform( .t., "@RE <|,yY#lL,|>" ) , "99-99-9999T" ) - TEST_LINE( Transform( .f., "@RE <|,yY#lL,|>" ) , "99-99-9999F" ) - TEST_LINE( Transform( .t., "@RD <|,yY#lL,|>" ) , "99-99-9999T" ) - TEST_LINE( Transform( .f., "@RD <|,yY#lL,|>" ) , "99-99-9999F" ) - TEST_LINE( Transform( .f., "@DE <|,yY#lL,|>" ) , "9" ) + Set( _SET_DATEFORMAT, "MM-DD-YYYY" ) + TEST_LINE( Transform( .T., "@RE <|,yY#lL,|>" ) , "99-99-9999T" ) + TEST_LINE( Transform( .F., "@RE <|,yY#lL,|>" ) , "99-99-9999F" ) + TEST_LINE( Transform( .T., "@RD <|,yY#lL,|>" ) , "99-99-9999T" ) + TEST_LINE( Transform( .F., "@RD <|,yY#lL,|>" ) , "99-99-9999F" ) + TEST_LINE( Transform( .F., "@DE <|,yY#lL,|>" ) , "9" ) TEST_LINE( Transform( "abcdefghij", "@S15! " ) , "" ) TEST_LINE( Transform( "abcdefghij", "@S0! " ) , "" ) @@ -775,9 +775,9 @@ PROCEDURE Main_TRANS() TEST_LINE( Transform( 123456789.12, "@,39 999,999,999.99" ) , "123,456,789.12" ) TEST_LINE( Transform( 123.456, "@R 9 9 9.9" ) , "1 2 3.5" ) - SET( _SET_FIXED, cOldFixed ) - SET( _SET_DECIMALS, cOldDecim ) - SET( _SET_DATEFORMAT, cOldDate ) + Set( _SET_FIXED, cOldFixed ) + Set( _SET_DECIMALS, cOldDecim ) + Set( _SET_DATEFORMAT, cOldDate ) RETURN