diff --git a/harbour/ChangeLog b/harbour/ChangeLog index c6eaf3767e..3d524d992d 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,22 @@ The license applies to all entries newer than 2009-04-28. */ +2010-07-01 00:46 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * include/std.ch + + Added .hbv version of SAVE TO / RESTORE FROM commands. + Use 'SAVE HBV ...' and 'RESTORE HBV ...' commands to + use Harbour specific mem file format (with .hbv extension). + The file format supports long variable names and much + larger amount of data then Clipper compatible .mem files. + The file format is NOT compatible with Clipper. + ; Pls review. This is my first time extending Harbour + commands, plus I'm not very much a command freak, so + maybe there is more natural (and compatible) way to + extend existing SAVE/RESTORE command. + + * utils/hbrun/hbrun.prg + * Variable scope cleanup to prev. + 2010-06-30 23:52 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * src/rtl/gttrm/gttrm.c + GTTRM will now generate HB_K_RESIZE Harbour INKEY() events diff --git a/harbour/include/std.ch b/harbour/include/std.ch index 936ae56e67..6d12ed1666 100644 --- a/harbour/include/std.ch +++ b/harbour/include/std.ch @@ -280,6 +280,13 @@ #command SAVE TO <(f)> ALL EXCEPT

=> __MVSave( <(f)>, <(p)>, .f. ) #command SAVE [TO <(f)>] [ALL] => __MVSave( <(f)>, "*", .t. ) +#command RESTORE HBV [FROM <(f)>] [] => hb_MVRestore( <(f)>, <.a.> ) +#command SAVE HBV TO <(f)> ALL LIKE

=> hb_MVSave( <(f)>, <(p)>, .t. ) +#command SAVE HBV ALL LIKE

TO <(f)> => hb_MVSave( <(f)>, <(p)>, .t. ) +#command SAVE HBV ALL EXCEPT

TO <(f)> => hb_MVSave( <(f)>, <(p)>, .f. ) +#command SAVE HBV TO <(f)> ALL EXCEPT

=> hb_MVSave( <(f)>, <(p)>, .f. ) +#command SAVE HBV [TO <(f)>] [ALL] => hb_MVSave( <(f)>, "*", .t. ) + #command ERASE <(f)> => FErase( <(f)> ) #command DELETE FILE <(f)> => FErase( <(f)> ) #command RENAME <(old)> TO <(new)> => FRename( <(old)>, <(new)> ) diff --git a/harbour/utils/hbrun/hbrun.prg b/harbour/utils/hbrun/hbrun.prg index d4647c93bf..7c766038ee 100644 --- a/harbour/utils/hbrun/hbrun.prg +++ b/harbour/utils/hbrun/hbrun.prg @@ -79,7 +79,6 @@ STATIC s_nCol := 0 STATIC s_aIncDir := {} STATIC s_aHistory := {} STATIC s_lPreserveHistory := .T. -STATIC s_lResize := .F. /* ********************************************************************** */ @@ -181,6 +180,7 @@ STATIC PROCEDURE hbrun_Prompt( cCommand ) LOCAL nMaxRow, nMaxCol LOCAL nHistIndex LOCAL bKeyUP, bKeyDown, bKeyIns, bKeyResize + LOCAL lResize := .F. CLEAR SCREEN SET SCOREBOARD OFF @@ -230,7 +230,7 @@ STATIC PROCEDURE hbrun_Prompt( cCommand ) s_aHistory[ ++nHistIndex ], ; ( nHistIndex := LEN( s_aHistory ) + 1, Space( HB_LINE_LEN ) ) ) } ) bKeyResize := SetKey( HB_K_RESIZE,; - {|| s_lResize := .T., hb_KeyPut( K_ENTER ) } ) + {|| lResize := .T., hb_KeyPut( K_ENTER ) } ) READ @@ -240,9 +240,9 @@ STATIC PROCEDURE hbrun_Prompt( cCommand ) SetKey( HB_K_RESIZE, bKeyResize ) IF LastKey() == K_ESC .OR. EMPTY( cLine ) .OR. ; - ( s_lResize .AND. LastKey() == K_ENTER ) - IF s_lResize - s_lResize := .F. + ( lResize .AND. LastKey() == K_ENTER ) + IF lResize + lResize := .F. ELSE cLine := NIL ENDIF