diff --git a/harbour/ChangeLog b/harbour/ChangeLog index f8644fa056..6bdba65034 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,23 @@ The license applies to all entries newer than 2009-04-28. */ +2012-10-17 11:13 UTC+0200 Viktor Szakats (harbour syenar.net) + * contrib/hbnf/doc/en/*.txt + * set mime-type to UTF-8 + + * contrib/hbnf/hbnf.hbp + * contrib/hbnf/hbnf.hbx + * contrib/hbnf/readme.txt + + contrib/hbnf/video2.prg + + implemented FT_CLS(), FT_VIDSTR(), FT_WRTCHR() + + * contrib/hbnf/video1.c + + added dummy implementation of few missing + functions. (commented) + + * contrib/hbnf/doc/en/video1.txt + ! fixed old typo in example + 2012-10-17 10:23 UTC+0200 Viktor Szakats (harbour syenar.net) - tests/hbdocext.prg + tests/hbdocext.hb diff --git a/harbour/contrib/hbnf/doc/en/video1.txt b/harbour/contrib/hbnf/doc/en/video1.txt index 0e61d01320..c9e90a6bc5 100644 --- a/harbour/contrib/hbnf/doc/en/video1.txt +++ b/harbour/contrib/hbnf/doc/en/video1.txt @@ -13,14 +13,14 @@ * FT_VIDSTR( , , [, ] ) -> NIL * $ARGUMENTS$ * and are the screen coordinates. - * + * * is the string to be printed on the screen. - * + * * is an integer representing the color attribute. * The formula is: - * + * * nFore + ( nBack * 16 ) - * + * * FT_VIDSTR() will display the string in the current color if * is not passed. * $RETURNS$ @@ -32,10 +32,10 @@ * screen prints where speed is important. * $EXAMPLES$ * FT_VIDSTR( 10, 20, "Enter Name :", 165 ) - * + * * This example will print the specified text at coordinates 10, 20 * in bright white on top of Magenta. - * + * * $END$ */ @@ -50,12 +50,12 @@ * FT_WRTCHR( , , , ) -> NIL * $ARGUMENTS$ * and are the screen coordinates. - * + * * is the single character to print on the screen. - * + * * is an integer representing the color attribute. * The formula is: - * + * * nFore + ( nBack * 16 ) * $RETURNS$ * NIL @@ -68,14 +68,14 @@ * $EXAMPLES$ * FOR nX = 1 to MaxRow() * FOR nY = 1 to MaxCol() - * FT_PRNTCHR( nX, nY, "ù", (nX - 1)+(nY * 16) ) + * FT_WRTCHR( nX, nY, "∙", ( nX - 1 ) + ( nY * 16 ) ) * NEXT * NEXT - * + * * This example will write the ASCII character 249 to every location * on screen in every possible color combination. It will recognize * the status of SetBlink(). It uses direct video writes for speed. - * + * * $END$ */ @@ -91,12 +91,12 @@ * $ARGUMENTS$ * , , and are the screen coordinates * to clear. - * + * * is an integer representing the color attribute. * The formula is: - * + * * nFore + ( nBack * 16 ) - * + * * The default is black. * $RETURNS$ * NIL @@ -104,10 +104,10 @@ * This is a high speed function to clear the screen at the given * coordinates with the given color attribute. This does not change * Clipper's color settings. It uses direct video writes for speed. - * + * * $EXAMPLES$ * FT_CLS( 0, 0, MaxRow(), MaxCol(), 165 ) - * + * * This example will clear the entire screen with the colors * bright white on magenta. * $END$ @@ -125,10 +125,10 @@ * $ARGUMENTS$ * , , , and are the coordinates of the * screen region. - * + * * is an integer representing the new color attribute. * The formula is: - * + * * nFore + ( nBack * 16 ) * $RETURNS$ * NIL @@ -138,7 +138,7 @@ * video writes. * $EXAMPLES$ * FT_SETATTR( 0, 0, MaxRow(), MaxCol(), 95 ) - * + * * This example will change the entire screen's colors to bright white on * magenta without changing or overwriting any text on the screen. * $END$ @@ -165,7 +165,7 @@ * containing multiple color combinations. * $EXAMPLES$ * FT_REVATTR( 0, 0, MaxRow(), MaxCol() ) - * + * * This example will change the entire screen's colors to their reverse * attributes without changing or overwriting any text. * $END$ @@ -191,7 +191,7 @@ * only one character on screen and hence is faster and uses less memory. * $EXAMPLES$ * FT_REVCHR( 10, 20 ) - * + * * This example will change the text and background at 10, 20 to it's * reverse color attributes without changing or overwriting the * character itself. diff --git a/harbour/contrib/hbnf/hbnf.hbp b/harbour/contrib/hbnf/hbnf.hbp index 36385f8740..1ef763bc30 100644 --- a/harbour/contrib/hbnf/hbnf.hbp +++ b/harbour/contrib/hbnf/hbnf.hbp @@ -146,6 +146,7 @@ tbwhile.prg tempfile.prg vertmenu.prg vidcur.prg +video2.prg wda.prg week.prg workdays.prg diff --git a/harbour/contrib/hbnf/hbnf.hbx b/harbour/contrib/hbnf/hbnf.hbx index 24e6e8e435..985bf2df2c 100644 --- a/harbour/contrib/hbnf/hbnf.hbx +++ b/harbour/contrib/hbnf/hbnf.hbx @@ -61,6 +61,7 @@ DYNAMIC FT_CAPLOCK DYNAMIC FT_CHDIR DYNAMIC FT_CIV2MIL DYNAMIC FT_CLRSEL +DYNAMIC FT_CLS DYNAMIC FT_COLOR2N DYNAMIC FT_CTRL DYNAMIC FT_D2E @@ -224,9 +225,11 @@ DYNAMIC FT_SYS2MIL DYNAMIC FT_SYSMEM DYNAMIC FT_TEMPFIL DYNAMIC FT_UNSQZN +DYNAMIC FT_VIDSTR DYNAMIC FT_WEEK DYNAMIC FT_WORKDAYS DYNAMIC FT_WOY +DYNAMIC FT_WRTCHR DYNAMIC FT_XBOX DYNAMIC FT_XTOY DYNAMIC FT_YEAR diff --git a/harbour/contrib/hbnf/readme.txt b/harbour/contrib/hbnf/readme.txt index 147c788e98..bbcc8abe71 100644 --- a/harbour/contrib/hbnf/readme.txt +++ b/harbour/contrib/hbnf/readme.txt @@ -4,7 +4,7 @@ Functions to be rewritten: -c\video1.c FT_VIDSTR(), FT_WRTCHR(), FT_CLS(), FT_REVATTR(), FT_REVCHR() +c\video1.c FT_REVATTR(), FT_REVCHR() Functions to be fixed: diff --git a/harbour/contrib/hbnf/video1.c b/harbour/contrib/hbnf/video1.c index 4135cfae89..6354ca83f0 100644 --- a/harbour/contrib/hbnf/video1.c +++ b/harbour/contrib/hbnf/video1.c @@ -62,3 +62,17 @@ HB_FUNC( FT_SETATTR ) hb_parni( 4 ), hb_parni( 5 ) ); } + +#if 0 + +HB_FUNC( FT_REVATTR ) +{ + hb_ret(); +} + +HB_FUNC( FT_REVCHR ) +{ + hb_ret(); +} + +#endif diff --git a/harbour/contrib/hbnf/video2.prg b/harbour/contrib/hbnf/video2.prg new file mode 100644 index 0000000000..94c8a5c43e --- /dev/null +++ b/harbour/contrib/hbnf/video2.prg @@ -0,0 +1,81 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * FT_CLS(), FT_VIDSTR(), FT_WRTCHR() + * + * Copyright 2012 Viktor Szakats (harbour syenar.net) + * www - http://harbour-project.org + * + * 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. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://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. + * + */ + +PROCEDURE FT_CLS( nTop, nLeft, nBottom, nRight, nColor ) + + IF ! HB_ISNUMERIC( nColor ) + nColor := 0 + ENDIF + + hb_Scroll( nTop, nLeft, nBottom, nRight, , , nColor ) + + RETURN + +PROCEDURE FT_VIDSTR( nRow, nCol, cString, nColor ) + + IF ! HB_ISNUMERIC( nColor ) + nColor := 0 + ENDIF + + hb_DispOutAt( nRow, nCol, cString, nColor ) + + RETURN + +PROCEDURE FT_WRTCHR( nRow, nCol, cChar, nColor ) + + IF ! HB_ISNUMERIC( nColor ) + nColor := 0 + ENDIF + + hb_DispOutAt( nRow, nCol, Left( cChar, 1 ), nColor ) + + RETURN