From e25ce2eda8a80f0e0854a772b30307ad0e621c8f Mon Sep 17 00:00:00 2001 From: Walter Negro Date: Sun, 22 Dec 2002 06:45:19 +0000 Subject: [PATCH] 2002-12-22 03:46 UTC-0300 Walter Negro * source/rtl/set.c ! Fix, reset PRINTFILE handle when close file. --- harbour/source/rtl/set.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/harbour/source/rtl/set.c b/harbour/source/rtl/set.c index 447ecccb5c..4e06d19d00 100644 --- a/harbour/source/rtl/set.c +++ b/harbour/source/rtl/set.c @@ -239,7 +239,7 @@ static FHANDLE open_handle( char * file_name, BOOL bAppend, char * def_ext, HB_s if( ( bPipe = ( set_specifier == HB_SET_PRINTFILE && \ (char) *file_name == '|' ) ) ) { file_name++; - bAppend = FALSE; + bAppend = FALSE; } #endif if( ! bPipe ) { @@ -734,6 +734,7 @@ HB_FUNC( SET ) if( args > 1 && ! HB_IS_NIL( pArg2 ) ) { close_binary( hb_set.hb_set_printhan ); + hb_set.hb_set_printhan = FS_ERROR; if( hb_set.HB_SET_PRINTFILE && strlen( hb_set.HB_SET_PRINTFILE ) > 0 ) hb_set.hb_set_printhan = open_handle( hb_set.HB_SET_PRINTFILE, bFlag, ".prn", HB_SET_PRINTFILE ); }