diff --git a/ChangeLog.txt b/ChangeLog.txt index 67273e0cf9..b6c251476a 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -10,6 +10,132 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2016-10-26 12:50 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com) + - extras/hbdoc/_tmplate.prg + - extras/hbdoc/hbdoc.ch + * extras/hbdoc/_genbase.prg + * extras/hbdoc/_genhtml.prg + * extras/hbdoc/_gentxt.prg + * extras/hbdoc/_genxml.prg + * extras/hbdoc/hbdoc.hbp + * extras/hbdoc/hbdoc.prg + + improve readability by paragraphs spacing in DESCRIPTION sections + + improve divs in section content for better control via CSS + + improve readability of tables with borders and + header hightlights + * change default output to single-file + + add support for the old / tags in html output until they + are converted to something better + + add support for /, , Markdown `inline code`, + _emphasis_, *bold*, character escaping \*, line separators ===/---, + and fenced code using triple backticks. + Very limited and not with standard compliance or completeness + in mind, just to be able to use some basic formatting. + ; TODO: Markdown URL and lists, then replace all ,, + markup with Markdown equivalents in docs + + better localization support + + add support for one file per component output via -output-component + cmdline option + % assemble output in memory and write to disk in a single call + % integrate external header + % replace almost all internal arrays with hashes + % replace self-modifying class and macro expansion with + regular hashes + % internal cleanups + % switch to simpler method for sort weighting + + merge category/subcategory values into tag list. It + means they will be now be included in the output + % cleanup/fix/simplify value expansions for 'compliance', + 'status' and 'platform' fields + % cleanup the way output engines are handles internally + + add support for 'TAGS' entry to replace/extend the rigid and + ambiguous CATEGORY/SUBCATEGORY-based categorization. It is meant + to be a comma-separated list of freeform tags, possibly with a set + of standard common tags, with the freedom to use anything else deemed + useful by component/doc authors. + + add footer showing the build date of the doc + + include Git revision the doc is based on, link to the relevant + source tree version. + * various code refactoring steps to avoid unnecessary + classes, arrays, macro evaluation, and using undocumented + functions + % various HTML5 tag improvements and optimizations + + load HBX file contents and lookup each referenced + symbol. Emit warning in verbose mode, if docs refers + to non-existing one. + (this replaces slow and broken logic based on hbextern.ch) + + use core hbdoc API to load the documentation instead + of locally rolled logic + * always show those content problems that are considered + fatal and the input doc to be skipped + + filter docs to English language by default + + add ability to choose language using a command-line option + ! fix faulty validation logic that resulted in + erronously skipping certain entries + + identify docs' 'component' property automatically + ! fix to not eat empty lines from examples + + convert "see also" items to links (this works correctly only + in single file output mode) + ! fix to not break words (f.e. URLs) when outputting HTML + % use shorter class names + ! fix invalid element ID generated + ! fix RTE when trying to create output by category + % delete dummy "HTML2" output mode + * convert more ASCII chars to better Unicode equivalents + + mark more text as code automatically + * drop MS-DOS compatibility + + * src/rtl/hbdoc.prg + ! fix filling '_LANG' property with the correct value + * switch to use LF instead of CRLF in the field contents + + * contrib/hbct/doc/en/*.txt + * contrib/hbgd/doc/en/hbgd.txt + * contrib/hbgt/doc/en/hbgt.txt + * contrib/hbmisc/doc/en/dates2.txt + * contrib/hbnf/doc/en/*.txt + * contrib/rddads/doc/en/adsfuncs.txt + * doc/en/*.txt + * cleanups and fixes + ! casing + ! fix to always delimit "see also" items with comma (",") + ! fix various casing issues and old typos + ! various fixes after detecting them using updated hbdoc + ! eliminate/fix various rare/unnecessary/invalid field values + ! move some embedded docs from hbdoc into their respective + doc sources + ! fix a typo + * use backtick + * replace code copyright with reference to COPYING.txt (=LICENSE.txt) + + mark tables without a header or with double height header + + ; Above patches come from 3.4 fork commits below: + + 2016-10-26 12:43 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com) + 2016-10-26 12:34 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com) + 2016-10-26 12:20 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com) + 2016-10-26 03:21 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com) + 2016-10-26 02:47 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com) + 2016-10-25 15:05 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com) + 2016-10-25 14:51 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com) + 2016-10-25 14:30 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com) + 2016-10-25 13:19 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com) + 2016-10-25 12:35 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com) + 2016-10-25 11:47 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com) + 2016-10-25 02:48 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com) + 2016-10-24 22:26 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com) + 2016-10-24 18:35 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com) + 2016-10-24 17:58 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com) + 2016-10-24 16:12 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com) + 2016-10-24 15:44 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com) + 2016-10-24 03:36 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com) + 2016-10-24 02:40 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com) + 2016-10-24 00:23 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com) + 2016-10-23 23:09 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com) + 2016-10-23 16:39 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com) + 2016-10-23 16:10 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com) + 2016-10-23 13:15 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com) + 2016-10-21 07:54 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com) * extras/hbdoc/_genbase.prg * extras/hbdoc/_genhtml.prg diff --git a/contrib/hbct/doc/en/atnum.txt b/contrib/hbct/doc/en/atnum.txt index f33e9c329c..ef31c06c97 100644 --- a/contrib/hbct/doc/en/atnum.txt +++ b/contrib/hbct/doc/en/atnum.txt @@ -98,7 +98,7 @@ $FILES$ Library is hbct. $SEEALSO$ - AtNum() AfterAtNum() CSetAtMupa() SetAtLike() + AtNum(), AfterAtNum(), CSetAtMupa(), SetAtLike() $END$ */ @@ -110,7 +110,7 @@ $ONELINER$ Returns the start position of the nth occurence of a substring in a string $SYNTAX$ - ATNUM (, , [], + AtNum( , , [], [] ) --> nPosition $ARGUMENTS$ is the substring scanned for @@ -149,6 +149,6 @@ $FILES$ Library is hbct. $SEEALSO$ - AtNum() AfterAtNum() CSetAtMupa() SetAtLike() + AtNum(), AfterAtNum(), CSetAtMupa(), SetAtLike() $END$ */ diff --git a/contrib/hbct/doc/en/atrepl.txt b/contrib/hbct/doc/en/atrepl.txt index 0d46463f26..9590e8bb85 100644 --- a/contrib/hbct/doc/en/atrepl.txt +++ b/contrib/hbct/doc/en/atrepl.txt @@ -54,6 +54,6 @@ $FILES$ Library is hbct. $SEEALSO$ - CSetAtMupa() SetAtLike() + CSetAtMupa(), SetAtLike() $END$ */ diff --git a/contrib/hbct/doc/en/charevod.txt b/contrib/hbct/doc/en/charevod.txt index 49b3fdcd06..dfcc5f72d9 100644 --- a/contrib/hbct/doc/en/charevod.txt +++ b/contrib/hbct/doc/en/charevod.txt @@ -26,7 +26,7 @@ $FILES$ Library is hbct. $SEEALSO$ - CharOdd() CharMix() + CharOdd(), CharMix() $END$ */ @@ -58,6 +58,6 @@ $FILES$ Library is hbct. $SEEALSO$ - CharEven() CharMix() + CharEven(), CharMix() $END$ */ diff --git a/contrib/hbct/doc/en/charmix.txt b/contrib/hbct/doc/en/charmix.txt index fdf89c9122..e352f5ae36 100644 --- a/contrib/hbct/doc/en/charmix.txt +++ b/contrib/hbct/doc/en/charmix.txt @@ -39,6 +39,6 @@ $FILES$ Library is hbct. $SEEALSO$ - CharEven() CharOdd() + CharEven(), CharOdd() $END$ */ diff --git a/contrib/hbct/doc/en/charone.txt b/contrib/hbct/doc/en/charone.txt index d5c80789b3..5a3dc48d22 100644 --- a/contrib/hbct/doc/en/charone.txt +++ b/contrib/hbct/doc/en/charone.txt @@ -33,7 +33,7 @@ $FILES$ Library is hbct. $SEEALSO$ - CharRem() WordOne() + CharRem(), WordOne() $END$ */ @@ -70,6 +70,6 @@ $FILES$ Library is hbct. $SEEALSO$ - CharOne() CharRem() + CharOne(), CharRem() $END$ */ diff --git a/contrib/hbct/doc/en/charonly.txt b/contrib/hbct/doc/en/charonly.txt index 8607a7f83b..a55f206d40 100644 --- a/contrib/hbct/doc/en/charonly.txt +++ b/contrib/hbct/doc/en/charonly.txt @@ -30,7 +30,7 @@ $FILES$ Library is hbct. $SEEALSO$ - CharRem() WordOnly() WordRem() + CharRem(), WordOnly(), WordRem() $END$ */ @@ -66,7 +66,7 @@ $FILES$ Library is hbct. $SEEALSO$ - CharOnly() CharRem() WordRem() + CharOnly(), CharRem(), WordRem() $END$ */ @@ -101,7 +101,7 @@ $FILES$ Library is hbct. $SEEALSO$ - CharOnly() WordOnly() WordRem() + CharOnly(), WordOnly(), WordRem() $END$ */ @@ -137,6 +137,6 @@ $FILES$ Library is hbct. $SEEALSO$ - CharOnly() CharRem() WordRem() + CharOnly(), CharRem(), WordRem() $END$ */ diff --git a/contrib/hbct/doc/en/charop.txt b/contrib/hbct/doc/en/charop.txt index 95f4b7867f..f71635d1a5 100644 --- a/contrib/hbct/doc/en/charop.txt +++ b/contrib/hbct/doc/en/charop.txt @@ -36,9 +36,9 @@ $FILES$ Library is hbct. $SEEALSO$ - CharSub() CharAnd() CharNot() - CharOr() CharXor() CharShl() - CharShr() CharRll() CharRlr() + CharSub(), CharAnd(), CharNot(), + CharOr(), CharXor(), CharShl(), + CharShr(), CharRll(), CharRlr(), CSetRef() $END$ */ @@ -82,9 +82,9 @@ $FILES$ Library is hbct. $SEEALSO$ - CharAdd() CharSub() CharNot() - CharOr() CharXor() CharShl() - CharShr() CharRll() CharRlr() + CharAdd(), CharSub(), CharNot(), + CharOr(), CharXor(), CharShl(), + CharShr(), CharRll(), CharRlr(), CSetRef() $END$ */ @@ -125,9 +125,9 @@ $FILES$ Library is hbct. $SEEALSO$ - CharAdd() CharSub() CharAnd() - CharOr() CharXor() CharShl() - CharShr() CharRll() CharRlr() + CharAdd(), CharSub(), CharAnd(), + CharOr(), CharXor(), CharShl(), + CharShr(), CharRll(), CharRlr(), CSetRef() $END$ */ @@ -171,9 +171,9 @@ $FILES$ Library is hbct. $SEEALSO$ - CharAdd() CharSub() CharNot() - CharAnd() CharXor() CharShl() - CharShr() CharRll() CharRlr() + CharAdd(), CharSub(), CharNot(), + CharAnd(), CharXor(), CharShl(), + CharShr(), CharRll(), CharRlr(), CSetRef() $END$ */ @@ -216,9 +216,9 @@ $FILES$ Library is hbct. $SEEALSO$ - CharAdd() CharSub() CharNot() - CharAnd() CharOr() CharShl() - CharShr() CharRll() CharRlr() + CharAdd(), CharSub(), CharNot(), + CharAnd(), CharOr(), CharShl(), + CharShr(), CharRll(), CharRlr(), CSetRef() $END$ */ diff --git a/contrib/hbct/doc/en/charophb.txt b/contrib/hbct/doc/en/charophb.txt index 52261b5e2f..3b27a6b95a 100644 --- a/contrib/hbct/doc/en/charophb.txt +++ b/contrib/hbct/doc/en/charophb.txt @@ -36,9 +36,9 @@ $FILES$ Library is hbct. $SEEALSO$ - CharAdd() CharAnd() CharNot() - CharOr() CharXor() CharShl() - CharShr() CharRll() CharRlr() + CharAdd(), CharAnd(), CharNot(), + CharOr(), CharXor(), CharShl(), + CharShr(), CharRll(), CharRlr(), CSetRef() $END$ */ @@ -82,9 +82,9 @@ $FILES$ Library is hbct. $SEEALSO$ - CharAdd() CharSub() CharAnd() - CharOr() CharXor() CharNot() - CharShr() CharRll() CharRlr() + CharAdd(), CharSub(), CharAnd(), + CharOr(), CharXor(), CharNot(), + CharShr(), CharRll(), CharRlr(), CSetRef() $END$ */ @@ -128,9 +128,9 @@ $FILES$ Library is hbct. $SEEALSO$ - CharAdd() CharSub() CharAnd() - CharOr() CharXor() CharNot() - CharShl() CharRll() CharRlr() + CharAdd(), CharSub(), CharAnd(), + CharOr(), CharXor(), CharNot(), + CharShl(), CharRll(), CharRlr(), CSetRef() $END$ */ @@ -174,9 +174,9 @@ $FILES$ Library is hbct. $SEEALSO$ - CharAdd() CharSub() CharAnd() - CharOr() CharXor() CharNot() - CharShl() CharShr() CharRlr() + CharAdd(), CharSub(), CharAnd(), + CharOr(), CharXor(), CharNot(), + CharShl(), CharShr(), CharRlr(), CSetRef() $END$ */ @@ -220,9 +220,9 @@ $FILES$ Library is hbct. $SEEALSO$ - CharAdd() CharSub() CharAnd() - CharOr() CharXor() CharNot() - CharShl() CharShr() CharRll() + CharAdd(), CharSub(), CharAnd(), + CharOr(), CharXor(), CharNot(), + CharShl(), CharShr(), CharRll(), CSetRef() $END$ */ diff --git a/contrib/hbct/doc/en/charrepl.txt b/contrib/hbct/doc/en/charrepl.txt index 0d7ebdf543..e4c4c226b5 100644 --- a/contrib/hbct/doc/en/charrepl.txt +++ b/contrib/hbct/doc/en/charrepl.txt @@ -51,7 +51,6 @@ $FILES$ Library is hbct. $SEEALSO$ - WordRepl() PosRepl() RangeRepl() - CSetRef() + WordRepl(), PosRepl(), RangeRepl(), CSetRef() $END$ */ diff --git a/contrib/hbct/doc/en/charsort.txt b/contrib/hbct/doc/en/charsort.txt index 60f13d9332..b88d025e5c 100644 --- a/contrib/hbct/doc/en/charsort.txt +++ b/contrib/hbct/doc/en/charsort.txt @@ -33,7 +33,7 @@ $RETURNS$ the string resulting from the sort process $DESCRIPTION$ - The CHARSORT function sorts the characters within a string . + The CharSort() function sorts the characters within a string . With the parameters and , you can determine that only the substring from position +1 to position + within should diff --git a/contrib/hbct/doc/en/color.txt b/contrib/hbct/doc/en/color.txt index 099352272f..541baa3548 100644 --- a/contrib/hbct/doc/en/color.txt +++ b/contrib/hbct/doc/en/color.txt @@ -73,7 +73,7 @@ $NAME$ NToColor() $CATEGORY$ - HBCT video functions + hbct video functions $ONELINER$ $SYNTAX$ diff --git a/contrib/hbct/doc/en/ctmath.txt b/contrib/hbct/doc/en/ctmath.txt index ff5218a7f2..d65dc0fce1 100644 --- a/contrib/hbct/doc/en/ctmath.txt +++ b/contrib/hbct/doc/en/ctmath.txt @@ -1,12 +1,12 @@ /* $DOC$ $NAME$ - SetPREC() + SetPrec() $CATEGORY$ CT3 math functions $ONELINER$ Set precision of math functions $SYNTAX$ - SetPREC( ) -> cEmptyString + SetPrec( ) -> cEmptyString $ARGUMENTS$ digit count between 1 and 16, defaults to 16 $RETURNS$ @@ -19,7 +19,7 @@ $STATUS$ Ready $COMPLIANCE$ - SetPREC() is compatible with CT3's SETPREC. + SetPrec() is compatible with CT3's SetPrec(). $PLATFORMS$ All $FILES$ @@ -50,7 +50,7 @@ $STATUS$ Ready $COMPLIANCE$ - GetPrec() is compatible with CT3's GETPREC. + GetPrec() is compatible with CT3's GetPrec(). $PLATFORMS$ All $FILES$ diff --git a/contrib/hbct/doc/en/ctstr.txt b/contrib/hbct/doc/en/ctstr.txt index f7691fe959..ba4e8038ab 100644 --- a/contrib/hbct/doc/en/ctstr.txt +++ b/contrib/hbct/doc/en/ctstr.txt @@ -30,7 +30,7 @@ Thus, these functions allow to pass the string by reference [@] to the function so that it may not be necessary to return the transformed - string. By calling CSETREF (.T.), the above mentioned functions return + string. By calling CSetRef( .T. ), the above mentioned functions return the value .F. instead of the transformed string if the string is passed by reference to the function. The switch is turned off (.F.) by default. @@ -46,14 +46,14 @@ $FILES$ Library is hbct. $SEEALSO$ - AddAscii() Blank() CharAdd() - CharAnd() CharMirr() CharNot() - CharOr() CharRelRep() CharRepl() - CharSort() CharSwap() CharXor() - Crypt() JustLeft() JustRight() - PosChar() PosRepl() RangeRepl() - ReplAll() ReplLeft() ReplRight() - TokenLower() TokenUpper() WordRepl() + AddAscii(), Blank(), CharAdd(), + CharAnd(), CharMirr(), CharNot(), + CharOr(), CharRelRep(), CharRepl(), + CharSort(), CharSwap(), CharXor(), + Crypt(), JustLeft(), JustRight(), + PosChar(), PosRepl(), RangeRepl(), + ReplAll(), ReplLeft(), ReplRight(), + TokenLower(), TokenUpper(), WordRepl(), WordSwap() $END$ */ @@ -74,7 +74,7 @@ lOldSwitch old (if lNewSwitch is a logical value) or current state of the switch $DESCRIPTION$ - CSETATMUPA determines how the following CT3 string functions + CSetAtMupa() determines how the following CT3 string functions AtNum() AfterAtNum() BeforAtNum() AtRepl() NumAt() AtAdjust() @@ -94,9 +94,9 @@ $FILES$ Library is hbct. $SEEALSO$ - AtNum() AfterAtNum() BeforAtNum() - AtRepl() NumAt() AtAdjust() - WordToChar() WordRepl() + AtNum(), AfterAtNum(), BeforAtNum(), + AtRepl(), NumAt(), AtAdjust(), + WordToChar(), WordRepl() $END$ */ @@ -108,7 +108,7 @@ $ONELINER$ Determine scan behaviour in some string functions $SYNTAX$ - SETATLIKE ([] [, <[@]cWildcard>]) --> nOldMode + SetAtLike( [] [, <[@]cWildcard>] ) --> nOldMode $ARGUMENTS$ [] CT_SETATLIKE_EXACT -> characters are compared exactly CT_SETATLIKE_WILDCARD -> characters are compared using @@ -128,10 +128,10 @@ base: AtAdjust() AtNum() AfterAtNum() - BEFOREAtNum() AtRepl() NumAt() + BeforAtNum() AtRepl() NumAt() StrDiff() - With the SETATLIKE function, one can determine when characters are + With the SetAtLike() function, one can determine when characters are considered to match within these functions. If CT_SETATLIKE_WILDCARD is set (e.g. "?"), then "?" matches every other character. diff --git a/contrib/hbct/doc/en/dattime2.txt b/contrib/hbct/doc/en/dattime2.txt index c58d9d4898..3da689ac3c 100644 --- a/contrib/hbct/doc/en/dattime2.txt +++ b/contrib/hbct/doc/en/dattime2.txt @@ -142,7 +142,7 @@ $STATUS$ Started $COMPLIANCE$ - AddMonth() is compatible with CT3's ADDMOTH(). + AddMonth() is compatible with CT3's AddMonth(). $PLATFORMS$ All $FILES$ @@ -214,68 +214,6 @@ $END$ */ -/* $DOC$ - $NAME$ - DaysToMonth() - $CATEGORY$ - CT3 date and time functions - $ONELINER$ - Total number of days from first of Jan to beginning of nMonth. - $SYNTAX$ - DaysToMonth( , ) -> nDaysToMonth - $ARGUMENTS$ - - $RETURNS$ - - $DESCRIPTION$ - lLeap is FALSE for a non-leap year but TRUE if it is. If so and nMonth - is greater than 2, ndays is incremented - TODO: add further documentation - $EXAMPLES$ - - $STATUS$ - Started - $COMPLIANCE$ - DaysToMonth() is a new function in Harbour's CT3 library. - $PLATFORMS$ - All - $FILES$ - Library is hbct. - $SEEALSO$ - DaysInMonth() - $END$ - */ - -/* $DOC$ - $NAME$ - DaysInMonth() - $CATEGORY$ - CT3 date and time functions - $ONELINER$ - Returns the number of days in month - $SYNTAX$ - DAYSINMONTH (, ) -> nDaysInMonth - $ARGUMENTS$ - - $RETURNS$ - - $DESCRIPTION$ - TODO: add documentation - $EXAMPLES$ - - $STATUS$ - Started - $COMPLIANCE$ - DaysInMonth() is a new function in Harbour's CT3 library. - $PLATFORMS$ - All - $FILES$ - Library is hbct. - $SEEALSO$ - DaysToMonth() - $END$ - */ - /* $DOC$ $NAME$ Quarter() diff --git a/contrib/hbct/doc/en/dattime3.txt b/contrib/hbct/doc/en/dattime3.txt index f5b9bd4de9..7ee84ca1cf 100644 --- a/contrib/hbct/doc/en/dattime3.txt +++ b/contrib/hbct/doc/en/dattime3.txt @@ -2,7 +2,7 @@ $NAME$ WaitPeriod() $CATEGORY$ - HBCT date and time functions + hbct date and time functions $ONELINER$ Pauses a specified time in increments of 1/100 seconds $SYNTAX$ @@ -52,7 +52,7 @@ $NAME$ TimeValid() $CATEGORY$ - HBCT Date and Time Functions + hbct Date and Time Functions $ONELINER$ Determines whether a specIFied time is valid $SYNTAX$ @@ -112,7 +112,7 @@ $NAME$ SetTime() $CATEGORY$ - HBCT Date and Time Functions + hbct Date and Time Functions $ONELINER$ Sets the system clock $SYNTAX$ @@ -162,7 +162,7 @@ $NAME$ SetDate() $CATEGORY$ - HBCT Date and Time Functions + hbct Date and Time Functions $ONELINER$ Sets the system date $SYNTAX$ diff --git a/contrib/hbct/doc/en/tab.txt b/contrib/hbct/doc/en/tab.txt index 9d5b0d350f..9c082a26e1 100644 --- a/contrib/hbct/doc/en/tab.txt +++ b/contrib/hbct/doc/en/tab.txt @@ -6,9 +6,9 @@ $ONELINER$ Replace tabulator control characters with fill characters $SYNTAX$ - TABEXPAND (, [], [], + TabExpand( , [], [], [], [], - []) -> cExpandedString + [] ) -> cExpandedString $ARGUMENTS$ diff --git a/contrib/hbct/doc/en/video.txt b/contrib/hbct/doc/en/video.txt index 427c8753c2..a5e5f531ca 100644 --- a/contrib/hbct/doc/en/video.txt +++ b/contrib/hbct/doc/en/video.txt @@ -2,7 +2,7 @@ $NAME$ CharPix() $CATEGORY$ - HBCT video functions + hbct video functions $ONELINER$ Gets the number of scan lines per character. $SYNTAX$ @@ -32,7 +32,7 @@ $NAME$ VGAPalette() $CATEGORY$ - HBCT video functions + hbct video functions $ONELINER$ Changes VGA palette colors $SYNTAX$ @@ -62,7 +62,7 @@ $FILES$ Library is hbct. $SEEALSO$ - EGAPALETTE() FONTRESET() + EGAPalette(), FontReset() $END$ */ @@ -70,7 +70,7 @@ $NAME$ VideoType() $CATEGORY$ - HBCT video functions + hbct video functions $ONELINER$ Detects supported video adapter modes $SYNTAX$ @@ -92,7 +92,7 @@ $FILES$ Library is hbct. $SEEALSO$ - ISCGA(), ISEGA(), ISHERCULES(), ISMCGA(), ISMONO(), ISPGA(), ISVGA() + IsCGA(), IsEGA(), IsHercules(), IsMCGA(), IsMono(), IsPGA(), IsVGA() $END$ */ @@ -100,7 +100,7 @@ $NAME$ SetFont() $CATEGORY$ - HBCT video functions + hbct video functions $ONELINER$ Loads font from a string. $SYNTAX$ diff --git a/contrib/hbgd/doc/en/hbgd.txt b/contrib/hbgd/doc/en/hbgd.txt index 64955e0dd1..5824051a0e 100644 --- a/contrib/hbgd/doc/en/hbgd.txt +++ b/contrib/hbgd/doc/en/hbgd.txt @@ -121,13 +121,13 @@ /* $DOC$ $NAME$ - gdImageFromJpeg() + gdImageCreateFromJpeg() $CATEGORY$ HBGD $ONELINER$ Load a JPEG image file. $SYNTAX$ - gdImageFromJpeg( | | [, ] ) --> + gdImageCreateFromJpeg( | | [, ] ) --> $ARGUMENTS$ - Image file name - File handle @@ -136,19 +136,19 @@ $RETURNS$ - Image pointer $DESCRIPTION$ - gdImageFromJpeg() creates a JPEG image from a file or a handle or another image in memory. + gdImageCreateFromJpeg() creates a JPEG image from a file or a handle or another image in memory. You can use one of 3 syntax: - pImage := gdImageFromJpeg( "myimage.jpg" ) + pImage := gdImageCreateFromJpeg( "myimage.jpg" ) or - pImage := gdImageFromJpeg( nFileHandle, nSize ) + pImage := gdImageCreateFromJpeg( nFileHandle, nSize ) or - pImage := gdImageFromJpeg( pMemoryImagePtr, nSize ) + pImage := gdImageCreateFromJpeg( pMemoryImagePtr, nSize ) the pImage pointer returned will be not NIL if successfull and will contains a memory pointer to the jpeg image. @@ -157,7 +157,7 @@ $EXAMPLES$ PROCEDURE Main() - LOCAL pImage := gdImageFromJpeg( "myimage.jpg" ) + LOCAL pImage := gdImageCreateFromJpeg( "myimage.jpg" ) // Use image here @@ -169,19 +169,19 @@ $PLATFORMS$ All $SEEALSO$ - gdImageCreate(), gdImageCreateTrueColor(), gdImageFromGif(), gdImageFromPng(), gdImageFromGD(), gdImageFromWBmp() + gdImageCreate(), gdImageCreateTrueColor(), gdImageCreateFromGif(), gdImageCreateFromPng(), gdImageCreateFromGD(), gdImageCreateFromWBmp() $END$ */ /* $DOC$ $NAME$ - gdImageFromGif() + gdImageCreateFromGif() $CATEGORY$ HBGD $ONELINER$ Load a Gif image file. $SYNTAX$ - gdImageFromGif( | | [, ] ) --> + gdImageCreateFromGif( | | [, ] ) --> $ARGUMENTS$ - Image file name - File handle @@ -190,19 +190,19 @@ $RETURNS$ - Image pointer $DESCRIPTION$ - gdImageFromGif() creates a GIF image from a file or a handle or another image in memory. + gdImageCreateFromGif() creates a GIF image from a file or a handle or another image in memory. You can use one of 3 syntax: - pImage := gdImageFromGif( "myimage.gif" ) + pImage := gdImageCreateFromGif( "myimage.gif" ) or - pImage := gdImageFromGif( nFileHandle, nSize ) + pImage := gdImageCreateFromGif( nFileHandle, nSize ) or - pImage := gdImageFromGif( pMemoryImagePtr, nSize ) + pImage := gdImageCreateFromGif( pMemoryImagePtr, nSize ) the pImage pointer returned will be not NIL if successfull and will contains a memory pointer to the gif image. @@ -211,7 +211,7 @@ $EXAMPLES$ PROCEDURE Main() - LOCAL pImage := gdImageFromGif( "myimage.gif" ) + LOCAL pImage := gdImageCreateFromGif( "myimage.gif" ) // Use image here @@ -223,19 +223,19 @@ $PLATFORMS$ All $SEEALSO$ - gdImageCreate(), gdImageCreateTrueColor(), gdImageFromJpeg(), gdImageFromPng(), gdImageFromGD(), gdImageFromWBmp() + gdImageCreate(), gdImageCreateTrueColor(), gdImageCreateFromJpeg(), gdImageCreateFromPng(), gdImageCreateFromGD(), gdImageCreateFromWBmp() $END$ */ /* $DOC$ $NAME$ - gdImageFromPng() + gdImageCreateFromPng() $CATEGORY$ HBGD $ONELINER$ Load a PNG image file. $SYNTAX$ - gdImageFromPng( | | [, ] ) --> + gdImageCreateFromPng( | | [, ] ) --> $ARGUMENTS$ - Image file name - File handle @@ -244,19 +244,19 @@ $RETURNS$ - Image pointer $DESCRIPTION$ - gdImageFromPng() creates a PNG image from a file or a handle or another image in memory. + gdImageCreateFromPng() creates a PNG image from a file or a handle or another image in memory. You can use one of 3 syntax: - pImage := gdImageFromPng( "myimage.png" ) + pImage := gdImageCreateFromPng( "myimage.png" ) or - pImage := gdImageFromPng( nFileHandle, nSize ) + pImage := gdImageCreateFromPng( nFileHandle, nSize ) or - pImage := gdImageFromPng( pMemoryImagePtr, nSize ) + pImage := gdImageCreateFromPng( pMemoryImagePtr, nSize ) the pImage pointer returned will be not NIL if successfull and will contains a memory pointer to the png image. @@ -265,7 +265,7 @@ $EXAMPLES$ PROCEDURE Main() - LOCAL pImage := gdImageFromPng( "myimage.png" ) + LOCAL pImage := gdImageCreateFromPng( "myimage.png" ) // Use image here @@ -277,19 +277,19 @@ $PLATFORMS$ All $SEEALSO$ - gdImageCreate(), gdImageCreateTrueColor(), gdImageFromJpeg(), gdImageFromGif(), gdImageFromGD(), gdImageFromWBmp() + gdImageCreate(), gdImageCreateTrueColor(), gdImageCreateFromJpeg(), gdImageCreateFromGif(), gdImageCreateFromGD(), gdImageCreateFromWBmp() $END$ */ /* $DOC$ $NAME$ - gdImageFromGD() + gdImageCreateFromGD() $CATEGORY$ HBGD $ONELINER$ Load a GD image file. $SYNTAX$ - gdImageFromGD( | | [, ] ) --> + gdImageCreateFromGD( | | [, ] ) --> $ARGUMENTS$ - Image file name - File handle @@ -298,19 +298,19 @@ $RETURNS$ - Image pointer $DESCRIPTION$ - gdImageFromGD() creates a GD image from a file or a handle or another image in memory. + gdImageCreateFromGD() creates a GD image from a file or a handle or another image in memory. You can use one of 3 syntax: - pImage := gdImageFromGD( "myimage.gd" ) + pImage := gdImageCreateFromGD( "myimage.gd" ) or - pImage := gdImageFromGD( nFileHandle, nSize ) + pImage := gdImageCreateFromGD( nFileHandle, nSize ) or - pImage := gdImageFromGD( pMemoryImagePtr, nSize ) + pImage := gdImageCreateFromGD( pMemoryImagePtr, nSize ) the pImage pointer returned will be not NIL if successfull and will contains a memory pointer to the GD image. @@ -319,7 +319,7 @@ $EXAMPLES$ PROCEDURE Main() - LOCAL pImage := gdImageFromGD( "myimage.gd" ) + LOCAL pImage := gdImageCreateFromGD( "myimage.gd" ) // Use image here @@ -331,19 +331,19 @@ $PLATFORMS$ All $SEEALSO$ - gdImageCreate(), gdImageCreateTrueColor(), gdImageFromJpeg(), gdImageFromGif(), gdImageFromPng(), gdImageFromWBmp() + gdImageCreate(), gdImageCreateTrueColor(), gdImageCreateFromJpeg(), gdImageCreateFromGif(), gdImageCreateFromPng(), gdImageCreateFromWBmp() $END$ */ /* $DOC$ $NAME$ - gdImageFromWBmp() + gdImageCreateFromWBmp() $CATEGORY$ HBGD $ONELINER$ Load a WBmp image file. $SYNTAX$ - gdImageFromWBmp( | | [, ] ) --> + gdImageCreateFromWBmp( | | [, ] ) --> $ARGUMENTS$ - Image file name - File handle @@ -352,19 +352,19 @@ $RETURNS$ - Image pointer $DESCRIPTION$ - gdImageFromWBmp() creates a WBmp image from a file or a handle or another image in memory. + gdImageCreateFromWBmp() creates a WBmp image from a file or a handle or another image in memory. You can use one of 3 syntax: - pImage := gdImageFromWBmp( "myimage.wbmp" ) + pImage := gdImageCreateFromWBmp( "myimage.wbmp" ) or - pImage := gdImageFromWBmp( nFileHandle, nSize ) + pImage := gdImageCreateFromWBmp( nFileHandle, nSize ) or - pImage := gdImageFromWBmp( pMemoryImagePtr, nSize ) + pImage := gdImageCreateFromWBmp( pMemoryImagePtr, nSize ) the pImage pointer returned will be not NIL if successfull and will contains a memory pointer to the WBmp image. @@ -373,7 +373,7 @@ $EXAMPLES$ PROCEDURE Main() - LOCAL pImage := gdImageFromWBmp( "myimage.wbmp" ) + LOCAL pImage := gdImageCreateFromWBmp( "myimage.wbmp" ) // Use image here @@ -385,7 +385,7 @@ $PLATFORMS$ All $SEEALSO$ - gdImageCreate(), gdImageCreateTrueColor(), gdImageFromJpeg(), gdImageFromGif(), gdImageFromPng(), gdImageFromGD() + gdImageCreate(), gdImageCreateTrueColor(), gdImageCreateFromJpeg(), gdImageCreateFromGif(), gdImageCreateFromPng(), gdImageCreateFromGD() $END$ */ @@ -419,7 +419,7 @@ $EXAMPLES$ PROCEDURE Main() - LOCAL pImage := gdImageFromGif( "myimage.gif" ) + LOCAL pImage := gdImageCreateFromGif( "myimage.gif" ) // Image conversion gdImageJpeg( pImage, "myimage.jpg" ) @@ -432,7 +432,7 @@ $PLATFORMS$ All $SEEALSO$ - gdImageFromGif() + gdImageCreateFromGif() $END$ */ @@ -464,7 +464,7 @@ $EXAMPLES$ PROCEDURE Main() - LOCAL pImage := gdImageFromJpeg( "myimage.jpg" ) + LOCAL pImage := gdImageCreateFromJpeg( "myimage.jpg" ) // Image conversion gdImageGif( pImage, "myimage.gif" ) @@ -477,7 +477,7 @@ $PLATFORMS$ All $SEEALSO$ - gdImageFromJpeg() + gdImageCreateFromJpeg() $END$ */ @@ -511,7 +511,7 @@ $EXAMPLES$ PROCEDURE Main() - LOCAL pImage := gdImageFromGif( "myimage.gif" ) + LOCAL pImage := gdImageCreateFromGif( "myimage.gif" ) // Image conversion gdImagePng( pImage, "myimage.png" ) @@ -524,7 +524,7 @@ $PLATFORMS$ All $SEEALSO$ - gdImageFromGif() + gdImageCreateFromGif() $END$ */ @@ -556,7 +556,7 @@ $EXAMPLES$ PROCEDURE Main() - LOCAL pImage := gdImageFromGif( "myimage.gif" ) + LOCAL pImage := gdImageCreateFromGif( "myimage.gif" ) // Image conversion gdImageGD( pImage, "myimage.gd" ) @@ -569,7 +569,7 @@ $PLATFORMS$ All $SEEALSO$ - gdImageFromGif() + gdImageCreateFromGif() $END$ */ @@ -1439,19 +1439,19 @@ $PLATFORMS$ All $SEEALSO$ - gdImageCreate(), gdImageColorAllocate(), gdImageJpeg(), gdImageLine(), gdAntiAliased, gdSetAntiAliasedDontBlend() + gdImageCreate(), gdImageColorAllocate(), gdImageJpeg(), gdImageLine(), gdAntiAliased, gdImageSetAntiAliasedDontBlend() $END$ */ /* $DOC$ $NAME$ - gdSetAntiAliasedDontBlend() + gdImageSetAntiAliasedDontBlend() $CATEGORY$ HBGD $ONELINER$ indicate the special color that the foreground should stand out more clearly against. $SYNTAX$ - gdSetAntiAliasedDontBlend( , ) --> NIL + gdImageSetAntiAliasedDontBlend( , ) --> NIL $ARGUMENTS$ - Image pointer - Color index of filling color @@ -1501,7 +1501,7 @@ $PLATFORMS$ All $SEEALSO$ - gdImageCreate(), gdImageColorAllocate(), gdImageJpeg(), gdImageLine(), gdAntiAliased, gdSetAntiAlias() + gdImageCreate(), gdImageColorAllocate(), gdImageJpeg(), gdImageLine(), gdAntiAliased, gdImageSetAntiAlias() $END$ */ diff --git a/contrib/hbgt/doc/en/hbgt.txt b/contrib/hbgt/doc/en/hbgt.txt index 0bf20c8282..680259d790 100644 --- a/contrib/hbgt/doc/en/hbgt.txt +++ b/contrib/hbgt/doc/en/hbgt.txt @@ -4,16 +4,16 @@ $CATEGORY$ String Tools $ONELINER$ - Return the ascii value of a specified character in a string + Return the ASCII value of a specified character in a string $SYNTAX$ gt_AscPos( , ) --> nAscVal $ARGUMENTS$ - The string - The position in $RETURNS$ - - The ascii value of hb_BSubStr( , , 1 ) + - The ASCII value of hb_BSubStr( , , 1 ) $DESCRIPTION$ - Return the ascii value of a specified character in a string + Return the ASCII value of a specified character in a string Equivalent (but much faster) to hb_BCode( hb_BSubStr( cStr, nPos, 1 ) ) @@ -43,15 +43,15 @@ $CATEGORY$ String Tools $ONELINER$ - Sum the ascii values in a string. + Sum the ASCII values in a string. $SYNTAX$ gt_AsciiSum( ) --> nSum $ARGUMENTS$ - The string to sum $RETURNS$ - - The sum of all ascii values in . + - The sum of all ASCII values in . $DESCRIPTION$ - Sum the ascii value of every character in the passed string + Sum the ASCII value of every character in the passed string and return the result. $EXAMPLES$ @@ -251,7 +251,7 @@ - The ASCII value of the first character in which appears first in $DESCRIPTION$ - Return the ascii value of a character in + Return the ASCII value of a character in which appears first in . $EXAMPLES$ ? hb_BChar( gt_ChrFirst( "sa ", "This is a test" ) ) // prints "s" @@ -575,7 +575,7 @@ $EXAMPLES$ cFlags := gt_NewFlag( 20 ) // Create a bit flag string for 20 logical values. $SEEALSO$ - gt_SetFlag() gt_ClrFlag() gt_IsFlag() + gt_SetFlag(), gt_ClrFlag(), gt_IsFlag() $END$ */ @@ -616,7 +616,7 @@ cFlags := gt_SetFlag( cFlags ) $SEEALSO$ - gt_NewFlag() gt_ClrFlag() gt_IsFlag() + gt_NewFlag(), gt_ClrFlag(), gt_IsFlag() $END$ */ @@ -661,7 +661,7 @@ cFlags := gt_ClrFlag( cFlags ) $SEEALSO$ - gt_NewFlag() gt_SetFlag() gt_IsFlag() + gt_NewFlag(), gt_SetFlag(), gt_IsFlag() $END$ */ @@ -690,6 +690,6 @@ ? "Flag number", nFlag, "==", gt_IsFlag( cDave, nFlag ) NEXT $SEEALSO$ - gt_NewFlag() gt_SetFlag() gt_ClrFlag() + gt_NewFlag(), gt_SetFlag(), gt_ClrFlag() $END$ */ diff --git a/contrib/hbmisc/doc/en/dates2.txt b/contrib/hbmisc/doc/en/dates2.txt index a8357cbdea..1dfcffd257 100644 --- a/contrib/hbmisc/doc/en/dates2.txt +++ b/contrib/hbmisc/doc/en/dates2.txt @@ -98,13 +98,13 @@ /* $DOC$ $NAME$ - DaysInMonth() + hbmisc_DaysInMonth() $CATEGORY$ Date $ONELINER$ Gets the days in a month. $SYNTAX$ - DaysInMonth( ) --> nDays + hbmisc_DaysInMonth( ) --> nDays $ARGUMENTS$ A valid date. $RETURNS$ @@ -112,8 +112,8 @@ $DESCRIPTION$ This function returns the number of days of the given date month. $EXAMPLES$ - ? DaysInMonth( hb_SToD( "20000101" ) ) // -> 31 - ? DaysInMonth( hb_SToD( "20000201" ) ) // -> 29 + ? hbmisc_DaysInMonth( hb_SToD( "20000101" ) ) // -> 31 + ? hbmisc_DaysInMonth( hb_SToD( "20000201" ) ) // -> 29 $STATUS$ R $COMPLIANCE$ diff --git a/contrib/hbnf/doc/en/acctadj.txt b/contrib/hbnf/doc/en/acctadj.txt index de12acbf5d..ba40171721 100644 --- a/contrib/hbnf/doc/en/acctadj.txt +++ b/contrib/hbnf/doc/en/acctadj.txt @@ -51,6 +51,6 @@ dDate := hb_SToD( "19910331" ) // Not in last 4 days of work week ? ft_AcctAdj( dDate, .T. ) // 1991-03-30 (prior week's end) $SEEALSO$ - ft_DateCnfg() ft_DayToBoW() + ft_DateCnfg(), ft_DayToBoW() $END$ */ diff --git a/contrib/hbnf/doc/en/acctmnth.txt b/contrib/hbnf/doc/en/acctmnth.txt index e7fad0c6c1..9911d6a83f 100644 --- a/contrib/hbnf/doc/en/acctmnth.txt +++ b/contrib/hbnf/doc/en/acctmnth.txt @@ -48,6 +48,6 @@ ? aDateInfo[ 2 ] // 1990-04-29 beginning of month 5 ? aDateInfo[ 3 ] // 1990-06-02 end of month 5 $SEEALSO$ - ft_DateCnfg() ft_AcctWeek() ft_AcctQtr() ft_AcctYear() + ft_DateCnfg(), ft_AcctWeek(), ft_AcctQtr(), ft_AcctYear() $END$ */ diff --git a/contrib/hbnf/doc/en/acctqtr.txt b/contrib/hbnf/doc/en/acctqtr.txt index a2d8ced74b..a1b390cab1 100644 --- a/contrib/hbnf/doc/en/acctqtr.txt +++ b/contrib/hbnf/doc/en/acctqtr.txt @@ -48,6 +48,6 @@ ? aDateInfo[ 2 ] // 1989-04-01 beginning of quarter 2 ? aDateInfo[ 3 ] // 1990-06-30 end of quarter 2 $SEEALSO$ - ft_DateCnfg() ft_AcctWeek() ft_AcctMonth() ft_AcctYear() + ft_DateCnfg(), ft_AcctWeek(), ft_AcctMonth(), ft_AcctYear() $END$ */ diff --git a/contrib/hbnf/doc/en/acctweek.txt b/contrib/hbnf/doc/en/acctweek.txt index fc45e7c9de..31d59bdfb2 100644 --- a/contrib/hbnf/doc/en/acctweek.txt +++ b/contrib/hbnf/doc/en/acctweek.txt @@ -48,6 +48,6 @@ ? aDateInfo[ 2 ] // 1989-06-17 beginning of week 25 ? aDateInfo[ 3 ] // 1990-06-23 end of week 25 $SEEALSO$ - ft_DateCnfg() ft_AcctMonth() ft_AcctQtr() ft_AcctYear() + ft_DateCnfg(), ft_AcctMonth(), ft_AcctQtr(), ft_AcctYear() $END$ */ diff --git a/contrib/hbnf/doc/en/acctyear.txt b/contrib/hbnf/doc/en/acctyear.txt index 8cbed45960..68f96aa5f0 100644 --- a/contrib/hbnf/doc/en/acctyear.txt +++ b/contrib/hbnf/doc/en/acctyear.txt @@ -39,6 +39,6 @@ ? aDateInfo[ 2 ] // 1989-12-31 beginning of year ? aDateInfo[ 3 ] // 1990-12-29 end of year $SEEALSO$ - ft_DateCnfg() ft_AcctWeek() ft_AcctMonth() ft_AcctQtr() + ft_DateCnfg(), ft_AcctWeek(), ft_AcctMonth(), ft_AcctQtr() $END$ */ diff --git a/contrib/hbnf/doc/en/alt.txt b/contrib/hbnf/doc/en/alt.txt index 356fb1a455..d36be10033 100644 --- a/contrib/hbnf/doc/en/alt.txt +++ b/contrib/hbnf/doc/en/alt.txt @@ -21,6 +21,6 @@ @ 0, 0 SAY " " ENDIF $SEEALSO$ - ft_CapLock() ft_Ctrl() ft_NumLock() ft_PrtScr() ft_Shift() + ft_CapLock(), ft_Ctrl(), ft_NumLock(), ft_PrtScr(), ft_Shift() $END$ */ diff --git a/contrib/hbnf/doc/en/bitclr.txt b/contrib/hbnf/doc/en/bitclr.txt index ce9219de4c..c458a88185 100644 --- a/contrib/hbnf/doc/en/bitclr.txt +++ b/contrib/hbnf/doc/en/bitclr.txt @@ -35,6 +35,6 @@ ? ft_BitClr( "A", 5 ) // result: "A", since bit 5 already clear $SEEALSO$ - ft_BitSet() ft_IsBit() + ft_BitSet(), ft_IsBit() $END$ */ diff --git a/contrib/hbnf/doc/en/bitset.txt b/contrib/hbnf/doc/en/bitset.txt index 568fcfff5f..c9d3ab99bb 100644 --- a/contrib/hbnf/doc/en/bitset.txt +++ b/contrib/hbnf/doc/en/bitset.txt @@ -37,6 +37,6 @@ ? ft_BitSet( "A", 5 ) // result: "a" // bit 5 set $SEEALSO$ - ft_BitClr() ft_IsBit() + ft_BitClr(), ft_IsBit() $END$ */ diff --git a/contrib/hbnf/doc/en/byteand.txt b/contrib/hbnf/doc/en/byteand.txt index e93c85d62a..72026c44ef 100644 --- a/contrib/hbnf/doc/en/byteand.txt +++ b/contrib/hbnf/doc/en/byteand.txt @@ -30,6 +30,6 @@ ? hb_BCode( cNewByte ) // result: 11 ? cNewByte // result: non-printable character $SEEALSO$ - ft_ByteOr() ft_ByteXor() ft_ByteNot() ft_ByteNeg() + ft_ByteOr(), ft_ByteXor(), ft_ByteNot(), ft_ByteNeg() $END$ */ diff --git a/contrib/hbnf/doc/en/byteneg.txt b/contrib/hbnf/doc/en/byteneg.txt index 729f62667a..6478bab1d0 100644 --- a/contrib/hbnf/doc/en/byteneg.txt +++ b/contrib/hbnf/doc/en/byteneg.txt @@ -28,6 +28,6 @@ cNewByte := ft_ByteNot( hb_BChar( 32 ) ) ? hb_BCode( cNewByte ) // result: 224 $SEEALSO$ - ft_ByteOr() ft_ByteXor() ft_ByteNot() ft_ByteAnd() + ft_ByteOr(), ft_ByteXor(), ft_ByteNot(), ft_ByteAnd() $END$ */ diff --git a/contrib/hbnf/doc/en/bytenot.txt b/contrib/hbnf/doc/en/bytenot.txt index e817ca3bd8..171573bfb5 100644 --- a/contrib/hbnf/doc/en/bytenot.txt +++ b/contrib/hbnf/doc/en/bytenot.txt @@ -28,6 +28,6 @@ cNewByte := ft_ByteNot( hb_BChar( 32 ) ) ? hb_BCode( cNewByte ) // result: 223 $SEEALSO$ - ft_ByteOr() ft_ByteXor() ft_ByteNeg() ft_ByteAnd() + ft_ByteOr(), ft_ByteXor(), ft_ByteNeg(), ft_ByteAnd() $END$ */ diff --git a/contrib/hbnf/doc/en/byteor.txt b/contrib/hbnf/doc/en/byteor.txt index 9baab5bc31..9187eb2c4f 100644 --- a/contrib/hbnf/doc/en/byteor.txt +++ b/contrib/hbnf/doc/en/byteor.txt @@ -29,6 +29,6 @@ ? hb_BCode( cNewByte ) // result: 30 ? cNewByte // result: non-printable character $SEEALSO$ - ft_ByteXor() ft_ByteNot() ft_ByteNeg() ft_ByteAnd() + ft_ByteXor(), ft_ByteNot(), ft_ByteNeg(), ft_ByteAnd() $END$ */ diff --git a/contrib/hbnf/doc/en/bytexor.txt b/contrib/hbnf/doc/en/bytexor.txt index 863840c746..b065cdecf2 100644 --- a/contrib/hbnf/doc/en/bytexor.txt +++ b/contrib/hbnf/doc/en/bytexor.txt @@ -29,6 +29,6 @@ ? hb_BCode( cNewByte ) // result: 23 ? cNewByte // result: non-printable character $SEEALSO$ - ft_ByteOr() ft_ByteNot() ft_ByteNeg() ft_ByteAnd() + ft_ByteOr(), ft_ByteNot(), ft_ByteNeg(), ft_ByteAnd() $END$ */ diff --git a/contrib/hbnf/doc/en/caplock.txt b/contrib/hbnf/doc/en/caplock.txt index 27e571abcd..2462e92793 100644 --- a/contrib/hbnf/doc/en/caplock.txt +++ b/contrib/hbnf/doc/en/caplock.txt @@ -23,6 +23,6 @@ ? "CapLock is active" ENDIF $SEEALSO$ - ft_Alt() ft_Ctrl() ft_NumLock() ft_PrtScr() ft_Shift() + ft_Alt(), ft_Ctrl(), ft_NumLock(), ft_PrtScr(), ft_Shift() $END$ */ diff --git a/contrib/hbnf/doc/en/ctrl.txt b/contrib/hbnf/doc/en/ctrl.txt index 93cbc09bbf..a8ecb603c0 100644 --- a/contrib/hbnf/doc/en/ctrl.txt +++ b/contrib/hbnf/doc/en/ctrl.txt @@ -21,6 +21,6 @@ @ 0, 0 SAY " " ENDIF $SEEALSO$ - ft_CapLock() ft_NumLock() ft_PrtScr() ft_Shift() ft_Alt() + ft_CapLock(), ft_NumLock(), ft_PrtScr(), ft_Shift(), ft_Alt() $END$ */ diff --git a/contrib/hbnf/doc/en/daytobow.txt b/contrib/hbnf/doc/en/daytobow.txt index 51bce34271..52850b0d92 100644 --- a/contrib/hbnf/doc/en/daytobow.txt +++ b/contrib/hbnf/doc/en/daytobow.txt @@ -31,6 +31,6 @@ ? CDoW( dDate ) // Saturday ? ft_DayToBoW( dDate ) // 1 $SEEALSO$ - ft_DateCnfg() ft_AcctWeek() ft_Week() + ft_DateCnfg(), ft_AcctWeek(), ft_Week() $END$ */ diff --git a/contrib/hbnf/doc/en/dfile.txt b/contrib/hbnf/doc/en/dfile.txt index 4ebc296939..9b0a7bb942 100644 --- a/contrib/hbnf/doc/en/dfile.txt +++ b/contrib/hbnf/doc/en/dfile.txt @@ -49,7 +49,7 @@ @ 20, 0 SAY "Key that terminated ft_DispFile() was: " + "[" + cKey + "]" $SEEALSO$ - ft_DispFile() ft_DFClose() + ft_DispFile(), ft_DFClose() $END$ */ @@ -82,6 +82,6 @@ @ 20, 0 SAY "Key that terminated ft_DispFile() was: " + "[" + cKey + "]" $SEEALSO$ - ft_DFSetup() ft_DispFile() + ft_DFSetup(), ft_DispFile() $END$ */ diff --git a/contrib/hbnf/doc/en/dispc.txt b/contrib/hbnf/doc/en/dispc.txt index fc25960e70..3748e3927e 100644 --- a/contrib/hbnf/doc/en/dispc.txt +++ b/contrib/hbnf/doc/en/dispc.txt @@ -57,6 +57,6 @@ @ 20, 0 SAY "Key that terminated ft_DispFile() was: " + "[" + cKey + "]" $SEEALSO$ - ft_DFSetup() ft_DFClose() + ft_DFSetup(), ft_DFClose() $END$ */ diff --git a/contrib/hbnf/doc/en/elapmil.txt b/contrib/hbnf/doc/en/elapmil.txt index 067fcb5e3e..a8c526fbcd 100644 --- a/contrib/hbnf/doc/en/elapmil.txt +++ b/contrib/hbnf/doc/en/elapmil.txt @@ -20,6 +20,6 @@ ? ft_ElapMin( "1718", "2040" ) // 202 ? ft_ElapMin( "2040", "1718" ) // -202 $SEEALSO$ - ft_ElTime() ft_Mil2Min() ft_Min2Mil() + ft_ElTime(), ft_Mil2Min(), ft_Min2Mil() $END$ */ diff --git a/contrib/hbnf/doc/en/eltime.txt b/contrib/hbnf/doc/en/eltime.txt index 6f65aa9ffa..c72aa9193b 100644 --- a/contrib/hbnf/doc/en/eltime.txt +++ b/contrib/hbnf/doc/en/eltime.txt @@ -17,9 +17,9 @@ Return the absolute difference between two times in hh:mm:ss format in character hours, minutes and seconds (hh:mm:ss). $EXAMPLES$ - ? ft_ElTime( "22:40:12", "23:55:17" ) // 01:15:05 - ? ft_ElTime( "23:55:17", "22:40:12" ) // 01:15:05 + ? ft_ElTime( "22:40:12", "23:55:17" ) // 01:15:05 + ? ft_ElTime( "23:55:17", "22:40:12" ) // 01:15:05 $SEEALSO$ - ft_ElapMin() ft_Mil2Min() ft_Min2Mil() + ft_ElapMin(), ft_Mil2Min(), ft_Min2Mil() $END$ */ diff --git a/contrib/hbnf/doc/en/fttext.txt b/contrib/hbnf/doc/en/fttext.txt index 9a2f93bf08..08bec8f118 100644 --- a/contrib/hbnf/doc/en/fttext.txt +++ b/contrib/hbnf/doc/en/fttext.txt @@ -46,7 +46,7 @@ // close file ft_FUse() $SEEALSO$ - ft_FUse() ft_FSelect() + ft_FUse(), ft_FSelect() $END$ */ @@ -129,7 +129,7 @@ ? ft_FRecNo() // 1 $SEEALSO$ - ft_FSelect() ft_FUse() ft_FRecNo() ft_FGoBot() + ft_FSelect(), ft_FUse(), ft_FRecNo(), ft_FGoBot() $END$ */ @@ -195,7 +195,7 @@ ? ft_FRecNo() // 1 $SEEALSO$ - ft_FSelect() ft_FUse() ft_FGoTop() ft_FGoBot() + ft_FSelect(), ft_FUse(), ft_FGoTop(), ft_FGoBot() $END$ */ @@ -227,7 +227,7 @@ ? ft_FReadLn() $SEEALSO$ - ft_FSelect() ft_FUse() ft_FGoTop() ft_FRecNo() ft_FReadLn() + ft_FSelect(), ft_FUse(), ft_FGoTop(), ft_FRecNo(), ft_FReadLn() $END$ */ @@ -268,7 +268,7 @@ ft_FSkip() ENDDO $SEEALSO$ - ft_FRecNo() ft_FGoTop() + ft_FRecNo(), ft_FGoTop() $END$ */ @@ -309,7 +309,7 @@ ft_FSkip() ENDDO $SEEALSO$ - ft_FUse() ft_FWriteLn() ft_FRecNo() ft_FGoTop() + ft_FUse(), ft_FWriteLn(), ft_FRecNo(), ft_FGoTop() $END$ */ @@ -342,7 +342,7 @@ ft_FDelete( 4 ) $SEEALSO$ - ft_FAppend() ft_FRecNo() ft_FInsert() + ft_FAppend(), ft_FRecNo(), ft_FInsert() $END$ */ @@ -380,7 +380,7 @@ ft_FInsert( 5 ) $SEEALSO$ - ft_FAppend() ft_FRecNo() ft_FDelete() ft_FLastRe() + ft_FAppend(), ft_FRecNo(), ft_FDelete(), ft_FLastRe() $END$ */ @@ -428,7 +428,7 @@ ? ft_FRecNo() // displays 6 $SEEALSO$ - ft_FRecNo() ft_FDelete() ft_FInsert() ft_FLastRe() + ft_FRecNo(), ft_FDelete(), ft_FInsert(), ft_FLastRe() $END$ */ @@ -478,7 +478,7 @@ ft_FWriteLn( "FILES=30", ft_FEof() ) $SEEALSO$ - ft_FReadLn() ft_FRecNo() ft_FInsert() ft_FDelete() + ft_FReadLn(), ft_FRecNo(), ft_FInsert(), ft_FDelete() $END$ */ @@ -506,7 +506,7 @@ ? ft_FLastRe() $SEEALSO$ - ft_FUse() ft_FRecNo() + ft_FUse(), ft_FRecNo() $END$ */ @@ -537,7 +537,7 @@ ? ft_FEof() // .T. $SEEALSO$ - ft_FUse() ft_FSkip() + ft_FUse(), ft_FSkip() $END$ */ @@ -570,7 +570,7 @@ ? ft_FBof() // .T. $SEEALSO$ - ft_FSkip() ft_FEof() ft_FGoTop() + ft_FSkip(), ft_FEof(), ft_FGoTop() $END$ */ @@ -613,6 +613,6 @@ ? ft_FReadLn() $SEEALSO$ - ft_FRecNo() ft_FGoTop() ft_FReadLn() + ft_FRecNo(), ft_FGoTop(), ft_FReadLn() $END$ */ diff --git a/contrib/hbnf/doc/en/isbit.txt b/contrib/hbnf/doc/en/isbit.txt index 8c26ef8c70..d77f07ce05 100644 --- a/contrib/hbnf/doc/en/isbit.txt +++ b/contrib/hbnf/doc/en/isbit.txt @@ -36,6 +36,6 @@ ? ft_IsBit( "A", 5 ) // result: .F. $SEEALSO$ - ft_BitSet() ft_BitClr() + ft_BitSet(), ft_BitClr() $END$ */ diff --git a/contrib/hbnf/doc/en/madd.txt b/contrib/hbnf/doc/en/madd.txt index bd735fccc8..3efcb61b76 100644 --- a/contrib/hbnf/doc/en/madd.txt +++ b/contrib/hbnf/doc/en/madd.txt @@ -40,6 +40,6 @@ ? ft_MAdd( dDate, 3 ) // 1991-07-30 ? ft_MAdd( dDate, 3, .T. ) // 1991-07-31 <- forced EOM $SEEALSO$ - ft_DayOfYr() ft_DayToBoW() + ft_DayOfYr(), ft_DayToBoW() $END$ */ diff --git a/contrib/hbnf/doc/en/miltime.txt b/contrib/hbnf/doc/en/miltime.txt index e5df06fedd..3f45aae11e 100644 --- a/contrib/hbnf/doc/en/miltime.txt +++ b/contrib/hbnf/doc/en/miltime.txt @@ -14,9 +14,9 @@ $DESCRIPTION$ Converts time in military format to number of minute of the day. $EXAMPLES$ - ? ft_Mil2Min( "1729" ) // 1049 + ? ft_Mil2Min( "1729" ) // 1049 $SEEALSO$ - ft_Min2Mil() ft_Civ2Mil() ft_Mil2Civ() ft_Sys2Mil() + ft_Min2Mil(), ft_Civ2Mil(), ft_Mil2Civ(), ft_Sys2Mil() $END$ */ @@ -36,9 +36,9 @@ $DESCRIPTION$ Converts minute of the day to military format time. $EXAMPLES$ - ? ft_Min2Mil( 279 ) // 0439 + ? ft_Min2Mil( 279 ) // 0439 $SEEALSO$ - ft_Mil2Min() ft_Mil2Civ() ft_Civ2Mil() ft_Sys2Mil() + ft_Mil2Min(), ft_Mil2Civ(), ft_Civ2Mil(), ft_Sys2Mil() $END$ */ @@ -59,15 +59,15 @@ $DESCRIPTION$ Converts time from military to civilian format $EXAMPLES$ - ? ft_Mil2Civ( "1640" ) // 4:40 pm - ? ft_Mil2Civ( "0440" ) // 4:40 am - ? ft_Mil2Civ( "1200" ) // 12:00 n - ? ft_Mil2Civ( "0000" ) // 12:00 m - ? ft_Mil2Civ( "2400" ) // 12:00 m + ? ft_Mil2Civ( "1640" ) // 4:40 pm + ? ft_Mil2Civ( "0440" ) // 4:40 am + ? ft_Mil2Civ( "1200" ) // 12:00 n + ? ft_Mil2Civ( "0000" ) // 12:00 m + ? ft_Mil2Civ( "2400" ) // 12:00 m Caution: leading blanks are irrelevant. $SEEALSO$ - ft_Civ2Mil() ft_Sys2Mil() ft_Mil2Min() ft_Min2Mil() + ft_Civ2Mil(), ft_Sys2Mil(), ft_Mil2Min(), ft_Min2Mil() $END$ */ @@ -88,15 +88,15 @@ $DESCRIPTION$ Converts time from 12-hour civilian format to military. $EXAMPLES$ - ? ft_Civ2Mil( " 5:40 pm" ) // 1740 - ? ft_Civ2Mil( " 5:40 am" ) // 0540 - ? ft_Civ2Mil( "12:00 n" ) // 1200 - ? ft_Civ2Mil( "12:00 m" ) // 0000 + ? ft_Civ2Mil( " 5:40 pm" ) // 1740 + ? ft_Civ2Mil( " 5:40 am" ) // 0540 + ? ft_Civ2Mil( "12:00 n" ) // 1200 + ? ft_Civ2Mil( "12:00 m" ) // 0000 // Caution: leading blanks are irrelevant; p,a,n,m must be preceded by // one and only one space. $SEEALSO$ - ft_Mil2Civ() ft_Sys2Mil() ft_Mil2Min() ft_Min2Mil() + ft_Mil2Civ(), ft_Sys2Mil(), ft_Mil2Min(), ft_Min2Mil() $END$ */ @@ -116,8 +116,8 @@ $DESCRIPTION$ Return current system time as character string in military format. $EXAMPLES$ - ? ft_Sys2Mil() // 1623 + ? ft_Sys2Mil() // 1623 $SEEALSO$ - ft_Mil2Civ() ft_Civ2Mil() + ft_Mil2Civ(), ft_Civ2Mil() $END$ */ diff --git a/contrib/hbnf/doc/en/month.txt b/contrib/hbnf/doc/en/month.txt index 1b4a45d138..496e3af73b 100644 --- a/contrib/hbnf/doc/en/month.txt +++ b/contrib/hbnf/doc/en/month.txt @@ -52,6 +52,6 @@ ? aDateInfo[ 2 ] // 1991-05-01 beginning of month 5 ? aDateInfo[ 3 ] // 1991-05-31 end of month 5 $SEEALSO$ - ft_DateCnfg() ft_Week() ft_Qtr() ft_Year() + ft_DateCnfg(), ft_Week(), ft_Qtr(), ft_Year() $END$ */ diff --git a/contrib/hbnf/doc/en/mouse1.txt b/contrib/hbnf/doc/en/mouse1.txt index c321c445c9..7a031980e2 100644 --- a/contrib/hbnf/doc/en/mouse1.txt +++ b/contrib/hbnf/doc/en/mouse1.txt @@ -106,7 +106,7 @@ MnuItem1() ENDIF $SEEALSO$ - ft_MButPrs() ft_MButRel() + ft_MButPrs(), ft_MButRel() $END$ */ @@ -134,7 +134,7 @@ $EXAMPLES$ ft_MCOnOff( 10, 10, 11, 20 ) $SEEALSO$ - ft_MShowCrs() ft_MHideCrs() ft_MXLimit() ft_MYLimit() ft_MInRegion() + ft_MShowCrs(), ft_MHideCrs(), ft_MXLimit(), ft_MYLimit(), ft_MInRegion() $END$ */ @@ -159,7 +159,7 @@ nChoice := 1 ENDIF $SEEALSO$ - ft_MXLimit() ft_MYLimit() ft_MInRegion() + ft_MXLimit(), ft_MYLimit(), ft_MInRegion() $END$ */ @@ -376,7 +376,7 @@ ? "No mouse driver is installed" ENDIF $SEEALSO$ - ft_MInit() ft_MShowCrs() + ft_MInit(), ft_MShowCrs() $END$ */ @@ -436,7 +436,7 @@ ft_MShowCrs() ENDIF $SEEALSO$ - ft_MHideCrs() ft_MCOnOff() + ft_MHideCrs(), ft_MCOnOff() $END$ */ @@ -470,7 +470,7 @@ @ 10, 10 TO 20, 20 ft_MShowCrs() $SEEALSO$ - ft_MShowCrs() ft_MCOnOff() + ft_MShowCrs(), ft_MCOnOff() $END$ */ @@ -514,7 +514,7 @@ ? "Mouse Column :", nY ? "Button Status:", nButton $SEEALSO$ - ft_MGetCoord() ft_MSetPos() ft_MDefCrs() ft_MGetX() ft_MGetY() + ft_MGetCoord(), ft_MSetPos(), ft_MDefCrs(), ft_MGetX(), ft_MGetY() $END$ */ @@ -539,7 +539,7 @@ $EXAMPLES$ ? ft_MGetX() $SEEALSO$ - ft_MGetCoord() ft_MDefCrs() ft_MGetPos() ft_MGetY() + ft_MGetCoord(), ft_MDefCrs(), ft_MGetPos(), ft_MGetY() $END$ */ @@ -563,7 +563,7 @@ $EXAMPLES$ ? ft_MGetY() $SEEALSO$ - ft_MGetCoord() ft_MDefCrs() ft_MGetPos() ft_MGetX() + ft_MGetCoord(), ft_MDefCrs(), ft_MGetPos(), ft_MGetX() $END$ */ @@ -590,7 +590,7 @@ ft_MSetPos( 10, 20 ) // position mouse cursor at row 10, col 20 // in virtual screen coordinates $SEEALSO$ - ft_MGetPos() ft_MGetCoord() ft_MSetCoord() ft_MGetX() ft_MGetY() + ft_MGetPos(), ft_MGetCoord(), ft_MSetCoord(), ft_MGetX(), ft_MGetY() $END$ */ @@ -616,7 +616,7 @@ ft_MSetCoord( 10, 20 ) // position mouse cursor at row 10, col 20 // in text screen coordinates $SEEALSO$ - ft_MGetPos() ft_MGetCoord() ft_MSetPos() ft_MDefCrs() ft_MGetX() ft_MGetY() + ft_MGetPos(), ft_MGetCoord(), ft_MSetPos(), ft_MDefCrs(), ft_MGetX(), ft_MGetY() $END$ */ @@ -640,7 +640,7 @@ $EXAMPLES$ ft_MXLimit( 10, 20 ) $SEEALSO$ - ft_MYLimit() ft_MInRegion() + ft_MYLimit(), ft_MInRegion() $END$ */ @@ -664,7 +664,7 @@ $EXAMPLES$ ft_MYLimit( 10, 20 ) $SEEALSO$ - ft_MXLimit() ft_MInRegion() + ft_MXLimit(), ft_MInRegion() $END$ */ @@ -710,7 +710,7 @@ ? "No Item selected" ENDIF $SEEALSO$ - ft_MButRel() ft_MDblClk() + ft_MButRel(), ft_MDblClk() $END$ */ @@ -751,7 +751,7 @@ ? "Left button released" ENDIF $SEEALSO$ - ft_MButPrs() ft_MDblClk() + ft_MButPrs(), ft_MDblClk() $END$ */ @@ -849,6 +849,6 @@ ? "Mouse Column :", nY ? "Button Status:", nButton $SEEALSO$ - ft_MGetPos() ft_MSetPos() ft_MDefCrs() ft_MGetX() ft_MGetY() + ft_MGetPos(), ft_MSetPos(), ft_MDefCrs(), ft_MGetX(), ft_MGetY() $END$ */ diff --git a/contrib/hbnf/doc/en/numlock.txt b/contrib/hbnf/doc/en/numlock.txt index 4df97f0e6b..f23c838591 100644 --- a/contrib/hbnf/doc/en/numlock.txt +++ b/contrib/hbnf/doc/en/numlock.txt @@ -36,6 +36,6 @@ RETURN ft_NumLock( lOldNum ) $SEEALSO$ - ft_CapLock() ft_Ctrl() ft_PrtScr() ft_Shift() ft_Alt() + ft_CapLock(), ft_Ctrl(), ft_PrtScr(), ft_Shift(), ft_Alt() $END$ */ diff --git a/contrib/hbnf/doc/en/nwsem.txt b/contrib/hbnf/doc/en/nwsem.txt index 1123888f46..e3d6e718c3 100644 --- a/contrib/hbnf/doc/en/nwsem.txt +++ b/contrib/hbnf/doc/en/nwsem.txt @@ -86,7 +86,7 @@ RETURN ENDIF $SEEALSO$ - ft_NWSemEx() ft_NWSemWait() ft_NWSemSig() ft_NWSemClose() ft_NWSemLock() + ft_NWSemEx(), ft_NWSemWait(), ft_NWSemSig(), ft_NWSemClose(), ft_NWSemLock() $END$ */ @@ -139,7 +139,7 @@ "] stations, value is [" + ; hb_ntos( nValue ) + "]" $SEEALSO$ - ft_NWSemOpen() ft_NWSemWait() ft_NWSemSig() ft_NWSemClose() ft_NWSemLock() + ft_NWSemOpen(), ft_NWSemWait(), ft_NWSemSig(), ft_NWSemClose(), ft_NWSemLock() $END$ */ @@ -177,7 +177,7 @@ RETURN ENDIF $SEEALSO$ - ft_NWSemOpen() ft_NWSemEx() ft_NWSemSig() ft_NWSemClose() ft_NWSemLock() + ft_NWSemOpen(), ft_NWSemEx(), ft_NWSemSig(), ft_NWSemClose(), ft_NWSemLock() $END$ */ @@ -208,7 +208,7 @@ $EXAMPLES$ ? "Signal returns:", ft_NWSemSig( nHandle ) $SEEALSO$ - ft_NWSemOpen() ft_NWSemEx() ft_NWSemWait() ft_NWSemClose() ft_NWSemLock() + ft_NWSemOpen(), ft_NWSemEx(), ft_NWSemWait(), ft_NWSemClose(), ft_NWSemLock() $END$ */ @@ -236,7 +236,7 @@ $EXAMPLES$ ? "Close returns:", ft_NWSemClose( nHandle ) $SEEALSO$ - ft_NWSemOpen() ft_NWSemEx() ft_NWSemWait() ft_NWSemSig() ft_NWSemLock() + ft_NWSemOpen(), ft_NWSemEx(), ft_NWSemWait(), ft_NWSemSig(), ft_NWSemLock() $END$ */ @@ -299,7 +299,7 @@ // Processing, then: ft_NWSemUnlock( nHandle ) $SEEALSO$ - ft_NWSemOpen() ft_NWSemEx() ft_NWSemWait() ft_NWSemSig() ft_NWSemUnlock() + ft_NWSemOpen(), ft_NWSemEx(), ft_NWSemWait(), ft_NWSemSig(), ft_NWSemUnlock() $END$ */ @@ -338,6 +338,6 @@ // Processing, then: ft_NWSemUnlock( nHandle ) $SEEALSO$ - ft_NWSemOpen() ft_NWSemEx() ft_NWSemWait() ft_NWSemSig() ft_NWSemLock() + ft_NWSemOpen(), ft_NWSemEx(), ft_NWSemWait(), ft_NWSemSig(), ft_NWSemLock() $END$ */ diff --git a/contrib/hbnf/doc/en/prtscr.txt b/contrib/hbnf/doc/en/prtscr.txt index fb1eeffdd9..9b7d3ef127 100644 --- a/contrib/hbnf/doc/en/prtscr.txt +++ b/contrib/hbnf/doc/en/prtscr.txt @@ -22,6 +22,6 @@ ft_PrtScr( .T. ) // Enable the printscreen key MemVar := ft_PrtScr() // Get the current status $SEEALSO$ - ft_CapLock() ft_Ctrl() ft_NumLock() ft_Shift() ft_Alt() + ft_CapLock(), ft_Ctrl(), ft_NumLock(), ft_Shift(), ft_Alt() $END$ */ diff --git a/contrib/hbnf/doc/en/qtr.txt b/contrib/hbnf/doc/en/qtr.txt index 06a75e42c0..134a1484ff 100644 --- a/contrib/hbnf/doc/en/qtr.txt +++ b/contrib/hbnf/doc/en/qtr.txt @@ -52,6 +52,6 @@ ? aDateInfo[ 2 ] // 1991-04-01 beginning of quarter 2 ? aDateInfo[ 3 ] // 1991-06-30 end of quarter 2 $SEEALSO$ - ft_DateCnfg() ft_Week() ft_Month() ft_Year() + ft_DateCnfg(), ft_Week(), ft_Month(), ft_Year() $END$ */ diff --git a/contrib/hbnf/doc/en/restsets.txt b/contrib/hbnf/doc/en/restsets.txt index 092ad5f79d..dd26884efe 100644 --- a/contrib/hbnf/doc/en/restsets.txt +++ b/contrib/hbnf/doc/en/restsets.txt @@ -19,6 +19,6 @@ $EXAMPLES$ ft_RestSets( aOldSets ) $SEEALSO$ - ft_SaveSets() ft_SetCentury() + ft_SaveSets(), ft_SetCentury() $END$ */ diff --git a/contrib/hbnf/doc/en/savesets.txt b/contrib/hbnf/doc/en/savesets.txt index 296503859c..156434a828 100644 --- a/contrib/hbnf/doc/en/savesets.txt +++ b/contrib/hbnf/doc/en/savesets.txt @@ -19,6 +19,6 @@ $EXAMPLES$ aOldSets := ft_SaveSets() $SEEALSO$ - ft_RestSets() ft_SetCentury() + ft_RestSets(), ft_SetCentury() $END$ */ diff --git a/contrib/hbnf/doc/en/scregion.txt b/contrib/hbnf/doc/en/scregion.txt index ccfef9af76..7101b271ad 100644 --- a/contrib/hbnf/doc/en/scregion.txt +++ b/contrib/hbnf/doc/en/scregion.txt @@ -33,7 +33,7 @@ @ 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() + ft_RstRgn(), ft_RgnStack() $END$ */ @@ -79,7 +79,7 @@ @ 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() + ft_SavRgn(), ft_RgnStack() $END$ */ @@ -149,6 +149,6 @@ ft_RgnStack( "pop" ) // restore the 4's region ft_RgnStack( "pop all" ) // restore the 3's, 2's and 1's regions $SEEALSO$ - ft_SavRgn() ft_RstRgn() + ft_SavRgn(), ft_RstRgn() $END$ */ diff --git a/contrib/hbnf/doc/en/shift.txt b/contrib/hbnf/doc/en/shift.txt index d9a8ae4cad..6f229f5469 100644 --- a/contrib/hbnf/doc/en/shift.txt +++ b/contrib/hbnf/doc/en/shift.txt @@ -21,6 +21,6 @@ @ 0, 0 SAY " " ENDIF $SEEALSO$ - ft_CapLock() ft_Ctrl() ft_NumLock() ft_PrtScr() ft_Alt() + ft_CapLock(), ft_Ctrl(), ft_NumLock(), ft_PrtScr(), ft_Alt() $END$ */ diff --git a/contrib/hbnf/doc/en/week.txt b/contrib/hbnf/doc/en/week.txt index deb3da92dd..d6a4afc371 100644 --- a/contrib/hbnf/doc/en/week.txt +++ b/contrib/hbnf/doc/en/week.txt @@ -52,6 +52,6 @@ ? aDateInfo[ 2 ] // 1991-06-16 beginning of week 25 ? aDateInfo[ 3 ] // 1991-06-22 end of week 25 $SEEALSO$ - ft_DateCnfg() ft_Month() ft_Qtr() ft_Year() ft_DayToBoW() + ft_DateCnfg(), ft_Month(), ft_Qtr(), ft_Year(), ft_DayToBoW() $END$ */ diff --git a/contrib/hbnf/doc/en/year.txt b/contrib/hbnf/doc/en/year.txt index 423cb23bdf..9d69547722 100644 --- a/contrib/hbnf/doc/en/year.txt +++ b/contrib/hbnf/doc/en/year.txt @@ -43,6 +43,6 @@ ? aDateInfo[ 2 ] // 1991-01-01 beginning of year ? aDateInfo[ 3 ] // 1991-12-31 end of year $SEEALSO$ - ft_DateCnfg() ft_Week() ft_Month() ft_Qtr() + ft_DateCnfg(), ft_Week(), ft_Month(), ft_Qtr() $END$ */ diff --git a/contrib/rddads/doc/en/adsfuncs.txt b/contrib/rddads/doc/en/adsfuncs.txt index f054f3a340..ea1fb16b34 100644 --- a/contrib/rddads/doc/en/adsfuncs.txt +++ b/contrib/rddads/doc/en/adsfuncs.txt @@ -17,7 +17,7 @@ True if the file is successfully written. $DESCRIPTION$ See ace.hlp for full details about the Advantage Database Server. - AdsBlob2File() is a wrapper for AdsBinaryToFile. + AdsBlob2File() is a wrapper for AdsBinaryToFile(). $EXAMPLES$ $STATUS$ @@ -56,7 +56,7 @@ True if the file is successfully written. $DESCRIPTION$ See ace.hlp for full details about the Advantage Database Server. - AdsFile2Blob() is a wrapper for AdsFileToBinary. + AdsFile2Blob() is a wrapper for AdsFileToBinary(). Use of this function is illegal in an ADS transaction. $EXAMPLES$ @@ -121,7 +121,7 @@ The type of operation: -
+ ADS_AOF_ADD_RECORD Add the record to the AOF (set the bit). This is the default operation. ADS_AOF_REMOVE_RECORD Remove the record from the AOF (clear the bit). ADS_AOF_TOGGLE_RECORD Switch the record into or out of the AOF. @@ -141,19 +141,19 @@ The maximum number of records that can be customized in a single call is 16, 383, so must not be longer than this. - Calls to AdsCustomizeAOF must be made after an application has created a - filter with a call to AdsSetAOF. To create a completely empty record set - (to which records can be added with calls to AdsCustomizeAOF), use ".F." as - the filter expression given to AdsSetAOF. To create a completely full + Calls to AdsCustomizeAOF() must be made after an application has created a + filter with a call to AdsSetAOF(). To create a completely empty record set + (to which records can be added with calls to AdsCustomizeAOF()), use ".F." as + the filter expression given to AdsSetAOF(). To create a completely full record set (from which records can be removed), use ".T." as the filter expression. WARNING: Always start with a FULLY optimized AOF! If an application must use a filter expression that is not fully optimized as the starting point for customization, the ADS_RESOLVE_IMMEDIATE option - should be used with the call to AdsSetAOF. Otherwise, the dynamic filter + should be used with the call to AdsSetAOF(). Otherwise, the dynamic filter resolution that occurs on the server will automatically remove records that - have been added through the AdsCustomizeAOF calls. The + have been added through the AdsCustomizeAOF() calls. The filter expressions ".T." and ".F." both result in fully optimized AOFs regardless of available indexes. @@ -248,13 +248,13 @@ $CATEGORY$ Advantage Database RDD $ONELINER$ - Retrieve the filter expression used in the call to AdsSetAOF + Retrieve the filter expression used in the call to AdsSetAOF() $SYNTAX$ AdsGetAOF() --> cFilter $ARGUMENTS$ None $RETURNS$ - The filter expression used in the call to AdsSetAOF. + The filter expression used in the call to AdsSetAOF(). $DESCRIPTION$ See ace.hlp for full details about the Advantage Database Server. $EXAMPLES$ @@ -507,7 +507,7 @@ Options are defined in ads.ch: -
+ ADS_RESPECTFILTERS Respect filters and scopes ADS_IGNOREFILTERS Ignore filters and scopes ADS_RESPECTSCOPES Respect scopes only @@ -554,8 +554,8 @@ Indicates if filters and/or scopes are to be respected if set. -
Options are defined in ads.ch: + ADS_RESPECTFILTERS Respect filters and scopes ADS_IGNOREFILTERS Ignore filters and scopes ADS_RESPECTSCOPES Respect scopes only @@ -563,8 +563,8 @@ $RETURNS$ The logical key number of the current record in the given index. $DESCRIPTION$ - See ace.hlp for full details about the Advantage Database Server. - Wrapper for AdsGetKeyNum. + See ace.hlp for full details about the Advantage Database Server. + Wrapper for AdsGetKeyNum. This function may be slow on a large database with ADS_RESPECTFILTERS set because it walks through the keys to get the current position. Compare to AdsGetRelKeyPos(). @@ -607,7 +607,7 @@ If a file is opened in the proprietary mode, other applications cannot open it in a "write" mode. So if non-Advantage applications need concurrent access to the data files, use the Compatibility locking mode - by calling AdsLocking( .F. ). + by calling AdsLocking( .F. ). AdsLocking() is a Get/Set function for the locking mode. It affects files at the time they are opened. So when a data @@ -689,7 +689,7 @@ $RETURNS$ NIL $DESCRIPTION$ - See ace.hlp for full details on AdsRegisterProgressCallback. + See ace.hlp for full details on AdsRegisterProgressCallback(). ace32.dll does not support the EVAL/EVERY clauses. Remember, there is an external process doing the indexing that knows nothing of Harbour expressions or codeblocks. Even with Local Server it's the @@ -958,7 +958,7 @@ $RETURNS$ $DESCRIPTION$ - Equivalent to Empty( ordSetFocus() )<\b>, but faster. + Equivalent to Empty( ordSetFocus() ), but faster. $EXAMPLES$ $STATUS$ @@ -1003,7 +1003,7 @@ the record has been explicitly locked already. If not, we throw an error so the developer can catch the missing lock condition. For performance reasons, Release code should leave this OFF. - Although the call to AdsIsRecordLocked is documented as a client + Although the call to AdsIsRecordLocked() is documented as a client call, not a server request, and should be fast, it will be called for EACH FIELD as it is assigned a value. @@ -1123,7 +1123,7 @@ $DESCRIPTION$ Advantage uses Handles to control connections to various servers. It's possible that an app may open some files via the Remote server, - but others via the Local server or an Internect connection. + but others via the Local server or an Internet connection. This function identifies the type of server used by a connection handle. Note that after a table is opened, the type of connection used for that workarea can be retrieved with AdsGetTableConType(). @@ -1206,6 +1206,8 @@ AdsDDCreateUser( , "Luiz", "papael", "This is luiz User" ) // Add the tables AdsDDAddTable( "Table1", "table1.adt", "table1.adi" ) + // ... + ENDIF $STATUS$ R $COMPLIANCE$ @@ -1275,11 +1277,11 @@ $RETURNS$ ??? $DESCRIPTION$ - AdsCacheOpenTables allows table closes to be cached in order for - subsequent opens to occur faster. A call to AdsCloseTable with + AdsCacheOpenTables() allows table closes to be cached in order for + subsequent opens to occur faster. A call to AdsCloseTable() with the table cache greater than zero results in the table appearing closed to an application, but still open on the Advantage server. - AdsCacheOpenTables is a global setting that affects the behavior + AdsCacheOpenTables() is a global setting that affects the behavior of the entire application. The default number of open tables that are cached is 0. $EXAMPLES$ @@ -1313,12 +1315,12 @@ $RETURNS$ ??? $DESCRIPTION$ - AdsCacheOpenCursors allows cursor closes to be cached in + AdsCacheOpenCursors() allows cursor closes to be cached in order for subsequent SELECTS to occur faster. A call to - AdsCloseTable with the cursor cache greater than zero results + AdsCloseTable() with the cursor cache greater than zero results in the cursor appearing closed to an application, but still open on the Advantage server. - AdsCacheOpenCursors is a global setting that affects the + AdsCacheOpenCursors() is a global setting that affects the behavior of the entire application. The default number of open cursors that are cached is 25. $EXAMPLES$ @@ -1354,7 +1356,7 @@ $RETURNS$ ??? $DESCRIPTION$ - AdsCloseCachedTables can be used to close all cached tables + AdsCloseCachedTables() can be used to close all cached tables on a given connection. All cached closed tables on the client will be closed, as well as all cache closed tables on the server that might have been used when executing SQL statements. @@ -1365,7 +1367,7 @@ $COMPLIANCE$ Harbour extension $PLATFORMS$ - Ads 7.x and above, Windows, Linux + ADS 7.x and above, Windows, Linux $FILES$ Library is rddads Header is ads.ch diff --git a/doc/en/1stread.txt b/doc/en/1stread.txt index 7422a02a66..ceeb945289 100644 --- a/doc/en/1stread.txt +++ b/doc/en/1stread.txt @@ -1,44 +1,7 @@ /* * Copyright 2009 April White * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this software; see the file COPYING.txt. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307 USA (or visit the website https://www.gnu.org/). - * - * As a special exception, the Harbour Project gives permission for - * additional uses of the text contained in its release of Harbour. - * - * The exception is that, if you link the Harbour libraries with other - * files to produce an executable, this does not by itself cause the - * resulting executable to be covered by the GNU General Public License. - * Your use of that executable is in no way restricted on account of - * linking the Harbour library code into it. - * - * This exception does not however invalidate any other reasons why - * the executable file might be covered by the GNU General Public License. - * - * This exception applies only to the code released by the Harbour - * Project under the name Harbour. If you copy code from other - * Harbour Project or Free Software Foundation releases into a copy of - * Harbour, as the General Public License permits, the exception does - * not apply to the code that you add in this way. To avoid misleading - * anyone as to the status of such modified files, you must delete - * this exception notice from them. - * - * If you write modifications of your own for Harbour, it is your choice - * whether to permit this exception to apply to your modifications. - * If you do not wish that, delete this exception notice. + * See COPYING.txt for licensing terms. * */ @@ -46,17 +9,14 @@ $TEMPLATE$ Document $NAME$ - 1st document to read + Welcome to Harbour $CATEGORY$ Document $SUBCATEGORY$ - + Intro $ONELINER$ - A starters guide to Harbour + A starter's guide $DESCRIPTION$ - Welcome to Harbour - ================== - Clipper is a trademark of Computer Associates and will often be referred to as CA-Cl*pper within Harbour documents. Regardless of this variant, Clipper is recognized as Computer Associates' trademark. @@ -66,19 +26,18 @@ Clipper). The goal of Harbour is to produce a cross platform CA-Cl*pper compatible compiler. - The Harbour website is at . + The Harbour website is at . If you have any problems with this copy of Harbour please visit our web site and ensure that you are using the latest release. If you are reading this file as part of a source distribution of Harbour you - probably want to start by reading dirstruc.txt because this is your map to + probably want to start by reading `dirstruc.txt` because this is your map to the Harbour source directories. Harbour is a superset of Clipper and is backwards compatible with nearly 100% of all Clipper 5.2x or 5.3 code. Most Clipper S'87 code will also compile and run fine, but may require some modifications to run well. $PLATFORMS$ - All $FILES$ $SEEALSO$ diff --git a/doc/en/array.txt b/doc/en/array.txt index 7483d62b34..49dba6d03d 100644 --- a/doc/en/array.txt +++ b/doc/en/array.txt @@ -38,6 +38,9 @@ destroy the original array and release the entire contents of the array. This depends, of course, on the data storage type of either the array or the variable with the same name as the array. + + CA-Cl*pper v5.x compliant except that arrays in Harbour can have + an unlimited number of elements. $EXAMPLES$ PROCEDURE Main() LOCAL aArray := Array( 10 ) @@ -50,7 +53,7 @@ $STATUS$ R $COMPLIANCE$ - C(array) + C $FILES$ Library is core $SEEALSO$ @@ -574,6 +577,9 @@ can sort multidimensional array, descending orders or even (but why would you want to do that) sort array that contain different data type. + + Codeblock calling frequency and order differs from CA-Cl*pper, since + Harbour uses a different (faster) sorting algorithm (quicksort). $EXAMPLES$ // sort numeric values in ascending order ASort( { 3, 1, 4, 42, 5, 9 } ) // result: { 1, 3, 4, 5, 9, 42 } @@ -590,7 +596,7 @@ $STATUS$ R $COMPLIANCE$ - C(arrayblock) + C $FILES$ Library is core $SEEALSO$ diff --git a/doc/en/compiler.txt b/doc/en/compiler.txt index 49f4d93042..047e295843 100644 --- a/doc/en/compiler.txt +++ b/doc/en/compiler.txt @@ -7,8 +7,6 @@ Document $SUBCATEGORY$ Compiler - $ONELINER$ - Compiler Options $DESCRIPTION$ Invoking the Harbour compiler: ============================== diff --git a/doc/en/dir.txt b/doc/en/dir.txt index f5f2270924..ac973fa391 100644 --- a/doc/en/dir.txt +++ b/doc/en/dir.txt @@ -39,6 +39,10 @@ __Dir() is a compatibility function, it is superseded by Directory() which return all the information in a multidimensional array. + + If long file names are available Harbour will use/display the first + 15 characters else Harbour will use/display a 8.3 file name consistent + with CA-Cl*pper. $EXAMPLES$ __Dir() // information for all DBF files in current directory @@ -55,7 +59,7 @@ $COMPLIANCE$ C $PLATFORMS$ - All(LFN) + All $FILES$ Library is core $SEEALSO$ @@ -94,6 +98,10 @@ __Dir() is a compatibility function, it is superseded by Directory() which returns all the information in a multidimensional array. + + If long file names are available Harbour will use/display the first + 15 characters else Harbour will use/display a 8.3 file name consistent + with CA-Cl*pper. $EXAMPLES$ DIR // information for all DBF files in current directory @@ -110,7 +118,7 @@ $COMPLIANCE$ C $PLATFORMS$ - All(LFN) + All $SEEALSO$ ADir(), Directory(), SET DEFAULT, __Dir()* $END$ diff --git a/doc/en/diskspac.txt b/doc/en/diskspac.txt index 4803a54719..34a801bf5e 100644 --- a/doc/en/diskspac.txt +++ b/doc/en/diskspac.txt @@ -42,7 +42,7 @@ $COMPLIANCE$ C $PLATFORMS$ - DOS, Win, OS2 + All $FILES$ Library is core Header is fileio.ch @@ -104,7 +104,7 @@ $COMPLIANCE$ H $PLATFORMS$ - DOS, Win, OS2, Unix + All $FILES$ Library is core Header is fileio.ch diff --git a/doc/en/harbext.txt b/doc/en/harbext.txt index 1fcc60f52a..403c2547b0 100644 --- a/doc/en/harbext.txt +++ b/doc/en/harbext.txt @@ -5,8 +5,6 @@ Harbour Extensions $CATEGORY$ Document - $ONELINER$ - Harbour Extensions $DESCRIPTION$ Language extensions: -------------------- diff --git a/doc/en/hashes.txt b/doc/en/hashes.txt index 526d3a9cb4..dcfd70bad7 100644 --- a/doc/en/hashes.txt +++ b/doc/en/hashes.txt @@ -1,47 +1,8 @@ /* - * Hash table type and functions - * * Copyright 2009 April White * Copyright 2007 Przemyslaw Czerpak * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this software; see the file COPYING.txt. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307 USA (or visit the web site https://www.gnu.org/). - * - * As a special exception, the Harbour Project gives permission for - * additional uses of the text contained in its release of Harbour. - * - * The exception is that, if you link the Harbour libraries with other - * files to produce an executable, this does not by itself cause the - * resulting executable to be covered by the GNU General Public License. - * Your use of that executable is in no way restricted on account of - * linking the Harbour library code into it. - * - * This exception does not however invalidate any other reasons why - * the executable file might be covered by the GNU General Public License. - * - * This exception applies only to the code released by the Harbour - * Project under the name Harbour. If you copy code from other - * Harbour Project or Free Software Foundation releases into a copy of - * Harbour, as the General Public License permits, the exception does - * not apply to the code that you add in this way. To avoid misleading - * anyone as to the status of such modified files, you must delete - * this exception notice from them. - * - * If you write modifications of your own for Harbour, it is your choice - * whether to permit this exception to apply to your modifications. - * If you do not wish that, delete this exception notice. + * See COPYING.txt for licensing terms. * */ diff --git a/doc/en/input.txt b/doc/en/input.txt index 2559f6ca9b..f10c947b3a 100644 --- a/doc/en/input.txt +++ b/doc/en/input.txt @@ -90,7 +90,7 @@ DO WHILE Inkey( 0.1 ) != K_ESC ENDDO // - KEYBOARD "AB"; ? Inkey(), Inkey() // ==> 65 66 + KEYBOARD "AB"; ? Inkey(), Inkey() // -> 65 66 $STATUS$ S $COMPLIANCE$ @@ -136,9 +136,9 @@ // Clear the keyboard buffer CLEAR TYPEAHEAD // - KEYBOARD Chr( 13 ); ? Inkey() // ==> 13 - KEYBOARD ";" ? Inkey() // ==> 13 - KEYBOARD "Hello"; CLEAR TYPEAHEAD; ? Inkey() // ==> 0 + KEYBOARD Chr( 13 ); ? Inkey() // -> 13 + KEYBOARD ";"; ? Inkey() // -> 13 + KEYBOARD "Hello"; CLEAR TYPEAHEAD; ? Inkey() // -> 0 $STATUS$ R $COMPLIANCE$ @@ -176,8 +176,8 @@ be inserted. $EXAMPLES$ // Stuff an Alt+PgDn key into the keyboard buffer - hb_keyPut( K_ALT_PGDN ); ? Inkey() // ==> 417 - hb_keyPut( K_F11 ); ? Inkey() // ==> -40 + hb_keyPut( K_ALT_PGDN ); ? Inkey() // -> 417 + hb_keyPut( K_F11 ); ? Inkey() // -> -40 $STATUS$ R $COMPLIANCE$ @@ -228,7 +228,7 @@ ENDIF ENDDO // - KEYBOARD "AB"; ? NextKey(), NextKey() // ==> 65 65 + KEYBOARD "AB"; ? NextKey(), NextKey() // -> 65 65 $STATUS$ R $COMPLIANCE$ @@ -273,7 +273,7 @@ ENDIF ENDDO // - KEYBOARD "AB"; ? Inkey(), LastKey() // ==> 65 65 + KEYBOARD "AB"; ? Inkey(), LastKey() // -> 65 65 $STATUS$ R $COMPLIANCE$ @@ -319,8 +319,8 @@ // Clear the keyboard buffer CLEAR TYPEAHEAD // - KEYBOARD Chr( 13 ); ? Inkey() // ==> 13 - KEYBOARD "Hello"; CLEAR TYPEAHEAD; ? Inkey() // ==> 0 + KEYBOARD Chr( 13 ); ? Inkey() // -> 13 + KEYBOARD "Hello"; CLEAR TYPEAHEAD; ? Inkey() // -> 0 $STATUS$ R $COMPLIANCE$ @@ -353,7 +353,7 @@ key pressed. If the GET buffer was updated during READ, 256 is added to the return code. -
+ Exit Return code Return code Key (not updated) (updated) diff --git a/doc/en/macro.txt b/doc/en/macro.txt index 9a0afee41b..6cecfbad9b 100644 --- a/doc/en/macro.txt +++ b/doc/en/macro.txt @@ -7,8 +7,6 @@ Document $SUBCATEGORY$ Compiler - $ONELINER$ - Macro compiler $DESCRIPTION$ Invoking the macro compiler: ============================== diff --git a/doc/en/menu.txt b/doc/en/menu.txt index 2e05104d7c..1cabe553f5 100644 --- a/doc/en/menu.txt +++ b/doc/en/menu.txt @@ -147,7 +147,7 @@ $STATUS$ R $COMPLIANCE$ - C(menu) + C $FILES$ Library is core $SEEALSO$ @@ -210,7 +210,7 @@ $STATUS$ R $COMPLIANCE$ - C(menu) + C $SEEALSO$ AChoice(), MENU TO, SET MESSAGE, SET INTENSITY, SET WRAP, __MenuTo() $END$ diff --git a/doc/en/objfunc.txt b/doc/en/objfunc.txt index 3507453fa3..c5ab878eb6 100644 --- a/doc/en/objfunc.txt +++ b/doc/en/objfunc.txt @@ -405,7 +405,7 @@ $FILES$ Library is core $SEEALSO$ - __objAddData(), __objAddMethod(), __objDelInline(), __objGetMethodList(), __objGetMsgList(), __objHasMethod() , __objModInline() + __objAddData(), __objAddMethod(), __objDelInline(), __objGetMethodList(), __objGetMsgList(), __objHasMethod(), __objModInline() $END$ */ diff --git a/doc/en/rdddb.txt b/doc/en/rdddb.txt index 48e379da67..95b3c2925d 100644 --- a/doc/en/rdddb.txt +++ b/doc/en/rdddb.txt @@ -390,7 +390,7 @@ 3-way toggle to Open the file in New or Current workarea: -
+ NIL The file is not opened. True It is opened in a New area. False It is opened in the current area. diff --git a/doc/en/rddord.txt b/doc/en/rddord.txt index 74f71db390..b881be0053 100644 --- a/doc/en/rddord.txt +++ b/doc/en/rddord.txt @@ -111,7 +111,7 @@ $ONELINER$ Set the Condition and scope for an order $SYNTAX$ - ORDCONSET([], + ordCondSet( [], [], [], [], @@ -125,7 +125,7 @@ [], [], [], - []) + [] ) $ARGUMENTS$ is a string that specifies the FOR condition for the order. diff --git a/doc/en/sayget.txt b/doc/en/sayget.txt index a00de37293..e34366d92d 100644 --- a/doc/en/sayget.txt +++ b/doc/en/sayget.txt @@ -82,7 +82,7 @@ NOTE GET functions/formatting rules: -
+ @A Allows only alphabetic characters. @B Numbers will be left justified @C All positive numbers will be followed by CR. @@ -103,7 +103,7 @@ GET templates/formatting rules: -
+ A Only alphabetic characters allowed. N Only alphabetic and numeric characters allowed X Any character allowed. diff --git a/doc/en/set.txt b/doc/en/set.txt index f83eca2a84..0c3138fdec 100644 --- a/doc/en/set.txt +++ b/doc/en/set.txt @@ -1204,7 +1204,7 @@ When SET DECIMALS OFF is used, the following rules apply to the number of decimal placed displayed. -
+ Addition Same as operand with the greatest number of decimal digits Subtraction Same as operand with the greatest number of decimal digits Multiplication Sum of operand decimal digits diff --git a/doc/en/setmode.txt b/doc/en/setmode.txt index 6a474a6386..1d7d8c8339 100644 --- a/doc/en/setmode.txt +++ b/doc/en/setmode.txt @@ -33,7 +33,7 @@ that produce the video mode change. The followings are availables for GTDOS: -
+ 12 rows x 40 columns 12 rows x 80 columns 25 rows x 40 columns 25 rows x 80 columns 28 rows x 40 columns 28 rows x 80 columns @@ -43,7 +43,7 @@ The follow modes are available to Windows -
+ 25 rows x 40 columns 25 rows x 80 columns 50 rows x 40 columns 43 rows x 80 columns 50 rows x 80 columns @@ -71,7 +71,7 @@ $COMPLIANCE$ Some of these modes are not availables in CA-Cl*pper $PLATFORMS$ - DOS, Win + All $SEEALSO$ MaxCol(), MaxRow() $END$ diff --git a/doc/en/string.txt b/doc/en/string.txt index 241b1f2199..3b11b30266 100644 --- a/doc/en/string.txt +++ b/doc/en/string.txt @@ -1501,7 +1501,7 @@ The table below shows the possible function strings available with the Transform() function. -
+ @B Left justify the string within the format. @C Issue a CR after format is numbers are positive. @D Put dates in SET DATE format. @@ -1518,7 +1518,7 @@ character in the string may be formatted based on using the follow characters as template markers for the string. -
+ A,N,X,9,# Any data type L Shows logical as "T" or "F" Y Shows logical as "Y" or "N" diff --git a/doc/en/terminal.txt b/doc/en/terminal.txt index 7ec1156d39..ce77a09f79 100644 --- a/doc/en/terminal.txt +++ b/doc/en/terminal.txt @@ -59,7 +59,7 @@ $COMPLIANCE$ C $PLATFORMS$ - All(GT) + All $FILES$ Library is core $SEEALSO$ @@ -102,7 +102,7 @@ $COMPLIANCE$ C $PLATFORMS$ - All(GT) + All $SEEALSO$ RESTORE SCREEN, __XRestScreen(), __XSaveScreen() $END$ @@ -146,7 +146,7 @@ $COMPLIANCE$ C $PLATFORMS$ - All(GT) + All $FILES$ Library is core $SEEALSO$ @@ -189,7 +189,7 @@ $COMPLIANCE$ C $PLATFORMS$ - All(GT) + All $SEEALSO$ __XRestScreen(), SAVE SCREEN, __XSaveScreen() $END$ @@ -840,7 +840,7 @@ $COMPLIANCE$ C $PLATFORMS$ - Linux(GT), OS2(GT), Win(GT) + All $FILES$ Library is core $SEEALSO$ @@ -876,7 +876,7 @@ $COMPLIANCE$ C $PLATFORMS$ - Linux(GT), OS2(GT), Win(GT) + All $FILES$ Library is core $SEEALSO$ diff --git a/extras/hbdoc/_genbase.prg b/extras/hbdoc/_genbase.prg index 351fa310ef..03e7db49e7 100644 --- a/extras/hbdoc/_genbase.prg +++ b/extras/hbdoc/_genbase.prg @@ -47,62 +47,78 @@ #include "hbclass.ch" -#include "fileio.ch" - #define DOCUMENT_ 1 #define INDEX_ 2 CREATE CLASS TPLGenerate - METHOD NewIndex( cDir, cFilename, cTitle, cExtension ) - METHOD NewDocument( cDir, cFilename, cTitle, cExtension ) + METHOD NewIndex( cDir, cFilename, cTitle, cExtension, cLang ) + METHOD NewDocument( cDir, cFilename, cTitle, cExtension, cLang ) METHOD AddEntry( oEntry ) INLINE HB_SYMBOL_UNUSED( oEntry ), NIL METHOD AddReference( oEntry ) INLINE HB_SYMBOL_UNUSED( oEntry ), NIL METHOD BeginSection( cSection, cFilename ) INLINE HB_SYMBOL_UNUSED( cSection ), HB_SYMBOL_UNUSED( cFilename ), ::Depth++ METHOD EndSection( cSection, cFilename ) INLINE HB_SYMBOL_UNUSED( cSection ), HB_SYMBOL_UNUSED( cFilename ), ::Depth-- - METHOD Generate() INLINE NIL + METHOD Generate() METHOD IsIndex() INLINE ::nType == INDEX_ - PROTECTED: + VAR cFilename AS STRING - METHOD New( cDir, cFilename, cTitle, cExtension, nType ) HIDDEN + HIDDEN: + + METHOD New( cDir, cFilename, cTitle, cExtension, cLang, nType ) + + PROTECTED: VAR nType AS INTEGER VAR Depth AS INTEGER INIT 0 - VAR hFile + VAR cFile AS STRING INIT "" VAR cDir AS STRING - VAR cFilename AS STRING VAR cTitle AS STRING VAR cExtension AS STRING + VAR cLang AS STRING + VAR cOutFileName AS STRING ENDCLASS -METHOD NewIndex( cDir, cFilename, cTitle, cExtension ) CLASS TPLGenerate +METHOD NewIndex( cDir, cFilename, cTitle, cExtension, cLang ) CLASS TPLGenerate - ::New( cDir, cFilename, cTitle, cExtension, INDEX_ ) + ::New( cDir, cFilename, cTitle, cExtension, cLang, INDEX_ ) RETURN self -METHOD NewDocument( cDir, cFilename, cTitle, cExtension ) CLASS TPLGenerate +METHOD NewDocument( cDir, cFilename, cTitle, cExtension, cLang ) CLASS TPLGenerate - ::New( cDir, cFilename, cTitle, cExtension, DOCUMENT_ ) + ::New( cDir, cFilename, cTitle, cExtension, cLang, DOCUMENT_ ) RETURN self -METHOD New( cDir, cFilename, cTitle, cExtension, nType ) CLASS TPLGenerate +METHOD New( cDir, cFilename, cTitle, cExtension, cLang, nType ) CLASS TPLGenerate ::cDir := cDir ::cFilename := cFilename ::cTitle := cTitle ::cExtension := cExtension + ::cLang := hb_defaultValue( cLang, "en" ) ::nType := nType - IF ! hb_vfDirExists( ::cDir ) - OutStd( hb_eol() + "Creating directory", "'" + ::cDir + "'" ) - hb_vfDirMake( ::cDir ) - ENDIF - - ::hFile := hb_vfOpen( ::cDir + hb_ps() + ::cFilename + ::cExtension, FO_CREAT + FO_TRUNC + FO_WRITE ) + ::cOutFileName := ; + ::cDir + hb_ps() + ; + ::cFilename + ; + iif( Lower( ::cLang ) == "en", "", "." + ::cLang ) + ; + ::cExtension + + RETURN self + +METHOD Generate() CLASS TPLGenerate + + LOCAL cDir := hb_FNameDir( ::cOutFileName ) + + IF ! hb_vfDirExists( cDir ) + OutStd( hb_eol() + "Creating directory", "'" + cDir + "'" ) + hb_vfDirMake( cDir ) + ENDIF + + hb_MemoWrit( ::cOutFileName, ::cFile ) RETURN self diff --git a/extras/hbdoc/_genhtml.prg b/extras/hbdoc/_genhtml.prg index 89625824cb..282dd75a22 100644 --- a/extras/hbdoc/_genhtml.prg +++ b/extras/hbdoc/_genhtml.prg @@ -46,117 +46,162 @@ */ #include "hbclass.ch" +#include "hbver.ch" -#ifdef __PLATFORM__DOS - #define EXTENSION ".htm" -#else - #define EXTENSION ".html" -#endif +#define EXTENSION ".html" -#define STYLEFILE "hbdoc.css" - -CREATE CLASS GenerateHTML2 INHERIT GenerateHTML - - METHOD NewIndex( cDir, cFilename, cTitle ) - METHOD NewDocument( cDir, cFilename, cTitle ) - -ENDCLASS - -METHOD NewDocument( cDir, cFilename, cTitle ) CLASS GenerateHTML2 - - ::super:NewDocument( cDir, cFilename, cTitle, EXTENSION ) - - RETURN self - -METHOD NewIndex( cDir, cFilename, cTitle ) CLASS GenerateHTML2 - - ::super:NewIndex( cDir, cFilename, cTitle, EXTENSION ) - - RETURN self +#define STYLEFILE "hbdoc.css" CREATE CLASS GenerateHTML INHERIT TPLGenerate HIDDEN: + METHOD RecreateStyleDocument( cStyleFile ) + METHOD OpenTagInline( cText, ... ) METHOD OpenTag( cText, ... ) METHOD Tagged( cText, cTag, ... ) + METHOD CloseTagInline( cText ) METHOD CloseTag( cText ) - METHOD Append( cText, cFormat ) - METHOD Newline() INLINE hb_vfWrite( ::hFile, "
" + hb_eol() ), self + METHOD AppendInline( cText, cFormat, lCode ) + METHOD Append( cText, cFormat, lCode ) + METHOD Space() INLINE ::cFile += ", ", self + METHOD Spacer() INLINE ::cFile += hb_eol(), self + METHOD Newline() INLINE ::cFile += "
" + hb_eol(), self + METHOD NewFile() CLASS VAR lCreateStyleDocument AS LOGICAL INIT .T. VAR TargetFilename AS STRING INIT "" EXPORTED: - METHOD NewFile() HIDDEN - METHOD NewIndex( cDir, cFilename, cTitle ) - METHOD NewDocument( cDir, cFilename, cTitle ) + + METHOD NewIndex( cDir, cFilename, cTitle, cLang ) + METHOD NewDocument( cDir, cFilename, cTitle, cLang ) METHOD AddEntry( oEntry ) METHOD AddReference( oEntry, cReference, cSubReference ) METHOD BeginSection( cSection, cFilename ) METHOD EndSection( cSection, cFilename ) METHOD Generate() - METHOD WriteEntry( cField, oEntry, lPreformatted ) HIDDEN + METHOD WriteEntry( cField, cContent, lPreformatted ) HIDDEN + + VAR nStart INIT hb_MilliSeconds() + VAR nIndent INIT 0 ENDCLASS METHOD NewFile() CLASS GenerateHTML - hb_vfWrite( ::hFile, "" + hb_eol() ) + ::cFile += "" + hb_eol() - ::OpenTag( "html", "lang", "en" ) + ::OpenTag( "html", "lang", StrTran( ::cLang, "_", "-" ) ) + ::Spacer() ::OpenTag( "meta", "charset", "utf-8" ) + ::OpenTag( "meta", "name", "referrer", "content", "origin" ) + ::OpenTag( "meta", "name", "viewport", "content", "initial-scale=1" ) + ::Spacer() + ::OpenTag( "meta", "name", "generator", "content", "hbdoc" ) - ::OpenTag( "meta", "name", "keywords", "content", "Harbour, Clipper, xBase, database, Free Software, GPL, compiler, cross platform, 32-bit, 64-bit" ) + ::OpenTag( "meta", "name", "keywords", "content", ; + "Harbour, Clipper, xBase, database, Free Software, GPL, compiler, cross-platform, 32-bit, 64-bit" ) + ::Spacer() IF ::lCreateStyleDocument ::lCreateStyleDocument := .F. ::RecreateStyleDocument( STYLEFILE ) ENDIF - ::Append( ::cTitle /* + iif( Empty( ::cDescription ), "", " - " + ::cDescription ) */, "title" ) + ::Append( ::cTitle, "title" ) + ::Spacer() ::OpenTag( "link", "rel", "stylesheet", "href", STYLEFILE ) + ::Spacer() + ::OpenTag( "body" ) + ::Spacer() + + ::OpenTag( "header" ) ::Append( ::cTitle, "h1" ) + ::CloseTag( "header" ) + ::Spacer() + + ::OpenTag( "main" ) RETURN self -METHOD NewDocument( cDir, cFilename, cTitle ) CLASS GenerateHTML +STATIC FUNCTION GitRev() - ::super:NewDocument( cDir, cFilename, cTitle, EXTENSION ) + LOCAL cStdOut := "" + + hb_processRun( "git rev-parse --short HEAD",, @cStdOut ) + + RETURN hb_StrReplace( cStdOut, Chr( 13 ) + Chr( 10 ) ) + +METHOD Generate() CLASS GenerateHTML + + LOCAL cRevision := GitRev() + + ::Spacer() + ::CloseTag( "main" ) + + ::Spacer() + ::OpenTag( "footer" ) + ::Append( "Generated by hbdoc on " + hb_TToC( hb_DateTime() - ( hb_UTCOffset() / 86400 ), "yyyy-mm-dd", "hh:mm" ) + " UTC", "div" ) + + ::OpenTagInline( "div" ) + ::AppendInline( "Based on commit " ) + #if defined( HB_VERSION_URL_BASE ) + ::OpenTagInline( "a", "href", hb_Version( HB_VERSION_URL_BASE ) + "tree/" + cRevision ) + #endif + ::AppendInline( cRevision ) + #if defined( HB_VERSION_URL_BASE ) + ::CloseTagInline( "a" ) + #endif + ::CloseTag( "div" ) + + ::CloseTag( "footer" ) + + ::super:Generate() + +#if 0 + ? Round( ( hb_MilliSeconds() - ::nStart ) / 1000, 3 ) +#endif + + RETURN self + +METHOD NewDocument( cDir, cFilename, cTitle, cLang ) CLASS GenerateHTML + + ::super:NewDocument( cDir, cFilename, cTitle, EXTENSION, cLang ) ::NewFile() RETURN self -METHOD NewIndex( cDir, cFilename, cTitle ) CLASS GenerateHTML +METHOD NewIndex( cDir, cFilename, cTitle, cLang ) CLASS GenerateHTML - ::super:NewIndex( cDir, cFilename, cTitle, EXTENSION ) + ::super:NewIndex( cDir, cFilename, cTitle, EXTENSION, cLang ) ::NewFile() RETURN self -METHOD BeginSection( cSection, cFilename ) CLASS GenerateHTML +METHOD BeginSection( cSection, cFilename ) CLASS GenerateHTML cSection := SymbolToHTMLID( cSection ) IF ::IsIndex() IF cFilename == ::cFilename - ::OpenTag( "div", "id", cSection ):Append( cSection, "h" + hb_ntos( ::Depth + 2 ) ):CloseTag( "div" ) + ::OpenTagInline( "div", "id", cSection ):AppendInline( cSection, "h" + hb_ntos( ::Depth + 2 ) ):CloseTag( "div" ) ELSE ::OpenTag( "a", "href", cFilename + ::cExtension + "#" + cSection ):Append( cSection, "h" + hb_ntos( ::Depth + 2 ) ):CloseTag( "a" ) ENDIF ELSE - ::OpenTag( "div", "id", cSection ):Append( cSection, "h" + hb_ntos( ::Depth + 2 ) ):CloseTag( "div" ) + ::OpenTagInline( "div", "id", cSection ):AppendInline( cSection, "h" + hb_ntos( ::Depth + 2 ) ):CloseTag( "div" ) ENDIF ::TargetFilename := cFilename ::Depth++ RETURN self -METHOD EndSection( cSection, cFilename ) CLASS GenerateHTML +METHOD EndSection( cSection, cFilename ) CLASS GenerateHTML HB_SYMBOL_UNUSED( cSection ) HB_SYMBOL_UNUSED( cFilename ) @@ -167,12 +212,12 @@ METHOD EndSection( cSection, cFilename ) CLASS GenerateHTML 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:fld[ "NAME" ] ):CloseTag( "a" ):Append( oEntry:fld[ "ONELINER" ] ):Newline() ELSE IF HB_ISSTRING( cSubReference ) ::OpenTag( "a", "href", cReference + ::cExtension + "#" + cSubReference ):Append( oEntry ):CloseTag( "a" ):Newline() ELSE - ::OpenTag( "a", "href", cReference + ::cExtension /* + "#" + oEntry:Filename */ ):Append( oEntry ):CloseTag( "a" ):Newline() + ::OpenTag( "a", "href", cReference + ::cExtension /* + "#" + oEntry:_filename */ ):Append( oEntry ):CloseTag( "a" ):Newline() ENDIF ENDIF @@ -181,67 +226,172 @@ METHOD AddReference( oEntry, cReference, cSubReference ) CLASS GenerateHTML METHOD AddEntry( oEntry ) CLASS GenerateHTML LOCAL item + LOCAL cEntry - FOR EACH item IN oEntry:Fields - IF item[ 1 ] == "NAME" - ::OpenTag( "div", "id", SymbolToHTMLID( oEntry:filename ) ):OpenTag( "h4" ):Append( oEntry:Name ):CloseTag( "h4" ):CloseTag( "div" ) - ELSEIF oEntry:IsField( item[ 1 ] ) .AND. oEntry:IsOutput( item[ 1 ] ) .AND. Len( oEntry:&( item[ 1 ] ) ) > 0 - ::WriteEntry( item[ 1 ], oEntry, oEntry:IsPreformatted( item[ 1 ] ) ) + ::Spacer() + ::OpenTag( "section", "id", SymbolToHTMLID( oEntry:_filename ) ) + + FOR EACH item IN FieldIDList() + IF item == "NAME" + cEntry := oEntry:fld[ "NAME" ] + IF "(" $ cEntry .OR. Upper( cEntry ) == cEntry // guess if it's code + ::OpenTagInline( "h4" ):OpenTagInline( "code" ):AppendInline( cEntry ):CloseTagInline( "code" ):CloseTag( "h4" ) + ELSE + ::OpenTagInline( "h4" ):AppendInline( cEntry ):CloseTag( "h4" ) + ENDIF + ELSEIF oEntry:IsField( item ) .AND. oEntry:IsOutput( item ) .AND. Len( oEntry:fld[ item ] ) > 0 + ::WriteEntry( item, oEntry:fld[ item ], oEntry:IsPreformatted( item ) ) ENDIF NEXT + ::CloseTag( "section" ) + RETURN self -METHOD Generate() CLASS GenerateHTML - RETURN self +METHOD PROCEDURE WriteEntry( cField, cContent, lPreformatted ) CLASS GenerateHTML -METHOD PROCEDURE WriteEntry( cField, oEntry, lPreformatted ) CLASS GenerateHTML + STATIC s_class := { ; + "NAME" => "d-na", ; + "ONELINER" => "d-ol", ; + "EXAMPLES" => "d-ex", ; + "TESTS" => "d-te" } - LOCAL cCaption := oEntry:FieldName( cField ) - LOCAL cEntry := oEntry:&( cField ) + LOCAL cTagClass + LOCAL cCaption + LOCAL lFirst + LOCAL tmp, tmp1 + LOCAL cLine + LOCAL lCode, lTable, lTablePrev, cHeaderClass - /* TODO: change this to search the CSS document itself */ - LOCAL cTagClass := iif( Lower( cField ) + "|" $ "name|oneliner|examples|tests|", Lower( cField ), "itemtext" ) + IF ! Empty( cContent ) - IF ! Empty( cEntry ) + cTagClass := hb_HGetDef( s_class, cField, "d-it" ) -#if 0 - hb_default( @lPreformatted, .F. ) - hb_default( @cTagClass, "itemtext" ) -#endif - - hb_default( @cCaption, "" ) - IF ! HB_ISNULL( cCaption ) - ::Tagged( cCaption, "div", "class", "itemtitle" ) + IF ! HB_ISNULL( cCaption := FieldCaption( cField ) ) + ::Tagged( cCaption, "div", "class", "d-d" ) ENDIF - IF lPreformatted + DO CASE + CASE lPreformatted /* EXAMPLES, TESTS */ + ::OpenTag( "pre", "class", cTagClass ) - DO WHILE ! HB_ISNULL( cEntry ) - IF Lower( cField ) + "|" $ "examples|tests|" - ::Append( SubStr( Parse( @cEntry, hb_eol() ), 5 ), "" ) - ELSE - ::Append( Indent( Parse( @cEntry, hb_eol() ), 0, , .T. ), "" ) - ENDIF -#if 0 - IF ! HB_ISNULL( cEntry ) .AND. ! lPreformatted - hb_vfWrite( ::hFile, hb_eol() ) - ENDIF -#endif - ENDDO + ::Append( cContent,, .T. ) ::CloseTag( "pre" ) - ELSE - DO WHILE ! HB_ISNULL( cEntry ) - ::OpenTag( "div", "class", cTagClass ) - ::Append( Indent( Parse( @cEntry, hb_eol() ), 0, 70 ), "" ):Newline() - ::CloseTag( "div" ) + + CASE cField == "SEEALSO" + + ::OpenTagInline( "div", "class", cTagClass ) + lFirst := .T. + FOR EACH tmp IN hb_ATokens( cContent, "," ) + tmp := AllTrim( tmp ) + IF ! HB_ISNULL( tmp ) + // TOFIX: for multi-file output + tmp1 := Parse( tmp, "(" ) + IF lFirst + lFirst := .F. + ELSE + ::Space() + ENDIF + ::OpenTagInline( "code" ):OpenTagInline( "a", "href", "#" + SymbolToHTMLID( tmp1 ) ):AppendInline( tmp ):CloseTagInline( "a" ):CloseTagInline( "code" ) + ENDIF + NEXT + ::CloseTag( "div" ) + + CASE cField == "SYNTAX" + + ::OpenTagInline( "div", "class", cTagClass ) + DO WHILE ! HB_ISNULL( cContent ) + ::OpenTagInline( "code" ) + ::AppendInline( Indent( Parse( @cContent, hb_eol() ), 0, -1,, .T. ),, .F. ) + ::CloseTagInline( "code" ) ENDDO - ENDIF + ::CloseTag( "div" ) + + OTHERWISE + + ::OpenTag( "div", "class", cTagClass ) + ::nIndent++ + + lTable := .F. + + DO WHILE ! HB_ISNULL( cContent ) + + lCode := .F. + lTablePrev := lTable + + tmp1 := "" + DO WHILE ! HB_ISNULL( cContent ) + + cLine := Parse( @cContent, hb_eol() ) + + DO CASE + CASE hb_LeftEq( LTrim( cLine ), "```" ) + IF lCode + EXIT + ELSE + lCode := .T. + ENDIF + CASE cLine == "" + lCode := .T. + CASE cLine == "" + IF lCode + EXIT + ENDIF + CASE hb_LeftEq( cLine, "" ; cHeaderClass := "" + CASE cLine == "" ; cHeaderClass := "d-t1 d-t2" + OTHERWISE ; cHeaderClass := "d-t1" + ENDCASE + CASE cLine == "
" + lTable := .F. + OTHERWISE + tmp1 += cLine + hb_eol() + IF ! lCode + EXIT + ENDIF + ENDCASE + ENDDO + + IF lTable != lTablePrev + IF lTable + ::OpenTag( "div", "class", "d-t" + iif( HB_ISNULL( cHeaderClass ), "", " " + cHeaderClass ) ) + ELSE + ::CloseTag( "div" ) + ENDIF + ENDIF + + DO CASE + CASE lCode + ::OpenTag( "pre" ) + ::Append( tmp1,, .T. ) + CASE lTable + ::OpenTagInline( "div" ) + ::AppendInline( iif( lTable, StrTran( tmp1, " ", hb_UChar( 160 ) ), tmp1 ),, .T. ) + OTHERWISE + ::OpenTagInline( "div" ) + IF cField $ "DESCRIPTION|" + ::OpenTagInline( "p" ) + ENDIF + ::AppendInline( iif( lTable, StrTran( tmp1, " ", hb_UChar( 160 ) ), tmp1 ),, .F. ) + ENDCASE + IF lCode + ::CloseTag( "pre" ) + ELSE + ::CloseTag( "div" ) + ENDIF + ENDDO + + ::nIndent-- + ::CloseTag( "div" ) + + ENDCASE ENDIF RETURN -METHOD OpenTag( cText, ... ) CLASS GenerateHTML +METHOD OpenTagInline( cText, ... ) CLASS GenerateHTML LOCAL aArgs := hb_AParams() LOCAL idx @@ -250,7 +400,18 @@ METHOD OpenTag( cText, ... ) CLASS GenerateHTML cText += " " + aArgs[ idx ] + "=" + '"' + aArgs[ idx + 1 ] + '"' NEXT - hb_vfWrite( ::hFile, "<" + cText + ">" + hb_eol() ) + IF ! cText $ "pre" + ::cFile += Replicate( " ", ::nIndent ) + ENDIF + ::cFile += "<" + cText + ">" + + RETURN self + +METHOD OpenTag( cText, ... ) CLASS GenerateHTML + + ::OpenTagInline( cText, ... ) + + ::cFile += hb_eol() RETURN self @@ -264,32 +425,139 @@ METHOD Tagged( cText, cTag, ... ) CLASS GenerateHTML cResult += " " + aArgs[ idx ] + "=" + '"' + aArgs[ idx + 1 ] + '"' NEXT - hb_vfWrite( ::hFile, "<" + cTag + cResult + ">" + cText + "" + hb_eol() ) + ::cFile += "<" + cTag + cResult + ">" + cText + "" + hb_eol() + + RETURN self + +METHOD CloseTagInline( cText ) CLASS GenerateHTML + + ::cFile += "" RETURN self METHOD CloseTag( cText ) CLASS GenerateHTML - hb_vfWrite( ::hFile, "" + hb_eol() ) - - IF cText == "html" - hb_vfClose( ::hFile ) - ::hFile := NIL - ENDIF + ::cFile += "" + hb_eol() RETURN self -METHOD Append( cText, cFormat ) CLASS GenerateHTML +STATIC FUNCTION StrEsc( cString ) + + STATIC s_html := { ; + "&" => "&", ; + '"' => """, ; + "<" => "<", ; + ">" => ">" } + + RETURN hb_StrReplace( cString, s_html ) + +METHOD AppendInline( cText, cFormat, lCode ) CLASS GenerateHTML LOCAL idx + LOCAL cChar, cPrev, cNext, cOut, tmp, tmp1, nLen + LOCAL lEM, lIT, lPR + LOCAL nEM, nIT, nPR + LOCAL cdp + IF ! HB_ISNULL( cText ) - cText := hb_StrReplace( cText, { ; - "&" => "&", ; - '"' => """, ; - "<" => "<", ; - ">" => ">" } ) + hb_default( @lCode, .F. ) + + IF lCode + cText := StrEsc( cText ) + ELSE + cdp := hb_cdpSelect( "EN" ) /* make processing loop much faster */ + + lEM := lIT := lPR := .F. + cOut := "" + nLen := Len( cText ) + FOR tmp := 1 TO nLen + + cPrev := iif( tmp > 1, SubStr( cText, tmp - 1, 1 ), "" ) + cChar := SubStr( cText, tmp, 1 ) + cNext := SubStr( cText, tmp + 1, 1 ) + + DO CASE + CASE ! lPR .AND. cChar == "\" .AND. tmp < Len( cText ) + tmp++ + cChar := cNext + CASE ! lPR .AND. cChar == "*" .AND. ! lIT .AND. ; + iif( lEM, ! Empty( cPrev ) .AND. Empty( cNext ), Empty( cPrev ) .AND. ! Empty( cNext ) ) + lEM := ! lEM + IF lEM + nEM := Len( cOut ) + 1 + ENDIF + cChar := iif( lEM, "", "" ) + CASE ! lPR .AND. cChar == "_" .AND. ! lEM .AND. ; + ( ( ! lIT .AND. Empty( cPrev ) .AND. ! Empty( cNext ) ) .OR. ; + ( lIT .AND. ! Empty( cPrev ) .AND. Empty( cNext ) ) ) + lIT := ! lIT + IF lIT + nIT := Len( cOut ) + 1 + ENDIF + cChar := iif( lIT, "", "" ) + CASE cChar == "`" .AND. ; + ( ( ! lPR .AND. Empty( cPrev ) .AND. ! Empty( cNext ) ) .OR. ; + ( lPR .AND. ! Empty( cPrev ) .AND. Empty( cNext ) ) ) + lPR := ! lPR + IF lPR + nPR := Len( cOut ) + 1 + ENDIF + cChar := iif( lPR, "", "" ) + CASE ! lPR .AND. SubStr( cText, tmp, 3 ) == "" + tmp += 2 + cChar := "" + CASE ! lPR .AND. SubStr( cText, tmp, 4 ) == "" + tmp += 3 + cChar := "" + CASE ! lPR .AND. ; + ( SubStr( cText, tmp, 3 ) == "===" .OR. SubStr( cText, tmp, 3 ) == "---" ) + DO WHILE tmp < nLen .AND. SubStr( cText, tmp, 1 ) == cChar + tmp++ + ENDDO + cChar := "
" + CASE ! lPR .AND. ; + ( SubStr( cText, tmp, 5 ) == "", cText, tmp + 6 ) ) > 0 ) + tmp1 := SubStr( cText, tmp + 5, tmp1 - tmp - 5 ) + tmp += Len( tmp1 ) + 5 + cChar := "" + tmp1 + "" + CASE ! lPR .AND. ; + ( SubStr( cText, tmp, 3 ) == "==>" .OR. SubStr( cText, tmp, 3 ) == "-->" ) + tmp += 2 + cChar := "→" + CASE ! lPR .AND. ; + ( SubStr( cText, tmp, 2 ) == "->" ) + tmp += 1 + cChar := "→" + CASE cChar == "&" + cChar := "&" + CASE cChar == '"' + cChar := """ + CASE cChar == "<" + cChar := "<" + CASE cChar == ">" + cChar := ">" + ENDCASE + + cOut += cChar + NEXT + + /* Remove these tags if they weren't closed */ + IF lPR + cOut := Stuff( cOut, nPR, Len( "" ), "`" ) + ENDIF + IF lEM + cOut := Stuff( cOut, nEM, Len( "" ), "*" ) + ENDIF + IF lIT + cOut := Stuff( cOut, nIT, Len( "" ), "_" ) + ENDIF + + cText := cOut + + hb_cdpSelect( cdp ) + ENDIF FOR EACH idx IN hb_ATokens( hb_defaultValue( cFormat, "" ), "," ) DESCEND IF ! Empty( idx ) @@ -301,12 +569,18 @@ METHOD Append( cText, cFormat ) CLASS GenerateHTML cText := hb_StrShrink( cText, Len( hb_eol() ) ) ENDDO - hb_vfWrite( ::hFile, cText + hb_eol() ) - + ::cFile += cText ENDIF RETURN self +METHOD Append( cText, cFormat, lCode ) CLASS GenerateHTML + + ::AppendInline( cText, cFormat, lCode ) + ::cFile += hb_eol() + + RETURN self + METHOD RecreateStyleDocument( cStyleFile ) CLASS GenerateHTML LOCAL cString @@ -320,4 +594,7 @@ METHOD RecreateStyleDocument( cStyleFile ) CLASS GenerateHTML RETURN self STATIC FUNCTION SymbolToHTMLID( cID ) - RETURN Lower( hb_StrReplace( cID, "_ ", "--" ) ) + RETURN Lower( hb_StrReplace( cID, { ; + "%" => "pct", ; + "_" => "-", ; + " " => "-" } ) ) diff --git a/extras/hbdoc/_gentxt.prg b/extras/hbdoc/_gentxt.prg index de758408fb..415fcdc935 100644 --- a/extras/hbdoc/_gentxt.prg +++ b/extras/hbdoc/_gentxt.prg @@ -49,22 +49,22 @@ CREATE CLASS GenerateAscii INHERIT GenerateText - METHOD NewIndex( cDir, cFilename, cTitle, cDescription ) - METHOD NewDocument( cDir, cFilename, cTitle, cDescription ) + METHOD NewIndex( cDir, cFilename, cTitle, cLang ) + METHOD NewDocument( cDir, cFilename, cTitle, cLang ) ENDCLASS -METHOD NewDocument( cDir, cFilename, cTitle, cDescription ) CLASS GenerateAscii +METHOD NewDocument( cDir, cFilename, cTitle, cLang ) CLASS GenerateAscii ::lContinuous := .T. - ::super:NewDocument( cDir, cFilename, cTitle, cDescription ) + ::super:NewDocument( cDir, cFilename, cTitle,, cLang ) RETURN self -METHOD NewIndex( cDir, cFilename, cTitle, cDescription ) CLASS GenerateAscii +METHOD NewIndex( cDir, cFilename, cTitle, cLang ) CLASS GenerateAscii ::lContinuous := .T. - ::super:NewIndex( cDir, cFilename, cTitle, cDescription ) + ::super:NewIndex( cDir, cFilename, cTitle,, cLang ) RETURN self @@ -72,34 +72,36 @@ CREATE CLASS GenerateText INHERIT TPLGenerate HIDDEN: + METHOD WriteEntry( cCaption, cContent, lPreformatted ) + METHOD AddIndex( oEntry ) + PROTECTED: + VAR lContinuous AS LOGICAL INIT .F. EXPORTED: - METHOD NewIndex( cDir, cFilename, cTitle ) - METHOD NewDocument( cDir, cFilename, cTitle ) + + METHOD NewIndex( cDir, cFilename, cTitle, cLang ) + METHOD NewDocument( cDir, cFilename, cTitle, cLang ) METHOD AddEntry( oEntry ) - METHOD AddIndex( oEntry ) HIDDEN METHOD BeginSection( cSection, cFilename ) #if 0 METHOD EndSection( cSection, cFilename ) /* will use inherited method */ #endif METHOD Generate() - METHOD WriteEntry( cCaption, cEntry, lPreformatted ) HIDDEN - ENDCLASS -METHOD NewDocument( cDir, cFilename, cTitle ) CLASS GenerateText +METHOD NewDocument( cDir, cFilename, cTitle, cLang ) CLASS GenerateText - ::super:NewDocument( cDir, cFilename, cTitle, ".txt" ) + ::super:NewDocument( cDir, cFilename, cTitle, ".txt", cLang ) ::WriteEntry( "", cTitle + hb_eol(), .F. ) RETURN self -METHOD NewIndex( cDir, cFilename, cTitle ) CLASS GenerateText +METHOD NewIndex( cDir, cFilename, cTitle, cLang ) CLASS GenerateText - ::super:NewIndex( cDir, cFilename, cTitle, ".txt" ) + ::super:NewIndex( cDir, cFilename, cTitle, ".txt", cLang ) ::WriteEntry( "", cTitle + hb_eol(), .F. ) RETURN self @@ -117,7 +119,7 @@ METHOD BeginSection( cSection, cFilename ) CLASS GenerateText METHOD AddIndex( oEntry ) CLASS GenerateText - ::WriteEntry( oEntry:FieldName( "NAME" ), oEntry:Name + " - " + oEntry:OneLiner, .F. ) + ::WriteEntry( FieldCaption( "NAME" ), oEntry:fld[ "NAME" ] + " - " + oEntry:fld[ "ONELINER" ], .F. ) RETURN self @@ -128,43 +130,40 @@ METHOD AddEntry( oEntry ) CLASS GenerateText IF ::IsIndex() ::AddIndex( oEntry ) ELSE - FOR EACH item IN oEntry:Fields - IF oEntry:IsField( item[ 1 ] ) .AND. oEntry:IsOutput( item[ 1 ] ) .AND. Len( oEntry:&( item[ 1 ] ) ) > 0 - ::WriteEntry( oEntry:FieldName( item[ 1 ] ), oEntry:&( item[ 1 ] ), oEntry:IsPreformatted( item[ 1 ] ) ) + FOR EACH item IN FieldIDList() + IF oEntry:IsField( item ) .AND. oEntry:IsOutput( item ) .AND. Len( oEntry:fld[ item ] ) > 0 + ::WriteEntry( FieldCaption( item ), oEntry:fld[ item ], oEntry:IsPreformatted( item ) ) ENDIF NEXT IF ! ::lContinuous - hb_vfWrite( ::hFile, hb_BChar( 12 ) + hb_eol() ) + ::cFile += hb_BChar( 12 ) + hb_eol() ENDIF ENDIF RETURN self -METHOD PROCEDURE WriteEntry( cCaption, cEntry, lPreformatted ) CLASS GenerateText +METHOD PROCEDURE WriteEntry( cCaption, cContent, lPreformatted ) CLASS GenerateText LOCAL nIndent - IF ! Empty( cEntry ) + IF ! Empty( cContent ) nIndent := iif( HB_ISNULL( cCaption ), 0, 6 ) IF ! HB_ISNULL( cCaption ) .AND. nIndent > 0 - hb_vfWrite( ::hFile, Space( ::Depth * 6 ) + cCaption + ": " + hb_eol() ) + ::cFile += Space( ::Depth * 6 ) + cCaption + ": " + hb_eol() ENDIF nIndent += ::Depth * 6 - DO WHILE ! HB_ISNULL( cEntry ) - hb_vfWrite( ::hFile, Indent( Parse( @cEntry, hb_eol() ), nIndent, 70, lPreformatted ) ) + DO WHILE ! HB_ISNULL( cContent ) + ::cFile += Indent( Parse( @cContent, hb_eol() ), nIndent, 70, lPreformatted ) ENDDO ENDIF METHOD Generate() CLASS GenerateText IF ::IsIndex() .AND. ! ::lContinuous - hb_vfWrite( ::hFile, hb_BChar( 12 ) + hb_eol() ) + ::cFile += hb_BChar( 12 ) + hb_eol() ENDIF - IF ::hFile != NIL - hb_vfClose( ::hFile ) - ::hFile := NIL - ENDIF + ::super:Generate() RETURN self diff --git a/extras/hbdoc/_genxml.prg b/extras/hbdoc/_genxml.prg index c23302c94e..fe48495314 100644 --- a/extras/hbdoc/_genxml.prg +++ b/extras/hbdoc/_genxml.prg @@ -49,45 +49,46 @@ CREATE CLASS GenerateXML INHERIT TPLGenerate - HIDDEN: - - PROTECTED: - EXPORTED: - METHOD NewIndex( cDir, cFilename, cTitle ) - METHOD NewDocument( cDir, cFilename, cTitle ) + + METHOD NewIndex( cDir, cFilename, cTitle, cLang ) + METHOD NewDocument( cDir, cFilename, cTitle, cLang ) METHOD AddEntry( oEntry ) METHOD AddIndex( oEntry ) HIDDEN METHOD BeginSection( cSection, cFilename ) METHOD EndSection( cSection, cFilename ) METHOD Generate() - METHOD WriteEntry( cCaption, cEntry, lPreformatted ) HIDDEN + HIDDEN: + + METHOD WriteEntry( cCaption, cContent, lPreformatted ) ENDCLASS -METHOD NewDocument( cDir, cFilename, cTitle ) CLASS GenerateXML +METHOD NewDocument( cDir, cFilename, cTitle, cLang ) CLASS GenerateXML - ::super:NewDocument( cDir, cFilename, cTitle, ".xml" ) - hb_vfWrite( ::hFile, '' + hb_eol() ) - hb_vfWrite( ::hFile, '' + hb_eol() ) + ::super:NewDocument( cDir, cFilename, cTitle, ".xml", cLang ) + ::cFile += ; + '' + hb_eol() + ; + '' + hb_eol() RETURN self -METHOD NewIndex( cDir, cFilename, cTitle ) CLASS GenerateXML +METHOD NewIndex( cDir, cFilename, cTitle, cLang ) CLASS GenerateXML - ::super:NewIndex( cDir, cFilename, cTitle, ".xml" ) - hb_vfWrite( ::hFile, '' + hb_eol() ) - hb_vfWrite( ::hFile, '' + hb_eol() ) + ::super:NewIndex( cDir, cFilename, cTitle, ".xml", cLang ) + ::cFile += ; + '' + hb_eol() + ; + '' + hb_eol() RETURN self METHOD BeginSection( cSection, cFilename ) CLASS GenerateXML IF ::Depth == 0 - hb_vfWrite( ::hFile, Replicate( Chr( 9 ), ::Depth ) + '
' + hb_eol() ) + ::cFile += Replicate( Chr( 9 ), ::Depth ) + '
' + hb_eol() ELSE - hb_vfWrite( ::hFile, Replicate( Chr( 9 ), ::Depth ) + '
' + hb_eol() ) + ::cFile += Replicate( Chr( 9 ), ::Depth ) + '
' + hb_eol() ENDIF ::Depth++ @@ -98,13 +99,13 @@ METHOD EndSection( cSection, cFilename ) CLASS GenerateXML HB_SYMBOL_UNUSED( cSection ) HB_SYMBOL_UNUSED( cFilename ) ::Depth-- - hb_vfWrite( ::hFile, Replicate( Chr( 9 ), ::Depth ) + '
' + hb_eol() ) + ::cFile += Replicate( Chr( 9 ), ::Depth ) + '
' + hb_eol() RETURN self METHOD AddIndex( oEntry ) CLASS GenerateXML - ::WriteEntry( "ENTRY", oEntry:Name + " - " + oEntry:OneLiner, .F. ) + ::WriteEntry( "ENTRY", oEntry:fld[ "NAME" ] + " - " + oEntry:fld[ "ONELINER" ], .F. ) RETURN self @@ -115,43 +116,41 @@ METHOD AddEntry( oEntry ) CLASS GenerateXML IF ::IsIndex() ::AddIndex( oEntry ) ELSE - hb_vfWrite( ::hFile, '' + hb_eol() ) + ::cFile += '' + hb_eol() ::Depth++ - FOR EACH item IN oEntry:Fields - ::WriteEntry( item[ 1 ], oEntry:&( item[ 1 ] ), oEntry:IsPreformatted( item[ 1 ] ) ) + FOR EACH item IN FieldIDList() + ::WriteEntry( item, oEntry:fld[ item ], oEntry:IsPreformatted( item ) ) NEXT ::Depth-- - hb_vfWrite( ::hFile, '' + hb_eol() ) + ::cFile += '' + hb_eol() ENDIF RETURN self METHOD Generate() CLASS GenerateXML - hb_vfWrite( ::hFile, '' + hb_eol() ) + ::cFile += '' + hb_eol() - IF ::hFile != NIL - hb_vfClose( ::hFile ) - ::hFile := NIL - ENDIF + ::super:Generate() RETURN self -METHOD PROCEDURE WriteEntry( cCaption, cEntry, lPreformatted ) CLASS GenerateXML +METHOD PROCEDURE WriteEntry( cCaption, cContent, lPreformatted ) CLASS GenerateXML - IF ! Empty( cEntry ) + IF ! Empty( cContent ) - IF hb_eol() $ cEntry - cEntry := hb_eol() + cEntry + IF hb_eol() $ cContent + cContent := hb_eol() + cContent ENDIF - hb_vfWrite( ::hFile, Replicate( Chr( 9 ), ::Depth ) + "<" + cCaption + iif( lPreformatted, ' preformatted="yes"', "" ) + ">" ) - hb_vfWrite( ::hFile, hb_StrReplace( cEntry, { ; - "&" => "&", ; - '"' => """, ; - "<" => "<", ; - ">" => ">" } ) ) - hb_vfWrite( ::hFile, /* Replicate( Chr( 9 ), ::Depth ) + */ "" + hb_eol() ) + ::cFile += ; + Replicate( Chr( 9 ), ::Depth ) + "<" + cCaption + iif( lPreformatted, ' preformatted="yes"', "" ) + ">" + ; + hb_StrReplace( cContent, { ; + "&" => "&", ; + '"' => """, ; + "<" => "<", ; + ">" => ">" } ) + ; + "" + hb_eol() ENDIF RETURN diff --git a/extras/hbdoc/_tmplate.prg b/extras/hbdoc/_tmplate.prg deleted file mode 100644 index 8c711fd5f6..0000000000 --- a/extras/hbdoc/_tmplate.prg +++ /dev/null @@ -1,232 +0,0 @@ -/* - * Document generator, templates - * - * Copyright 2009 April White - * Copyright 1999-2003 Luiz Rafael Culik (Portions of this project are based on hbdoc) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this software; see the file COPYING.txt. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307 USA (or visit the web site https://www.gnu.org/). - * - * As a special exception, the Harbour Project gives permission for - * additional uses of the text contained in its release of Harbour. - * - * The exception is that, if you link the Harbour libraries with other - * files to produce an executable, this does not by itself cause the - * resulting executable to be covered by the GNU General Public License. - * Your use of that executable is in no way restricted on account of - * linking the Harbour library code into it. - * - * This exception does not however invalidate any other reasons why - * the executable file might be covered by the GNU General Public License. - * - * This exception applies only to the code released by the Harbour - * Project under the name Harbour. If you copy code from other - * Harbour Project or Free Software Foundation releases into a copy of - * Harbour, as the General Public License permits, the exception does - * not apply to the code that you add in this way. To avoid misleading - * anyone as to the status of such modified files, you must delete - * this exception notice from them. - * - * If you write modifications of your own for Harbour, it is your choice - * whether to permit this exception to apply to your modifications. - * If you do not wish that, delete this exception notice. - * - */ - -#include "hbdoc.ch" - -#include "hbclass.ch" - -/* a class that will hold one entry */ -CREATE CLASS Entry - - EXPORTED: - - CLASS VAR Fields AS ARRAY INIT { ; - { "DOC", "Doc" }, ; - { "TEMPLATE", "Template" }, ; - { "NAME", "" }, ; - { "CATEGORY", "Category" }, ; - { "SUBCATEGORY", "Sub category" }, ; - { "ONELINER", "" }, ; - { "SYNTAX", "Syntax" }, ; - { "ARGUMENTS", "Argument(s)" }, ; - { "RETURNS", "Returns" }, ; - { "DESCRIPTION", "Description" }, ; - { "DATALINK", "Data link" }, ; - { "DATANOLINK", "Data no link" }, ; - { "METHODSLINK", "Methods link" }, ; - { "METHODSNOLINK","Methods no link" }, ; - { "EXAMPLES", "Example(s)" }, ; - { "TESTS", "Test(s)" }, ; - { "STATUS", "Status" }, ; /* ::hConstraint[ "status" ] is the constraint list */ - { "COMPLIANCE", "Compliance" }, ; /* ::hConstraint[ "compliance" ] is the constraint list */ - { "PLATFORMS", "Platform(s)" }, ; /* ::hConstraint[ "platforms" ] is the constraint list */ - { "FILES", "File(s)" }, ; - { "SEEALSO", "See also" }, ; - { "END", "End" } } - -#define _S TPL_START -#define _E TPL_END -#define _T TPL_TEMPLATE -#define _R TPL_REQUIRED -#define _O TPL_OPTIONAL -#define _P TPL_PREFORMATTED -#define _U TPL_OUTPUT - - /* the columns of this array correspond to the elements of Fields */ - CLASS VAR Templates AS ARRAY INIT { ; - { "Template" , { _S, _T, 0+_U, 0, _O , 0+_U, 0+_U, 0+_U, 0+_U, 0+_U, 0+_U, 0+_U, 0+_U, 0+_U, 0 +_U, 0 +_U, 0+_U, 0+_U, 0+_U, 0+_U, 0+_U, _E } }, ; - { "Document" , { _S, _T, _R+_U, _R, _O+_U, _O+_U, 0+_U, 0+_U, 0+_U, _R+_U, 0+_U, 0+_U, 0+_U, 0+_U, 0 +_U, 0 +_U, 0+_U, 0+_U, _O+_U, _O+_U, _O+_U, _E } }, ; - { "Function" , { _S, _T, _R+_U, _R, _R , _O+_U, _O+_U, _O+_U, _O+_U, _O+_U, 0+_U, 0+_U, 0+_U, 0+_U, _P+_O+_U, _P+_O+_U, _O+_U, _O+_U, _O+_U, _O+_U, _O+_U, _E } }, ; - { "C Function" , { _S, _T, _R+_U, _R, _R , _O+_U, _O+_U, _O+_U, _O+_U, _O+_U, 0+_U, 0+_U, 0+_U, 0+_U, _P+_O+_U, _P+_O+_U, _O+_U, _O+_U, _O+_U, _O+_U, _O+_U, _E } }, ; - { "Procedure" , { _S, _T, _R+_U, _R, _R , _O+_U, _O+_U, _O+_U, 0, _O+_U, 0+_U, 0+_U, 0+_U, 0+_U, _P+_O+_U, _P+_O+_U, _O+_U, _O+_U, _O+_U, _O+_U, _O+_U, _E } }, ; - { "Command" , { _S, _T, _R+_U, _R, _R , _O+_U, _R+_U, _R+_U, 0+_U, _R+_U, 0+_U, 0+_U, 0+_U, 0+_U, _P+_O+_U, _P+_O+_U, _O+_U, _O+_U, _O+_U, _O+_U, _O+_U, _E } }, ; - { "Class" , { _S, _T, _R+_U, _R, _R , _O+_U, _R+_U, _R+_U, _R+_U, _R+_U, _O+_U, _O+_U, _O+_U, _O+_U, _P+_O+_U, _P+_O+_U, _O+_U, _O+_U, _O+_U, _O+_U, _O+_U, _E } }, ; - { "Class method" , { _S, _T, _R+_U, _R, _R , _O+_U, _R+_U, _R+_U, _R+_U, _R+_U, 0+_U, 0+_U, 0+_U, 0+_U, _P+_O+_U, 0 +_U, 0+_U, 0+_U, 0+_U, 0+_U, _O+_U, _E } }, ; - { "Class data" , { _S, _T, _R+_U, _R, _R , _O+_U, _R+_U, 0+_U, 0+_U, _R+_U, 0+_U, 0+_U, 0+_U, 0+_U, _P+_O+_U, 0 +_U, 0+_U, 0+_U, 0+_U, 0+_U, _O+_U, _E } }, ; - { "Run time error", { _S, _T, _R+_U, _R, 0 , _O+_U, 0+_U, 0+_U, 0+_U, _R+_U, 0+_U, 0+_U, 0+_U, 0+_U, _P+_O+_U, 0 +_U, 0+_U, _O+_U, 0+_U, 0+_U, _O+_U, _E } } } - - METHOD New( cType, hConstraint ) CONSTRUCTOR - METHOD IsField( c, nType ) - METHOD IsTemplate( cType ) - METHOD SetTemplate( cTemplate ) - METHOD IsConstraint( cSectionName, cSection ) - METHOD IsComplete( cIncompleteFielsList ) - METHOD IsPreformatted( cField ) - METHOD IsRequired( cField ) - METHOD IsOptional( cField ) - METHOD IsOutput( cField ) - METHOD FieldName( cField ) - METHOD CategoryIndex( cCategory ) - METHOD SubcategoryIndex( cCategory, cSubcategory ) - - VAR Group AS ARRAY - VAR filename AS STRING - VAR type_ AS STRING - VAR sourcefile_ AS STRING - VAR sourcefileversion_ AS STRING - VAR uid_ AS STRING - VAR hConstraint AS HASH - - CLASS VAR uid__ AS INTEGER INIT 0 - -ENDCLASS - -METHOD New( cType, hConstraint ) CLASS Entry - - ::hConstraint := hConstraint - - ::uid_ := hb_ntos( ++::uid__ ) - IF ! __objHasData( self, ::Fields[ 1 ][ 1 ] ) - AEval( ::Fields, {| a | __objAddData( self, a[ 1 ] ) } ) - ENDIF - IF HB_ISSTRING( cType ) - ::Group := ::Templates[ AScan( ::Templates, {| a | Upper( a[ 1 ] ) == Upper( cType ) } ) ][ 2 ] - ENDIF - - RETURN self - -METHOD IsField( c, nType ) CLASS Entry - - LOCAL idx - LOCAL lResult - - IF ( lResult := ( idx := AScan( ::Fields, {| a | Upper( a[ 1 ] ) == Upper( c ) } ) ) > 0 ) - IF ::Group[ idx ] == 0 - lResult := .F. - ELSEIF HB_ISNUMERIC( nType ) .AND. hb_bitAnd( ::Group[ idx ], nType ) != nType - lResult := .F. - ENDIF - ENDIF - - RETURN lResult - -METHOD IsTemplate( cType ) CLASS Entry - RETURN AScan( ::Templates, {| a | Upper( a[ 1 ] ) == Upper( cType ) } ) > 0 - -METHOD SetTemplate( cTemplate ) CLASS Entry - - LOCAL aData := Array( Len( ::Fields ) ) - LOCAL idx - - ::Group := ::Templates[ AScan( ::Templates, {| a | Upper( a[ 1 ] ) == Upper( cTemplate ) } ) ][ 2 ] - FOR idx := 1 TO Len( aData ) - IF ::Fields[ idx ][ 1 ] == "TEMPLATE" - aData[ idx ] := { ::Fields[ idx ][ 1 ], cTemplate } - ELSE - aData[ idx ] := { ::Fields[ idx ][ 1 ], iif( ::Group[ idx ] == TPL_REQUIRED, NIL, "" ) } - ENDIF - NEXT - __objSetValueList( self, aData ) - - RETURN self - -METHOD IsConstraint( cSectionName, cSection ) CLASS Entry - - LOCAL lResult - LOCAL idx := AScan( ::Fields, {| a | a[ 1 ] == cSectionName } ) - - IF hb_bitAnd( ::Group[ idx ], hb_bitAnd( TPL_REQUIRED, TPL_OPTIONAL ) ) == 0 - lResult := .T. - ELSEIF cSectionName $ ::hConstraint - lResult := ; - hb_AScan( ::hConstraint[ cSectionName ], cSection, , , .T. ) .OR. ; - hb_AScan( ::hConstraint[ cSectionName ], Parse( cSection, "," ), , , .T. ) - ELSE - lResult := .T. - ENDIF - - RETURN lResult - -METHOD IsComplete( cIncompleteFielsList ) CLASS Entry - - LOCAL lResult := .T. - LOCAL idx - - cIncompleteFielsList := "" - - FOR idx := 1 TO Len( ::Fields ) - IF hb_bitAnd( ::Group[ idx ], TPL_REQUIRED ) != 0 .AND. Empty( ::&( ::Fields[ idx ][ 1 ] ) ) - cIncompleteFielsList += "," + ::Fields[ idx ][ 1 ] - lResult := .F. - ENDIF - NEXT - - cIncompleteFielsList := SubStr( cIncompleteFielsList, 2 ) - - RETURN lResult - -METHOD IsPreformatted( cField ) CLASS Entry - RETURN hb_bitAnd( ::Group[ AScan( ::Fields, {| a | a[ 1 ] == cField } ) ], TPL_PREFORMATTED ) != 0 - -METHOD IsRequired( cField ) CLASS Entry - RETURN hb_bitAnd( ::Group[ AScan( ::Fields, {| a | a[ 1 ] == cField } ) ], TPL_REQUIRED ) != 0 - -METHOD IsOptional( cField ) CLASS Entry - RETURN hb_bitAnd( ::Group[ AScan( ::Fields, {| a | a[ 1 ] == cField } ) ], TPL_OPTIONAL ) != 0 - -METHOD IsOutput( cField ) CLASS Entry - RETURN hb_bitAnd( ::Group[ AScan( ::Fields, {| a | a[ 1 ] == cField } ) ], TPL_OUTPUT ) != 0 - -METHOD FieldName( cField ) CLASS Entry - RETURN ::Fields[ AScan( ::Fields, {| a | a[ 1 ] == cField } ) ][ 2 ] - -METHOD CategoryIndex( cCategory ) CLASS Entry - RETURN AScan( ::hConstraint[ "categories" ], {| a | HB_ISARRAY( a ) .AND. Len( a ) >= 1 .AND. a[ 1 ] == cCategory } ) - -METHOD SubcategoryIndex( cCategory, cSubcategory ) CLASS Entry - RETURN ::CategoryIndex( cCategory ) >= 1 .AND. ; - hb_AScan( ::hConstraint[ "categories" ][ ::CategoryIndex( cCategory ) ][ 2 ], cSubcategory, , , .T. ) diff --git a/extras/hbdoc/hbdoc.ch b/extras/hbdoc/hbdoc.ch deleted file mode 100644 index e755bbb39d..0000000000 --- a/extras/hbdoc/hbdoc.ch +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Document generator include file - * - * Copyright 2009 April White - * Copyright 1999-2003 Luiz Rafael Culik (Portions of this project are based on hbdoc) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this software; see the file COPYING.txt. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307 USA (or visit the web site https://www.gnu.org/). - * - * As a special exception, the Harbour Project gives permission for - * additional uses of the text contained in its release of Harbour. - * - * The exception is that, if you link the Harbour libraries with other - * files to produce an executable, this does not by itself cause the - * resulting executable to be covered by the GNU General Public License. - * Your use of that executable is in no way restricted on account of - * linking the Harbour library code into it. - * - * This exception does not however invalidate any other reasons why - * the executable file might be covered by the GNU General Public License. - * - * This exception applies only to the code released by the Harbour - * Project under the name Harbour. If you copy code from other - * Harbour Project or Free Software Foundation releases into a copy of - * Harbour, as the General Public License permits, the exception does - * not apply to the code that you add in this way. To avoid misleading - * anyone as to the status of such modified files, you must delete - * this exception notice from them. - * - * If you write modifications of your own for Harbour, it is your choice - * whether to permit this exception to apply to your modifications. - * If you do not wish that, delete this exception notice. - * - */ - -#ifndef HBDOC_CH_ -#define HBDOC_CH_ - -// Template definitions -#define TPL_START 1 -#define TPL_END 2 -#define TPL_REQUIRED 4 // intentionally has a 'required' and 'optional' flag -#define TPL_OPTIONAL 8 -#define TPL_PREFORMATTED 16 -#define TPL_CONSTRAINTLIST 32 -#define TPL_TEMPLATE 64 -#define TPL_OUTPUT 128 - -#endif diff --git a/extras/hbdoc/hbdoc.css b/extras/hbdoc/hbdoc.css index c8f06885cd..ed8303c562 100644 --- a/extras/hbdoc/hbdoc.css +++ b/extras/hbdoc/hbdoc.css @@ -1,40 +1,178 @@ body { - font-family: Arial, sans-serif; - font-size: 14px; - line-height: 18px; + background-color: #f8f8f8; + font-family: 'Source Sans Pro', Arial, sans-serif; + font-size: 14pt; + line-height: 150%; + margin: 0; + padding: 0; } -.name { - font-size: 18px; +header { + -position: fixed; + top: 0; + background-color: #0974c5; + color: #f0f0f0; + border: none; + padding: 0 20px; + margin: 0; +} + +footer { + background: #333; + color: #bbb; + font-size: 75%; + line-height: 150%; + margin: auto; + padding: .6em 1em; + height: 90px; + text-align: center; + width: auto; +} + +footer a { + color: #ddd; + text-decoration: none; +} + +footer a:hover { + border: none; + color: #f8f8f8; + transition: color .25s; +} + +footer a:active { + color: #f8f8f8; +} + +main { + margin: 0 10px; +} + +main section:first-child { + -margin-top: 60px; + border-top: 0; +} + +a { + text-decoration: none; +} + +a:hover { + border-style: none none solid; + border-width: 0 0 1px; + border-color: #000088; + border-color: rgba(0, 0, 255, .4); +} + +hr { + border: 0; + border-bottom: 1px dotted rgba(0, 0, 0, .1); + width: 75%; + margin-left: 0; +} + +h1 { + font-size: 130%; + font-weight: normal; + padding: 14px 0; + margin: 0; +} + +section { + border-top: 1px solid rgba(0, 0, 0, .1); + margin-top: 0; + margin-bottom: 0; + padding: 1em .6em; +} + +h4 { + color: #095fa8; + font-size: 125%; + margin-top: 0; + margin-bottom: 14px; +} + +pre { + background-color: #f2f2f2; + font-size: 12pt; + padding: 16px; + overflow: scroll; +} + +pre, code, .d-t { + font-family: Hack, Consolas, Menlo, 'Droid Sans Mono', 'Source Code Pro', 'Liberation Mono', 'Oxygen Mono', 'Andale Mono', monospace; +} + +code, .d-t { + font-size: 95%; +} + +p { + margin-top: 1em; + margin-bottom: 1em; +} + +.d-it div:first-child p { + margin-top: .2em; +} + +.d-it div:last-child p { + margin-bottom: .2em; +} + +.d-t { + border-top: 1px solid rgba(0, 0, 0, .1); + border-bottom: 1px solid rgba(0, 0, 0, .1); + overflow: scroll; + margin: 16px; + width: 80%; +} + +.d-t1 div:first-child { + border-top: 0; + background-color: #333; + color: #f8f8f8; +} + +.d-t2 div:nth-child(2) { + background-color: #333; + color: #f8f8f8; +} + +.d-na { + font-size: 100%; + margin-left: 0; + padding-top: 0; + padding-bottom: 8px; +} + +.d-ol { + font-weight: bold; + font-size: 115%; + margin-left: 1em; + margin-top: 0px; + margin-bottom: 14px; +} + +.d-d { + color: #095fa8; font-weight: bold; margin-left: 0; padding-top: 0; - padding-bottom: 4px; + padding-bottom: 8px; } -.oneliner { - font-style: italic; - margin-bottom: 12px; +.d-it { + margin-left: 1em; + padding-bottom: 8px; } -.itemtitle { - font-weight: bold; - margin-left: 0; - padding-top: 0; - padding-bottom: 4px; +.d-ex { + margin-left: 1em; + margin-right: 1em; } -.itemtext { - margin-left: 10px; - padding-bottom: 4px; -} - -.examples { - margin-left: 10px; - padding-bottom: 4px; -} - -.tests { - margin-left: 10px; - padding-bottom: 4px; +.d-te { + margin-left: 1em; + padding-bottom: 8px; } diff --git a/extras/hbdoc/hbdoc.hbp b/extras/hbdoc/hbdoc.hbp index 8251c2aa1d..01d8411334 100644 --- a/extras/hbdoc/hbdoc.hbp +++ b/extras/hbdoc/hbdoc.hbp @@ -11,7 +11,6 @@ _genbase.prg _genhtml.prg _gentxt.prg _genxml.prg -_tmplate.prg # NOTE: hbdoc doesn't work from other locations than # the current one, so we don't install it yet. @@ -19,7 +18,6 @@ _tmplate.prg # default -run params useful to update the online docs # on the Harbour website --runflag=-format=html --runflag=-output-single +-runflag=-html {allgcc}-ldflag=-fno-lto diff --git a/extras/hbdoc/hbdoc.prg b/extras/hbdoc/hbdoc.prg index afcd10f1ea..52f4604c94 100644 --- a/extras/hbdoc/hbdoc.prg +++ b/extras/hbdoc/hbdoc.prg @@ -60,7 +60,7 @@ TODO: - look for embedded 'fixed' - done - recognize and accept ; see macro.txt output esp. hb_setmacro + done - recognize and accept ; see macro.txt output esp. hb_SetMacro() done - list 'compliance' and 'platforms' within help done - list 'category' and 'subcategory' types on help screen done - load into memory (class and) method template @@ -70,11 +70,9 @@ */ #include "directry.ch" -#include "fileio.ch" +#include "hbclass.ch" #include "hbver.ch" -#include "hbdoc.ch" - ANNOUNCE HB_GTSYS REQUEST HB_GT_CGI_DEFAULT @@ -86,20 +84,42 @@ REQUEST HB_CODEPAGE_UTF8EX #define YesOrNo( b ) iif( b, "yes", "no" ) #define IsDefault( b ) iif( b, "; default", "" ) +#define TPL_START 1 +#define TPL_END 2 +#define TPL_REQUIRED 4 // intentionally has a 'required' and 'optional' flag +#define TPL_OPTIONAL 8 +#define TPL_PREFORMATTED 16 +#define TPL_CONSTRAINTLIST 32 +#define TPL_TEMPLATE 64 +#define TPL_OUTPUT 128 + STATIC sc_aExclusions := { "class_tp.txt", "hdr_tpl.txt" } +STATIC sc_hFields +STATIC sc_hTemplates STATIC sc_hConstraint STATIC s_hSwitches +STATIC s_hComponent := { => } +STATIC s_generators PROCEDURE Main( ... ) LOCAL aArgs := hb_AParams() - LOCAL idx, idx2, item, item4 - LOCAL arg + LOCAL idx, item, item4 + LOCAL arg, tmp LOCAL cArgName LOCAL cFormat LOCAL oDocument, oIndex LOCAL aContent + LOCAL generatorClass + + s_generators := { ; + "all" =>, ; + "html" => @GenerateHTML(), ; + "ascii" => @GenerateAscii(), ; + "text" => @GenerateText(), ; + "xml" => @GenerateXML() } + /* Setup input CP of the translation */ hb_cdpSelect( "UTF8EX" ) @@ -109,34 +129,26 @@ PROCEDURE Main( ... ) init_Templates() + /* configuration settings, values, etc */ ; s_hSwitches := { ; - /* configuration settings, values, etc */ ; "basedir" => BASE_DIR, ; + "lang" => "en", ; "doc" => .T., ; "source" => .F., ; "contribs" => .T., ; "format" => {}, ; - "output" => "category", ; + "output" => "single", ; "include-doc-source" => .F., ; - "include-doc-version" => .F., ; "immediate-errors" => .F., ; /* internal settings, values, etc */ ; "DELIMITER" => "$", ; - "format-list" => { "text", "ascii", "html", "html2", "xml", "rtf", "hpc", "ngi", "os2", "chm", "ch2", "pdf", "trf", "doc", "dbf", "all" }, ; - "hbextern.ch" => {}, ; + "hHBX" => {}, ; "in hbextern" => {}, ; - "not in hbextern" => {}, ; - "" => NIL } + "not in hbextern" => {} } - /* remove formats that have not been implemented yet */ - FOR EACH item IN s_hSwitches[ "format-list" ] DESCEND - IF item == "all" - ELSEIF ! hb_IsFunction( "Generate" + item ) - hb_ADel( item:__enumBase(), item:__enumIndex(), .T. ) - ENDIF - NEXT - - IF Len( aArgs ) == 0 .OR. aArgs[ 1 ] == "-?" .OR. aArgs[ 1 ] == "/?" .OR. aArgs[ 1 ] == "--help" + IF Empty( aArgs ) .OR. ; + aArgs[ 1 ] == "-h" .OR. ; + aArgs[ 1 ] == "--help" ShowHelp( , aArgs ) RETURN ENDIF @@ -153,24 +165,23 @@ PROCEDURE Main( ... ) DO CASE CASE cArgName == "-source" ; s_hSwitches[ "basedir" ] := hb_DirSepAdd( arg ) + CASE cArgName == "-lang" ; s_hSwitches[ "lang" ] := Lower( arg ) CASE cArgName == "-format" - IF arg == "" .OR. hb_AScan( s_hSwitches[ "format-list" ], arg, , , .T. ) == 0 + IF arg == "" .OR. ! arg $ s_generators ShowHelp( "Unrecognized format option '" + arg + "'" ) RETURN ELSEIF arg == "all" - s_hSwitches[ "format" ] := s_hSwitches[ "format-list" ] + s_hSwitches[ "format" ] := hb_HKeys( s_generators ) ELSE AAdd( s_hSwitches[ "format" ], arg ) ENDIF - CASE cArgName == "-output-single" ; s_hSwitches[ "output" ] := "single" - CASE cArgName == "-output-category" ; s_hSwitches[ "output" ] := "category" - CASE cArgName == "-output-entry" ; s_hSwitches[ "output" ] := "entry" + CASE hb_LeftEq( cArgName, "-output-" ) + s_hSwitches[ "output" ] := SubStr( cArgName, Len( "-output-" ) + 1 ) CASE cArgName == "-include-doc-source" ; s_hSwitches[ "include-doc-source" ] := .T. - CASE cArgName == "-include-doc-version" ; s_hSwitches[ "include-doc-version" ] := .T. OTHERWISE - IF hb_AScan( s_hSwitches[ "format-list" ], SubStr( cArgName, 2 ), , , .T. ) > 0 + IF SubStr( cArgName, 2 ) $ s_generators IF SubStr( cArgName, 2 ) == "all" - s_hSwitches[ "format" ] := s_hSwitches[ "format-list" ] + s_hSwitches[ "format" ] := hb_HKeys( s_generators ) ELSE AAdd( s_hSwitches[ "format" ], SubStr( cArgName, 2 ) ) ENDIF @@ -182,89 +193,92 @@ PROCEDURE Main( ... ) ENDIF NEXT - /* load hbextern.ch */ - FileEval( s_hSwitches[ "basedir" ] + "include" + hb_ps() + "hbextern.ch", ; - {| c | iif( hb_LeftEq( c, "EXTERNAL " ), ; - AAdd( s_hSwitches[ "hbextern.ch" ], SubStr( c, Len( "EXTERNAL " ) + 1 ) ), ; - ) } ) - ASort( s_hSwitches[ "hbextern.ch" ] ) + s_hSwitches[ "hHBX" ] := { => } + hb_HCaseMatch( s_hSwitches[ "hHBX" ], .F. ) + aContent := ProcessDirs( s_hSwitches[ "hHBX" ] ) - aContent := {} - AEval( ; - {; - s_hSwitches[ "basedir" ] + "doc" + hb_ps() + "en", ; - iif( s_hSwitches[ "source" ], s_hSwitches[ "basedir" ] + "src", NIL ), ; - iif( s_hSwitches[ "contribs" ], s_hSwitches[ "basedir" ] + "contrib", NIL ), ; - }, ; - {| c | iif( Empty( c ),, ProcessDir( c, @aContent ) ) } ) +#if 0 + hb_MemoWrit( "hbx.json", hb_jsonEncode( s_hSwitches[ "hHBX" ], .T. ) ) + hb_MemoWrit( "cats.json", hb_jsonencode( sc_hConstraint[ "categories" ], .T. ) ) +#endif OutStd( hb_ntos( Len( aContent ) ), "items found" + hb_eol() ) OutStd( hb_eol() ) - ASort( aContent, , , {| oL, oR | ; - hb_ntos( oL:CategoryIndex( oL:Category ) ) + " " + hb_ntos( oL:SubcategoryIndex( oL:Category, oL:Subcategory ) ) + Chr( 1 ) + oL:Name + " " ; + ASort( aContent,,, {| oL, oR | ; + PadR( SortWeight( oL:fld[ "CATEGORY" ] ), 20 ) + ; + PadR( SortWeight( oL:fld[ "SUBCATEGORY" ] ), 20 ) + ; + PadR( oL:fld[ "NAME" ], 50 ) ; <= ; - hb_ntos( oR:CategoryIndex( oR:Category ) ) + " " + hb_ntos( oR:SubcategoryIndex( oR:Category, oR:Subcategory ) ) + Chr( 1 ) + oR:Name + " " ; + PadR( SortWeight( oR:fld[ "CATEGORY" ] ), 20 ) + ; + PadR( SortWeight( oR:fld[ "SUBCATEGORY" ] ), 20 ) + ; + PadR( oR:fld[ "NAME" ], 50 ) ; } ) - /* TODO: what is this for? it is sorting the category sub-arrays and removing empty (?) sub-arrays, but why? */ - FOR EACH item IN sc_hConstraint[ "categories" ] - IF ! Empty( item ) - IF Len( item ) == 4 /* category, list of subcategory, list of entries, handle */ - FOR idx2 := Len( item[ 3 ] ) TO 1 STEP -1 - IF HB_ISARRAY( item[ 3 ][ idx2 ] ) - ASort( item[ 3 ][ idx2 ], , , ; - {| oL, oR | ; - hb_ntos( oL:CategoryIndex( oL:Category ) ) + " " + hb_ntos( oL:SubcategoryIndex( oL:Category, oL:Subcategory ) ) + " " + oL:Name ; - <= ; - hb_ntos( oR:CategoryIndex( oR:Category ) ) + " " + hb_ntos( oR:SubcategoryIndex( oR:Category, oR:Subcategory ) ) + " " + oR:Name ; - } ) - ELSE - hb_ADel( item[ 2 ], idx2, .T. ) - hb_ADel( item[ 3 ], idx2, .T. ) - ENDIF - NEXT - ELSE - OutStd( "Index", item:__enumIndex(), "is not length 4 but rather", Len( item ), hb_eol() ) - ENDIF - ENDIF - NEXT - - IF Len( s_hSwitches[ "format" ] ) == 0 - s_hSwitches[ "format" ] := { "text" } - ENDIF - FOR EACH cFormat IN s_hSwitches[ "format" ] - IF !( cFormat == "all" ) + + IF HB_ISEVALITEM( generatorClass := hb_HGetDef( s_generators, Lower( cFormat ) ) ) + OutStd( "Output as", cFormat + hb_eol() ) DO CASE CASE s_hSwitches[ "output" ] == "single" - oDocument := &( "Generate" + cFormat + "()" ):NewDocument( cFormat, "harbour", "Harbour Reference Guide" ) + oDocument := Eval( generatorClass ):NewDocument( cFormat, "harbour", "Harbour Reference Guide", s_hSwitches[ "lang" ] ) FOR EACH item IN aContent - IF Right( item:sourcefile_, Len( "1stread.txt" ) ) == "1stread.txt" + IF item:_type == "harbour" oDocument:AddEntry( item ) - EXIT ENDIF NEXT - FOR EACH item IN aContent - IF !( Right( item:sourcefile_, Len( "1stread.txt" ) ) == "1stread.txt" ) - oDocument:AddEntry( item ) + FOR EACH tmp IN ASort( hb_HKeys( s_hComponent ) ) + IF !( tmp == "harbour" ) + FOR EACH item IN aContent + IF item:_type == tmp .AND. ; + oDocument:AddEntry( item ) + ENDIF + NEXT ENDIF NEXT oDocument:Generate() oDocument := NIL - CASE s_hSwitches[ "output" ] == "category" + CASE s_hSwitches[ "output" ] == "component" - oIndex := &( "Generate" + cFormat + "()" ):NewIndex( cFormat, "harbour", "Harbour Reference Guide" ) + oDocument := Eval( generatorClass ):NewDocument( cFormat, "harbour", "Harbour Reference Guide", s_hSwitches[ "lang" ] ) FOR EACH item IN aContent - IF Right( item:sourcefile_, Len( "1stread.txt" ) ) == "1stread.txt" + IF item:_type == "harbour" + oDocument:AddEntry( item ) + ENDIF + NEXT + + oDocument:Generate() + + FOR EACH tmp IN ASort( hb_HKeys( s_hComponent ) ) + IF !( tmp == "harbour" ) + oDocument := Eval( generatorClass ):NewDocument( cFormat, tmp, hb_StrFormat( "Harbour Reference Guide — %1$s", tmp ), s_hSwitches[ "lang" ] ) + + FOR EACH item IN aContent + IF item:_type == tmp .AND. ; + oDocument:AddEntry( item ) + ENDIF + NEXT + + oDocument:Generate() + ENDIF + NEXT + + oDocument := NIL + + CASE s_hSwitches[ "output" ] == "category" + + oIndex := Eval( generatorClass ):NewIndex( cFormat, "harbour", "Harbour Reference Guide" ) + + FOR EACH item IN aContent + IF Right( item:_sourcefile, Len( "1stread.txt" ) ) == "1stread.txt" IF oIndex != NIL oIndex:AddEntry( item ) ENDIF @@ -273,68 +287,61 @@ PROCEDURE Main( ... ) NEXT FOR EACH item IN sc_hConstraint[ "categories" ] - IF ! Empty( item ) - item[ 4 ] := Filename( item[ 1 ] ) -#if 0 - oIndex:BeginSection( item[ 1 ], item[ 4 ] ) - oIndex:EndSection( item[ 1 ], item[ 4 ] ) -#endif - ENDIF + item[ 3 ] := Filename( item:__enumKey() ) NEXT FOR EACH item IN sc_hConstraint[ "categories" ] - IF ! Empty( item ) - oDocument := &( "Generate" + cFormat + "()" ):NewDocument( cFormat, item[ 4 ], "Harbour Reference Guide - " + item[ 1 ] ) - IF oIndex != NIL - oIndex:BeginSection( item[ 1 ], oDocument:cFilename ) - ENDIF - oDocument:BeginSection( item[ 1 ], oDocument:cFilename ) + oDocument := Eval( generatorClass ):NewDocument( cFormat, item[ 3 ], hb_StrFormat( "Harbour Reference Guide — %1$s", item:__enumKey() ), s_hSwitches[ "lang" ] ) - FOR idx := 1 TO Len( item[ 3 ] ) - IF ! Empty( item[ 3 ][ idx ] ) - ASort( item[ 3 ][ idx ], , , {| oL, oR | oL:Name <= oR:Name } ) - IF Len( item[ 2 ][ idx ] ) > 1 .OR. Len( item[ 2 ][ idx ] ) > 0 - IF oIndex != NIL - oIndex:BeginSection( item[ 2 ][ idx ], oDocument:cFilename ) - ENDIF - oDocument:BeginSection( item[ 2 ][ idx ], oDocument:cFilename ) + IF oIndex != NIL + oIndex:BeginSection( item:__enumKey(), oDocument:cFilename ) + ENDIF + oDocument:BeginSection( item:__enumKey(), oDocument:cFilename ) + + FOR idx := 1 TO Len( item[ 2 ] ) + IF ! Empty( item[ 2 ][ idx ] ) + ASort( item[ 2 ][ idx ], , , {| oL, oR | oL:fld[ "NAME" ] <= oR:fld[ "NAME" ] } ) + IF Len( item[ 1 ][ idx ] ) > 0 + IF oIndex != NIL + oIndex:BeginSection( item[ 1 ][ idx ], oDocument:cFilename ) ENDIF - FOR EACH item4 IN item[ 3 ][ idx ] - IF ! Empty( item4 ) - IF !( Right( item4:sourcefile_, Len( "1stread.txt" ) ) == "1stread.txt" ) - IF oIndex != NIL - oIndex:AddReference( item4 ) - ENDIF - oDocument:AddEntry( item4 ) - IF oIndex != NIL - oDocument:AddReference( "Index", oIndex:cFilename ) - /* this kind of works; the reference is outputed but it is not what I meant */ - oDocument:AddReference( item[ 1 ], oIndex:cFilename, item[ 4 ] ) - ENDIF + oDocument:BeginSection( item[ 1 ][ idx ], oDocument:cFilename ) + ENDIF + FOR EACH item4 IN item[ 2 ][ idx ] + IF ! Empty( item4 ) + IF !( Right( item4:_sourcefile, Len( "1stread.txt" ) ) == "1stread.txt" ) + IF oIndex != NIL + oIndex:AddReference( item4 ) + ENDIF + oDocument:AddEntry( item4 ) + IF oIndex != NIL + oDocument:AddReference( "Index", oIndex:cFilename ) + /* this kind of works; the reference is outputed but it is not what I meant */ + oDocument:AddReference( item:__enumKey(), oIndex:cFilename, item[ 3 ] ) ENDIF ENDIF - NEXT - IF Len( item[ 2 ][ idx ] ) > 1 .OR. Len( item[ 2 ][ idx ] ) > 0 - IF oIndex != NIL - oIndex:EndSection( item[ 2 ][ idx ], oDocument:cFilename ) - ENDIF - oDocument:EndSection( item[ 2 ][ idx ], oDocument:cFilename ) ENDIF + NEXT + IF Len( item[ 1 ][ idx ] ) > 0 + IF oIndex != NIL + oIndex:EndSection( item[ 1 ][ idx ], oDocument:cFilename ) + ENDIF + oDocument:EndSection( item[ 1 ][ idx ], oDocument:cFilename ) ENDIF - NEXT - IF oIndex != NIL - oIndex:EndSection( item[ 1 ], oDocument:cFilename ) ENDIF - oDocument:EndSection( item[ 1 ], oDocument:cFilename ) - oDocument:Generate() + NEXT + IF oIndex != NIL + oIndex:EndSection( item:__enumKey(), oDocument:cFilename ) ENDIF + oDocument:EndSection( item:__enumKey(), oDocument:cFilename ) + oDocument:Generate() NEXT CASE s_hSwitches[ "output" ] == "entry" FOR EACH item IN aContent - oDocument := &( "Generate" + cFormat + "()" ):NewDocument( cFormat, item:filename, "Harbour Reference Guide" ) + oDocument := Eval( generatorClass ):NewDocument( cFormat, item:_filename, "Harbour Reference Guide", s_hSwitches[ "lang" ] ) IF oIndex != NIL oIndex:AddEntry( item ) ENDIF @@ -358,104 +365,213 @@ PROCEDURE Main( ... ) RETURN -STATIC PROCEDURE ProcessDir( cDir, aContent ) /* this is a recursive procedure */ +STATIC FUNCTION SortWeight( cString ) + SWITCH hb_defaultValue( cString, "" ) + CASE "Document" ; RETURN Chr( 31 ) + "001" + cString /* category */ + CASE "Intro" ; RETURN Chr( 31 ) + "001" + cString /* subcategory */ + CASE "License" ; RETURN Chr( 31 ) + "002" + cString /* subcategory */ + CASE "Compiler" ; RETURN Chr( 31 ) + "003" + cString /* subcategory */ + ENDSWITCH + + RETURN cString + +STATIC FUNCTION ProcessDirs( hAll ) + + LOCAL aContent := {} + LOCAL cDir LOCAL file -#if 0 - OutStd( ">>> " + cDir + hb_eol() ) -#endif + DirLoadHBX( s_hSwitches[ "basedir" ] + "include", hAll ) - cDir += hb_ps() + ProcessDocDir( s_hSwitches[ "basedir" ], "harbour", @aContent ) - FOR EACH file IN hb_vfDirectory( cDir + hb_osFileMask(), "D" ) - IF file[ F_ATTR ] == "D" - IF !( file[ F_NAME ] == "." ) .AND. ; - !( file[ F_NAME ] == ".." ) + IF s_hSwitches[ "contribs" ] - IF s_hSwitches[ "source" ] .OR. s_hSwitches[ "contribs" ] - /* .AND. hb_AScanI( s_aSkipDirs, file[ F_NAME ],,, .T. ) == 0 */ - ProcessDir( cDir + file[ F_NAME ], @aContent ) + cDir := s_hSwitches[ "basedir" ] + "contrib" + + FOR EACH file IN hb_DirScan( cDir,, "D" ) + IF file[ F_ATTR ] == "D" .AND. ; + !( hb_FNameName( hb_DirSepDel( file[ F_NAME ] ) ) == "." ) .AND. ; + !( hb_FNameName( hb_DirSepDel( file[ F_NAME ] ) ) == ".." ) + + DirLoadHBX( cDir + hb_ps() + file[ F_NAME ], hAll ) + + IF ! ProcessDocDir( cDir + hb_ps() + file[ F_NAME ], hb_FNameName( file[ F_NAME ] ), @aContent ) + EXIT ENDIF ENDIF - ELSEIF hb_AScanI( sc_aExclusions, file[ F_NAME ],,, .T. ) == 0 - IF Lower( hb_FNameExt( file[ F_NAME ] ) ) == ".txt" .AND. ; - ! ProcessFile( cDir + file[ F_NAME ], @aContent ) - EXIT - ENDIF - ENDIF - NEXT - - RETURN - -STATIC FUNCTION ProcessFile( cFile, aContent ) - - LOCAL aHandle := { NIL, 0 } /* file handle and position */ - LOCAL cSectionName - LOCAL cVersion - LOCAL o - LOCAL nOldContentLen := Len( aContent ) - - IF ( aHandle[ 1 ] := hb_vfOpen( cFile, FO_READ ) ) == NIL - OutErr( "error: could not open", cFile + hb_eol() ) - RETURN .F. + NEXT ENDIF - cVersion := "" + RETURN aContent - o := Entry():New( "Template", sc_hConstraint ) +STATIC FUNCTION ProcessDocDir( cDir, cComponent, aContent ) - DO WHILE FReadSection( aHandle, @cSectionName, , o ) - IF o:IsField( @cSectionName, TPL_START ) - o := Entry():New( "Template", sc_hConstraint ) - ProcessBlock( aHandle, @aContent, cFile, cSectionName, @cVersion, @o ) + LOCAL aErrMsg := {} + LOCAL aEntry := __hbdoc_LoadDir( cDir, cComponent, aErrMsg ) + + LOCAL hEntry + LOCAL nOldContentLen, tmp + + FOR EACH tmp IN aErrMsg + AddErrorCondition( cDir, tmp ) + NEXT + + IF ! Empty( aEntry ) + +#if 1 + hb_MemoWrit( "_" + aEntry[ 1 ][ "_COMPONENT" ] + ".json", hb_jsonEncode( aEntry, .t. ) ) +#endif + + nOldContentLen := Len( aContent ) + + FOR EACH hEntry IN aEntry + IF Lower( hEntry[ "_LANG" ] ) == s_hSwitches[ "lang" ] + ProcessBlock( hEntry, aContent ) + ENDIF + NEXT + + IF Len( aContent ) > nOldContentLen + OutStd( ">", cDir, "(" + hb_ntos( Len( aContent ) - nOldContentLen ), "items)" + hb_eol() ) ENDIF - ENDDO - hb_vfClose( aHandle[ 1 ] ) - - IF Len( aContent ) > nOldContentLen - OutStd( ">", cFile, "(" + hb_ntos( Len( aContent ) - nOldContentLen ), "items)" + hb_eol() ) ENDIF RETURN .T. -STATIC PROCEDURE ProcessBlock( aHandle, aContent, cFile, cType, cVersion, o ) +STATIC FUNCTION NewLineVoodoo( cSectionIn ) + + LOCAL cSection := "" + LOCAL lPreformatted := .F. + LOCAL lLastPreformatted := .F. + LOCAL nLastIndent := -1 + + LOCAL cLine + + FOR EACH cLine IN hb_ATokens( cSectionIn, .T. ) + + IF Len( AllTrim( cLine ) ) == 0 + IF !( Right( cSection, Len( hb_eol() ) ) == hb_eol() ) + cSection += hb_eol() + ENDIF + nLastIndent := -1 + ELSEIF hb_LeftEq( AllTrim( cLine ), "" .OR. hb_LeftEq( AllTrim( cLine ), '```' ) + IF !( Right( cSection, Len( hb_eol() ) ) == hb_eol() ) .OR. lPreformatted + cSection += hb_eol() + ENDIF + cSection += AllTrim( cLine ) // + hb_eol() + lLastPreformatted := lPreformatted + lPreformatted := .T. + ELSEIF AllTrim( cLine ) == "" .OR. AllTrim( cLine ) == "" + IF !( Right( cSection, Len( hb_eol() ) ) == hb_eol() ) .OR. lPreformatted + cSection += hb_eol() + ENDIF + cSection += AllTrim( cLine ) + hb_eol() + lPreformatted := lLastPreformatted + ELSEIF nLastIndent != ( Len( cLine ) - Len( LTrim( cLine ) ) ) .OR. lPreformatted .OR. Right( cLine, Len( "" ) ) == "" + IF Right( cLine, Len( "" ) ) == "" + cLine := hb_StrShrink( cLine, Len( "" ) ) + ENDIF + nLastIndent := Len( cLine ) - Len( LTrim( cLine ) ) + IF !( Right( cSection, Len( hb_eol() ) ) == hb_eol() ) + cSection += hb_eol() + ENDIF + cSection += iif( lPreformatted, cLine, AllTrim( cLine ) ) + ELSE + cSection += " " + AllTrim( cLine ) + ENDIF + NEXT + + IF hb_LeftEq( cSection, hb_eol() ) + cSection := SubStr( cSection, Len( hb_eol() ) + 1 ) + ENDIF + IF Right( cSection, Len( hb_eol() ) ) == hb_eol() + cSection := hb_StrShrink( cSection, Len( hb_eol() ) ) + ENDIF + + RETURN cSection + +STATIC PROCEDURE ProcessBlock( hEntry, aContent ) + + LOCAL cFile := hEntry[ "_DOCSOURCE" ] + LOCAL cComponent := hEntry[ "_COMPONENT" ] LOCAL cSectionName LOCAL cSection LOCAL lAccepted := .T. LOCAL cSource - LOCAL idxCategory := -1 + LOCAL idxCategory := NIL LOCAL idxSubCategory := -1 - LOCAL cSourceFile + LOCAL item - cSourceFile := StrTran( ".." + hb_ps() + cFile /* SubStr( cFile, Len( s_hSwitches[ "basedir" ] + hb_ps() ) ) */, iif( hb_ps() == "\", "/", "\" ), hb_ps() ) + LOCAL cSourceFile := StrTran( ".." + hb_ps() + cFile, iif( hb_ps() == "\", "/", "\" ), hb_ps() ) - o:type_ := cType - o:sourcefile_ := cSourceFile - o:sourcefileversion_ := cVersion - o:Name := "?NAME?" - o:SetTemplate( "Function" ) + LOCAL o - DO WHILE FReadSection( aHandle, @cSectionName, @cSection, @o ) + /* Set template */ + IF ! "TEMPLATE" $ hEntry + hEntry[ "TEMPLATE" ] := "Function" + ENDIF + IF ! hEntry[ "TEMPLATE" ] $ sc_hTemplates + hEntry[ "TEMPLATE" ] := "Function" + AddErrorCondition( cFile, "Unrecognized TEMPLATE '" + hEntry[ "TEMPLATE" ] + "'", .T. ) + lAccepted := .F. + ENDIF - IF cSectionName == "TEMPLATE" - IF o:IsTemplate( cSection ) - o:SetTemplate( cSection ) - ELSE - AddErrorCondition( cFile, "Unrecognized TEMPLATE '" + cSection + "'" ) // + "' (line " + hb_ntos( aHandle[ 2 ] ) + ")" // exclude link number, it reports tonnes of entries - lAccepted := .F. - EXIT - ENDIF + o := Entry():New( hEntry[ "TEMPLATE" ] ) + o:_type := cComponent + o:_sourcefile := cSourceFile - ELSEIF HB_ISNULL( cSectionName ) + /* Merge category/subcategory into tag list */ + o:_tags := { => } + FOR EACH item IN hb_ATokens( ; + hb_HGetDef( hEntry, "TAGS", "" ) + ; + ", " + hb_HGetDef( hEntry, "CATEGORY", "" ) + ; + ", " + hb_HGetDef( hEntry, "SUBCATEGORY", "" ), "," ) + + IF ! HB_ISNULL( item := AllTrim( item ) ) + o:_tags[ item ] := NIL + ENDIF + NEXT + hEntry[ "TAGS" ] := "" + FOR EACH item IN hb_HKeys( o:_tags ) + hEntry[ "TAGS" ] += item + IF ! item:__enumIsLast() + hEntry[ "TAGS" ] += ", " + ENDIF + NEXT + + IF "CATEGORY" $ hEntry + IF hEntry[ "CATEGORY" ] $ sc_hConstraint[ "categories" ] + idxCategory := hEntry[ "CATEGORY" ] + ELSE + AddErrorCondition( cFile, "Unrecognized CATEGORY '" + hEntry[ "CATEGORY" ] + "' for template '" + o:fld[ "TEMPLATE" ] ) + ENDIF + ENDIF + + FOR EACH item IN hEntry + + cSectionName := item:__enumKey() + cSection := StrTran( item, Chr( 13 ) + Chr( 10 ), hb_eol() ) + + IF !( cSectionName == "EXAMPLES" ) .AND. ; + !( cSectionName == "TESTS" ) + cSection := NewLineVoodoo( cSection ) /* Decides which EOLs to keep and which to drop */ + ENDIF + + cSection := StrTran( cSection, hb_eol(), Chr( 10 ) ) + + IF hb_LeftEq( cSectionName, "_" ) .OR. ; + cSectionName == "TEMPLATE" + + /* do nothing */ ELSEIF o:IsField( cSectionName ) DO CASE CASE o:IsField( cSectionName, TPL_START ) - AddErrorCondition( cFile, "Encountered another section '" + cSection, aHandle[ 2 ] ) + AddErrorCondition( cFile, "Encountered another section '" + cSection, .T. ) lAccepted := .F. EXIT @@ -463,36 +579,16 @@ STATIC PROCEDURE ProcessBlock( aHandle, aContent, cFile, cType, cVersion, o ) EXIT - CASE ! Empty( o:&cSectionName ) + CASE ! Empty( o:fld[ cSectionName ] ) - AddErrorCondition( cFile, "Duplicate " + cSectionName, aHandle[ 2 ] ) + AddErrorCondition( cFile, "Duplicate " + cSectionName, .T. ) lAccepted := .F. - CASE cSectionName == "CATEGORY" - - IF ( idxCategory := AScan( sc_hConstraint[ "categories" ], {| c | ! Empty( c ) .AND. iif( HB_ISCHAR( c ), Lower( c ) == Lower( cSection ), Lower( c[ 1 ] ) == Lower( cSection ) ) } ) ) == 0 - AddErrorCondition( cFile, "Unrecognized CATEGORY '" + cSection + "' for template '" + o:Template, aHandle[ 2 ] ) -#if 0 - lAccepted := .F. -#endif - ENDIF - CASE cSectionName == "SUBCATEGORY" .AND. o:IsField( "SUBCATEGORY" ) - IF idxCategory <= 0 .OR. o:Category == "" - - AddErrorCondition( cFile, "SUBCATEGORY '" + cSection + "' defined before CATEGORY", aHandle[ 2 ] ) -#if 0 - lAccepted := .F. -#endif - - ELSEIF ( idxSubCategory := AScan( sc_hConstraint[ "categories" ][ idxCategory ][ 2 ], {| c | c != NIL .AND. iif( HB_ISCHAR( c ), Lower( c ) == Lower( cSection ), Lower( c[ 1 ] ) == Lower( cSection ) ) } ) ) == 0 - - AddErrorCondition( cFile, "Unrecognized SUBCATEGORY '" + sc_hConstraint[ "categories" ][ idxCategory ][ 1 ] + "-" + cSection, aHandle[ 2 ] ) -#if 0 - lAccepted := .F. -#endif - + IF idxCategory != NIL .AND. ; + ( idxSubCategory := AScan( sc_hConstraint[ "categories" ][ idxCategory ][ 1 ], {| c | c != NIL .AND. iif( HB_ISSTRING( c ), Lower( c ) == Lower( cSection ), Lower( c[ 1 ] ) == Lower( cSection ) ) } ) ) == 0 + AddErrorCondition( cFile, "Unrecognized SUBCATEGORY '" + idxCategory + "'-" + cSection ) ENDIF CASE o:IsField( "RETURNS" ) .AND. cSectionName == "RETURNS" .AND. ( ; @@ -501,10 +597,7 @@ STATIC PROCEDURE ProcessBlock( aHandle, aContent, cFile, cType, cVersion, o ) Lower( cSection ) == "none" .OR. ; Lower( cSection ) == "none." ) - AddErrorCondition( cFile, "'" + o:Name + "' is identified as template " + o:Template + " but has no RETURNS value (" + cSection + ")", aHandle[ 2 ] - 1 ) -#if 0 - lAccepted := .F. -#endif + AddErrorCondition( cFile, "'" + o:fld[ "NAME" ] + "' is identified as template " + hEntry[ "TEMPLATE" ] + " but has no RETURNS value (" + cSection + ")" ) CASE ! o:IsConstraint( cSectionName, cSection ) @@ -513,332 +606,121 @@ STATIC PROCEDURE ProcessBlock( aHandle, aContent, cFile, cType, cVersion, o ) cSource := hb_HKeyAt( hsTemplate, idx ) + " should be one of: " #endif AEval( sc_hConstraint[ cSectionName ], {| c, n | cSource += iif( n == 1, "", "," ) + c } ) - AddErrorCondition( cFile, cSource, aHandle[ 2 ] - 1 ) - - OTHERWISE + AddErrorCondition( cFile, cSource ) ENDCASE IF lAccepted - o:&cSectionName := Decode( cSectionName, , cSection ) + o:fld[ cSectionName ] := ExpandAbbrevs( cSectionName, cSection ) ENDIF ELSE - AddErrorCondition( cFile, "Using template '" + o:Template + "' encountered an unexpected section '" + cSectionName, aHandle[ 2 ] ) + AddErrorCondition( cFile, "Using template '" + hEntry[ "TEMPLATE" ] + "' encountered an unexpected section '" + cSectionName + "'", .T. ) lAccepted := .F. ENDIF - ENDDO - - IF lAccepted .AND. ! o:IsComplete( @cSource ) - AddErrorCondition( cFile, "Missing sections: '" + cSource + "'", aHandle[ 2 ] ) -#if 0 - lAccepted := .F. -#endif - ENDIF - - IF ! lAccepted - ELSEIF o:Template == "Function" .AND. ( ; - Empty( o:Returns ) .OR. ; - Lower( o:Returns ) == "nil" .OR. ; - Lower( o:Returns ) == "none" .OR. ; - Lower( o:Returns ) == "none." ) - - AddErrorCondition( cFile, "'" + o:Name + "' is identified as template " + o:Template + " but has no RETURNS value (" + o:Returns + ")", aHandle[ 2 ] ) -#if 0 - lAccepted := .F. -#endif - - ELSE - - IF !( ; - /* Lower( hsBlock[ "CATEGORY" ] ) == "document" .OR. */ ; - /* ! ( hsBlock[ "SUBCODE" ] == "" ) .OR. */ ; - .F. ) - - cSectionName := Parse( Upper( o:Name ), "(" ) - - IF hb_AScan( s_hSwitches[ "hbextern.ch" ], cSectionName, , , .T. ) > 0 - AAdd( s_hSwitches[ "in hbextern" ], cSectionName ) - ELSE - AAdd( s_hSwitches[ "not in hbextern" ], cSectionName + "; " + cFile ) - ENDIF - -#if 0 - OutStd( " > " + cSectionName + hb_eol() ) -#endif - ENDIF - - IF s_hSwitches[ "include-doc-source" ] - o:Files += hb_eol() + o:sourcefile_ + iif( s_hSwitches[ "include-doc-version" ], " (" + o:sourcefileversion_ + ")", "" ) - ENDIF - - o:filename := Filename( o:Name ) - - AAdd( aContent, o ) - - IF idxSubCategory == -1 .AND. ( ! o:IsField( "SUBCATEGORY" ) .OR. ! o:IsRequired( "SUBCATEGORY" ) ) // .AND. idxSubCategory == -1 - idxSubCategory := o:SubcategoryIndex( o:Category, "" ) - ENDIF - - IF idxCategory > 0 .AND. idxSubCategory > 0 - IF ! HB_ISARRAY( sc_hConstraint[ "categories" ][ idxCategory ][ 3 ][ idxSubCategory ] ) - sc_hConstraint[ "categories" ][ idxCategory ][ 3 ][ idxSubCategory ] := {} - ENDIF - AAdd( sc_hConstraint[ "categories" ][ idxCategory ][ 3 ][ idxSubCategory ], o ) - ENDIF - ENDIF - - RETURN - -STATIC FUNCTION FReadSection( aHandle, /* @ */ cSectionName, /* @ */ cSection, /* @ */ o ) - - LOCAL nPosition - LOCAL cBuffer - LOCAL nLastIndent - LOCAL lPreformatted := .F. - LOCAL lLastPreformatted - - cSectionName := cSection := "" - - IF FReadLn( aHandle, @cSectionName ) - cSectionName := LTrim( SubStr( cSectionName, 3 ) ) - IF Left( cSectionName, 1 ) == s_hSwitches[ "DELIMITER" ] .AND. ; - Right( cSectionName, 1 ) == s_hSwitches[ "DELIMITER" ] - - cSectionName := SubStr( cSectionName, 1 + Len( s_hSwitches[ "DELIMITER" ] ), Len( cSectionName ) - ( 2 * Len( s_hSwitches[ "DELIMITER" ] ) ) ) - IF o:IsField( cSectionName ) - lLastPreformatted := lPreformatted := o:IsPreformatted( cSectionName ) - nLastIndent := -1 - DO WHILE ( nPosition := hb_vfSeek( aHandle[ 1 ], 0, FS_RELATIVE ) ), FReadLn( aHandle, @cBuffer ) - /* TOFIX: this assumes that every line starts with " *" */ - cBuffer := RTrim( SubStr( cBuffer, 3 ) ) - IF Left( LTrim( cBuffer ), 1 ) == s_hSwitches[ "DELIMITER" ] .AND. ; - Right( cBuffer, 1 ) == s_hSwitches[ "DELIMITER" ] - hb_vfSeek( aHandle[ 1 ], nPosition, FS_SET ) - aHandle[ 2 ]-- /* decrement the line number when rewinding the file */ - EXIT - ELSEIF Len( AllTrim( cBuffer ) ) == 0 - IF !( Right( cSection, Len( hb_eol() ) ) == hb_eol() ) - cSection += hb_eol() - ENDIF - nLastIndent := -1 - ELSEIF AllTrim( cBuffer ) == "" - IF !( Right( cSection, Len( hb_eol() ) ) == hb_eol() ) .OR. lPreformatted - cSection += hb_eol() - ENDIF - cSection += "
" // + hb_eol() - lLastPreformatted := lPreformatted - lPreformatted := .T. - ELSEIF AllTrim( cBuffer ) == "
" - IF !( Right( cSection, Len( hb_eol() ) ) == hb_eol() ) .OR. lPreformatted - cSection += hb_eol() - ENDIF - cSection += "" + hb_eol() - lPreformatted := lLastPreformatted - ELSEIF nLastIndent != ( Len( cBuffer ) - Len( LTrim( cBuffer ) ) ) .OR. lPreformatted .OR. Right( cBuffer, Len( "" ) ) == "" - IF Right( cBuffer, Len( "" ) ) == "" - cBuffer := hb_StrShrink( cBuffer, Len( "" ) ) - ENDIF - nLastIndent := ( Len( cBuffer ) - Len( LTrim( cBuffer ) ) ) - IF !( Right( cSection, Len( hb_eol() ) ) == hb_eol() ) - cSection += hb_eol() - ENDIF - cSection += iif( lPreformatted, cBuffer, AllTrim( cBuffer ) ) - ELSE - cSection += " " + AllTrim( cBuffer ) - ENDIF - ENDDO - ENDIF - ENDIF - ELSE - RETURN .F. - ENDIF - - DO WHILE hb_LeftEq( cSection, hb_eol() ) - cSection := SubStr( cSection, Len( hb_eol() ) + 1 ) - ENDDO - - DO WHILE Right( cSection, Len( hb_eol() ) ) == hb_eol() - cSection := hb_StrShrink( cSection, Len( hb_eol() ) ) - ENDDO - - IF lPreformatted .AND. Lower( Right( cSection, Len( "" ) ) ) == "" - cSection := hb_StrShrink( cSection, Len( "" ) ) - DO WHILE Right( cSection, Len( hb_eol() ) ) == hb_eol() - cSection := hb_StrShrink( cSection, Len( hb_eol() ) ) - ENDDO - ENDIF - - RETURN .T. - -STATIC PROCEDURE FileEval( acFile, bBlock, nMaxLine ) - - LOCAL aHandle := { NIL, 0 } - LOCAL cBuffer - LOCAL lCloseFile := .F. - - hb_default( @nMaxLine, 256 ) - - DO CASE - CASE HB_ISSTRING( acFile ) - lCloseFile := .T. - IF ( aHandle[ 1 ] := hb_vfOpen( acFile, FO_READ ) ) == NIL - RETURN - ENDIF - OTHERWISE - aHandle := acFile - ENDCASE - - DO WHILE FReadLn( aHandle, @cBuffer, nMaxLine ) - IF ! hb_defaultValue( Eval( bBlock, cBuffer ), .T. ) - EXIT - ENDIF - ENDDO - - IF lCloseFile - hb_vfClose( aHandle[ 1 ] ) - ENDIF - - RETURN - -STATIC FUNCTION FReadLn( aHandle, /* @ */ cBuffer, nMaxLine ) - - STATIC s_aEOL := { Chr( 13 ) + Chr( 10 ), Chr( 10 ), Chr( 13 ) } - - LOCAL cLine, nSavePos, nEol, nNumRead, nLenEol, cEOL - - cBuffer := "" - - nSavePos := hb_vfSeek( aHandle[ 1 ], 0, FS_RELATIVE ) - cLine := Space( hb_defaultValue( nMaxLine, 256 ) ) - nNumRead := hb_vfRead( aHandle[ 1 ], @cLine, hb_BLen( cLine ) ) - cLine := hb_BLeft( cLine, nNumRead ) - - nEol := 0 - FOR EACH cEOL IN s_aEOL - IF ( nEol := hb_BAt( cEOL, cLine ) ) > 0 - nLenEol := hb_BLen( cEOL ) - 1 - EXIT - ENDIF NEXT - IF nEol == 0 - cBuffer := cLine - ELSE - cBuffer := hb_BLeft( cLine, nEol - 1 ) - hb_vfSeek( aHandle[ 1 ], nSavePos + hb_BLen( cBuffer ) + 1 + nLenEol, FS_SET ) + /* Verify entry-wide constraints */ + IF lAccepted + + DO CASE + CASE ! o:IsComplete( @cSource ) + AddErrorCondition( cFile, "Missing sections: '" + cSource + "'" ) +#if 0 + lAccepted := .F. +#endif + CASE hEntry[ "TEMPLATE" ] == "Function" .AND. ( ; + Empty( o:fld[ "RETURNS" ] ) .OR. ; + Lower( o:fld[ "RETURNS" ] ) == "nil" .OR. ; + Lower( o:fld[ "RETURNS" ] ) == "none" .OR. ; + Lower( o:fld[ "RETURNS" ] ) == "none." ) + + AddErrorCondition( cFile, "'" + o:fld[ "NAME" ] + "' is identified as template " + hEntry[ "TEMPLATE" ] + " but has no RETURNS value (" + o:fld[ "RETURNS" ] + ")" ) +#if 0 + lAccepted := .F. +#endif + ENDCASE ENDIF - aHandle[ 2 ]++ + IF lAccepted - RETURN nNumRead > 0 + IF !( Lower( hEntry[ "CATEGORY" ] ) == "document" ) + cSectionName := Parse( o:fld[ "NAME" ], "(" ) + IF ! cSectionName $ s_hSwitches[ "hHBX" ] + AddErrorCondition( cFile, "Not found in HBX: " + cSectionName + " " + cComponent ) + ENDIF + ENDIF -STATIC FUNCTION Decode( cType, hsBlock, cKey ) + IF s_hSwitches[ "include-doc-source" ] + o:Files += hb_eol() + o:_sourcefile + ENDIF + + o:_filename := Filename( o:fld[ "NAME" ] ) + + AAdd( aContent, o ) + + IF ! cComponent $ s_hComponent + s_hComponent[ cComponent ] := NIL + ENDIF + + IF idxCategory != NIL + IF idxSubCategory == -1 .AND. ( ! o:IsField( "SUBCATEGORY" ) .OR. ! o:IsRequired( "SUBCATEGORY" ) ) + idxSubCategory := o:SubcategoryIndex( o:fld[ "CATEGORY" ], "" ) + ENDIF + IF idxSubCategory > 0 + AAdd( sc_hConstraint[ "categories" ][ idxCategory ][ 2 ][ idxSubCategory ], o ) + ENDIF + ENDIF + ENDIF + + RETURN + +STATIC FUNCTION ExpandAbbrevs( cSectionName, cCode ) - LOCAL cCode LOCAL cResult - LOCAL idx - IF cKey != NIL .AND. HB_ISHASH( hsBlock ) .AND. cKey $ hsBlock - cCode := hsBlock[ cKey ] - ELSE - cCode := cKey - ENDIF - - SWITCH cType + SWITCH cSectionName CASE "STATUS" - IF "," $ cCode .AND. hb_AScan( sc_hConstraint[ "status" ], Parse( cCode, "," ), , , .T. ) > 0 + IF "," $ cCode .AND. Parse( cCode, "," ) $ sc_hConstraint[ "status" ] cResult := "" DO WHILE ! HB_ISNULL( cCode ) - cResult += hb_eol() + Decode( cType, hsBlock, Parse( @cCode, "," ) ) + cResult += hb_eol() + ExpandAbbrevs( cSectionName, Parse( @cCode, "," ) ) ENDDO RETURN SubStr( cResult, Len( hb_eol() ) + 1 ) ENDIF - IF ( idx := AScan( sc_hConstraint[ "status" ], {| a | a[ 1 ] == cCode } ) ) > 0 - RETURN sc_hConstraint[ "status" ][ idx ][ 2 ] + IF cCode $ sc_hConstraint[ "status" ] + RETURN sc_hConstraint[ "status" ][ cCode ] ELSEIF Len( cCode ) > 1 RETURN cCode ELSEIF ! HB_ISNULL( cCode ) RETURN "Unrecognized 'STATUS' code: '" + cCode + "'" ELSE - RETURN ATail( sc_hConstraint[ "status" ] )[ 2 ] + RETURN sc_hConstraint[ "status" ][ "N" ] ENDIF CASE "PLATFORMS" - IF "," $ cCode .AND. hb_AScan( sc_hConstraint[ "platforms" ], Parse( cCode, "," ), , , .T. ) > 0 - cResult := "" - DO WHILE ! HB_ISNULL( cCode ) - cResult += hb_eol() + Decode( cType, hsBlock, Parse( @cCode, "," ) ) - ENDDO - RETURN SubStr( cResult, Len( hb_eol() ) + 1 ) - ENDIF - - IF ( idx := AScan( sc_hConstraint[ "platforms" ], {| a | a[ 1 ] == cCode } ) ) > 0 - RETURN sc_hConstraint[ "platforms" ][ idx ][ 2 ] - ELSE - RETURN cCode - ENDIF + cResult := "" + FOR EACH cCode IN hb_ATokens( cCode, "," ) + IF ! HB_ISNULL( cCode := AllTrim( cCode ) ) + cResult += hb_eol() + hb_HGetDef( sc_hConstraint[ "platforms" ], cCode, cCode ) + ENDIF + NEXT + RETURN SubStr( cResult, Len( hb_eol() ) + 1 ) CASE "COMPLIANCE" - IF "," $ cCode .AND. hb_AScan( sc_hConstraint[ "compliance" ], Parse( cCode, "," ), , , .T. ) > 0 + IF "," $ cCode .AND. Parse( cCode, "," ) $ sc_hConstraint[ "compliance" ] cResult := "" DO WHILE ! HB_ISNULL( cCode ) - cResult += hb_eol() + Decode( cType, hsBlock, Parse( @cCode, "," ) ) + cResult += hb_eol() + ExpandAbbrevs( cSectionName, Parse( @cCode, "," ) ) ENDDO RETURN SubStr( cResult, Len( hb_eol() ) + 1 ) ENDIF - IF ( idx := AScan( sc_hConstraint[ "compliance" ], {| a | a[ 1 ] == cCode } ) ) > 0 - RETURN sc_hConstraint[ "compliance" ][ idx ][ 2 ] - ELSE - RETURN cCode - ENDIF - - SWITCH cCode - CASE "C" ; RETURN "This is CA-Cl*pper v5.2 compliant" - CASE "C(array)" ; RETURN "This is CA-Cl*pper v5.2 compliant except that arrays in Harbour can have an unlimited number of elements" - CASE "C(menu)" ; RETURN "This is CA-Cl*pper v5.2 compliant except that menus (internally arrays) in Harbour can have an unlimited number of elements" - CASE "C52U" ; RETURN "This is an undocumented CA-Cl*pper v5.2 function and is only visible if source was compiled with the HB_CLP_UNDOC flag" - CASE "C52S" ; RETURN "? verbage: This is an CA-Cl*pper v5.2 compliant and is only visible if source was compiled with the HB_CLP_STRICT flag" - CASE "C53" ; RETURN "This is CA-Cl*pper v5.3 compliant and is only visible if source was compiled with the HB_COMPAT_C53 flag" - CASE "H" ; RETURN "This is Harbour specific" - CASE "NA" ; RETURN "Not applicable" - OTHERWISE ; RETURN cCode - ENDSWITCH - - CASE "NAME" - IF hsBlock == NIL - RETURN cCode - ELSEIF !( "RETURNS" $ hsBlock ) - RETURN hsBlock[ "NAME" ] - ELSEIF Empty( hsBlock[ "RETURNS" ] ) .OR. ; - Upper( hsBlock[ "RETURNS" ] ) == "NIL" .OR. ; - Lower( hsBlock[ "RETURNS" ] ) == "none" .OR. ; - Lower( hsBlock[ "RETURNS" ] ) == "none." - - hsBlock[ "RETURNS" ] := "" - - DO CASE - CASE Lower( hsBlock[ "CATEGORY" ] ) == "document" - RETURN hsBlock[ "NAME" ] - CASE Lower( hsBlock[ "TEMPLATE" ] ) == "function" .OR. ; - Lower( hsBlock[ "TEMPLATE" ] ) == "procedure" - RETURN "Procedure " + hsBlock[ "NAME" ] - OTHERWISE - RETURN LTrim( hsBlock[ "SUBCATEGORY" ] + " " ) + hsBlock[ "CATEGORY" ] + " " + hsBlock[ "NAME" ] - ENDCASE - ELSE - DO CASE - CASE ! Empty( hsBlock[ "NAME" ] ) - RETURN "Function " + hsBlock[ "NAME" ] - OTHERWISE - RETURN "Unrecognized 'CATEGORY': " + hsBlock[ "CATEGORY" ] - ENDCASE - ENDIF + RETURN hb_HGetDef( sc_hConstraint[ "compliance" ], cCode, cCode ) ENDSWITCH - RETURN /* cType + "=" + */ cCode + RETURN cCode STATIC PROCEDURE ShowSubHelp( xLine, /* @ */ nMode, nIndent, n ) @@ -867,11 +749,12 @@ STATIC PROCEDURE ShowSubHelp( xLine, /* @ */ nMode, nIndent, n ) RETURN STATIC FUNCTION HBRawVersion() - RETURN hb_StrFormat( "%d.%d.%d%s (%s)", ; + RETURN hb_StrFormat( "%d.%d.%d%s (%s) (%s)", ; hb_Version( HB_VERSION_MAJOR ), ; hb_Version( HB_VERSION_MINOR ), ; hb_Version( HB_VERSION_RELEASE ), ; hb_Version( HB_VERSION_STATUS ), ; + hb_Version( HB_VERSION_ID ), ; "20" + Transform( hb_Version( HB_VERSION_REVISION ), "99-99-99 99:99" ) ) STATIC PROCEDURE ShowHelp( cExtraMessage, aArgs ) @@ -893,21 +776,20 @@ STATIC PROCEDURE ShowHelp( cExtraMessage, aArgs ) "", ; "Options:", ; { ; - "-? or --help this screen", ; - "-?