2012-09-28 01:20 UTC+0200 Viktor Szakats (harbour syenar.net)

+ contrib/hbnf/hbmk.hbm
    + added .hbm for to make it easy to build embedded test 
      code protected by FT_TEST macro
      (note most/some test code will fail in -w3 mode)

  * contrib/hbnf/nwuid.prg
  * contrib/hbnf/tempfile.prg
    * minor in comment

  * contrib/hbnf/pchr.prg
    * use string literals instead of Chr() call
    * minor formatting

  * contrib/hbnf/dispmsg.prg
    ! fixed test code to compile in -w3 mode
    ! fixed key handling for unicode (including one
      regression from recent days)
    * formatted // comments

  * contrib/hbnf/aredit.prg
    * use Asc() instead of using hardwired char codes

  * contrib/hbnf/clrsel.prg
    ! fixed test code to compile in -w3 mode
    ! replaced Chr() calls for CP437 chars to unicode strings
    * formatted // comments

  * contrib/hbnf/woy.prg
    * use Tone() instead of Chr( 7 )

  * utils/hbmk2/hbmk2.prg
    + hbshell_gtInteractive() to set hb_SetTermCP()
    ! for pure unicode mode, set HB_GTI_BOXCP to UTF8EX
      (note this will cause problems with current default
      box drawing chars used in RTL)
This commit is contained in:
Viktor Szakats
2012-09-27 23:22:07 +00:00
parent a049c1d4c1
commit 520c8ea3f9
10 changed files with 143 additions and 96 deletions

View File

@@ -16,6 +16,43 @@
The license applies to all entries newer than 2009-04-28.
*/
2012-09-28 01:20 UTC+0200 Viktor Szakats (harbour syenar.net)
+ contrib/hbnf/hbmk.hbm
+ added .hbm for to make it easy to build embedded test
code protected by FT_TEST macro
(note most/some test code will fail in -w3 mode)
* contrib/hbnf/nwuid.prg
* contrib/hbnf/tempfile.prg
* minor in comment
* contrib/hbnf/pchr.prg
* use string literals instead of Chr() call
* minor formatting
* contrib/hbnf/dispmsg.prg
! fixed test code to compile in -w3 mode
! fixed key handling for unicode (including one
regression from recent days)
* formatted // comments
* contrib/hbnf/aredit.prg
* use Asc() instead of using hardwired char codes
* contrib/hbnf/clrsel.prg
! fixed test code to compile in -w3 mode
! replaced Chr() calls for CP437 chars to unicode strings
* formatted // comments
* contrib/hbnf/woy.prg
* use Tone() instead of Chr( 7 )
* utils/hbmk2/hbmk2.prg
+ hbshell_gtInteractive() to set hb_SetTermCP()
! for pure unicode mode, set HB_GTI_BOXCP to UTF8EX
(note this will cause problems with current default
box drawing chars used in RTL)
2012-09-27 23:44 UTC+0200 Viktor Szakats (vszakats syenar.net)
* utils/hbmk2/examples/plug_bis.hb
% minor cleanup

View File

@@ -54,21 +54,21 @@
PROCEDURE Main()
// Thanks to Jim Gale for helping me understand the basics
// Thanks to Jim Gale for helping me understand the basics
LOCAL i, ar[ 3, 26 ], aBlocks[ 3 ], aHeadings[ 3 ], nElem := 1, bGetFunc, cRet
// set up 2 dimensional array ar[]
// set up 2 dimensional array ar[]
FOR i := 1 TO 26
ar[ 1, i ] := i // 1 -> 26 Numeric
ar[ 2, i ] := Chr( i + 64 ) // "A" -> "Z" Character
ar[ 3, i ] := Chr( 91 - i ) // "Z" -> "A" Character
ar[ 1, i ] := i // 1 -> 26 Numeric
ar[ 2, i ] := Chr( Asc( "A" ) + i - 1 ) // "A" -> "Z" Character
ar[ 3, i ] := Chr( Asc( "Z" ) - i + 1 ) // "Z" -> "A" Character
NEXT i
// Set Up aHeadings[] for column headings
// Set Up aHeadings[] for column headings
aHeadings := { "Numbers", "Letters", "Reverse" }
// Set Up Blocks Describing Individual Elements in Array ar[]
// Set Up Blocks Describing Individual Elements in Array ar[]
aBlocks[ 1 ] := {|| Str( ar[ 1, nElem ], 2 ) } // to prevent default 10 spaces
aBlocks[ 2 ] := {|| ar[ 2, nElem ] }
aBlocks[ 3 ] := {|| ar[ 3, nElem ] }
// Set up TestGet() as bGetFunc
// Set up TestGet() as bGetFunc
bGetFunc := {| b, ar, nDim, nElem | TestGet( b, ar, nDim, nElem ) }
SET SCOREBOARD OFF
@@ -120,13 +120,13 @@ FUNCTION TestGet( b, ar, nDim, nElem )
FUNCTION FT_ArEdit( nTop, nLeft, nBot, nRight, ;
ar, nElem, aHeadings, aBlocks, bGetFunc )
// ANYTYPE[] ar - Array to browse
// NUMERIC nElem - Element In Array
// CHARACTER[] aHeadings - Array of Headings for each column
// BLOCK[] aBlocks - Array containing code block for each column.
// CODE BLOCK bGetFunc - Code Block For Special Get Processing
// NOTE: When evaluated a code block is passed the array element to
// be edited
// ANYTYPE[] ar - Array to browse
// NUMERIC nElem - Element In Array
// CHARACTER[] aHeadings - Array of Headings for each column
// BLOCK[] aBlocks - Array containing code block for each column.
// CODE BLOCK bGetFunc - Code Block For Special Get Processing
// NOTE: When evaluated a code block is passed the array element to
// be edited
LOCAL exit_requested, nKey, meth_no
LOCAL cSaveWin, i, b, column
@@ -160,7 +160,7 @@ FUNCTION FT_ArEdit( nTop, nLeft, nBot, nRight, ;
b:gotopblock := {|| nElem := 1 }
b:gobottomblock := {|| nElem := Len( ar[ 1 ] ) }
// skipblock originally coded by Robert DiFalco
// skipblock originally coded by Robert DiFalco
b:SkipBlock := {| nSkip, nStart | nStart := nElem, ;
nElem := Max( 1, Min( Len( ar[ 1 ] ), nElem + nSkip ) ), ;
nElem - nStart }
@@ -233,7 +233,7 @@ FUNCTION FT_ArEdit( nTop, nLeft, nBot, nRight, ;
ENDDO
RestScreen( nTop, nLeft, nBot, nRight, cSaveWin )
// if no bGetFunc then ESC returns 0, otherwise return value of last element
// if no bGetFunc then ESC returns 0, otherwise return value of last element
// TOFIX: ValType() never returns NIL
RETURN iif( ValType( bGetFunc ) == NIL .AND. nKey == K_ESC, ;
0, ar[ b:colPos, nElem ] )

View File

@@ -98,11 +98,10 @@ PROCEDURE Main( cVidMode )
LOCAL nRowDos := Row()
LOCAL nColDos := Col()
LOCAL lBlink := SetBlink( .F. ) // make sure it starts out .F.
LOCAL aEnvDos := FT_SaveSets()
LOCAL cScrDos := SaveScreen( 0, 0, MaxRow(), MaxCol() )
LOCAL lColour := .F.
LOCAL aClrs := {}
LOCAL lColour
LOCAL aClrs
DEFAULT cVidMode TO ""
NoSnow( ( "NOSNOW" $ Upper( cVidMode ) ) )
@@ -116,26 +115,28 @@ PROCEDURE Main( cVidMode )
SET SCOREBOARD OFF
SetCursor( SC_NONE )
lBlink := SetBlink( .F. )
SetBlink( .F. )
//.... a typical application might have the following different settings
// normally these would be stored in a .dbf/.dbv
//.... a typical application might have the following different settings
// normally these would be stored in a .dbf/.dbv
aClrs := { ;
{ "Desktop", "N/BG", "D", hb_UTF8ToStr( "▒" ) }, ;
{ "Title", "N/W", "T" }, ;
{ "Top Menu", "N/BG,N/W,W+/BG,W+/N,GR+/N", "M" }, ;
{ "Sub Menu", "W+/N*,GR+/N*,GR+/N*,W+/R,G+/R", "M" }, ;
{ "Standard Gets", "W/B, W+/N,,, W/N", "G" }, ;
{ "Nested Gets", "N/BG, W+/N,,, W/N", "G" }, ;
{ "Help", "N/G, W+/N,,, W/N", "W" }, ;
{ "Error Messages", "W+/R*,N/GR*,,,N/R*", "W" }, ;
{ "Database Query", "N/BG, N/GR*,,,N+/BG", "B" }, ;
{ "Pick List", "N/GR*,W+/B,,, BG/GR*", "A" } ;
{ "Desktop", "N/BG", "D", hb_UTF8ToStr( "▒" ) }, ;
{ "Title", "N/W", "T" }, ;
{ "Top Menu", "N/BG,N/W,W+/BG,W+/N,GR+/N", "M" }, ;
{ "Sub Menu", "W+/N*,GR+/N*,GR+/N*,W+/R,G+/R", "M" }, ;
{ "Standard Gets", "W/B, W+/N,,, W/N", "G" }, ;
{ "Nested Gets", "N/BG, W+/N,,, W/N", "G" }, ;
{ "Help", "N/G, W+/N,,, W/N", "W" }, ;
{ "Error Messages", "W+/R*,N/GR*,,,N/R*", "W" }, ;
{ "Database Query", "N/BG, N/GR*,,,N+/BG", "B" }, ;
{ "Pick List", "N/GR*,W+/B,,, BG/GR*", "A" } ;
}
aClrs := FT_ClrSel( aClrs, lColour )
//.... restore the DOS environment
HB_SYMBOL_UNUSED( aClrs )
//.... restore the DOS environment
FT_RestSets( aEnvDos )
RestScreen( 0, 0, MaxRow(), MaxCol(), cScrDos )
SetPos( nRowDos, nColDos )
@@ -149,8 +150,8 @@ PROCEDURE Main( cVidMode )
FUNCTION FT_ClrSel( aClrs, lColour, cChr )
// Colour selection routine
// Return -> the same array that was passed but with modified colours
// Colour selection routine
// Return -> the same array that was passed but with modified colours
LOCAL aClrOld := AClone( aClrs )
LOCAL aOptions
@@ -167,40 +168,40 @@ FUNCTION FT_ClrSel( aClrs, lColour, cChr )
LOCAL cScrSav := SaveScreen( 0, 0, MaxRow(), MaxCol() )
DEFAULT lColour TO IsColor()
DEFAULT cChr TO Chr( 254 ) + Chr( 254 )
DEFAULT cChr TO hb_UTF8ToStr( "■■" )
cChr := PadR( cChr, 2 )
SetCursor( SC_NONE )
SetColor( iif( lColour, "GR+/N,,N/N", "W+/N,,N/N" ) )
CLS
//.... initialize the colour palette
//.... initialize the colour palette
aClrPal := _ftInitPal( iif( lColour, aClrTab, aClrBW ) )
//.... paint the colours on the screen
//.... paint the colours on the screen
_ftShowPal( aClrPal, cChr )
//.... Determine length of longest name and make sure not greater than 20
//.... Determine length of longest name and make sure not greater than 20
AEval( aClrs, {| aOpt | nLen := Max( nLen, Len( aOpt[ C_NAME ] ) ) } )
nLen := Min( Max( nLen, 1 ), 20 ) + 2
//.... prepare an array for use with aChoice(); truncate names at 20 chrs.
//.... prepare an array for use with aChoice(); truncate names at 20 chrs.
aPrompt := Array( Len( aClrs ) )
AEval( aClrs, ;
{| aOpt, nE | aPrompt[ nE ] := " " + SubStr( aOpt[ C_NAME ], 1, nLen - 2 ) + " " };
)
//.... determine co-ordinates for the achoice window
//.... determine co-ordinates for the achoice window
nT := Max( Int( ( 18 - Len( aPrompt ) ) /2 ) - 1, 1 )
nB := Min( nT + Len( aPrompt ) + 1, 17 )
nL := Max( Int( ( 27 - nLen ) /2 ) - 2, 1 )
nR := Min( nL + nLen + 3, 26 )
//.... set up the window for aChoice
//.... set up the window for aChoice
SetColor( iif( lColour, "N/W,W+/R", "N/W,W+/N" ) )
ClearS( nT, nL, nB, nR )
//.... prompt for colour setting and modify
//.... prompt for colour setting and modify
DO WHILE nChoice != 0
Double( nT, nL + 1, nB, nR - 1 )
nChoice := AChoice( nt + 1, nL + 2, nB - 1, nR - 2, aPrompt, , , nChoice )
@@ -226,11 +227,11 @@ FUNCTION FT_ClrSel( aClrs, lColour, cChr )
//------------------------------------------------
STATIC FUNCTION _ftHiLite( nRow, nCol, cStr, nLen )
// Highlight the current selected aChoice element
// Return -> NIL
STATIC FUNCTION _ftHiLite( nRow, nCol, cStr, nLen )
LOCAL cClr := SetColor()
LOCAL aClr := _ftChr2Arr( cClr )
@@ -242,11 +243,11 @@ STATIC FUNCTION _ftHiLite( nRow, nCol, cStr, nLen )
//------------------------------------------------
STATIC FUNCTION _ftColours( aOpt, aClrPal, lColour )
// Colour selection for specific type of colour setting
// Return -> aOpt with modified colour strings
STATIC FUNCTION _ftColours( aOpt, aClrPal, lColour )
LOCAL nB, nT, nL, nR
LOCAL nX
LOCAL aClrs := {}
@@ -265,7 +266,7 @@ STATIC FUNCTION _ftColours( aOpt, aClrPal, lColour )
DEFAULT lColour TO IsColor()
//.... display appropriate prompts based on type of colour setting
//.... display appropriate prompts based on type of colour setting
nChoice := 1
DO CASE
CASE aOpt[ C_TYPE ] == "D"
@@ -346,7 +347,7 @@ STATIC FUNCTION _ftColours( aOpt, aClrPal, lColour )
ENDDO
//.... restore the lower 1/2 of screen, and colour
//.... restore the lower 1/2 of screen, and colour
RestScreen( 18, 00, MaxRow(), MaxCol(), cScrSav )
SetColor( cColour )
@@ -354,11 +355,11 @@ STATIC FUNCTION _ftColours( aOpt, aClrPal, lColour )
//------------------------------------------------
STATIC FUNCTION _ftShowIt( aOpt )
// Show an example of the colour setting
// Return -> NIL
STATIC FUNCTION _ftShowIt( aOpt )
LOCAL aClr := _ftChr2Arr( aOpt[ C_CLR ] )
IF !( aOpt[ C_TYPE ] == "M" ) // no borders in menu colour selection
@@ -378,7 +379,7 @@ STATIC FUNCTION _ftShowIt( aOpt )
CASE aOpt[ C_TYPE ] == "M" // Menus
SetColor( "W/N" )
BkGrnd( 19, 41, 23, 66, Chr( 177 ) )
BkGrnd( 19, 41, 23, 66, hb_UTF8ToStr( "▒" ) )
SetColor( aClr[ 1 ] )
Single( 19, 43, 22, 60 )
@ 18, 41 SAY " Report Inquiry Quit "
@@ -457,12 +458,12 @@ STATIC FUNCTION _ftShowIt( aOpt )
//------------------------------------------------
STATIC FUNCTION _ftClrSel( aClrPal, cClr, nElem, aOpt )
// select the colour combination from aClrPal and place in cClr
// cClr is the current colour being modified
// Return -> selected colour combination
STATIC FUNCTION _ftClrSel( aClrPal, cClr, nElem, aOpt )
LOCAL nR
LOCAL nC := 1
LOCAL lFound := .F.
@@ -478,7 +479,7 @@ STATIC FUNCTION _ftClrSel( aClrPal, cClr, nElem, aOpt )
SetColor( "W+/N" )
//.... find the starting row and column for the current colour
//.... find the starting row and column for the current colour
FOR nR := 1 TO nDim
FOR nC := 1 TO nDim
IF aClrPal[ nR, nC ] == AllTrim( cClr )
@@ -532,11 +533,11 @@ STATIC FUNCTION _ftClrSel( aClrPal, cClr, nElem, aOpt )
//------------------------------------------------
STATIC FUNCTION _ftClrPut( cClrStr, nElem, cClr )
// Place a colour setting in the colour string
// Return -> modified colour string
STATIC FUNCTION _ftClrPut( cClrStr, nElem, cClr )
LOCAL aClr := _ftChr2Arr( cClrStr )
aClr[ nElem ] := cClr
@@ -545,23 +546,23 @@ STATIC FUNCTION _ftClrPut( cClrStr, nElem, cClr )
//------------------------------------------------
STATIC FUNCTION _ftDeskChar( aOpt )
// Select the character to be used for the desktop background
// Return -> same array with new character
LOCAL aChar := { Chr( 32 ), Chr( 176 ), Chr( 177 ), Chr( 178 ) }
STATIC FUNCTION _ftDeskChar( aOpt )
LOCAL aChar := { " ", hb_UTF8ToStr( "░" ), hb_UTF8ToStr( "▒" ), hb_UTF8ToStr( "▓" ) }
LOCAL cChar := aOpt[ C_CHAR ]
LOCAL cClr := aOpt[ C_CLR ]
LOCAL nElem := AScan( aChar, cChar )
LOCAL n, nKey
IF nElem == 0 // this allows another character to be selected
IF nElem == 0 // this allows another character to be selected
AAdd( aChar, cChar ) // but there is the possibility that it will
nElem := 5 // not be available if they ever select another
ENDIF // char and store it. It's up to you to put it in
ENDIF // char and store it. It's up to you to put it in
//.... draw the choices on the screen
//.... draw the choices on the screen
SetColor( cClr )
FOR n := 1 TO Len( aChar )
@ n + 18, 29 SAY REPLICATE( aChar[ n ], 10 )
@@ -585,10 +586,10 @@ STATIC FUNCTION _ftDeskChar( aOpt )
//.... check key movement and modify co-ordinates
DO CASE
CASE nKey == K_ESC ; aOpt[ C_CHAR ] := cChar ; EXIT
CASE nKey == K_ENTER ; EXIT
CASE nKey == K_UP ; --n
CASE nKey == K_DOWN ; ++n
CASE nKey == K_ESC ; aOpt[ C_CHAR ] := cChar ; EXIT
CASE nKey == K_ENTER ; EXIT
CASE nKey == K_UP ; --n
CASE nKey == K_DOWN ; ++n
ENDCASE
ENDDO
@@ -600,11 +601,11 @@ STATIC FUNCTION _ftDeskChar( aOpt )
//------------------------------------------------
STATIC FUNCTION _ftChr2Arr( cString, cDelim )
// Convert a chr string to an array
// Return -> array
STATIC FUNCTION _ftChr2Arr( cString, cDelim )
LOCAL n, aArray := {}
DEFAULT cDelim TO ","
@@ -624,11 +625,11 @@ STATIC FUNCTION _ftChr2Arr( cString, cDelim )
//------------------------------------------------
STATIC FUNCTION _ftArr2Chr( aArray, cDelim )
// convert an array to a chr string
// Return -> string
STATIC FUNCTION _ftArr2Chr( aArray, cDelim )
LOCAL cString := ""
DEFAULT aArray TO {}
@@ -640,18 +641,18 @@ STATIC FUNCTION _ftArr2Chr( aArray, cDelim )
//------------------------------------------------
STATIC FUNCTION _ftShowPal( aClrPal, cChr )
// Paint the palette on the screen
// Return -> NIL
STATIC FUNCTION _ftShowPal( aClrPal, cChr )
LOCAL nF, nB
LOCAL nTop := 0
LOCAL nLeft := 28
LOCAL nBottom := nTop + Len( aClrPal ) + 1
LOCAL nRight := nLeft + ( Len( aClrPal ) * 3 ) + 2
//.... Buffer the screen output
//.... Buffer the screen output
DispBegin()
Single( nTop, nLeft, nBottom, nRight )
FOR nF := 1 TO Len( aClrPal )
@@ -666,12 +667,12 @@ STATIC FUNCTION _ftShowPal( aClrPal, cChr )
//------------------------------------------------
STATIC FUNCTION _ftInitPal( aClrTab )
// Initialise the colour palette based on the passed colour table aClrTab
// Load the palette with colours
// Return -> Colour pallette array
STATIC FUNCTION _ftInitPal( aClrTab )
LOCAL nF, nB
LOCAL nDim := Len( aClrTab )
LOCAL aClrPal := Array( nDim * 2, nDim * 2 )
@@ -688,11 +689,11 @@ STATIC FUNCTION _ftInitPal( aClrTab )
//------------------------------------------------
STATIC FUNCTION _ftIdentArr( aArr1, aArr2 )
// Compares the contents of 2 arrays
// Return -> logical
STATIC FUNCTION _ftIdentArr( aArr1, aArr2 )
LOCAL lIdentical := Len( aArr1 ) == Len( aArr2 )
LOCAL n := 1

View File

@@ -32,7 +32,7 @@
// beginning of demo program
#ifdef FT_TEST
PROCEDURE Main( cCmdLine )
PROCEDURE Main()
LOCAL cDosScrn
LOCAL nDosRow
@@ -42,9 +42,9 @@ PROCEDURE Main( cCmdLine )
LOCAL nType
// color variables
LOCAL cNormH, cNormN, cNormE
LOCAL cWindH, cWindN, cWindE
LOCAL cErrH, cErrN, cErrE
LOCAL cNormH, cNormN
LOCAL cWindH, cWindN
LOCAL cErrH, cErrN
// main routine starts here
SET SCOREBOARD OFF
@@ -53,13 +53,10 @@ PROCEDURE Main( cCmdLine )
cNormH := iif( lColor, "W+/BG", "W+/N" )
cNormN := iif( lColor, "N/BG" , "W/N" )
cNormE := iif( lColor, "N/W" , "N/W" )
cWindH := iif( lColor, "W+/B", "W+/N" )
cWindN := iif( lColor, "W/B" , "W/N" )
cWindE := iif( lColor, "N/W" , "N/W" )
cErrH := iif( lColor, "W+/R", "W+/N" )
cErrN := iif( lColor, "W/R" , "W/N" )
cErrE := iif( lColor, "N/W" , "N/W" )
cDosScrn := SaveScreen()
nDosRow := Row()
@@ -84,7 +81,7 @@ PROCEDURE Main( cCmdLine )
"Create Or Edit [B]ack Order", ;
"Create Or Edit [Q]uote", ;
"[Esc] To Exit" }, ;
{ cWindN, , , , , cWindH } }, "BIOQ" + Chr( 27 ) )
{ cWindN, , , , , cWindH } }, "BIOQ" + Chr( K_ESC ) )
SetColor( "W/N" )
SetCursor( SC_NORMAL )
@@ -216,12 +213,12 @@ FUNCTION FT_DispMsg( aInfo, cKey, nBoxTop, nBoxLeft, cnBoxString, lShadow )
IF cKey != NIL
IF Len( cKey ) == 1
nOption := FT_SInkey( 0 )
IF Upper( hb_keyChar( nOption ) ) == cKey
IF Upper( Chr( nOption ) ) == cKey
xRtnVal := .T.
ENDIF
ELSE
nOption := 0
DO WHILE At( Upper( hb_keyChar( nOption ) ), Upper( cKey ) ) == 0
DO WHILE hb_BAt( Upper( Chr( nOption ) ), Upper( cKey ) ) == 0
nOption := FT_SInkey( 0 )
ENDDO
xRtnVal := nOption

View File

@@ -0,0 +1,9 @@
#
# $Id$
#
hbnf.hbc
-w3 -es2
-DFT_TEST

View File

@@ -19,7 +19,7 @@
* Minor edit to file header
*
* Rev 1.2 14 Jun 1991 04:31:30 GLENN
* Return value still needs to have nulls (chr(0)) removed. Put that back
* Return value still needs to have nulls (hb_bchar(0)) removed. Put that back
* in.
*
* Rev 1.1 12 Jun 1991 02:25:22 GLENN

View File

@@ -42,18 +42,18 @@ FUNCTION FT_PCHR( c_nums )
DO WHILE ! ( c_part == "~" .OR. c_part == "" )
IF SubStr( c_part, 1, 1 ) == Chr( 34 )
IF SubStr( c_part, 1, 1 ) == '"'
c_st2 := At( Chr( 34 ), SubStr( c_part,2 ) ) + 1
c_st2 := At( '"', SubStr( c_part,2 ) ) + 1
c_ret := c_ret + SubStr( c_part, 2, c_st2 - 2 )
ELSEIF SubStr( c_part, 1, 1 ) == "&"
c_upper := Upper( c_part )
c_t1 := At( SubStr( c_upper, 2, 1 ), c_hex ) - 1
IF c_t1 >- 1
IF c_t1 > -1
c_t2 := At( SubStr( c_upper, 3, 1 ), c_hex ) - 1
IF c_t2 >- 1
IF c_t2 > -1
c_t1 := c_t1 * 16 + c_t2
ENDIF
c_ret := c_ret + Chr( c_t1 )

View File

@@ -24,7 +24,7 @@
* Forest Belt proofread/edited/cleaned up doc
*
* Rev 1.4 17 Jul 1991 22:11:18 GLENN
* Stripped off chr(0)s in the return value (aRegs[DS])
* Stripped off hb_bchar(0)s in the return value (aRegs[DS])
*
* Rev 1.3 03 Jul 1991 01:08:08 GLENN
* Changed one line in FT_TEST driver ( cHide == "Y" )

View File

@@ -56,7 +56,7 @@ PROCEDURE Main( cCent )
ENDIF
IF Left( DToC( CToD( cDate ) ), 1 ) == " "
QQOut( Chr( 7 ) )
Tone( 800, 1 )
@ 4, 24 SAY "INVALID DATE"
Inkey( 2 )
LOOP

View File

@@ -13180,6 +13180,8 @@ FUNCTION hbshell_ProgName()
FUNCTION hbshell_gtInteractive()
IF !( "GT" + hb_gtVersion( 0 ) == __hbshell_gtDefault() )
hb_gtSelect( hb_gtCreate( __hbshell_gtDefault() ) )
hb_SetTermCP( hb_cdpTerm() )
hb_gtInfo( HB_GTI_BOXCP, hb_cdpSelect() )
ENDIF
RETURN NIL
@@ -13623,6 +13625,7 @@ STATIC PROCEDURE SetUILang( cUILNG )
/* Setup input CP of the translation */
hb_cdpSelect( "UTF8EX" )
hb_gtInfo( HB_GTI_BOXCP, hb_cdpSelect() )
/* Configure terminal and OS codepage */
hb_SetTermCP( hb_cdpTerm() )