2016-01-08 12:13 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)

* contrib/hbfoxpro/hbfoxpro.ch
    + added new PP rules suggested by Jeff Stone for THIS., .NULL. and CD

  * contrib/hbfoxpro/hbfoxpro.hbx
  * contrib/hbfoxpro/misc.prg
  * contrib/hbfoxpro/miscfunc.c
    + added new functions Id(), Program() and LineNo()
    + added SYS( 1 ), SYS( 11 ), SYS( 2003 )
    ! fixed SYS( 10 ) to return date as character string
This commit is contained in:
Przemysław Czerpak
2016-01-08 12:13:52 +01:00
parent aeb2a15261
commit 9e3fe580b5
5 changed files with 36 additions and 6 deletions

View File

@@ -10,6 +10,17 @@
* Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment
*/
2016-01-08 12:13 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbfoxpro/hbfoxpro.ch
+ added new PP rules suggested by Jeff Stone for THIS., .NULL. and CD
* contrib/hbfoxpro/hbfoxpro.hbx
* contrib/hbfoxpro/misc.prg
* contrib/hbfoxpro/miscfunc.c
+ added new functions Id(), Program() and LineNo()
+ added SYS( 1 ), SYS( 11 ), SYS( 2003 )
! fixed SYS( 10 ) to return date as character string
2016-01-07 12:16 UTC-0800 Pritpal Bedi (bedipritpal/at/hotmail.com)
* contrib/gtwvg/wvgcore.c
* contrib/gtwvg/wvgcuig.c

View File

@@ -53,7 +53,10 @@
/* messages in FP */
#xtranslate .<!msg!> => :<msg>
#translate THIS. => Self:
/* Harbour does not support NULL */
#xtranslate .NULL. => NIL
/* array declarations */
#xtranslate __FP_DIM( <exp> ) => <exp>
@@ -118,6 +121,6 @@
#command EJECT PAGE => __Eject()
#command FLUSH => DbCommitAll()
#command REGIONAL [<defs,...>] => LOCAL <defs>
#command CD <(path)> => hb_cwd( <(path)> )
#endif /* HBFOXPRO_CH_ */

View File

@@ -26,12 +26,15 @@ DYNAMIC Filter
DYNAMIC fox_At
DYNAMIC fox___DynCall
DYNAMIC FSize
DYNAMIC Id
DYNAMIC InsMode
DYNAMIC Key
DYNAMIC LineNo
DYNAMIC NDX
DYNAMIC Occurs
DYNAMIC Parameters
DYNAMIC PrintStatus
DYNAMIC Program
DYNAMIC Relation
DYNAMIC SCols
DYNAMIC SRows

View File

@@ -54,7 +54,9 @@ FUNCTION Sys( nValue, xPar1 )
SWITCH nValue
CASE 0
RETURN NetName() + " # " + hb_UserName()
RETURN Id()
CASE 1
RETURN hb_ntos( Date() - CToD( "" ) )
CASE 2
RETURN hb_ntos( Seconds() )
CASE 5
@@ -62,8 +64,11 @@ FUNCTION Sys( nValue, xPar1 )
CASE 6
RETURN Set( _SET_PRINTFILE )
CASE 10
hb_default( @xPar1, 0 )
RETURN CToD( "" ) + xPar1
RETURN DToC( CToD( "" ) + hb_defaultValue( xPar1, 0 ) )
CASE 11
RETURN hb_ntos( iif( HB_ISDATETIME( xPar1 ), xPar1, ;
iif( HB_ISSTRING( xPar1 ), CToD( xPar1 ), ;
Date() ) ) - CToD( "" ) )
CASE 100
RETURN iif( Set( _SET_CONSOLE ), "ON", "OFF" )
CASE 101
@@ -71,19 +76,25 @@ FUNCTION Sys( nValue, xPar1 )
CASE 102
RETURN iif( Set( _SET_PRINTER ), "ON", "OFF" )
CASE 2002
hb_default( @xPar1, SC_NONE )
RETURN SetCursor( xPar1 )
RETURN SetCursor( hb_defaultValue( xPar1, SC_NONE ) )
CASE 2003
RETURN CurDir()
CASE 2011
RETURN iif( ! dbInfo( DBOI_SHARED ), "Exclusive", ;
iif( dbInfo( DBI_ISFLOCK ), "File locked", ;
iif( dbRecordInfo( DBRI_LOCKED ), "Record locked", ;
"Not locked" ) ) )
CASE 2020
RETURN hb_DiskSpace( Set( _SET_DEFAULT ) )
OTHERWISE
/* Throw RTE? */
ENDSWITCH
RETURN NIL
FUNCTION Id()
RETURN NetName() + " # " + hb_UserName()
STATIC FUNCTION AFillNested( aValue, xVal )
LOCAL item

View File

@@ -55,3 +55,5 @@ HB_FUNC_TRANSLATE( SCOLS, MAXCOL )
HB_FUNC_TRANSLATE( VARREAD, READVAR )
HB_FUNC_TRANSLATE( PRINTSTATUS, ISPRINTER )
HB_FUNC_TRANSLATE( KEY, INDEXKEY )
HB_FUNC_TRANSLATE( PROGRAM, PROCNAME )
HB_FUNC_TRANSLATE( LINENO, PROCLINE )