2012-07-04 12:43 UTC+0200 Viktor Szakats (harbour syenar.net)

* doc/en/set.txt
  * doc/en/string.txt
  * doc/en/terminal.txt
    ! minors

  * examples/hbdoc/genhtml.prg
    ! ugly fix to keep indentation for $EXAMPLES$ and $TESTS$
      sections in html output

  * examples/hbdoc/hbdoc.prg
    * formal updates
This commit is contained in:
Viktor Szakats
2012-07-04 10:45:31 +00:00
parent 0f9c19f41b
commit 11036992ff
6 changed files with 58 additions and 41 deletions

View File

@@ -16,6 +16,19 @@
The license applies to all entries newer than 2009-04-28.
*/
2012-07-04 12:43 UTC+0200 Viktor Szakats (harbour syenar.net)
* doc/en/set.txt
* doc/en/string.txt
* doc/en/terminal.txt
! minors
* examples/hbdoc/genhtml.prg
! ugly fix to keep indentation for $EXAMPLES$ and $TESTS$
sections in html output
* examples/hbdoc/hbdoc.prg
* formal updates
2012-07-04 11:57 UTC+0200 Viktor Szakats (harbour syenar.net)
* examples/hbdoc/hbdoc.prg
* use hash literal instead of hb_hash()

View File

@@ -656,41 +656,41 @@
* $TEMPLATE$
* Function
* $NAME$
* HB_SETKEYSAVE()
* HB_SETKEYSAVE()
* $CATEGORY$
* API
* $SUBCATEGORY$
* Events
* $ONELINER$
* Returns a copy of internal set-key list, optionally overwriting
* Returns a copy of internal set-key list, optionally overwriting
* $SYNTAX$
* HB_SETKEYSAVE( [ <OldKeys> ] )
* HB_SETKEYSAVE( [ <OldKeys> ] )
* $ARGUMENTS$
* <OldKeys> is an optional set-key list from a previous call to
* HB_SetKeySave(), or NIL to clear current set-key list
* <OldKeys> is an optional set-key list from a previous call to
* HB_SetKeySave(), or NIL to clear current set-key list
* $RETURNS$
* Current set-key list
* Current set-key list
* $DESCRIPTION$
* HB_SetKeySave() is designed to act like the set() function which
* returns the current state of an environment setting, and optionally
* assigning a new value. In this case, the "environment setting" is the
* internal set-key list, and the optional new value is either a value
* returned from a previous call to SetKeySave() - to restore that list,
* or the value of NIL to clear the current list.
* HB_SetKeySave() is designed to act like the set() function which
* returns the current state of an environment setting, and optionally
* assigning a new value. In this case, the "environment setting" is the
* internal set-key list, and the optional new value is either a value
* returned from a previous call to SetKeySave() - to restore that list,
* or the value of NIL to clear the current list.
* $EXAMPLES$
* LOCAL aKeys := HB_SetKeySave( NIL ) // removes all current set=keys
* ... // some other processing
* HB_SetKeySave( aKeys )
* LOCAL aKeys := HB_SetKeySave( NIL ) // removes all current set=keys
* ... // some other processing
* HB_SetKeySave( aKeys )
* $TESTS$
* None definable
* None definable
* $STATUS$
* R
* R
* $COMPLIANCE$
* H
* H
* $FILES$
* Library is rtl
* $SEEALSO$
* SETKEY()
* SETKEY()
* $END$
*/

View File

@@ -648,11 +648,11 @@
* ? LEN( "Harbour" ) // 7
* ? LEN( { "One", "Two" } ) // 2
* $TESTS$
* function Test()
* PROCEDURE Test()
* LOCAL cName := ""
* ACCEPT "Enter your name: " TO cName
* ? LEN( cName )
* return nil
* RETURN
* $STATUS$
* R
* $COMPLIANCE$

View File

@@ -463,7 +463,7 @@
* // Output a negative dollar amount using debit notation.
* DEVOUTPICT( -1.25, "@D$ 99,999.99 )
* $TESTS$
* @ 3,1 SAY -1.25 PICTURE "@D$ 99,999.99"
* @ 3, 1 SAY -1.25 PICTURE "@D$ 99,999.99"
* will display "$( 1.25)" starting on row four, column two of the
* current device (without the double quotation marks, of course).
* $STATUS$
@@ -599,9 +599,9 @@
* // Wait for a key stroke
* __Wait( "Press a key to continue" )
* $TESTS$
* do while cKey != "Q"
* cKey := __Wait( "Press 'Q' to continue" )
* end do
* DO WHILE !( cKey == "Q" )
* cKey := __Wait( "Press 'Q' to continue" )
* ENDDO
* $STATUS$
* R
* $COMPLIANCE$

View File

@@ -195,7 +195,7 @@ METHOD PROCEDURE WriteEntry( cField, oEntry, lPreformatted, nIndent ) CLASS Gene
LOCAL cCaption := oEntry:FieldName( cField )
LOCAL cEntry := oEntry:&( cField )
// TODO: change this to search the CSS document itself
LOCAL cTagClass := iif( LOWER( cField ) + "|" $ "name|oneliner|examples|tests|", LOWER( cField ), "itemtext" )
LOCAL cTagClass := iif( Lower( cField ) + "|" $ "name|oneliner|examples|tests|", Lower( cField ), "itemtext" )
IF ! Empty( cEntry )
@@ -211,7 +211,11 @@ METHOD PROCEDURE WriteEntry( cField, oEntry, lPreformatted, nIndent ) CLASS Gene
IF lPreformatted
::OpenTag( "pre", iif( cTagClass != NIL, "class", ), cTagClass )
DO WHILE Len( cEntry ) > 0
::Append( Indent( Parse( @cEntry, hb_eol() ), 0, , .T. ), "" )
IF Lower( cField ) + "|" $ "examples|tests|"
::Append( SubStr( Parse( @cEntry, hb_eol() ), 7 ), "" )
ELSE
::Append( Indent( Parse( @cEntry, hb_eol() ), 0, , .T. ), "" )
ENDIF
//~ IF Len( cEntry ) > 0 .AND. ! lPreformatted
//~ FWrite( ::nHandle, hb_eol() )
//~ ENDIF

View File

@@ -392,7 +392,7 @@ STATIC PROCEDURE ProcessFolder( cFolder, aContent ) // this is a recursive proce
cFolder += hb_ps()
aFiles := Directory( cFolder + hb_osFileMask(), "D" )
IF ( nLen := LEN( aFiles ) ) > 0
IF ( nLen := Len( aFiles ) ) > 0
FOR idx := 1 TO nLen
IF aFiles[ idx ][F_ATTR ] == "D"
IF !( aFiles[ idx ][ F_NAME ] == "." ) .AND. ;
@@ -423,7 +423,7 @@ STATIC FUNCTION ProcessFile( cFile, aContent )
LOCAL o
LOCAL nOldContentLen := Len( aContent )
IF ( aHandle[ 1 ] := FOpen( cFile ) ) < 0
IF ( aHandle[ 1 ] := FOpen( cFile ) ) == F_ERROR
OutErr( "error: could not open " + cFile + ", " + hb_ntos( Abs( aHandle[ 1 ] ) ) + hb_eol() )
RETURN .F.
ENDIF
@@ -712,7 +712,7 @@ STATIC PROCEDURE FileEval( acFile, bBlock, nMaxLine )
IF HB_ISSTRING( acFile )
lCloseFile := .T.
IF ( aHandle[ 1 ] := FOpen( acFile ) ) < 0
IF ( aHandle[ 1 ] := FOpen( acFile ) ) == F_ERROR
RETURN
ENDIF
ELSEIF HB_ISNUMERIC( acFile )
@@ -779,17 +779,17 @@ FUNCTION Decode( cType, hsBlock, cKey )
DO CASE
CASE cType == "STATUS"
IF "," $ cCode .AND. hb_AScan( p_aStatus, Parse( ( cCode ), "," ) ) > 0
IF "," $ cCode .AND. hb_AScan( p_aStatus, Parse( cCode, "," ) ) > 0
cResult := ""
DO WHILE LEN( cCode ) > 0
DO WHILE Len( cCode ) > 0
cResult += hb_eol() + Decode( cType, hsBlock, Parse( @cCode, "," ) )
ENDDO
RETURN SubStr( cResult, LEN( hb_eol() ) + 1 )
RETURN SubStr( cResult, Len( hb_eol() ) + 1 )
ENDIF
IF ( idx := hb_AScan( p_aStatus, {| a | a[ 1 ] == cCode } ) ) > 0
RETURN p_aStatus[ idx ][ 2 ]
ELSEIF LEN( cCode ) > 1
ELSEIF Len( cCode ) > 1
RETURN cCode
ELSEIF Len( cCode ) > 0
RETURN "Unknown 'STATUS' code: '" + cCode + "'"
@@ -798,12 +798,12 @@ FUNCTION Decode( cType, hsBlock, cKey )
ENDIF
CASE cType == "PLATFORMS"
IF "," $ cCode .AND. hb_AScan( p_aPlatforms, Parse( ( cCode ), "," ) ) > 0
IF "," $ cCode .AND. hb_AScan( p_aPlatforms, Parse( cCode, "," ) ) > 0
cResult := ""
DO WHILE LEN( cCode ) > 0
DO WHILE Len( cCode ) > 0
cResult += hb_eol() + Decode( cType, hsBlock, Parse( @cCode, "," ) )
ENDDO
RETURN SubStr( cResult, LEN( hb_eol() ) + 1 )
RETURN SubStr( cResult, Len( hb_eol() ) + 1 )
ENDIF
IF ( idx := hb_AScan( p_aPlatforms, {| a | a[ 1 ] == cCode } ) ) > 0
@@ -813,12 +813,12 @@ FUNCTION Decode( cType, hsBlock, cKey )
ENDIF
CASE cType == "COMPLIANCE"
IF "," $ cCode .AND. hb_AScan( p_aCompliance, Parse( ( cCode ), "," ) ) > 0
IF "," $ cCode .AND. hb_AScan( p_aCompliance, Parse( cCode, "," ) ) > 0
cResult := ""
DO WHILE LEN( cCode ) > 0
DO WHILE Len( cCode ) > 0
cResult += hb_eol() + Decode( cType, hsBlock, Parse( @cCode, "," ) )
ENDDO
RETURN SubStr( cResult, LEN( hb_eol() ) + 1 )
RETURN SubStr( cResult, Len( hb_eol() ) + 1 )
ENDIF
IF ( idx := hb_AScan( p_aCompliance, {| a | a[ 1 ] == cCode } ) ) > 0
@@ -1076,7 +1076,7 @@ FUNCTION Indent( cText, nLeftMargin, nWidth, lRaw )
idx -= 2
OTHERWISE
EXIT
END SELECT
ENDCASE
ENDDO
IF idx <= 0
idx := nWidth