From 24894493d321901b864c443fe751a41e58bc551e Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 19 Oct 2016 01:25:24 +0200 Subject: [PATCH] 2016-10-19 01:24 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com) + contrib/hbxpp/doc/en/binnumx.txt + contrib/hbxpp/doc/en/browse.txt * sync more docs with 3.4 fork * contrib/hbgt/doc/en/hbgt.txt * sync some updates from 3.4 fork --- ChangeLog.txt | 8 ++ contrib/hbgt/doc/en/hbgt.txt | 4 +- contrib/hbxpp/doc/en/binnumx.txt | 209 +++++++++++++++++++++++++++++++ contrib/hbxpp/doc/en/browse.txt | 51 ++++++++ 4 files changed, 270 insertions(+), 2 deletions(-) create mode 100644 contrib/hbxpp/doc/en/binnumx.txt create mode 100644 contrib/hbxpp/doc/en/browse.txt diff --git a/ChangeLog.txt b/ChangeLog.txt index 8c665cb3a4..b4e822efc1 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -10,6 +10,14 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2016-10-19 01:24 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com) + + contrib/hbxpp/doc/en/binnumx.txt + + contrib/hbxpp/doc/en/browse.txt + * sync more docs with 3.4 fork + + * contrib/hbgt/doc/en/hbgt.txt + * sync some updates from 3.4 fork + 2016-10-18 19:16 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com) - contrib/hbct/doc/en/ct.txt * contrib/hbct/doc/en/ctc.txt diff --git a/contrib/hbgt/doc/en/hbgt.txt b/contrib/hbgt/doc/en/hbgt.txt index 9dcfa6df33..0bf20c8282 100644 --- a/contrib/hbgt/doc/en/hbgt.txt +++ b/contrib/hbgt/doc/en/hbgt.txt @@ -686,8 +686,8 @@ $EXAMPLES$ // Print the setting of the flags in a flag string called ``cDave'' - FOR nFlag := 1 to ( hb_BLen( cDave ) * 8 ) - ? "Flag number ", nFlag, " == ", gt_IsFlag( cDave, nFlag ) + FOR nFlag := 1 TO hb_BLen( cDave ) * 8 + ? "Flag number", nFlag, "==", gt_IsFlag( cDave, nFlag ) NEXT $SEEALSO$ gt_NewFlag() gt_SetFlag() gt_ClrFlag() diff --git a/contrib/hbxpp/doc/en/binnumx.txt b/contrib/hbxpp/doc/en/binnumx.txt new file mode 100644 index 0000000000..5050be2a42 --- /dev/null +++ b/contrib/hbxpp/doc/en/binnumx.txt @@ -0,0 +1,209 @@ +/* + * Copyright 2000 Chen Kedem + * Documentation for: Bin2W(), Bin2U(), W2Bin(), U2Bin() + * + * See COPYING.txt for licensing terms. + * + */ + +/* $DOC$ + $TEMPLATE$ + Function + $NAME$ + Bin2W() + $CATEGORY$ + API + $SUBCATEGORY$ + Conversion + $ONELINER$ + Convert unsigned short encoded bytes into Harbour numeric + $SYNTAX$ + Bin2W( ) --> nNumber + $ARGUMENTS$ + is a character string that contains 16-bit encoded unsigned + short integer (least significant byte first). The first two bytes + are taken into account, the rest if any are ignored. + $RETURNS$ + Bin2W() return numeric integer (or 0 if is not a string). + $DESCRIPTION$ + Bin2W() is one of the low level binary conversion functions, those + functions convert between Harbour numeric and a character + representation of numeric value. Bin2W() take two bytes of encoded + 16-bit unsigned short integer and convert it into standard Harbour + numeric value. + + You might ask what is the need for such functions, well, first of + all it allow you to read/write information from/to a binary file + (like extracting information from DBF header), it is also a useful + way to share information from source other than Harbour (C for + instance). + + Bin2W() is the opposite of W2Bin() + $EXAMPLES$ + // Show header length of a DBF + #include "fileio.ch" + PROCEDURE Main() + LOCAL hFile, cBuffer := Space( 2 ) + IF ( hFile := hb_vfOpen( "test.dbf", FO_READ ) ) != NIL + hb_vfSeek( hFile, 8 ) + hb_vfRead( hFile, @cBuffer, hb_BLen( cBuffer ) ) + ? "Length of DBF header in bytes:", Bin2W( cBuffer ) + hb_vfClose( hFile ) + ELSE + ? "Can not open file" + ENDIF + RETURN + $STATUS$ + R + $COMPLIANCE$ + C + $FILES$ + Library is core + $SEEALSO$ + Bin2I(), Bin2L(), Bin2U(), I2Bin(), L2Bin(), W2Bin(), Word(), U2Bin() + $END$ + */ + +/* $DOC$ + $TEMPLATE$ + Function + $NAME$ + Bin2U() + $CATEGORY$ + API + $SUBCATEGORY$ + Conversion + $ONELINER$ + Convert unsigned long encoded bytes into Harbour numeric + $SYNTAX$ + Bin2U( ) --> nNumber + $ARGUMENTS$ + is a character string that contains 32-bit encoded unsigned + long integer (least significant byte first). The first four bytes + are taken into account, the rest if any are ignored. + $RETURNS$ + Bin2U() return numeric integer (or 0 if is not a string). + $DESCRIPTION$ + Bin2U() is one of the low level binary conversion functions, those + functions convert between Harbour numeric and a character + representation of numeric value. Bin2U() take four bytes of encoded + 32-bit unsigned long integer and convert it into standard Harbour + numeric value. + + You might ask what is the need for such functions, well, first of + all it allow you to read/write information from/to a binary file + (like extracting information from DBF header), it is also a useful + way to share information from source other than Harbour (C for + instance). + + Bin2U() is the opposite of U2Bin() + $EXAMPLES$ + // Show number of records in DBF + #include "fileio.ch" + PROCEDURE Main() + LOCAL hFile, cBuffer := Space( 4 ) + IF ( hFile := hb_vfOpen( "test.dbf", FO_READ ) ) != NIL + hb_vfSeek( hFile, 4 ) + hb_vfRead( hFile, @cBuffer, hb_BLen( cBuffer ) ) + ? "Number of records in file:", Bin2U( cBuffer ) + hb_vfClose( hFile ) + ELSE + ? "Can not open file" + ENDIF + RETURN + $STATUS$ + R + $COMPLIANCE$ + XPP + $FILES$ + Library is core + $SEEALSO$ + Bin2I(), Bin2L(), Bin2W(), I2Bin(), L2Bin(), W2Bin(), Word(), U2Bin() + $END$ + */ + +/* $DOC$ + $TEMPLATE$ + Function + $NAME$ + W2Bin() + $CATEGORY$ + API + $SUBCATEGORY$ + Conversion + $ONELINER$ + Convert Harbour numeric into unsigned short encoded bytes + $SYNTAX$ + W2Bin( ) --> cBuffer + $ARGUMENTS$ + is a numeric value to convert (decimal digits are ignored). + $RETURNS$ + W2Bin() return two bytes character string that contains 16-bit + encoded unsigned short integer (least significant byte first). + $DESCRIPTION$ + W2Bin() is one of the low level binary conversion functions, those + functions convert between Harbour numeric and a character + representation of numeric value. W2Bin() take a numeric integer + value and convert it into two bytes of encoded 16-bit unsigned short + integer. + + You might ask what is the need for such functions, well, first of + all it allow you to read/write information from/to a binary file + (like extracting information from DBF header), it is also a useful + way to share information from source other than Harbour (C for + instance). + + W2Bin() is the opposite of Bin2W() + $STATUS$ + R + $COMPLIANCE$ + XPP + $FILES$ + Library is core + $SEEALSO$ + Bin2I(), Bin2L(), Bin2U(), Bin2W(), I2Bin(), L2Bin(), Word(), U2Bin() + $END$ + */ + +/* $DOC$ + $TEMPLATE$ + Function + $NAME$ + U2Bin() + $CATEGORY$ + API + $SUBCATEGORY$ + Conversion + $ONELINER$ + Convert Harbour numeric into unsigned long encoded bytes + $SYNTAX$ + U2Bin( ) --> cBuffer + $ARGUMENTS$ + is a numeric value to convert (decimal digits are ignored). + $RETURNS$ + U2Bin() return four bytes character string that contains 32-bit + encoded unsigned long integer (least significant byte first). + $DESCRIPTION$ + U2Bin() is one of the low level binary conversion functions, those + functions convert between Harbour numeric and a character + representation of numeric value. U2Bin() take a numeric integer + value and convert it into four bytes of encoded 32-bit unsigned long + integer. + + You might ask what is the need for such functions, well, first of + all it allow you to read/write information from/to a binary file + (like extracting information from DBF header), it is also a useful + way to share information from source other than Harbour (C for + instance). + + U2Bin() is the opposite of Bin2U() + $STATUS$ + R + $COMPLIANCE$ + XPP + $FILES$ + Library is core + $SEEALSO$ + Bin2I(), Bin2L(), Bin2U(), Bin2W(), I2Bin(), L2Bin(), W2Bin(), Word() + $END$ + */ diff --git a/contrib/hbxpp/doc/en/browse.txt b/contrib/hbxpp/doc/en/browse.txt new file mode 100644 index 0000000000..b05347af58 --- /dev/null +++ b/contrib/hbxpp/doc/en/browse.txt @@ -0,0 +1,51 @@ +/* + * Copyright 1999 Chen Kedem + * Documentation for: dbSkipper() + * + * See COPYING.txt for licensing terms. + * + */ + +/* $DOC$ + $TEMPLATE$ + Function + $NAME$ + dbSkipper() + $CATEGORY$ + API + $SUBCATEGORY$ + User interface + $ONELINER$ + Helper function to skip a database + $SYNTAX$ + dbSkipper( ) --> nSkipped + $ARGUMENTS$ + is the number of records to skip relative to current record. + Positive number would try to move the record pointer forward, while + a negative number would try to move the record pointer back + records. + $RETURNS$ + dbSkipper() return the number of actual record skipped. + $DESCRIPTION$ + dbSkipper() is a helper function used in browse mechanism to skip + a number of records while giving the caller indication about the + actual records skipped. + $EXAMPLES$ + // open a file and find if we've got enough records in it + USE month_sales + IF dbSkipper( 100 ) == 100 + ? "Good work! You can party now" + ELSE + ? "Too bad, you should really work harder" + ENDIF + dbCloseArea() + $STATUS$ + R + $COMPLIANCE$ + XPP + $FILES$ + Library is core + $SEEALSO$ + dbSkip(), SKIP + $END$ + */