2012-10-02 04:07 UTC+0200 Viktor Szakats (harbour syenar.net)

* contrib/hbnf/dispc.c
    + added TOFIX (needs to be updated for unicode savescreen buffers)

  * contrib/hbnf/menu1.prg
    ! use inkey.ch constants

  * contrib/hbnf/pickday.prg
    * comment

  * contrib/hbnf/tests/*.prg
    + added '#require "hbnf"' so they all work as hbrun scripts now.
      pretty cool.
    * Added CLS calls for few files to force CUI mode.
This commit is contained in:
Viktor Szakats
2012-10-02 02:15:26 +00:00
parent f0bfd87f8d
commit d67aec1555
61 changed files with 167 additions and 12 deletions

View File

@@ -16,6 +16,21 @@
The license applies to all entries newer than 2009-04-28.
*/
2012-10-02 04:07 UTC+0200 Viktor Szakats (harbour syenar.net)
* contrib/hbnf/dispc.c
+ added TOFIX (needs to be updated for unicode savescreen buffers)
* contrib/hbnf/menu1.prg
! use inkey.ch constants
* contrib/hbnf/pickday.prg
* comment
* contrib/hbnf/tests/*.prg
+ added '#require "hbnf"' so they all work as hbrun scripts now.
pretty cool.
* Added CLS calls for few files to force CUI mode.
2012-10-02 03:33 UTC+0200 Viktor Szakats (harbour syenar.net)
* utils/hbmk2/hbmk2.prg
* minor code cleanup by using macros for special dirs

View File

@@ -50,6 +50,8 @@
*
*/
/* TOFIX: for unicode savescreen buffers */
#include "hbapi.h"
#include "hbapifs.h"
#include "hbapigt.h"

View File

@@ -61,9 +61,33 @@ FUNCTION FT_MENU1( aBar, aOptions, aColors, nTopRow, lShadow )
LOCAL aBarKeys[ Len( aBar ) ]
// inkey codes for A - Z
LOCAL aKeyCodes := { 286, 304, 302, 288, 274, 289, 290, 291, 279, ;
292, 293, 294, 306, 305, 280, 281, 272, 275, ;
287, 276, 278, 303, 273, 301, 277, 300 }
LOCAL aKeyCodes := { ;
K_ALT_A ,;
K_ALT_B ,;
K_ALT_C ,;
K_ALT_D ,;
K_ALT_E ,;
K_ALT_F ,;
K_ALT_G ,;
K_ALT_H ,;
K_ALT_I ,;
K_ALT_J ,;
K_ALT_K ,;
K_ALT_L ,;
K_ALT_M ,;
K_ALT_N ,;
K_ALT_O ,;
K_ALT_P ,;
K_ALT_Q ,;
K_ALT_R ,;
K_ALT_S ,;
K_ALT_T ,;
K_ALT_U ,;
K_ALT_V ,;
K_ALT_W ,;
K_ALT_X ,;
K_ALT_Y ,;
K_ALT_Z }
// Len() of widest array element for for each pulldown menu
LOCAL aBarWidth[ Len( aBar ) ]

View File

@@ -23,7 +23,6 @@
*
*/
// test code
FUNCTION FT_PICKDAY()
LOCAL days := { "SUNDAY", "MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", ;

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbnf"
PROCEDURE Main()
LOCAL aList1, aList2, var0, nstart, nstop, nelapsed, nCtr

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbnf"
PROCEDURE Main()
LOCAL var0, myarray1 := Directory()

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbnf"
PROCEDURE Main()
LOCAL var0, myarray1 := Directory()

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbnf"
#include "directry.ch"
PROCEDURE Main()

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbnf"
#include "inkey.ch"
PROCEDURE Main()

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbnf"
PROCEDURE Main()
LOCAL cSearch, cTarget, var0

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbnf"
PROCEDURE Main()
FT_BLINK( "WAIT", 5, 10 )

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbnf"
#include "inkey.ch"
PROCEDURE Main()

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbnf"
#include "common.ch"
#include "setcurs.ch"

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbnf"
#include "common.ch"
PROCEDURE Main( cNum, cPrec )

View File

@@ -44,10 +44,10 @@
//
// See function: FT_DATECNFG()
//
// COMPILE ALL PROGRAMS WITH /N /W /A
//
//*******************************************************************
#require "hbnf"
PROCEDURE Main()
LOCAL nNum, dDate, aTestData, aTemp, cFY_Start, nDOW_Start

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbnf"
PROCEDURE Main()
LOCAL X

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbnf"
PROCEDURE Main()
LOCAL cInFile := "dfile.prg"

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbnf"
PROCEDURE Main( cDrv )
QOut( "Disk size: " + Str( FT_DSKSIZE( cDrv ) ) )

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbnf"
#include "inkey.ch"
#include "setcurs.ch"

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbnf"
PROCEDURE Main()
QOut( "Dos version: " + FT_DOSVER() )

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbnf"
PROCEDURE Main( sNumE )
QOut( FT_E2D( sNumE ) )

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbnf"
PROCEDURE Main()
LOCAL dStart, dEnd, cTimeStart, cTimeEnd, n, aDataTest

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbnf"
PROCEDURE Main( cCk, cStr, nOcc, xCase )
LOCAL nFind

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbnf"
PROCEDURE Main( cArg1 )
LOCAL nErrCode

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbnf"
#include "simpleio.ch"
PROCEDURE Main()

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbnf"
PROCEDURE Main( cNum1, cNum2 )
OutStd( Str( FT_GCD( Val( cNum1 ), Val( cNum2 ) ) ) + hb_eol() )

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbnf"
PROCEDURE Main( cHexNum )
QOut( FT_HEX2DEC( cHexNum ) )

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbnf"
PROCEDURE Main()
LOCAL nLoaded := ft_isshare()

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbnf"
PROCEDURE Main()
LOCAL aString := { ;

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbnf"
#include "setcurs.ch"
PROCEDURE Main( cCmdLine )

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbnf"
PROCEDURE Main()
LOCAL aNames := {}

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbnf"
PROCEDURE Main()
CLS

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbnf"
PROCEDURE Main( nRow, nCol )
// Pass valid row and column values for different video modes to change modes

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbnf"
// Pass valid row and column values for different video modes to change modes
PROCEDURE Main( nRow, nCol )

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbnf"
PROCEDURE Main()
? FT_NETPV( 10000, 10, { 10000, 15000, 16000, 17000 } )

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbnf"
PROCEDURE Main( cNum )
QOut( ft_ntow( Val( cNum ) ) )

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbnf"
PROCEDURE Main()
QOut( "Logical station: " + Str( FT_NWLSTAT() ) )

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbnf"
#define INITIAL_SEMAPHORE_VALUE 2
#define WAIT_SECONDS 1

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbnf"
PROCEDURE Main()
LOCAL x, cUid

View File

@@ -10,8 +10,12 @@
*
*/
#require "hbnf"
PROCEDURE Main()
CLS
FT_ONTICK( {|| OutStd( hb_milliSeconds(), hb_eol() ) } )
Inkey( 0 )

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbnf"
PROCEDURE Main()
@ 0, 0 CLEAR

View File

@@ -2,8 +2,11 @@
* $Id$
*/
#require "hbnf"
PROCEDURE Main()
CLS
QOut( "You selected " + FT_PICKDAY() )
RETURN

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbnf"
#include "inkey.ch"
PROCEDURE Main()

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbnf"
PROCEDURE Main( cParm1 )
//-------------------------------------------------------

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbnf"
// Write 100 random numbers from 1 to 100 to stdout.
// Run it multiple times and redirect output to a file
// to check it

View File

@@ -2,12 +2,14 @@
* $Id$
*/
#require "hbnf"
PROCEDURE Main()
LOCAL aArray := {;
{ "Invoice 1", SToD( "19910415" ), 1234.32, .T. }, ;
{ "Invoice 2", Date(), 234.98, .F. }, ;
{ "Invoice 3", Date() + 1, 0, .T. } }, aSave
{ "Invoice 3", Date() + 1, 0, .T. } }, aSave
LOCAL nErrorCode := 0
FT_SAVEARR( aArray, "invoice.dat", @nErrorCode )

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbnf"
PROCEDURE Main()
LOCAL aSets := FT_SAVESETS()

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbnf"
#define SCANCODE_ESCAPE ( hb_BChar( 27 ) + hb_BChar( 1 ) )
PROCEDURE Main()

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbnf"
PROCEDURE Main( cDate )
cDate := iif( cDate == NIL, DToC( Date() ), cDate )

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbnf"
PROCEDURE Main( cTime )
cTime := iif( cTime == NIL, Time(), cTime )

View File

@@ -2,7 +2,8 @@
* $Id$
*/
// Test routine
#require "hbnf"
// Invoke by running SLEEP 1.0 to sleep 1.0 seconds
PROCEDURE Main( nSleep )

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbnf"
PROCEDURE Main()
QOut( "Conventional memory: " + Str( FT_SYSMEM() ) + "K installed" )

View File

@@ -11,6 +11,8 @@
* tbnames.dbf/.ntx ARE AUTOMATICALLY CREATED BY THIS TEST PROGRAM
*/
#require "hbnf"
PROCEDURE Main()
LOCAL aFields := {}, cKey := "O", cOldColor

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbnf"
#include "fileio.ch"
PROCEDURE Main( cPath, cHide )

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbnf"
PROCEDURE Main()
LOCAL nver, nmar, ntype, nir, ppp
@@ -9,7 +11,7 @@ PROCEDURE Main()
nmar := FT_MVERSION( @nver, @ntype, @nir )
ppp := nmar + nver
? Str( nmar, 2, 0 ), '.', Str( nver, 2, 0 )
? ppp/100
? ppp / 100
Inkey( 0 )
? 'is mouse on', ft_mreset()
Inkey( 0 )

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbnf"
PROCEDURE Main()
LOCAL datamenu := { ;
@@ -30,6 +32,8 @@ PROCEDURE Main()
{ "Maintenance", "Reindex files, etc.", {|| FT_MENU2( maintmenu ) } }, ;
{ "Quit", "See ya later" } }
CLS
FT_MENU2( mainmenu )
RETURN

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbnf"
PROCEDURE Main( cMode )
FT_SETMODE( Val( cMode ) )

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbnf"
PROCEDURE Main( cDate, cDays )
LOCAL nDays := ft_addWkDy( CToD( cDate ), Val( cDays ) )

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbnf"
PROCEDURE Main( cStart, cStop )
QOut( ft_workdays( CToD( cStart ), CToD( cStop ) ) )

View File

@@ -2,6 +2,8 @@
* $Id$
*/
#require "hbnf"
// ADD PARAMETER "CENTURY" ON COMMAND LINES TO TEST 4-DIGIT YEARS
PROCEDURE Main( cCent )

View File

@@ -1,13 +1,15 @@
/*
* $Id$
* $Id$
*/
#require "hbnf"
PROCEDURE Main()
LOCAL i
SetColor( "W/B" )
// CLS
CLS
FOR i := 1 TO 24
@ i, 0 SAY Replicate( "@", 80 )
NEXT
@@ -22,4 +24,3 @@ PROCEDURE Main()
"Even though this line is way too long, and is in fact more than 80 characters long, if you care to check!" )
RETURN