From 52952d007327ee2c468f3504456918b0b707fd47 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 27 May 2011 21:43:25 +0000 Subject: [PATCH] 2011-05-27 23:42 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * examples/hbdoc2/gentxt.prg * examples/hbdoc2/genxml.prg * examples/hbdoc2/genhtml.prg ! removed extra dot before extension in filename references. it also caused bad links in .html output. Reported by Claudia. --- harbour/ChangeLog | 7 +++++++ harbour/examples/hbdoc2/genhtml.prg | 8 ++++---- harbour/examples/hbdoc2/gentxt.prg | 2 +- harbour/examples/hbdoc2/genxml.prg | 2 +- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 10f0b3ce8e..f3b971db24 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,13 @@ The license applies to all entries newer than 2009-04-28. */ +2011-05-27 23:42 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * examples/hbdoc2/gentxt.prg + * examples/hbdoc2/genxml.prg + * examples/hbdoc2/genhtml.prg + ! removed extra dot before extension in filename references. + it also caused bad links in .html output. Reported by Claudia. + 2011-05-27 19:04 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/include/hbapicdp.h * harbour/src/codepage/Makefile diff --git a/harbour/examples/hbdoc2/genhtml.prg b/harbour/examples/hbdoc2/genhtml.prg index ed06746cd8..f742df44e1 100644 --- a/harbour/examples/hbdoc2/genhtml.prg +++ b/harbour/examples/hbdoc2/genhtml.prg @@ -143,7 +143,7 @@ METHOD BeginSection( cSection, cFilename ) CLASS GenerateHTML If cFilename == ::cFilename ::OpenTag( "a", "name", cSection ):Append( cSection, "h" + HB_NTOS( ::Depth + 2 ) ):CloseTag( "a" )//:Newline() ELSE - ::OpenTag( "a", "href", cFilename + "." + ::cExtension + "#" + cSection ):Append( cSection, "h" + HB_NTOS( ::Depth + 2 ) ):CloseTag( "a" )//:Newline() + ::OpenTag( "a", "href", cFilename + ::cExtension + "#" + cSection ):Append( cSection, "h" + HB_NTOS( ::Depth + 2 ) ):CloseTag( "a" )//:Newline() ENDIF ELSE ::OpenTag( "a", "name", cSection ):Append( cSection, "h" + HB_NTOS( ::Depth + 2 ) ):CloseTag( "a" )//:Newline() @@ -160,12 +160,12 @@ HB_SYMBOL_UNUSED( cFilename ) METHOD AddReference( oEntry, cReference, cSubReference ) CLASS GenerateHTML IF HB_IsObject( oEntry ) .AND. oEntry:ClassName == "ENTRY" - ::OpenTag( "a", "href", ::TargetFilename + "." + ::cExtension + "#" + oEntry:Filename ):Append( oEntry:Name ):CloseTag( "a" ):Append( oEntry:OneLiner ):Newline() + ::OpenTag( "a", "href", ::TargetFilename + ::cExtension + "#" + oEntry:Filename ):Append( oEntry:Name ):CloseTag( "a" ):Append( oEntry:OneLiner ):Newline() ELSE IF cSubReference == NIL - ::OpenTag( "a", "href", cReference + "." + ::cExtension /* + "#" + oEntry:Filename */ ):Append( oEntry ):CloseTag( "a" ):Newline() + ::OpenTag( "a", "href", cReference + ::cExtension /* + "#" + oEntry:Filename */ ):Append( oEntry ):CloseTag( "a" ):Newline() ELSE - ::OpenTag( "a", "href", cReference + "." + ::cExtension + "#" + cSubReference ):Append( oEntry ):CloseTag( "a" ):Newline() + ::OpenTag( "a", "href", cReference + ::cExtension + "#" + cSubReference ):Append( oEntry ):CloseTag( "a" ):Newline() ENDIF ENDIF RETURN self diff --git a/harbour/examples/hbdoc2/gentxt.prg b/harbour/examples/hbdoc2/gentxt.prg index 26df202e3c..8ed2e6999e 100644 --- a/harbour/examples/hbdoc2/gentxt.prg +++ b/harbour/examples/hbdoc2/gentxt.prg @@ -104,7 +104,7 @@ METHOD NewIndex( cFolder, cFilename, cTitle ) CLASS GenerateText METHOD BeginSection( cSection, cFilename ) CLASS GenerateText IF ::Depth == 0 - ::WriteEntry( "", cSection + " (see " + cFilename + "." + ::cExtension + "):", .F. ) + ::WriteEntry( "", cSection + " (see " + cFilename + ::cExtension + "):", .F. ) ELSE ::WriteEntry( "", cSection + ":", .F. ) ENDIF diff --git a/harbour/examples/hbdoc2/genxml.prg b/harbour/examples/hbdoc2/genxml.prg index 3233222dfa..648765b601 100644 --- a/harbour/examples/hbdoc2/genxml.prg +++ b/harbour/examples/hbdoc2/genxml.prg @@ -90,7 +90,7 @@ METHOD NewIndex( cFolder, cFilename, cTitle ) CLASS GenerateXML METHOD BeginSection( cSection, cFilename ) CLASS GenerateXML IF ::Depth == 0 - FWrite( ::nHandle, Replicate( Chr(9), ::Depth ) + [
] + hb_eol() ) + FWrite( ::nHandle, Replicate( Chr(9), ::Depth ) + [
] + hb_eol() ) ELSE FWrite( ::nHandle, Replicate( Chr(9), ::Depth ) + [
] + hb_eol() ) ENDIF