From 2775f662f26e57b7293d3f835ee79c4ab2dcabf9 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Mon, 6 Sep 2010 22:12:08 +0000 Subject: [PATCH] 2010-09-07 00:10 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * src/compiler/hbcomp.c ! Revisiting non-*nix stdout/stderr usage in compiler. From now on the Clipper (and old MS-DOS/Windows tool) compatible behavior is only maintained for MS-DOS Harbour builds, for the rest error messages are output to stderr, regular msgs are output to stdout. --- harbour/ChangeLog | 8 ++++++++ harbour/src/compiler/hbcomp.c | 12 ++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 19db48c3bb..56b6a40cec 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,14 @@ The license applies to all entries newer than 2009-04-28. */ +2010-09-07 00:10 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * src/compiler/hbcomp.c + ! Revisiting non-*nix stdout/stderr usage in compiler. + From now on the Clipper (and old MS-DOS/Windows tool) + compatible behavior is only maintained for MS-DOS Harbour + builds, for the rest error messages are output to stderr, + regular msgs are output to stdout. + 2010-09-06 23:44 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbqt/qtgui/hbqt_hbqgraphicsrectitem.cpp ! Missing EOL @ EOF. diff --git a/harbour/src/compiler/hbcomp.c b/harbour/src/compiler/hbcomp.c index 5ef29030a3..462b121984 100644 --- a/harbour/src/compiler/hbcomp.c +++ b/harbour/src/compiler/hbcomp.c @@ -307,10 +307,10 @@ void hb_compOutStd( HB_COMP_DECL, const char * szMessage ) if( HB_COMP_PARAM->outStdFunc ) HB_COMP_PARAM->outStdFunc( HB_COMP_PARAM->cargo, szMessage ); else -#if defined( HB_OS_UNIX ) - fprintf( stdout, "%s", szMessage ); fflush( stdout ); -#else +#if defined( HB_OS_DOS ) fprintf( stderr, "%s", szMessage ); fflush( stderr ); +#else + fprintf( stdout, "%s", szMessage ); fflush( stdout ); #endif } } @@ -322,10 +322,10 @@ void hb_compOutErr( HB_COMP_DECL, const char * szMessage ) if( HB_COMP_PARAM->outErrFunc ) HB_COMP_PARAM->outErrFunc( HB_COMP_PARAM->cargo, szMessage ); else -#if defined( HB_OS_UNIX ) - fprintf( stderr, "%s", szMessage ); fflush( stderr ); -#else +#if defined( HB_OS_DOS ) fprintf( stdout, "%s", szMessage ); fflush( stdout ); +#else + fprintf( stderr, "%s", szMessage ); fflush( stderr ); #endif } }