See changelog 20000604-09:20 GMT -3

This commit is contained in:
Luiz Rafael Culik
2000-06-04 12:24:05 +00:00
parent 2bdeb57dc6
commit 5bbb1a224c
3 changed files with 1423 additions and 7 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -120,6 +120,7 @@ MEMVAR lRtf
MEMVAR lNgi
MEMVAR lOs2
MEMVAR lWww
MEMVAR lChm
MEMVAR lNorton
MEMVAR aWWW
MEMVAR lTroff
@@ -148,6 +149,7 @@ FUNCTION MAIN( cFlags, cLinkName, cAtFile )
LOCAL cCompiler // Compiler type
LOCAL oHtm
LOCAL oHtm1
LOCAL nPos
LOCAL ppp
LOCAL aMetaContents:={}
PUBLIC theHandle
@@ -162,6 +164,7 @@ FUNCTION MAIN( cFlags, cLinkName, cAtFile )
PUBLIC lNgi := .F.
PUBLIC lOs2 := .F.
PUBLIC lWww := .F.
PUBLIC lChm := .F.
PUBLIC lNorton := .F.
PUBLIC aWWW := {}
PUBLIC lTroff := .f.
@@ -196,6 +199,8 @@ FUNCTION MAIN( cFlags, cLinkName, cAtFile )
lRtf := .T.
ELSEIF cFlags = "HTM"
lWww := .T.
ELSEIF cFlags = "CHM"
lChm := .T.
ELSEIF cFlags = "TRF"
lTroff := .t.
ELSEIF cFlags = "DOC"
@@ -225,6 +230,7 @@ FUNCTION MAIN( cFlags, cLinkName, cAtFile )
? " /rtf Winhelp source code for Windows"
? " /os2 OS/2 help source code For OS/2"
? " /htm Generate HTML output"
? " /chm Generate HTML source files for Windows .CHM Help files"
? " /trf Gerenate Linux TROFF code"
? " /doc Create continuous ASCII file w/o author information"
? " "
@@ -249,8 +255,9 @@ FUNCTION MAIN( cFlags, cLinkName, cAtFile )
CLEAR SCREEN
SET CURSOR OFF
ReadLinkFile( cLinkName )
if lNgi
cCompiler := fill_Link_info( cLinkName )
endif
// See if ngi subdirectory is present
IF lNorton
IF EMPTY( DIRECTORY( "hdf.*", "D" ) )
@@ -264,6 +271,11 @@ FUNCTION MAIN( cFlags, cLinkName, cAtFile )
IF EMPTY( DIRECTORY( "htm.*", "D" ) )
FT_MKDIR( "htm" )
ENDIF
ELSEIF lChm
IF EMPTY( DIRECTORY( "chm.*", "D" ) )
FT_MKDIR( "chm" )
ENDIF
ELSEIF lNgi
IF EMPTY( DIRECTORY( "ngi.*", "D" ) )
FT_MKDIR( "ngi" )
@@ -300,6 +312,8 @@ FUNCTION MAIN( cFlags, cLinkName, cAtFile )
ProcessRtf()
ELSEIF lWww
ProcessWww()
ELSEIF lChm
ProcessChm()
ELSEIF lNgi
ProcessiNg()
ELSEIF lTroff
@@ -326,6 +340,8 @@ FUNCTION MAIN( cFlags, cLinkName, cAtFile )
ProcessRtf()
ELSEIF lWww
ProcessWww()
ELSEIF lChm
ProcessChm()
ELSEIF lNgi
ProcessiNg()
ELSEIF lTroff
@@ -356,7 +372,7 @@ FUNCTION MAIN( cFlags, cLinkName, cAtFile )
ELSEIF lRTF
@ INFILELINE, 30 SAY "Assembling " + IIF( lAscii, "documentation", "WINHELP" ) ;
+ " input files"
ELSEIF lWww
ELSEIF lWww .or. lChm
@ INFILELINE, 30 SAY "Assembling " + IIF( lAscii, "documentation", "Html" ) ;
+ " input files"
ELSEIF lNgi
@@ -421,12 +437,12 @@ FUNCTION MAIN( cFlags, cLinkName, cAtFile )
FWRITE( nHpj, 'TITLE='+cTitle + CRLF )
FWRITE( nHpj, 'COPYRIGHT=Harbour (C) http://www.harbour-project.org' + CRLF )
FWRITE( nHpj, 'HLP=.\'+ lower(substr(cLinkName,1,AT(".",cLinkName)-1)) +".hlp"+ CRLF )
FWRITE( nHpj, 'ROOT=' + CURDIR() + "\RTF" + CRLF )
FWRITE( nHpj, 'ROOT=\' + CURDIR() + "\RTF" + CRLF )
FWRITE( nHpj, 'CNT=.\Harbour.cnt' + CRLF )
FWRITE( nHpj, '[FILES]' + CRLF )
FWRITE( nHpj, "harbour.rtf" + CRLF )
FWRITE( nHpj, '[CONFIG]' + CRLF + 'contents()' + CRLF + 'prev()' + CRLF + 'next()' + CRLF + 'BrowseButtons()' + CRLF )
FWRITE( nHpj, '[WINDOWS]' + CRLF + 'Commands="Harbour Commands",(653,102,360,600),20736,(r14876671),(r12632256),f3' + CRLF + 'Error="Harbour Run Time Errors",(653,102,360,600),20736,(r14876671),(r12632256),f3' + CRLF + 'Tools="Harbour Tools",(653,102,360,600),20736,(r14876671),(r12632256),f3' + CRLF + 'Class="Harbour OOP Commands",(653,102,360,600),20736,(r14876671),(r12632256),f3' + CRLF + 'Funca="Harbour Run Time Functions A-M",(653,102,360,600),20736,(r14876671),(r12632256),f3' + CRLF + 'Funcn="Harbour Run Time Functions N-_",(653,102,360,600),20736,(r14876671),(r12632256),f3' + CRLF + 'Main="HARBOUR",(117,100,894,873),60672,(r14876671),(r12632256),f3' + CRLF )
FWRITE( nHpj, '[WINDOWS]' + CRLF + 'Commands="Harbour Commands",(653,102,360,600),20736,(r14876671),(r12632256),f2' + CRLF + 'Error="Harbour Run Time Errors",(653,102,360,600),20736,(r14876671),(r12632256),f2' + CRLF + 'Tools="Harbour Tools",(653,102,360,600),20736,(r14876671),(r12632256),f2' + CRLF + 'Class="Harbour OOP Commands",(653,102,360,600),20736,(r14876671),(r12632256),f2' + CRLF + 'Funca="Harbour Run Time Functions A-M",(653,102,360,600),20736,(r14876671),(r12632256),f2' + CRLF + 'Funcn="Harbour Run Time Functions N-_",(653,102,360,600),20736,(r14876671),(r12632256),f2' + CRLF + 'Main="HARBOUR",(117,100,894,873),60672,(r14876671),(r12632256),f2' + CRLF )
FCLOSE( nHpj )
ELSEIF lWWW
@@ -543,6 +559,26 @@ FUNCTION MAIN( cFlags, cLinkName, cAtFile )
oHtm:WriteText( "</ul>" )
*/
oHtm:Close()
ELSEIF lChm
nHpj := FCREATE( 'chm\'+lower(substr(cLinkName,1,AT(".",cLinkName)-1)) +".hhp" )
FWRITE( nHpj, '[OPTIONS]' + CRLF )
FWRITE( nHpj, 'Compatibility=1.1 or later'+CRLF)
FWRITE( nHpj, 'Language=0x416 Português (brasileiro)' + CRLF )
FWRITE( nHpj, 'compiled file=.\'+ lower(substr(cLinkName,1,AT(".",cLinkName)-1)) +".chm"+ CRLF )
FWRITE( nHpj, 'Display compile progress=No'+CRLF)
nPos:=aScan(awww,{|x| Upper(x[1])="OVERVIEW"})
if nPos > 0
FWRITE( nHpj,'Default topic='+awww[npos,2]+CRLF)
Else
FWRITE( nHpj,'Default topic='+awww[1,2]+CRLF)
Endif
FWRITE( nHpj, '[FILES]' + CRLF )
For nPos:=1 to len(aWww)
FWRITE( nHpj, lower(awww[npos,2])+".htm" + CRLF )
Next
FCLOSE( nHpj )
ELSEIF lNgi
SET ALTERNATE TO "assembl.bat" ADDITIVE
SET ALTERNATE ON

View File

@@ -4,7 +4,8 @@
/*
* Harbour Project source code:
* HTML Support Code For FT_HELPC
* HTML Support Code For HBDOC
* HTML .CMH support code for HBDOC
*
* Copyright 2000 Luiz Rafael Culik <Culik@sl.conex.net>
* www - http://www.harbour-project.org
@@ -56,7 +57,12 @@ CLASS THTML
METHOD WriteText( cText )
METHOD WriteMetaTag(cTag,cDescription)
METHOD CLOSE()
// The Follow methods is for html source files for .CHM help
METHOD NewChm( cFile ,aMetaContents,cFuncName)
METHOD ADDoBJECT(cType,cClassid)
METHOD ADDPARAM(cName,cValue)
METHOD EndOBJect()
METHOD NewContent(cFile)
ENDCLASS
METHOD New( cFile,aMetaContents ) CLASS THTML
@@ -84,7 +90,7 @@ RETURN Self
METHOD WriteTitle( cTitle ) CLASS THTML
FWRITE( Self:nHandle, "<TITLE>" + CRLF + cTitle + CRLF + "</Title>" + CRLF + '</HEAD>' + CRLF + '<body bgcolor="#FFFFFF">' + CRLF )
FWRITE( Self:nHandle, "<TITLE>" + CRLF + cTitle + CRLF + "</Title>" + CRLF + '</HEAD>' + CRLF )
RETURN Self
@@ -156,4 +162,60 @@ METHOD WriteMetaTag(cTag,cDescription) Class THtml
fWrite(Self:nHandle,'<META NAME="'+cTag+'" CONTENT="'+cDescription+'">'+CRLF)
return Self
/////////////////////Method for .CHM html source files support////////////////
METHOD NewChm( cFile ,aMetaContents,cFuncName) CLASS THTML
Local nCount
? Valtype(aMetaContents)
IF Nx > 0
FCLOSE( NX )
ENDIF
IF VALTYPE( cFile ) <> NIL .AND. VALTYPE( cFile ) == "C"
Self:cFile := LOWER( cFile )
Self:nHandle := FCREATE( Self:cFile )
ENDIF
nX := Self:nHandle
FWRITE( Self:nHandle, "<HTML>" + CRLF +"<HEAD>" +CRLF)
if Valtype(aMetaContents) <> NIL .and. Valtype(aMetaContents)=="A"
For nCount:=1 to len(aMetaContents)
Self:WriteMetaTag(aMetaContents[nCount,1],aMetaContents[nCount,2])
NEXT
Endif
::WriteTitle(cFuncName)
FWRITE( Self:nHandle, '<BODY BGCOLOR="#FFFFFF" TEXT="#000000">' + CRLF )
::AddObject("application/x-oleobject","clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e")
::ADDPARAM("Keyword",cFuncName)
::ENDOBJECT()
RETURN Self
method ADDOBJECT(cType,cClassId) Class THTML
IF VALTYPE(cClassId)<>NIL
FWRITE( Self:nHandle,'<OBJECT TYPE="'+cType+'" CLASSID="'+cClassId+'">'+CRLF)
ELSE
FWRITE( Self:nHandle,'<OBJECT TYPE="'+cType+'">'+CRLF)
ENDIF
RETURN Self
METHOD ENDOBJECT() Class THTML
FWRITE( Self:nHandle,"</OBJECT>"+CRLF)
RETURN Self
METHOD ADDPARAM(cType,cValue) Class THTML
FWRITE( Self:nHandle,'<PARAM NAME="'+cType+ '" VALUE="'+cValue +'">' +CRLF)
RETURN Self
METHOD NewContent( cFile ) CLASS THTML
Local nCount
IF Nx > 0
FCLOSE( NX )
ENDIF
IF VALTYPE( cFile ) <> NIL .AND. VALTYPE( cFile ) == "C"
Self:cFile := LOWER( cFile )
Self:nHandle := FCREATE( Self:cFile )
ENDIF
nX := Self:nHandle
FWRITE( Self:nHandle, "<HTML>" + CRLF )
RETURN Self
*+ EOF: HTML.PRG