2007-09-11 00:40 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* include/hbcompat.ch
* include/hbextern.ch
* source/rtl/hbini.prg
+ .ini functions added to hbextern.ch.
* .ini functions renamed so that all of them reside
in the hb_ini*() namespace. xhb compatibility translates
added.
* source/debug/debugger.prg
* Formatting.
* source/rtl/memoedit.prg
% Minor optimization.
* source/rtl/teditor.prg
! Fixed to not ask for confirmation when pressing
<Esc> on an unedited buffer.
This commit is contained in:
@@ -8,6 +8,25 @@
|
||||
2002-12-01 13:30 UTC+0100 Foo Bar <foo.bar@foobar.org>
|
||||
*/
|
||||
|
||||
2007-09-11 00:40 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* include/hbcompat.ch
|
||||
* include/hbextern.ch
|
||||
* source/rtl/hbini.prg
|
||||
+ .ini functions added to hbextern.ch.
|
||||
* .ini functions renamed so that all of them reside
|
||||
in the hb_ini*() namespace. xhb compatibility translates
|
||||
added.
|
||||
|
||||
* source/debug/debugger.prg
|
||||
* Formatting.
|
||||
|
||||
* source/rtl/memoedit.prg
|
||||
% Minor optimization.
|
||||
|
||||
* source/rtl/teditor.prg
|
||||
! Fixed to not ask for confirmation when pressing
|
||||
<Esc> on an unedited buffer.
|
||||
|
||||
2007-09-10 22:51 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* contrib/libct/ctnet.c
|
||||
* contrib/libct/dattime2.c
|
||||
|
||||
@@ -76,14 +76,18 @@
|
||||
#xtranslate hb_setLastKey([<x,...>])=> setLastKey(<x>)
|
||||
#xtranslate hb_CStr([<x,...>]) => CStr(<x>)
|
||||
|
||||
#xtranslate HB_HEXTONUM([<c,...>]) => HEXTONUM(<c>)
|
||||
#xtranslate HB_NUMTOHEX([<n,...>]) => NUMTOHEX(<n>)
|
||||
#xtranslate HB_HEXTOSTR([<c,...>]) => HEXTOSTR(<c>)
|
||||
#xtranslate HB_STRTOHEX([<c,...>]) => STRTOHEX(<c>)
|
||||
#xtranslate hb_HexToNum([<c,...>]) => HexToNum(<c>)
|
||||
#xtranslate hb_NumToHex([<n,...>]) => NumToHex(<n>)
|
||||
#xtranslate hb_HexToStr([<c,...>]) => HexToStr(<c>)
|
||||
#xtranslate hb_StrToHex([<c,...>]) => StrToHex(<c>)
|
||||
|
||||
#xtranslate HB_RASCAN([<x,...>]) => RASCAN(<x>)
|
||||
#xtranslate hb_RAScan([<x,...>]) => RAScan(<x>)
|
||||
|
||||
#xtranslate HB_ISPOINTER( <xValue> )=> ISPOINTER( <xValue> )
|
||||
#xtranslate hb_ISPOINTER( <xValue> )=> ISPOINTER( <xValue> )
|
||||
|
||||
#xtranslate hb_IniSetComment([<x,...>]) => hb_SetIniComment(<x>)
|
||||
#xtranslate hb_IniRead([<x,...>]) => hb_ReadIni(<x>)
|
||||
#xtranslate hb_IniWrite([<x,...>]) => hb_WriteIni(<x>)
|
||||
|
||||
#xtranslate HBDebugger() => TDebugger()
|
||||
#xtranslate HBBrwText() => TBrwText()
|
||||
@@ -103,9 +107,9 @@
|
||||
|
||||
#xtranslate gtSetClipboard(<x>) => hb_gtInfo( GTI_CLIPBOARDDATA, <x> )
|
||||
#xtranslate gtGetClipboard() => hb_gtInfo( GTI_CLIPBOARDDATA )
|
||||
#xtranslate gtGetClipBoardSize() => len( hb_gtInfo( GTI_CLIPBOARDDATA ) )
|
||||
#xtranslate gtGetClipBoardSize() => Len( hb_gtInfo( GTI_CLIPBOARDDATA ) )
|
||||
#xtranslate gtPasteClipBoard([<n>]) => hb_gtInfo( GTI_CLIPBOARDPAST )
|
||||
#xtranslate gtProcessMessages() => nextkey()
|
||||
#xtranslate gtProcessMessages() => NextKey()
|
||||
#xtranslate gfxPrimitive([<x,...>]) => hb_gfxPrimitive(<x>)
|
||||
#xtranslate gfxText([<x,...>]) => hb_gfxText(<x>)
|
||||
|
||||
@@ -118,43 +122,57 @@
|
||||
#xtranslate setLastKey([<x,...>]) => hb_setLastKey(<x>)
|
||||
#xtranslate CStr([<x,...>]) => hb_CStr(<x>)
|
||||
|
||||
#xtranslate HEXTONUM([<c,...>]) => HB_HEXTONUM(<c>)
|
||||
#xtranslate NUMTOHEX([<n,...>]) => HB_NUMTOHEX(<n>)
|
||||
#xtranslate HEXTOSTR([<c,...>]) => HB_HEXTOSTR(<c>)
|
||||
#xtranslate STRTOHEX([<c,...>]) => HB_STRTOHEX(<c>)
|
||||
#xtranslate HexToNum([<c,...>]) => hb_HexToNum(<c>)
|
||||
#xtranslate NumToHex([<n,...>]) => hb_NumToHex(<n>)
|
||||
#xtranslate HexToStr([<c,...>]) => hb_HexToStr(<c>)
|
||||
#xtranslate StrToHex([<c,...>]) => hb_StrToHex(<c>)
|
||||
|
||||
#xtranslate RASCAN([<x,...>]) => HB_RASCAN(<x>)
|
||||
#xtranslate RAScan([<x,...>]) => hb_RAScan(<x>)
|
||||
|
||||
#xtranslate ISPOINTER( <xValue> ) => HB_ISPOINTER( <xValue> )
|
||||
#xtranslate ISPOINTER( <xValue> ) => hb_ISPOINTER( <xValue> )
|
||||
|
||||
#xtranslate str(<x>,[<y>],[<y>],<z>)=> iif(<z>, ltrim(str(<x>)), str(<x>))
|
||||
#xtranslate HB_CMDARGARGV([<x,...>])=> HB_ARGV(0)
|
||||
#xtranslate hb_SetIniComment([<x,...>]) => hb_IniSetComment(<x>)
|
||||
#xtranslate hb_ReadIni([<x,...>]) => hb_IniRead(<x>)
|
||||
#xtranslate hb_WriteIni([<x,...>]) => hb_IniWrite(<x>)
|
||||
|
||||
#xtranslate HASH([<x,...>]) => HB_HASH(<x>)
|
||||
#xtranslate HHASKEY([<x,...>]) => HB_HHASKEY(<x>)
|
||||
#xtranslate HGETPOS([<x,...>]) => HB_HPOS(<x>)
|
||||
#xtranslate HGET([<x,...>]) => HB_HGET(<x>)
|
||||
#xtranslate HSET([<x,...>]) => HB_HSET(<x>)
|
||||
#xtranslate HDEL([<x,...>]) => HB_HDEL(<x>)
|
||||
#xtranslate HGETKEYAT([<x,...>]) => HB_HKEYAT(<x>)
|
||||
#xtranslate HGETVALUEAT([<x,...>]) => HB_HVALUEAT(<x>)
|
||||
#xtranslate HSETVALUEAT([<x,...>]) => HB_HVALUEAT(<x>)
|
||||
#xtranslate HGETPAIRAT([<x,...>]) => HB_HPAIRAT(<x>)
|
||||
#xtranslate HDELAT([<x,...>]) => HB_HDELAT(<x>)
|
||||
#xtranslate HGETKEYS([<x,...>]) => HB_HKEYS(<x>)
|
||||
#xtranslate HGETVALUES([<x,...>]) => HB_HVALUES(<x>)
|
||||
#xtranslate HFILL([<x,...>]) => HB_HFILL(<x>)
|
||||
#xtranslate HCLONE([<x,...>]) => HB_HCLONE(<x>)
|
||||
#xtranslate HCOPY([<x,...>]) => HB_HCOPY(<x>)
|
||||
#xtranslate HMERGE([<x,...>]) => HB_HMERGE(<x>)
|
||||
#xtranslate HEVAL([<x,...>]) => HB_HEVAL(<x>)
|
||||
#xtranslate HSCAN([<x,...>]) => HB_HSCAN(<x>)
|
||||
#xtranslate HSETCASEMATCH([<x,...>])=> HB_HSETCASEMATCH(<x>)
|
||||
#xtranslate HGETCASEMATCH([<x,...>])=> HB_HCASEMATCH(<x>)
|
||||
#xtranslate HSETAUTOADD([<x,...>]) => HB_HSETAUTOADD(<x>)
|
||||
#xtranslate HGETAUTOADD([<x,...>]) => HB_HAUTOADD(<x>)
|
||||
#xtranslate HALLOCATE([<x,...>]) => HB_HALLOCATE(<x>)
|
||||
#xtranslate HDEFAULT([<x,...>]) => HB_HDEFAULT(<x>)
|
||||
#xtranslate TDebugger() => HBDebugger()
|
||||
#xtranslate TBrwText() => HBBrwText()
|
||||
#xtranslate TDbMenu() => HBDbMenu()
|
||||
#xtranslate TDbMenuItem() => HBDbMenuItem()
|
||||
#xtranslate TDbWindow() => HBDbWindow()
|
||||
#xtranslate TDBGBrowser() => HBDbBrowse()
|
||||
#xtranslate TDBGArray() => HBDbArray()
|
||||
#xtranslate TDBGHash() => HBDbHash()
|
||||
#xtranslate TDBGobject() => HBDbObject()
|
||||
|
||||
#xtranslate Str(<x>,[<y>],[<y>],<z>)=> iif(<z>, LTrim(Str(<x>)), Str(<x>))
|
||||
#xtranslate hb_CMDARGARGV([<x,...>])=> hb_ARGV(0)
|
||||
|
||||
#xtranslate HASH([<x,...>]) => hb_HASH(<x>)
|
||||
#xtranslate HHASKEY([<x,...>]) => hb_HHASKEY(<x>)
|
||||
#xtranslate HGETPOS([<x,...>]) => hb_HPOS(<x>)
|
||||
#xtranslate HGET([<x,...>]) => hb_HGET(<x>)
|
||||
#xtranslate HSET([<x,...>]) => hb_HSET(<x>)
|
||||
#xtranslate HDEL([<x,...>]) => hb_HDEL(<x>)
|
||||
#xtranslate HGETKEYAT([<x,...>]) => hb_HKEYAT(<x>)
|
||||
#xtranslate HGETVALUEAT([<x,...>]) => hb_HVALUEAT(<x>)
|
||||
#xtranslate HSETVALUEAT([<x,...>]) => hb_HVALUEAT(<x>)
|
||||
#xtranslate HGETPAIRAT([<x,...>]) => hb_HPAIRAT(<x>)
|
||||
#xtranslate HDELAT([<x,...>]) => hb_HDELAT(<x>)
|
||||
#xtranslate HGETKEYS([<x,...>]) => hb_HKEYS(<x>)
|
||||
#xtranslate HGETVALUES([<x,...>]) => hb_HVALUES(<x>)
|
||||
#xtranslate HFILL([<x,...>]) => hb_HFILL(<x>)
|
||||
#xtranslate HCLONE([<x,...>]) => hb_HCLONE(<x>)
|
||||
#xtranslate HCOPY([<x,...>]) => hb_HCOPY(<x>)
|
||||
#xtranslate HMERGE([<x,...>]) => hb_HMERGE(<x>)
|
||||
#xtranslate HEVAL([<x,...>]) => hb_HEVAL(<x>)
|
||||
#xtranslate HSCAN([<x,...>]) => hb_HSCAN(<x>)
|
||||
#xtranslate HSETCASEMATCH([<x,...>])=> hb_HSETCASEMATCH(<x>)
|
||||
#xtranslate HGETCASEMATCH([<x,...>])=> hb_HCASEMATCH(<x>)
|
||||
#xtranslate HSETAUTOADD([<x,...>]) => hb_HSETAUTOADD(<x>)
|
||||
#xtranslate HGETAUTOADD([<x,...>]) => hb_HAUTOADD(<x>)
|
||||
#xtranslate HALLOCATE([<x,...>]) => hb_HALLOCATE(<x>)
|
||||
#xtranslate HDEFAULT([<x,...>]) => hb_HDEFAULT(<x>)
|
||||
|
||||
/* THROW => generate error */
|
||||
#xtranslate THROW(<oErr>) => (Eval(ErrorBlock(), <oErr>), Break(<oErr>))
|
||||
@@ -184,16 +202,6 @@
|
||||
#translate ( <exp1> & <exp2> ) => ( HB_BITAND( (<exp1>), (<exp2>) ) )
|
||||
#translate ( <exp1> ^^ <exp2> ) => ( HB_BITXOR( (<exp1>), (<exp2>) ) )
|
||||
|
||||
#xtranslate TDebugger() => HBDebugger()
|
||||
#xtranslate TBrwText() => HBBrwText()
|
||||
#xtranslate TDbMenu() => HBDbMenu()
|
||||
#xtranslate TDbMenuItem() => HBDbMenuItem()
|
||||
#xtranslate TDbWindow() => HBDbWindow()
|
||||
#xtranslate TDBGBrowser() => HBDbBrowse()
|
||||
#xtranslate TDBGArray() => HBDbArray()
|
||||
#xtranslate TDBGHash() => HBDbHash()
|
||||
#xtranslate TDBGobject() => HBDbObject()
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* __HARBOUR__ */
|
||||
|
||||
@@ -410,6 +410,10 @@ EXTERNAL HB_NUMTOHEX
|
||||
EXTERNAL HB_HEXTOSTR
|
||||
EXTERNAL HB_STRTOHEX
|
||||
|
||||
EXTERNAL HB_INISETCOMMENT
|
||||
EXTERNAL HB_INIREAD
|
||||
EXTERNAL HB_INIWRITE
|
||||
|
||||
EXTERNAL HBCLASS
|
||||
EXTERNAL HBOBJECT
|
||||
|
||||
|
||||
@@ -75,18 +75,10 @@
|
||||
#include "setcurs.ch"
|
||||
|
||||
/* A macro to compare filenames on different platforms. */
|
||||
#ifdef __PLATFORM__DOS
|
||||
#define FILENAME_EQUAL(s1, s2) ( Lower( s1 ) == Lower( s2 ) )
|
||||
#if defined(__PLATFORM__DOS) || defined(__PLATFORM__OS2) || defined(__PLATFORM__Windows)
|
||||
#define FILENAME_EQUAL( s1, s2 ) ( Lower( s1 ) == Lower( s2 ) )
|
||||
#else
|
||||
#ifdef __PLATFORM__OS2
|
||||
#define FILENAME_EQUAL(s1, s2) ( Lower( s1 ) == Lower( s2 ) )
|
||||
#else
|
||||
#ifdef __PLATFORM__Windows
|
||||
#define FILENAME_EQUAL(s1, s2) ( Lower( s1 ) == Lower( s2 ) )
|
||||
#else
|
||||
#define FILENAME_EQUAL(s1, s2) ( s1 == s2 )
|
||||
#endif
|
||||
#endif
|
||||
#define FILENAME_EQUAL( s1, s2 ) ( s1 == s2 )
|
||||
#endif
|
||||
|
||||
|
||||
@@ -115,8 +107,7 @@
|
||||
#define MODULE_GLOBALS 3
|
||||
#define MODULE_EXTERNGLOBALS 4
|
||||
|
||||
|
||||
* The dimension of the debugger window
|
||||
/* The dimensions of the debugger window */
|
||||
#define DEBUGGER_MINROW 0
|
||||
#define DEBUGGER_MINCOL 0
|
||||
#define DEBUGGER_MAXROW 22
|
||||
@@ -735,10 +726,10 @@ METHOD Colors() CLASS HBDebugger
|
||||
|
||||
oBrwColors:AddColumn( oCol := TBColumnNew( "", { || PadR( aColors[ oBrwColors:Cargo[ 1 ] ], 14 ) } ) )
|
||||
oCol:DefColor := { 1, 2 }
|
||||
AAdd(oBrwColors:Cargo[ 2 ],acolors)
|
||||
AAdd( oBrwColors:Cargo[ 2 ],acolors)
|
||||
oBrwColors:AddColumn( oCol := TBColumnNew( "",;
|
||||
{ || PadR( '"' + ::aColors[ oBrwColors:Cargo[ 1 ] ] + '"', nWidth - 15 ) } ) )
|
||||
AAdd(oBrwColors:Cargo[ 2 ],acolors)
|
||||
AAdd( oBrwColors:Cargo[ 2 ],acolors)
|
||||
oCol:DefColor := { 1, 3 }
|
||||
ocol:width := 50
|
||||
oBrwColors:autolite:=.F.
|
||||
@@ -862,14 +853,14 @@ METHOD DoCommand( cCommand ) CLASS HBDebugger
|
||||
|
||||
DO CASE
|
||||
CASE cCommand == "??" .OR. cCommand == "?"
|
||||
aCmnd[WP_TYPE] := cCommand
|
||||
aCmnd[WP_EXPR] := cParam
|
||||
aCmnd[ WP_TYPE ] := cCommand
|
||||
aCmnd[ WP_EXPR ] := cParam
|
||||
|
||||
::RestoreAppState()
|
||||
cResult := ::GetExprValue( cParam, @lValid )
|
||||
::SaveAppState()
|
||||
|
||||
IF aCmnd[WP_TYPE] == "??"
|
||||
IF aCmnd[ WP_TYPE ] == "??"
|
||||
IF lValid
|
||||
::Inspect( aCmnd[ WP_EXPR ], cResult )
|
||||
ENDIF
|
||||
@@ -1124,15 +1115,15 @@ METHOD EditColor( nColor, oBrwColors ) CLASS HBDebugger
|
||||
READ
|
||||
SetCursor( SC_NONE )
|
||||
#else
|
||||
cColor := getdbginput( Row(), Col() + 15, cColor, { |cColor| iif( Type( cColor ) != "C", ( Alert( "Must be string" ), .F. ), .T. ) }, SubStr( ::ClrModal(), 5 ) )
|
||||
cColor := getdbginput( Row(), Col() + 15, cColor, {| cColor | iif( Type( cColor ) != "C", ( Alert( "Must be string" ), .F. ), .T. ) }, SubStr( ::ClrModal(), 5 ) )
|
||||
#endif
|
||||
|
||||
Set( _SET_SCOREBOARD, lPrevScore )
|
||||
Set( _SET_EXIT, lPrevExit )
|
||||
|
||||
if LastKey() != K_ESC
|
||||
IF LastKey() != K_ESC
|
||||
::aColors[ nColor ] := &cColor
|
||||
endif
|
||||
ENDIF
|
||||
|
||||
oBrwColors:RefreshCurrent()
|
||||
oBrwColors:ForceStable()
|
||||
@@ -1153,7 +1144,7 @@ METHOD EditSet( nSet, oBrwSets ) CLASS HBDebugger
|
||||
#ifndef HB_NO_READDBG
|
||||
SetCursor( SC_NORMAL )
|
||||
@ Row(), Col() + 13 GET cSet COLOR SubStr( ::ClrModal(), 5 ) ;
|
||||
VALID iif( Type(cSet) != cType, ( Alert( "Must be of type '" + cType + "'" ), .F. ), .T. )
|
||||
VALID iif( Type( cSet ) != cType, ( Alert( "Must be of type '" + cType + "'" ), .F. ), .T. )
|
||||
|
||||
READ
|
||||
SetCursor( SC_NONE )
|
||||
@@ -1183,25 +1174,23 @@ METHOD EditVar( nVar ) CLASS HBDebugger
|
||||
|
||||
uVarValue := ::VarGetValue( ::aVars[ nVar ] )
|
||||
|
||||
DO CASE
|
||||
CASE ValType( uVarValue ) $ "AHOP"
|
||||
|
||||
IF ValType( uVarValue ) $ "AHOP"
|
||||
::InputBox( cVarName, uVarValue, NIL, .F. )
|
||||
|
||||
OTHERWISE
|
||||
ELSE
|
||||
cVarStr := ::InputBox( cVarName, __dbgValToStr( uVarValue ),;
|
||||
{ | u | iif( Type( u ) == "UE", ( Alert( "Expression error" ), .F. ), .T. ) } )
|
||||
ENDCASE
|
||||
ENDIF
|
||||
|
||||
IF LastKey() != K_ESC
|
||||
|
||||
if LastKey() != K_ESC
|
||||
DO CASE
|
||||
CASE cVarStr == "{ ... }"
|
||||
//aArray := ::VarGetValue( ::aVars[ nVar ] )
|
||||
if Len( uVarValue ) > 0
|
||||
IF Len( uVarValue ) > 0
|
||||
__DbgArrays( uVarValue, cVarName )
|
||||
else
|
||||
ELSE
|
||||
Alert( "Array is empty" )
|
||||
endif
|
||||
ENDIF
|
||||
|
||||
CASE Upper( Left( cVarStr, 5 ) ) == "CLASS"
|
||||
__DbgObject( uVarValue, cVarName )
|
||||
@@ -1209,7 +1198,7 @@ METHOD EditVar( nVar ) CLASS HBDebugger
|
||||
OTHERWISE
|
||||
::VarSetValue( ::aVars[ nVar ], &cVarStr )
|
||||
ENDCASE
|
||||
endif
|
||||
ENDIF
|
||||
|
||||
::oBrwVars:RefreshCurrent()
|
||||
::oBrwVars:ForceStable()
|
||||
@@ -1568,11 +1557,11 @@ METHOD InputBox( cMsg, uValue, bValid, lEditable ) CLASS HBDebugger
|
||||
endif
|
||||
|
||||
nOldCursor := SetCursor( SC_NORMAL )
|
||||
oGet := ATAIL( GetList )
|
||||
bMouseSave := Setkey( K_LBUTTONDOWN, {|| iif(MRow() == nTop .AND. MCol() == nLeft + 2,;
|
||||
(oGet:undo(), oGet:exitState := GE_ESCAPE, .T.), .F.)})
|
||||
oGet := ATail( GetList )
|
||||
bMouseSave := SetKey( K_LBUTTONDOWN, {|| iif( MRow() == nTop .AND. MCol() == nLeft + 2,;
|
||||
( oGet:undo(), oGet:exitState := GE_ESCAPE, .T. ), .F. ) } )
|
||||
READ
|
||||
Setkey( K_LBUTTONDOWN, bMouseSave)
|
||||
SetKey( K_LBUTTONDOWN, bMouseSave)
|
||||
SetCursor( nOldCursor )
|
||||
#else
|
||||
uTemp := getdbginput( nTop + 1, nLeft + 1, uTemp, bValid, __DbgColors()[ 5 ] )
|
||||
@@ -2047,7 +2036,7 @@ METHOD OSShell() CLASS HBDebugger
|
||||
|
||||
RECOVER USING oE
|
||||
|
||||
Alert("Error: " + oE:description)
|
||||
Alert( "Error: " + oE:description )
|
||||
|
||||
END SEQUENCE
|
||||
|
||||
@@ -2915,7 +2904,7 @@ METHOD VarSetValue( aVar, uValue ) CLASS HBDebugger
|
||||
hb_dbg_vmVarGSet( aVar[ VAR_LEVEL ], aVar[ VAR_POS ], uValue )
|
||||
|
||||
ELSEIF cType == "L"
|
||||
nProcLevel := hb_dbg_procLevel() - aVar[VAR_LEVEL] //skip debugger stack
|
||||
nProcLevel := hb_dbg_procLevel() - aVar[ VAR_LEVEL ] //skip debugger stack
|
||||
hb_dbg_vmVarLSet( nProcLevel, aVar[ VAR_POS ], uValue )
|
||||
|
||||
ELSEIF cType == "S"
|
||||
|
||||
@@ -82,13 +82,13 @@ STATIC s_cLineComment := ";"
|
||||
STATIC s_cHalfLineComment := "#"
|
||||
|
||||
|
||||
PROCEDURE hb_SetIniComment( cLc, cHlc )
|
||||
PROCEDURE hb_IniSetComment( cLc, cHlc )
|
||||
s_cLineComment := cLc
|
||||
s_cHalfLineComment := cHlc
|
||||
RETURN
|
||||
|
||||
|
||||
FUNCTION hb_ReadIni( cFileSpec, bKeyCaseSens, cSplitters, bAutoMain )
|
||||
FUNCTION hb_IniRead( cFileSpec, bKeyCaseSens, cSplitters, bAutoMain )
|
||||
LOCAL hIni := hb_Hash()
|
||||
|
||||
/* Default case sensitiveness for keys */
|
||||
@@ -103,9 +103,9 @@ FUNCTION hb_ReadIni( cFileSpec, bKeyCaseSens, cSplitters, bAutoMain )
|
||||
hIni[ "MAIN" ] := hb_Hash()
|
||||
ENDIF
|
||||
|
||||
RETURN hb_ReadIni2( hIni, cFileSpec, bKeyCaseSens, cSplitters, bAutoMain )
|
||||
RETURN hb_IniRdLow( hIni, cFileSpec, bKeyCaseSens, cSplitters, bAutoMain )
|
||||
|
||||
STATIC FUNCTION hb_ReadIni2( hIni, cFileSpec, bKeyCaseSens, cSplitters, bAutoMain )
|
||||
STATIC FUNCTION hb_IniRdLow( hIni, cFileSpec, bKeyCaseSens, cSplitters, bAutoMain )
|
||||
LOCAL aFiles
|
||||
LOCAL cFile, nLen
|
||||
LOCAL aKeyVal, hCurrentSection
|
||||
@@ -208,7 +208,7 @@ STATIC FUNCTION hb_ReadIni2( hIni, cFileSpec, bKeyCaseSens, cSplitters, bAutoMai
|
||||
IF Len( aKeyVal[ 2 ] ) == 0
|
||||
LOOP
|
||||
ENDIF
|
||||
hb_ReadIni2( hIni, aKeyVal[ 2 ], bKeyCaseSens, cSplitters, bAutoMain )
|
||||
hb_IniRdLow( hIni, aKeyVal[ 2 ], bKeyCaseSens, cSplitters, bAutoMain )
|
||||
cLine := ""
|
||||
LOOP
|
||||
ENDIF
|
||||
@@ -248,7 +248,7 @@ STATIC FUNCTION hb_ReadIni2( hIni, cFileSpec, bKeyCaseSens, cSplitters, bAutoMai
|
||||
RETURN hIni
|
||||
|
||||
|
||||
FUNCTION hb_WriteIni( xFileName, hIni, cCommentBegin, cCommentEnd, bAutoMain )
|
||||
FUNCTION hb_IniWrite( xFileName, hIni, cCommentBegin, cCommentEnd, bAutoMain )
|
||||
LOCAL hFile
|
||||
LOCAL lClose
|
||||
LOCAL cNewLine := hb_OSNewLine()
|
||||
|
||||
@@ -149,19 +149,23 @@ METHOD KeyboardHook( nKey ) CLASS HBMemoEditor
|
||||
|
||||
if nKey == K_ESC
|
||||
|
||||
cBackScr := SaveScreen( ::nTop, ::nRight - 18, ::nTop, ::nRight )
|
||||
|
||||
nRow := Row()
|
||||
nCol := Col()
|
||||
@ ::nTop, ::nRight - 18 SAY "Abort Edit? (Y/N)"
|
||||
|
||||
nYesNoKey := Inkey( 0 )
|
||||
|
||||
RestScreen( ::nTop, ::nRight - 18, ::nTop, ::nRight, cBackScr )
|
||||
SetPos( nRow, nCol )
|
||||
|
||||
if Upper( Chr( nYesNoKey ) ) == "Y"
|
||||
::lSaved := .F.
|
||||
if ::lDirty
|
||||
cBackScr := SaveScreen( ::nTop, ::nRight - 18, ::nTop, ::nRight )
|
||||
|
||||
nRow := Row()
|
||||
nCol := Col()
|
||||
@ ::nTop, ::nRight - 18 SAY "Abort Edit? (Y/N)"
|
||||
|
||||
nYesNoKey := Inkey( 0 )
|
||||
|
||||
RestScreen( ::nTop, ::nRight - 18, ::nTop, ::nRight, cBackScr )
|
||||
SetPos( nRow, nCol )
|
||||
|
||||
if Upper( Chr( nYesNoKey ) ) == "Y"
|
||||
::lSaved := .F.
|
||||
::lExitEdit := .T.
|
||||
endif
|
||||
else
|
||||
::lExitEdit := .T.
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -136,7 +136,7 @@ CREATE CLASS HBEditor
|
||||
VAR lSaved AS LOGICAL INIT .F. // True if user exited editor with K_CTRL_W
|
||||
VAR lWordWrap AS LOGICAL INIT .F. // True if word wrapping is active
|
||||
VAR nWordWrapCol AS NUMERIC INIT 0 // At which column word wrapping occurs
|
||||
VAR lDirty AS LOGICAL // .T. if there are changes not saved
|
||||
VAR lDirty AS LOGICAL INIT .F. // .T. if there are changes not saved
|
||||
VAR lExitEdit AS LOGICAL INIT .F. // .T. if user requested to end Edit() method
|
||||
|
||||
VAR cColorSpec AS CHARACTER INIT SetColor() // Color string used for screen writes
|
||||
@@ -181,9 +181,6 @@ METHOD New( cString, nTop, nLeft, nBottom, nRight, lEditMode, nLineLength, nTabS
|
||||
::InsertState( ::lInsert )
|
||||
endif
|
||||
|
||||
// No need to save
|
||||
::lDirty := .F.
|
||||
|
||||
// is word wrap required?
|
||||
if ISNUMBER( nLineLength )
|
||||
::lWordWrap := .T.
|
||||
|
||||
Reference in New Issue
Block a user