From b7d47cd28429480b88047f2a57d4d377b0ee14fe Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 2 Dec 2009 10:44:06 +0000 Subject: [PATCH] 2009-12-02 11:42 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * src/rtl/philes.c * include/hbextern.ch + Added HB_FISDEVICE() ; NOTE: Didn't add anything to hbmk2 yet, as after testing I found it weird and unusual that the output is different when redirected, but we may think of some other solution, like user option or else. --- harbour/ChangeLog | 9 +++++++++ harbour/include/hbextern.ch | 1 + harbour/src/rtl/philes.c | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 74844919dd..8e56cf0620 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,15 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-12-02 11:42 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * src/rtl/philes.c + * include/hbextern.ch + + Added HB_FISDEVICE() + + ; NOTE: Didn't add anything to hbmk2 yet, as after testing I found it + weird and unusual that the output is different when redirected, + but we may think of some other solution, like user option or else. + 2009-12-01 22:35 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * contrib/hbide/idemisc.prg * contrib/hbide/hbide.prg diff --git a/harbour/include/hbextern.ch b/harbour/include/hbextern.ch index 0ac4203227..4c2ef784d4 100644 --- a/harbour/include/hbextern.ch +++ b/harbour/include/hbextern.ch @@ -1098,6 +1098,7 @@ EXTERNAL HB_FGETATTR EXTERNAL HB_FSETDATETIME EXTERNAL HB_FGETDATETIME EXTERNAL HB_FSETDEVMODE +EXTERNAL HB_FISDEVICE EXTERNAL HB_FILEEXISTS EXTERNAL HB_DIREXISTS EXTERNAL HB_FNAMEEXISTS diff --git a/harbour/src/rtl/philes.c b/harbour/src/rtl/philes.c index 09a14ea824..c2eb1de7f5 100644 --- a/harbour/src/rtl/philes.c +++ b/harbour/src/rtl/philes.c @@ -432,6 +432,11 @@ HB_FUNC( HB_FSETDEVMODE ) hb_retni( iRet ); } +HB_FUNC( HB_FISDEVICE ) +{ + hb_retl( hb_fsIsDevice( hb_numToHandle( hb_parnint( 1 ) ) ) ); +} + HB_FUNC( HB_OSERROR ) { hb_retni( hb_fsOsError() );