2012-11-01 17:33 UTC+0100 Viktor Szakats (harbour syenar.net)

* contrib/gtwvg/tests/demowvg.prg
  * contrib/gtwvg/tests/wvtcls.prg
  * contrib/hbct/tests/datetime.prg
  * contrib/hbmisc/hbedit.prg
  * contrib/hbnf/clrsel.prg
  * contrib/hbnf/doc/en/prtesc.txt
  * contrib/hbnf/doc/en/scregion.txt
  * contrib/hbnf/doc/en/video1.txt
  * contrib/hbnf/tests/metaph.prg
  * contrib/xhb/trpc.prg
  * src/common/hbver.c
  * src/rtl/gtchrmap.c
  * tests/dttest.prg
  * tests/mousetst.prg
  * tests/sbartest.prg
    * deleted unnecessary leading zeros from decimal numbers
    * minor formatting and cleanups in docs
    * use ANSI dates
This commit is contained in:
Viktor Szakats
2012-11-01 16:35:14 +00:00
parent 3227e918a9
commit 175984ec71
16 changed files with 101 additions and 72 deletions

View File

@@ -16,6 +16,26 @@
The license applies to all entries newer than 2009-04-28.
*/
2012-11-01 17:33 UTC+0100 Viktor Szakats (harbour syenar.net)
* contrib/gtwvg/tests/demowvg.prg
* contrib/gtwvg/tests/wvtcls.prg
* contrib/hbct/tests/datetime.prg
* contrib/hbmisc/hbedit.prg
* contrib/hbnf/clrsel.prg
* contrib/hbnf/doc/en/prtesc.txt
* contrib/hbnf/doc/en/scregion.txt
* contrib/hbnf/doc/en/video1.txt
* contrib/hbnf/tests/metaph.prg
* contrib/xhb/trpc.prg
* src/common/hbver.c
* src/rtl/gtchrmap.c
* tests/dttest.prg
* tests/mousetst.prg
* tests/sbartest.prg
* deleted unnecessary leading zeros from decimal numbers
* minor formatting and cleanups in docs
* use ANSI dates
2012-11-01 16:04 UTC+0100 Viktor Szakats (harbour syenar.net)
* contrib/hbexpat/core.c
* minor change to avoid uncrustify formatting a tricky macro

View File

@@ -561,10 +561,10 @@ STATIC FUNCTION GoogleMap()
mfrom3 := mto3 := Space( 50 )
WHILE .T.
@ 05, 01 SAY "FROM :"
@ 07, 01 SAY "State ...:" GET mfrom1 PICTURE "@!"
@ 08, 01 SAY "City ....:" GET mfrom2 PICTURE "@!"
@ 09, 01 SAY "Street ..:" GET mfrom3 PICTURE "@!"
@ 5, 01 SAY "FROM :"
@ 7, 01 SAY "State ...:" GET mfrom1 PICTURE "@!"
@ 8, 01 SAY "City ....:" GET mfrom2 PICTURE "@!"
@ 9, 01 SAY "Street ..:" GET mfrom3 PICTURE "@!"
@ 11, 01 SAY "TO :"
@ 13, 01 SAY "State ...:" GET mto1 PICTURE "@!"
@ 14, 01 SAY "City ....:" GET mto2 PICTURE "@!"

View File

@@ -246,11 +246,12 @@ STATIC FUNCTION MyDialogOne( oCrt )
nGetCol := 20
nSayCol := 7
nGetRow := 7
bBlock1 := {|| oCon:Say( nGetRow + 00, nSayCol, "First Name" , "N/W" ), ;
oCon:Say( nGetRow + 02, nSayCol, "Last Name " , "N/W" ), ;
oCon:Say( nGetRow + 04, nSayCol, "Street" , "N/W" ), ;
oCon:Say( nGetRow + 06, nSayCol, "City" , "W+/W" ), ;
oCon:Say( nGetRow + 08, nSayCol, "State" , "N/W" ), ;
bBlock1 := {|| ;
oCon:Say( nGetRow + 0, nSayCol, "First Name" , "N/W" ), ;
oCon:Say( nGetRow + 2, nSayCol, "Last Name " , "N/W" ), ;
oCon:Say( nGetRow + 4, nSayCol, "Street" , "N/W" ), ;
oCon:Say( nGetRow + 6, nSayCol, "City" , "W+/W" ), ;
oCon:Say( nGetRow + 8, nSayCol, "State" , "N/W" ), ;
oCon:Say( nGetRow + 10, nSayCol, "Zip" , "B+/W" ), ;
oCon:Say( nGetRow + 12, nSayCol, "Date Hired" , "B+/W" ), ;
oCon:Say( nGetRow + 14, nSayCol, "Married" , "B+/W" ), ;
@@ -259,17 +260,25 @@ STATIC FUNCTION MyDialogOne( oCrt )
oCon:Say( nGetRow + 20, nSayCol, "Notes", , "B+/W" ) ;
}
aGets_ := { PadR( "Pritpal", 20 ), PadR( "Bedi", 20 ), PadR( "60, New Professor Colony", 30 ), ;
aGets_ := { ;
PadR( "Pritpal", 20 ), ;
PadR( "Bedi", 20 ), ;
PadR( "60, New Professor Colony", 30 ), ;
PadR( "Ludhiana, INDIA", 30 ), ;
"PB", PadR( "141004", 10 ), SToD( "20040622" ), .T., 48, 17000, ;
"PB", ;
PadR( "141004", 10 ), ;
SToD( "20040622" ), ;
.T., ;
48, ;
17000, ;
PadR( "Wvtgui is a classical example of Harbour capabilities...", 65 ) }
oGet1 := WvtGets():New( oDlg, , 4, 2, 37, 62 )
oGet1:AddGets( nGetRow + 00, nGetCol, aGets_[ 1 ], "@ " , "N/W*,N/GR*" )
oGet1:AddGets( nGetRow + 02, nGetCol, aGets_[ 2 ], "@ " , "N/W*,N/GR*" )
oGet1:AddGets( nGetRow + 04, nGetCol, aGets_[ 3 ], "@ " , "N/W*,N/GR*" )
oGet1:AddGets( nGetRow + 06, nGetCol, aGets_[ 4 ], "@ " , "N/W*,N/GR*" )
oGet1:AddGets( nGetRow + 08, nGetCol, aGets_[ 5 ], "@ " , "N/W*,N/GR*" )
oGet1:AddGets( nGetRow + 0, nGetCol, aGets_[ 1 ], "@ " , "N/W*,N/GR*" )
oGet1:AddGets( nGetRow + 2, nGetCol, aGets_[ 2 ], "@ " , "N/W*,N/GR*" )
oGet1:AddGets( nGetRow + 4, nGetCol, aGets_[ 3 ], "@ " , "N/W*,N/GR*" )
oGet1:AddGets( nGetRow + 6, nGetCol, aGets_[ 4 ], "@ " , "N/W*,N/GR*" )
oGet1:AddGets( nGetRow + 8, nGetCol, aGets_[ 5 ], "@ " , "N/W*,N/GR*" )
oGet1:AddGets( nGetRow + 10, nGetCol, aGets_[ 6 ], "@ " , "N/W*,N/GR*" )
oGet1:AddGets( nGetRow + 12, nGetCol, aGets_[ 7 ], "@ " , "N/W*,N/GR*" )
oGet1:AddGets( nGetRow + 14, nGetCol, aGets_[ 8 ], "@Y" , "N/W*,N/GR*" )

View File

@@ -220,8 +220,8 @@ FUNCTION bomtest()
DO WHILE c
@ 5, 10 SAY "bom(dDate) returns the date of the first day of dDate"
@ 6, 10 SAY "If dDate is 15/10/2002(that's in dd/mm/yyy), bom()"
@ 7, 10 SAY "should return 01/10/2002. Test it, Insert a date"
@ 6, 10 SAY "If dDate is 2002/10/15 (that's in yyyy/mm/dd), bom()"
@ 7, 10 SAY "should return 2002/10/01. Test it, Insert a date"
@ 9, 10 GET dDate
SET CONFIRM ON
@@ -265,8 +265,8 @@ FUNCTION boqtest()
DO WHILE c
@ 5, 10 SAY "boq(dDate) returns the date of the first day of the"
@ 6, 10 SAY "quarter in which dDate is situated. If dDate is"
@ 7, 10 SAY "15/10/2002 (that's in dd/mm/yyy), BOQ() should return"
@ 8, 10 SAY "01/09/2002. Test it, Insert a date"
@ 7, 10 SAY "2002/10/15 (that's in yyyy/mm/dd), BOQ() should return"
@ 8, 10 SAY "2002/09/01. Test it, Insert a date"
@ 9, 10 GET dDate
@@ -310,8 +310,8 @@ FUNCTION boytest()
DO WHILE c
@ 5, 10 SAY "boy(dDate) returns the date of the first day of dDate"
@ 6, 10 SAY "If dDate is 15/10/2002(that's in dd/mm/yyy), boy()"
@ 7, 10 SAY "should return 01/01/2002. Test it, Insert a date"
@ 6, 10 SAY "If dDate is 2002/10/15 (that's in yyyy/mm/dd), boy()"
@ 7, 10 SAY "should return 2002/01/01. Test it, Insert a date"
@ 9, 10 GET dDate
SET CONFIRM ON

View File

@@ -282,7 +282,7 @@ FUNCTION EditorFile( xInput, cOutput, nLineLen, ;
ENDIF
nSize := iif( nLen < 8192, nLen * 2, Int( nLen * 1.5 ) )
oEdit := EditorNew( 01, 00, 23, 79, nLineLen, "--- ", cOutput, , ;
oEdit := EditorNew( 1, 0, 23, 79, nLineLen, "--- ", cOutput, , ;
nSize, nEscape )
IF nHandle > 0

View File

@@ -255,7 +255,7 @@ STATIC FUNCTION _ftColours( aOpt, aClrPal, lColour )
ENDDO
// .... restore the lower 1/2 of screen, and colour
RestScreen( 18, 00, MaxRow(), MaxCol(), cScrSav )
RestScreen( 18, 0, MaxRow(), MaxCol(), cScrSav )
SetColor( cColour )
RETURN aOpt
@@ -282,7 +282,7 @@ STATIC FUNCTION _ftShowIt( aOpt )
CASE "T" // Title
SetColor( aClr[ 1 ] )
hb_DispOutAt( 20, 08, PadC( "This is an example of how the text shall look", 63 ) )
hb_DispOutAt( 20, 8, PadC( "This is an example of how the text shall look", 63 ) )
EXIT
CASE "M" // Menus

View File

@@ -25,7 +25,7 @@
this function convert that code to the format that the printer
needs to receive.
$EXAMPLES$
cSetup = "\015" // default = Epson compressed print
cSetup := "\015" // default = Epson compressed print
UserInput( @cSetup ) // Let user modify setup code
SET DEVICE TO PRINT // get ready to print
?? FT_ESCCODE( cSetup ) // Output the converted code

View File

@@ -32,10 +32,10 @@
The following example uses FT_SAVRGN() and FT_RSTRGN() to save
and restore a portion of the screen.
@ 00, 00, 24, 79 BOX "111111111" // fill the screen with 1's
cScreen = FT_SAVRGN(10, 10, 20, 30) // save a region
@ 00, 00, 24, 79 BOX "222222222" // fill the screen with 2's
FT_RSTRGN(cScreen) // restore the 1's region
@ 0, 0, 24, 79 BOX "111111111" // fill the screen with 1's
cScreen := FT_SAVRGN( 10, 10, 20, 30 ) // save a region
@ 0, 0, 24, 79 BOX "222222222" // fill the screen with 2's
FT_RSTRGN( cScreen ) // restore the 1's region
$SEEALSO$
FT_RSTRGN() FT_RGNSTACK()
$END$
@@ -74,14 +74,14 @@
The following example uses FT_RSTRGN() to restore a saved portion
of the screen to different locations.
@ 00, 00, 24, 79 BOX "111111111" // fill the screen with 1's
cScreen = FT_SAVRGN(10, 10, 20, 30) // save a region
@ 00, 00, 24, 79 BOX "222222222" // fill the screen with 2's
FT_RSTRGN(cScreen) // restore the 1's region
@ 00, 00, 24, 79 BOX "222222222" // fill the screen with 2's
FT_RSTRGN(cScreen, 15, 15) // restore to a different location
@ 00, 00, 24, 79 BOX "222222222" // fill the screen with 2's
FT_RSTRGN(cScreen, 20, 60) // restore to a different location
@ 0, 0, 24, 79 BOX "111111111" // fill the screen with 1's
cScreen := FT_SAVRGN( 10, 10, 20, 30 ) // save a region
@ 0, 0, 24, 79 BOX "222222222" // fill the screen with 2's
FT_RSTRGN( cScreen ) // restore the 1's region
@ 0, 0, 24, 79 BOX "222222222" // fill the screen with 2's
FT_RSTRGN( cScreen, 15, 15 ) // restore to a different location
@ 0, 0, 24, 79 BOX "222222222" // fill the screen with 2's
FT_RSTRGN( cScreen, 20, 60 ) // restore to a different location
$SEEALSO$
FT_SAVRGN() FT_RGNSTACK()
$END$
@@ -138,15 +138,15 @@
The following example uses FT_RGNSTACK() to save and restore various
sections of the screen.
@ 00, 00, 24, 79 BOX "111111111" // fill the screen with 1's
FT_RGNSTACK( "push", 10, 05, 15, 15 ) // push a region
@ 00, 00, 24, 79 BOX "222222222" // fill the screen with 2's
@ 0, 0, 24, 79 BOX "111111111" // fill the screen with 1's
FT_RGNSTACK( "push", 10, 5, 15, 15 ) // push a region
@ 0, 0, 24, 79 BOX "222222222" // fill the screen with 2's
FT_RGNSTACK( "push", 10, 20, 15, 30 ) // push a region
@ 00, 00, 24, 79 BOX "333333333" // fill the screen with 3's
@ 0, 0, 24, 79 BOX "333333333" // fill the screen with 3's
FT_RGNSTACK( "push", 10, 35, 15, 45 ) // push a region
@ 00, 00, 24, 79 BOX "444444444" // fill the screen with 4's
@ 0, 0, 24, 79 BOX "444444444" // fill the screen with 4's
FT_RGNSTACK( "push", 10, 50, 15, 60 ) // push a region
@ 00, 00, 24, 79 BOX "555555555" // fill the screen with 5's
@ 0, 0, 24, 79 BOX "555555555" // fill the screen with 5's
FT_RGNSTACK( "push", 10, 65, 15, 75 ) // push a region
CLEAR
FT_RGNSTACK( "pop" ) // restore the 5's region

View File

@@ -66,8 +66,8 @@
where speed is important. It is faster and requires less memory than
FT_VIDSTR(). A working example is contained in clrtable.prg.
$EXAMPLES$
FOR nX = 1 to MaxRow()
FOR nY = 1 to MaxCol()
FOR nX := 1 to MaxRow()
FOR nY := 1 to MaxCol()
FT_WRTChr( nX, nY, "∙", ( nX - 1 ) + ( nY * 16 ) )
NEXT
NEXT

View File

@@ -84,7 +84,7 @@ PROCEDURE Main()
QQOut( PadR( cName, 18, "." ) + FT_METAPH( cName ) ) ;
} )
SetPos( 21, 00 )
SetPos( 21, 0 )
RETURN

View File

@@ -927,7 +927,7 @@ METHOD LaunchFunction( cFuncName, aParams, nMode, aDesc ) CLASS tRPCServeCon
oFunc := ::oServer:Find( cFuncName )
IF Empty( oFunc )
// signal error
::oServer:OnFunctionError( Self, cFuncName, 00 )
::oServer:OnFunctionError( Self, cFuncName, 0 )
hb_inetSendAll( ::skRemote, "XHBR4000" )
RETURN .T.
ENDIF
@@ -935,7 +935,7 @@ METHOD LaunchFunction( cFuncName, aParams, nMode, aDesc ) CLASS tRPCServeCon
// check for level
IF oFunc:nAuthLevel > ::nAuthLevel
// signal error
::oServer:OnFunctionError( Self, cFuncName, 01 )
::oServer:OnFunctionError( Self, cFuncName, 1 )
hb_inetSendAll( ::skRemote, "XHBR4001" )
RETURN .T.
ENDIF
@@ -943,7 +943,7 @@ METHOD LaunchFunction( cFuncName, aParams, nMode, aDesc ) CLASS tRPCServeCon
// check for parameters
IF aParams == NIL .OR. ! oFunc:CheckTypes( aParams )
// signal error
::oServer:OnFunctionError( Self, cFuncName, 02 )
::oServer:OnFunctionError( Self, cFuncName, 2 )
hb_inetSendAll( ::skRemote, "XHBR4002" )
RETURN .T.
ENDIF

View File

@@ -483,7 +483,7 @@ char * hb_verPlatform( void )
int i;
/* Skip the leading spaces (Win95B, Win98) */
for( i = 0; pszCSDVersion[ i ] != '\0' && HB_ISSPACE( ( int ) pszCSDVersion[ i ] ); i++ );
for( i = 0; pszCSDVersion[ i ] != '\0' && HB_ISSPACE( ( int ) pszCSDVersion[ i ] ); i++ ) {;}
if( pszCSDVersion[ i ] != '\0' )
{

View File

@@ -84,20 +84,20 @@ static void chrmap_dotctrl( int * piTransTbl )
static void chrmap_ascictrl( int * piTransTbl )
{
piTransTbl[ 04] = HB_CHRMAP( 1, '#' );
piTransTbl[ 16] = HB_CHRMAP( 1, '>' );
piTransTbl[ 17] = HB_CHRMAP( 1, '<' );
piTransTbl[ 30] = HB_CHRMAP( 1, '^' );
piTransTbl[ 31] = HB_CHRMAP( 1, 'v' );
piTransTbl[ 24] = HB_CHRMAP( 1, '^' );
piTransTbl[ 25] = HB_CHRMAP( 1, 'v' );
piTransTbl[ 26] = HB_CHRMAP( 1, '>' );
piTransTbl[ 27] = HB_CHRMAP( 1, '<' );
piTransTbl[ 4 ] = HB_CHRMAP( 1, '#' );
piTransTbl[ 16 ] = HB_CHRMAP( 1, '>' );
piTransTbl[ 17 ] = HB_CHRMAP( 1, '<' );
piTransTbl[ 30 ] = HB_CHRMAP( 1, '^' );
piTransTbl[ 31 ] = HB_CHRMAP( 1, 'v' );
piTransTbl[ 24 ] = HB_CHRMAP( 1, '^' );
piTransTbl[ 25 ] = HB_CHRMAP( 1, 'v' );
piTransTbl[ 26 ] = HB_CHRMAP( 1, '>' );
piTransTbl[ 27 ] = HB_CHRMAP( 1, '<' );
}
static void chrmap_acscbox( int * piTransTbl )
{
piTransTbl[ 04 ] = HB_CHRMAP( 5, '`' ); /* ACS_DIAMOND */
piTransTbl[ 4 ] = HB_CHRMAP( 5, '`' ); /* ACS_DIAMOND */
piTransTbl[ 16 ] = HB_CHRMAP( 5, '+' ); /* ACS_RARROW */
piTransTbl[ 17 ] = HB_CHRMAP( 5, ',' ); /* ACS_LARROW */
piTransTbl[ 24 ] = HB_CHRMAP( 5, '-' ); /* ACS_UARROW */

View File

@@ -32,17 +32,17 @@ PROCEDURE Main()
? " ValType( hb_DateTime( 1974, 31, 5, NIL, NIL, NIL ) ) =>", ValType( hb_DateTime( 1974, 31, 5, NIL, NIL, NIL ) )
?
? " ValType( hb_DateTime( 2001, 10, 13, 18, 42, 16 ) ) =>", ValType( hb_DateTime( 2001, 10, 13, 18, 42, 16 ) )
? " ValType( hb_DateTime( 2001, 10, 13, 18, 42, 16 ) ) =>", ValType( hb_DateTime( 2001, 10, 13, 18, 42, 16 ) )
?
? " ValType( hb_DateTime( NIL, NIL, NIL, 10, 36, 05 ) ) =>", ValType( hb_DateTime( NIL, NIL, NIL, 10, 36, 05 ) )
? " hb_DateTime( NIL, NIL, NIL, 10, 36, 05 ) =>", hb_DateTime( NIL, NIL, NIL, 10, 36, 05 )
? " ValType( hb_DateTime( NIL, NIL, NIL, 10, 36, 5 ) ) =>", ValType( hb_DateTime( NIL, NIL, NIL, 10, 36, 5 ) )
? " hb_DateTime( NIL, NIL, NIL, 10, 36, 5 ) =>", hb_DateTime( NIL, NIL, NIL, 10, 36, 5 )
?
? " ValType( hb_DateTime( NIL, NIL, NIL, 10, 36, 05, 176 ) ) =>", ValType( hb_DateTime( NIL, NIL, NIL, 10, 36, 05, 176 ) )
? " hb_DateTime( NIL, NIL, NIL, 10, 36, 05, 176 ) =>", hb_DateTime( NIL, NIL, NIL, 10, 36, 05, 176 )
? " ValType( hb_DateTime( NIL, NIL, NIL, 10, 36, 5, 176 ) ) =>", ValType( hb_DateTime( NIL, NIL, NIL, 10, 36, 5, 176 ) )
? " hb_DateTime( NIL, NIL, NIL, 10, 36, 5, 176 ) =>", hb_DateTime( NIL, NIL, NIL, 10, 36, 5, 176 )
? " ValType( hb_DateTime( 0, 0, 0, 10, 36, 05, 176 ) ) =>", ValType( hb_DateTime( 0, 0, 0, 10, 36, 05, 176 ) )
? " hb_DateTime( 0, 0, 0, 10, 36, 05, 176 ) =>", hb_DateTime( 0, 0, 0, 10, 36, 05, 176 )
? " ValType( hb_DateTime( 0, 0, 0, 10, 36, 5, 176 ) ) =>", ValType( hb_DateTime( 0, 0, 0, 10, 36, 5, 176 ) )
? " hb_DateTime( 0, 0, 0, 10, 36, 5, 176 ) =>", hb_DateTime( 0, 0, 0, 10, 36, 5, 176 )
RETURN

View File

@@ -21,7 +21,7 @@ PROCEDURE Main()
QUIT
ENDIF
@ 0, 0 TO MaxRow(), MaxCol() DOUBLE
@ 0, 0 TO MaxRow(), MaxCol() DOUBLE
@ MaxRow() - 2, 0 TO MaxRow(), 18 DOUBLE
@ MaxRow() - 1, 2 SAY "Y:"
@ MaxRow() - 1, 10 SAY "X:"
@@ -240,7 +240,7 @@ PROCEDURE TEST2( nR, nC )
SET CURSOR ON
@ 20, 01 SAY "MOUSE TEST FINISH!"
@ 20, 1 SAY "MOUSE TEST FINISH!"
?
RETURN

View File

@@ -55,7 +55,7 @@ FUNCTION InitScrlBar()
AAdd( aFileList, tmpFileList[ i ][ F_NAME ] )
NEXT
filesScroll := ScrollBar( 06, 14, 60, NIL, 1 )
filesScroll := ScrollBar( 6, 14, 60, NIL, 1 )
filesScroll:total := Len( aFileList )
@@ -64,7 +64,7 @@ FUNCTION InitScrlBar()
filesScroll:display()
i := AChoice( 06, 29, 14, 59, aFileList, , {| modo | updateFilesScroll( modo, aFileList, filesScroll ) } )
i := AChoice( 6, 29, 14, 59, aFileList, , {| modo | updateFilesScroll( modo, aFileList, filesScroll ) } )
@ 23, 0 SAY iif( i < 1, "", aFileList[ i ] ) COLOR "N/W*"
SET COLOR TO