diff --git a/ansicon.c b/ansicon.c index ccdfeca..89a99a1 100644 --- a/ansicon.c +++ b/ansicon.c @@ -73,9 +73,12 @@ v1.62, 18 July, 2013: write the bits to the log; test if creating the registry key fails (HKLM requires admin privileges). + + v1.63, 25 July, 2013: + don't write the reset sequence if output is redirected. */ -#define PDATE L"18 July, 2013" +#define PDATE L"25 July, 2013" #include "ansicon.h" #include "version.h" @@ -236,7 +239,8 @@ int main( void ) // worry about ANSICON_GUI. if (installed) { - fputws( L"\33[m", stdout ); + if (_isatty( 1 )) + fputws( L"\33[m", stdout ); FreeLibrary( GetModuleHandle( ANSIDLL ) ); } diff --git a/readme.txt b/readme.txt index e387721..54c93b2 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Copyright 2005-2013 Jason Hood - Version 1.62. Freeware + Version 1.63. Freeware Description @@ -270,6 +270,10 @@ Version History Legend: + added, - bug-fixed, * changed. + 1.63 - 25 July, 2013: + - don't write the reset sequence (when it's already installed) if output is + redirected. + 1.62 - 18 July, 2013: - indicate if opening HKLM failed; * removed ANSI-LLW.exe again, properly this time; @@ -446,4 +450,4 @@ Distribution ========================== -Jason Hood, 18 July, 2013. +Jason Hood, 25 July, 2013. diff --git a/version.h b/version.h index 38c668e..0f5c5a9 100644 --- a/version.h +++ b/version.h @@ -2,11 +2,11 @@ version.h - Version defines. */ -#define PVERS L"1.62" // wide string -#define PVERSA "1.62" // ANSI string (windres 2.16.91 didn't like L) -#define PVERE L"162" // wide environment string -#define PVEREA "162" // ANSI environment string -#define PVERB 1,6,2,0 // binary (resource) +#define PVERS L"1.63" // wide string +#define PVERSA "1.63" // ANSI string (windres 2.16.91 didn't like L) +#define PVERE L"163" // wide environment string +#define PVEREA "163" // ANSI environment string +#define PVERB 1,6,3,0 // binary (resource) #ifdef _WIN64 # define BITS L"64"