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 <table>/<fixed> tags in html output until they
      are converted to something better
    + add support for <b>/<b>, <URL:url>, 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 <b>,<URL>,<fixed>
            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)
This commit is contained in:
Viktor Szakats
2016-10-26 13:07:21 +02:00
parent da5de0c27b
commit c1bde05495
86 changed files with 1791 additions and 1613 deletions

View File

@@ -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 <table>/<fixed> tags in html output until they
are converted to something better
+ add support for <b>/<b>, <URL:url>, 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 <b>,<URL>,<fixed>
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

View File

@@ -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 (<cStringToMatch>, <cString>, [<nCounter>],
AtNum( <cStringToMatch>, <cString>, [<nCounter>],
[<nIgnore>] ) --> nPosition
$ARGUMENTS$
<cStringToMatch> is the substring scanned for
@@ -149,6 +149,6 @@
$FILES$
Library is hbct.
$SEEALSO$
AtNum() AfterAtNum() CSetAtMupa() SetAtLike()
AtNum(), AfterAtNum(), CSetAtMupa(), SetAtLike()
$END$
*/

View File

@@ -54,6 +54,6 @@
$FILES$
Library is hbct.
$SEEALSO$
CSetAtMupa() SetAtLike()
CSetAtMupa(), SetAtLike()
$END$
*/

View File

@@ -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$
*/

View File

@@ -39,6 +39,6 @@
$FILES$
Library is hbct.
$SEEALSO$
CharEven() CharOdd()
CharEven(), CharOdd()
$END$
*/

View File

@@ -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$
*/

View File

@@ -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$
*/

View File

@@ -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$
*/

View File

@@ -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$
*/

View File

@@ -51,7 +51,6 @@
$FILES$
Library is hbct.
$SEEALSO$
WordRepl() PosRepl() RangeRepl()
CSetRef()
WordRepl(), PosRepl(), RangeRepl(), CSetRef()
$END$
*/

View File

@@ -33,7 +33,7 @@
$RETURNS$
<cSortedString> the string resulting from the sort process
$DESCRIPTION$
The CHARSORT function sorts the characters within a string <cString>.
The CharSort() function sorts the characters within a string <cString>.
With the parameters <nIgnoreCharacters> and <nSortLength>, you can
determine that only the substring from position <nIgnoreCharacters>+1
to position <nIgnoreCharacters>+<nSortLength> within <cString> should

View File

@@ -73,7 +73,7 @@
$NAME$
NToColor()
$CATEGORY$
HBCT video functions
hbct video functions
$ONELINER$
$SYNTAX$

View File

@@ -1,12 +1,12 @@
/* $DOC$
$NAME$
SetPREC()
SetPrec()
$CATEGORY$
CT3 math functions
$ONELINER$
Set precision of math functions
$SYNTAX$
SetPREC( <nPrecision> ) -> cEmptyString
SetPrec( <nPrecision> ) -> cEmptyString
$ARGUMENTS$
<nPrecision> 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$

View File

@@ -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 ([<nMode>] [, <[@]cWildcard>]) --> nOldMode
SetAtLike( [<nMode>] [, <[@]cWildcard>] ) --> nOldMode
$ARGUMENTS$
[<nMode>] 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.

View File

@@ -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( <nMonth>, <lLeapYear> ) -> 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 (<nMonth>, <lLeapYear>) -> 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()

View File

@@ -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$

View File

@@ -6,9 +6,9 @@
$ONELINER$
Replace tabulator control characters with fill characters
$SYNTAX$
TABEXPAND (<cString>, [<nTabWidth>], [<cFillChar|nFillChar>],
TabExpand( <cString>, [<nTabWidth>], [<cFillChar|nFillChar>],
[<cNewLineCharacters>], [<cTabChar|nTabChar>],
[<lIgnore141>]) -> cExpandedString
[<lIgnore141>] ) -> cExpandedString
$ARGUMENTS$
<cString>
<nTabWidth>

View File

@@ -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$

View File

@@ -121,13 +121,13 @@
/* $DOC$
$NAME$
gdImageFromJpeg()
gdImageCreateFromJpeg()
$CATEGORY$
HBGD
$ONELINER$
Load a JPEG image file.
$SYNTAX$
gdImageFromJpeg( <cFile> | <nHandle> | <pPointer> [, <nSize> ] ) --> <pImage>
gdImageCreateFromJpeg( <cFile> | <nHandle> | <pPointer> [, <nSize> ] ) --> <pImage>
$ARGUMENTS$
<cFile> - Image file name
<nHandle> - File handle
@@ -136,19 +136,19 @@
$RETURNS$
<pImage> - 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( <cFile> | <nHandle> | <pPointer> [, <nSize> ] ) --> <pImage>
gdImageCreateFromGif( <cFile> | <nHandle> | <pPointer> [, <nSize> ] ) --> <pImage>
$ARGUMENTS$
<cFile> - Image file name
<nHandle> - File handle
@@ -190,19 +190,19 @@
$RETURNS$
<pImage> - 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( <cFile> | <nHandle> | <pPointer> [, <nSize> ] ) --> <pImage>
gdImageCreateFromPng( <cFile> | <nHandle> | <pPointer> [, <nSize> ] ) --> <pImage>
$ARGUMENTS$
<cFile> - Image file name
<nHandle> - File handle
@@ -244,19 +244,19 @@
$RETURNS$
<pImage> - 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( <cFile> | <nHandle> | <pPointer> [, <nSize> ] ) --> <pImage>
gdImageCreateFromGD( <cFile> | <nHandle> | <pPointer> [, <nSize> ] ) --> <pImage>
$ARGUMENTS$
<cFile> - Image file name
<nHandle> - File handle
@@ -298,19 +298,19 @@
$RETURNS$
<pImage> - 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( <cFile> | <nHandle> | <pPointer> [, <nSize> ] ) --> <pImage>
gdImageCreateFromWBmp( <cFile> | <nHandle> | <pPointer> [, <nSize> ] ) --> <pImage>
$ARGUMENTS$
<cFile> - Image file name
<nHandle> - File handle
@@ -352,19 +352,19 @@
$RETURNS$
<pImage> - 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( <pImage>, <nColor> ) --> NIL
gdImageSetAntiAliasedDontBlend( <pImage>, <nColor> ) --> NIL
$ARGUMENTS$
<pImage> - Image pointer
<nColor> - 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$
*/

View File

@@ -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( <cStr>, <nPos> ) --> nAscVal
$ARGUMENTS$
<cStr> - The string
<nPos> - The position in <cStr>
$RETURNS$
<nAscVal> - The ascii value of hb_BSubStr( <cStr>, <nPos>, 1 )
<nAscVal> - The ASCII value of hb_BSubStr( <cStr>, <nPos>, 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( <cStr> ) --> nSum
$ARGUMENTS$
<cStr> - The string to sum
$RETURNS$
<nSum> - The sum of all ascii values in <cStr>.
<nSum> - The sum of all ASCII values in <cStr>.
$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 @@
<nAsc> - The ASCII value of the first character in <cChars>
which appears first in <cStr>
$DESCRIPTION$
Return the ascii value of a character in <cChars>
Return the ASCII value of a character in <cChars>
which appears first in <cStr>.
$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$
*/

View File

@@ -98,13 +98,13 @@
/* $DOC$
$NAME$
DaysInMonth()
hbmisc_DaysInMonth()
$CATEGORY$
Date
$ONELINER$
Gets the days in a month.
$SYNTAX$
DaysInMonth( <dDate> ) --> nDays
hbmisc_DaysInMonth( <dDate> ) --> nDays
$ARGUMENTS$
<dDate> 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$

View File

@@ -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$
*/

View File

@@ -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$
*/

View File

@@ -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$
*/

View File

@@ -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$
*/

View File

@@ -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$
*/

View File

@@ -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$
*/

View File

@@ -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$
*/

View File

@@ -37,6 +37,6 @@
? ft_BitSet( "A", 5 ) // result: "a"
// bit 5 set
$SEEALSO$
ft_BitClr() ft_IsBit()
ft_BitClr(), ft_IsBit()
$END$
*/

View File

@@ -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$
*/

View File

@@ -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$
*/

View File

@@ -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$
*/

View File

@@ -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$
*/

View File

@@ -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$
*/

View File

@@ -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$
*/

View File

@@ -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$
*/

View File

@@ -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$
*/

View File

@@ -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$
*/

View File

@@ -57,6 +57,6 @@
@ 20, 0 SAY "Key that terminated ft_DispFile() was: " + "[" + cKey + "]"
$SEEALSO$
ft_DFSetup() ft_DFClose()
ft_DFSetup(), ft_DFClose()
$END$
*/

View File

@@ -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$
*/

View File

@@ -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$
*/

View File

@@ -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$
*/

View File

@@ -36,6 +36,6 @@
? ft_IsBit( "A", 5 ) // result: .F.
$SEEALSO$
ft_BitSet() ft_BitClr()
ft_BitSet(), ft_BitClr()
$END$
*/

View File

@@ -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$
*/

View File

@@ -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$
*/

View File

@@ -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$
*/

View File

@@ -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$
*/

View File

@@ -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$
*/

View File

@@ -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$
*/

View File

@@ -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$
*/

View File

@@ -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$
*/

View File

@@ -19,6 +19,6 @@
$EXAMPLES$
ft_RestSets( aOldSets )
$SEEALSO$
ft_SaveSets() ft_SetCentury()
ft_SaveSets(), ft_SetCentury()
$END$
*/

View File

@@ -19,6 +19,6 @@
$EXAMPLES$
aOldSets := ft_SaveSets()
$SEEALSO$
ft_RestSets() ft_SetCentury()
ft_RestSets(), ft_SetCentury()
$END$
*/

View File

@@ -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$
*/

View File

@@ -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$
*/

View File

@@ -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$
*/

View File

@@ -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$
*/

View File

@@ -17,7 +17,7 @@
<lSuccess> 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 @@
<lSuccess> 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 @@
<nType> The type of operation:
<table>
<table-noheader>
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 <aRecNos> 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$
<cFilter> The filter expression used in the call to AdsSetAOF.
<cFilter> 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:
<table>
<table-noheader>
ADS_RESPECTFILTERS Respect filters and scopes
ADS_IGNOREFILTERS Ignore filters and scopes
ADS_RESPECTSCOPES Respect scopes only
@@ -554,8 +554,8 @@
<nFilterOption> Indicates if filters and/or scopes are to be respected if set.
<table>
Options are defined in ads.ch:
<table-noheader>
ADS_RESPECTFILTERS Respect filters and scopes
ADS_IGNOREFILTERS Ignore filters and scopes
ADS_RESPECTSCOPES Respect scopes only
@@ -563,8 +563,8 @@
$RETURNS$
<nKeyNo> The logical key number of the current record in the given index.
$DESCRIPTION$
See ace.hlp for full details about the Advantage Database Server.</par>
Wrapper for AdsGetKeyNum. </par>
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$
<lActiveIndex>
$DESCRIPTION$
Equivalent to <b>Empty( ordSetFocus() )<\b>, but faster.
Equivalent to <b>Empty( ordSetFocus() )</b>, 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$
<nRetVal> ???
$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$
<nRetVal> ???
$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$
<nRetVal> ???
$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

View File

@@ -1,44 +1,7 @@
/*
* Copyright 2009 April White <bright.tigra gmail.com>
*
* 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 <URL:https://harbour.github.io/>.
The Harbour website is at <URL:https://vszakats.github.io/harbour-core/>.
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$

View File

@@ -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$

View File

@@ -7,8 +7,6 @@
Document
$SUBCATEGORY$
Compiler
$ONELINER$
Compiler Options
$DESCRIPTION$
<b>Invoking the Harbour compiler: </b> </par>
============================== </par>

View File

@@ -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$

View File

@@ -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

View File

@@ -5,8 +5,6 @@
Harbour Extensions
$CATEGORY$
Document
$ONELINER$
Harbour Extensions
$DESCRIPTION$
<b>Language extensions:</b> </par>
--------------------

View File

@@ -1,47 +1,8 @@
/*
* Hash table type and functions
*
* Copyright 2009 April White <bright.tigra gmail.com>
* Copyright 2007 Przemyslaw Czerpak <druzus / at / priv.onet.pl>
*
* 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.
*
*/

View File

@@ -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.
<table>
<table-doubleheader>
Exit Return code Return code
Key (not updated) (updated)

View File

@@ -7,8 +7,6 @@
Document
$SUBCATEGORY$
Compiler
$ONELINER$
Macro compiler
$DESCRIPTION$
<b>Invoking the macro compiler: </b> </par>
============================== </par>

View File

@@ -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$

View File

@@ -405,7 +405,7 @@
$FILES$
Library is core
$SEEALSO$
__objAddData(), __objAddMethod(), __objDelInline(), __objGetMethodList(), __objGetMsgList(), __objHasMethod() , __objModInline()
__objAddData(), __objAddMethod(), __objDelInline(), __objGetMethodList(), __objGetMsgList(), __objHasMethod(), __objModInline()
$END$
*/

View File

@@ -390,7 +390,7 @@
<lOpenNew> 3-way toggle to Open the file in New or Current workarea:
<table>
<table-noheader>
NIL The file is not opened.
True It is opened in a New area.
False It is opened in the current area.

View File

@@ -111,7 +111,7 @@
$ONELINER$
Set the Condition and scope for an order
$SYNTAX$
ORDCONSET([<cForCondition>],
ordCondSet( [<cForCondition>],
[<bForCondition>],
[<lAll>],
[<bWhileCondition>],
@@ -125,7 +125,7 @@
[<lAdditive>],
[<lCurrent>],
[<lCustom>],
[<lNoOptimize>])
[<lNoOptimize>] )
$ARGUMENTS$
<cForCondition> is a string that specifies the FOR condition for the
order.

View File

@@ -82,7 +82,7 @@
NOTE GET functions/formatting rules:
<table>
<table-noheader>
@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:
<table>
<table-noheader>
A Only alphabetic characters allowed.
N Only alphabetic and numeric characters allowed
X Any character allowed.

View File

@@ -1204,7 +1204,7 @@
When SET DECIMALS OFF is used, the following rules apply to the number
of decimal placed displayed.
<table>
<table-noheader>
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

View File

@@ -33,7 +33,7 @@
that produce the video mode change.
The followings are availables for GTDOS:
<table>
<table-noheader>
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
<table>
<table-noheader>
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$

View File

@@ -1501,7 +1501,7 @@
The table below shows the possible function strings available with
the Transform() function.
<table>
<table-noheader>
@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.
<table>
<table-noheader>
A,N,X,9,# Any data type
L Shows logical as "T" or "F"
Y Shows logical as "Y" or "N"

View File

@@ -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$

View File

@@ -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

View File

@@ -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, "<br>" + 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 += "<br>" + 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, "<!DOCTYPE html>" + hb_eol() )
::cFile += "<!DOCTYPE html>" + 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 == "<fixed>"
lCode := .T.
CASE cLine == "</fixed>"
IF lCode
EXIT
ENDIF
CASE hb_LeftEq( cLine, "<table" )
lTable := .T.
DO CASE
CASE cLine == "<table-noheader>" ; cHeaderClass := ""
CASE cLine == "<table-doubleheader>" ; cHeaderClass := "d-t1 d-t2"
OTHERWISE ; cHeaderClass := "d-t1"
ENDCASE
CASE cLine == "</table>"
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 + "</" + cTag + ">" + hb_eol() )
::cFile += "<" + cTag + cResult + ">" + cText + "</" + cTag + ">" + hb_eol()
RETURN self
METHOD CloseTagInline( cText ) CLASS GenerateHTML
::cFile += "</" + cText + ">"
RETURN self
METHOD CloseTag( cText ) CLASS GenerateHTML
hb_vfWrite( ::hFile, "</" + cText + ">" + hb_eol() )
IF cText == "html"
hb_vfClose( ::hFile )
::hFile := NIL
ENDIF
::cFile += "</" + cText + ">" + hb_eol()
RETURN self
METHOD Append( cText, cFormat ) CLASS GenerateHTML
STATIC FUNCTION StrEsc( cString )
STATIC s_html := { ;
"&" => "&amp;", ;
'"' => "&quot;", ;
"<" => "&lt;", ;
">" => "&gt;" }
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, { ;
"&" => "&amp;", ;
'"' => "&quot;", ;
"<" => "&lt;", ;
">" => "&gt;" } )
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, "<strong>", "</strong>" )
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, "<i>", "</i>" )
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, "<code>", "</code>" )
CASE ! lPR .AND. SubStr( cText, tmp, 3 ) == "<b>"
tmp += 2
cChar := "<strong>"
CASE ! lPR .AND. SubStr( cText, tmp, 4 ) == "</b>"
tmp += 3
cChar := "</strong>"
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 := "<hr>"
CASE ! lPR .AND. ;
( SubStr( cText, tmp, 5 ) == "<URL:" .AND. ( tmp1 := hb_At( ">", cText, tmp + 6 ) ) > 0 )
tmp1 := SubStr( cText, tmp + 5, tmp1 - tmp - 5 )
tmp += Len( tmp1 ) + 5
cChar := "<a href=" + '"' + tmp1 + '"' + ">" + tmp1 + "</a>"
CASE ! lPR .AND. ;
( SubStr( cText, tmp, 3 ) == "==>" .OR. SubStr( cText, tmp, 3 ) == "-->" )
tmp += 2
cChar := "&rarr;"
CASE ! lPR .AND. ;
( SubStr( cText, tmp, 2 ) == "->" )
tmp += 1
cChar := "&rarr;"
CASE cChar == "&"
cChar := "&amp;"
CASE cChar == '"'
cChar := "&quot;"
CASE cChar == "<"
cChar := "&lt;"
CASE cChar == ">"
cChar := "&gt;"
ENDCASE
cOut += cChar
NEXT
/* Remove these tags if they weren't closed */
IF lPR
cOut := Stuff( cOut, nPR, Len( "<code>" ), "`" )
ENDIF
IF lEM
cOut := Stuff( cOut, nEM, Len( "<strong>" ), "*" )
ENDIF
IF lIT
cOut := Stuff( cOut, nIT, Len( "<i>" ), "_" )
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", ;
"_" => "-", ;
" " => "-" } ) )

View File

@@ -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

View File

@@ -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, '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' + hb_eol() )
hb_vfWrite( ::hFile, '<HarbourReference>' + hb_eol() )
::super:NewDocument( cDir, cFilename, cTitle, ".xml", cLang )
::cFile += ;
'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' + hb_eol() + ;
'<HarbourReference>' + 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, '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' + hb_eol() )
hb_vfWrite( ::hFile, '<HarbourReference>' + hb_eol() )
::super:NewIndex( cDir, cFilename, cTitle, ".xml", cLang )
::cFile += ;
'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' + hb_eol() + ;
'<HarbourReference>' + hb_eol()
RETURN self
METHOD BeginSection( cSection, cFilename ) CLASS GenerateXML
IF ::Depth == 0
hb_vfWrite( ::hFile, Replicate( Chr( 9 ), ::Depth ) + '<Section name="' + cSection + '" file="' + cFilename + ::cExtension + '">' + hb_eol() )
::cFile += Replicate( Chr( 9 ), ::Depth ) + '<Section name="' + cSection + '" file="' + cFilename + ::cExtension + '">' + hb_eol()
ELSE
hb_vfWrite( ::hFile, Replicate( Chr( 9 ), ::Depth ) + '<Section name="' + cSection + '">' + hb_eol() )
::cFile += Replicate( Chr( 9 ), ::Depth ) + '<Section name="' + cSection + '">' + 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 ) + '</Section>' + hb_eol() )
::cFile += Replicate( Chr( 9 ), ::Depth ) + '</Section>' + 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, '<Entry>' + hb_eol() )
::cFile += '<Entry>' + 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, '</Entry>' + hb_eol() )
::cFile += '</Entry>' + hb_eol()
ENDIF
RETURN self
METHOD Generate() CLASS GenerateXML
hb_vfWrite( ::hFile, '</HarbourReference>' + hb_eol() )
::cFile += '</HarbourReference>' + 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, { ;
"&" => "&amp;", ;
'"' => "&quot;", ;
"<" => "&lt;", ;
">" => "&gt;" } ) )
hb_vfWrite( ::hFile, /* Replicate( Chr( 9 ), ::Depth ) + */ "</" + cCaption + ">" + hb_eol() )
::cFile += ;
Replicate( Chr( 9 ), ::Depth ) + "<" + cCaption + iif( lPreformatted, ' preformatted="yes"', "" ) + ">" + ;
hb_StrReplace( cContent, { ;
"&" => "&amp;", ;
'"' => "&quot;", ;
"<" => "&lt;", ;
">" => "&gt;" } ) + ;
"</" + cCaption + ">" + hb_eol()
ENDIF
RETURN

View File

@@ -1,232 +0,0 @@
/*
* Document generator, templates
*
* Copyright 2009 April White <bright.tigra gmail.com>
* Copyright 1999-2003 Luiz Rafael Culik <culikr@uol.com.br> (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. )

View File

@@ -1,61 +0,0 @@
/*
* Document generator include file
*
* Copyright 2009 April White <bright.tigra gmail.com>
* Copyright 1999-2003 Luiz Rafael Culik <culikr@uol.com.br> (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

View File

@@ -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;
}

View File

@@ -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

File diff suppressed because it is too large Load Diff

View File

@@ -145,9 +145,10 @@ STATIC PROCEDURE __hbdoc__read_langdir( aEntry, cDir, hMeta, aErrMsg )
LOCAL aFile
LOCAL nCount
hMeta[ "_LANG" ] := hb_FNameName( hb_DirSepDel( cDir ) )
nCount := 0
FOR EACH aFile IN Directory( cDir + hb_ps() + "*" + _HBDOC_SRC_EXT )
hMeta[ "_LANG" ] := aFile[ F_NAME ]
__hbdoc__read_file( aEntry, cDir + hb_ps() + aFile[ F_NAME ], hMeta, aErrMsg )
++nCount
NEXT
@@ -244,7 +245,7 @@ STATIC PROCEDURE __hbdoc__read_stream( aEntry, cFile, cFileName, hMeta, aErrMsg
consecutive lines. [vszakats] */
nStartCol := Len( cLine ) - Len( LTrim( cLine ) ) + 1
ELSE
hEntry[ cSection ] += Chr( 13 ) + Chr( 10 )
hEntry[ cSection ] += Chr( 10 )
ENDIF
hEntry[ cSection ] += SubStr( cLine, nStartCol )
ELSEIF ! Empty( cLine )