Skip Menu |

This queue is for tickets about the Win32-Console-ANSI CPAN distribution.

Report information
The Basics
Id: 86089
Status: resolved
Priority: 0/
Queue: Win32-Console-ANSI

People
Owner: jl_morel [...] bribes.org
Requestors: j.kreuzberger [...] procitec.de
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 1.05



Subject: Default Initialisation of background/foreground color
Date: Wed, 12 Jun 2013 13:55:25 +0200
To: bug-Win32-Console-ANSI [...] rt.cpan.org <bug-Win32-Console-ANSI [...] rt.cpan.org>
From: Jörg Kreuzberger <j.kreuzberger [...] procitec.de>
Hi! I have an issue with command sessions, which are not with the default color (white on black). Im using the module from my scripts an set only the foreground colors, not the background colors. This leads to having black background. If people have e.g inverted display (black on white) its broken after my script. If they apply "color", all output is "recollored", so my outputs also: Suggestion (File ANSI.xs) in line 450/451 the values for foreground/background are initialised with white and black. Please use here the "attributes" WORD from CONSOLE_SCREEN_BUFFER_INFO Info used at line 443. (e.g. by assigning Info.wAttributes and masking out all except fg/bg) ---- Jörg Kreuzberger, System-Ingenieur PROCITEC GmbH Rastatter Strasse 41 D-75179 Pforzheim Fon: +49 (0) 7231 15561 49 Fax: +49 (0) 7231 15561-11 Mailto: j.kreuzberger@procitec.de Mannheim HRB 504702 Geschäftsführer: Dipl.-Ing. (FH) Michael Brenk This e-mail may contain confidential and/or legally protected information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Thank you!  
Subject: [rt.cpan.org #86089] Suggestion for patch
Date: Wed, 12 Jun 2013 17:05:11 +0200
To: bug-Win32-Console-ANSI [...] rt.cpan.org <bug-Win32-Console-ANSI [...] rt.cpan.org>
From: Jörg Kreuzberger <j.kreuzberger [...] procitec.de>
--- ANSI.xs 2009-03-22 16:47:53.000000000 +0100 +++ update/ANSI.xs 2013-06-12 17:00:56.116694415 +0200 @@ -447,8 +447,11 @@ for(i=0; i<es_argc; i++) { switch (es_argv[i]) { case 0 : - foreground = FOREGROUND_WHITE; - background = BACKGROUND_BLACK; + Info.wAttributes &= ~(COMMON_LVB_LEADING_BYTE | COMMON_LVB_TRAILING_BYTE | COMMON_LVB_GRID_HORIZONTAL | COMMON_LVB_GRID_LVERTICAL | COMMON_LVB_GRID_RVERTICAL | COMMON_LVB_REVERSE_VIDEO | COMMON_LVB_UNDERSCORE); + foreground = Info.wAttributes; + foreground &= ~(BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED | BACKGROUND_INTENSITY); + background = Info.wAttributes; + foreground &= ~(FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_INTENSITY); bold = 0; underline = 0; rvideo = 0; ---- Jörg Kreuzberger, System-Ingenieur PROCITEC GmbH Rastatter Strasse 41 D-75179 Pforzheim Fon: +49 (0) 7231 15561 49 Fax: +49 (0) 7231 15561-11 Mailto: j.kreuzberger@procitec.de Mannheim HRB 504702 Geschäftsführer: Dipl.-Ing. (FH) Michael Brenk This e-mail may contain confidential and/or legally protected information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Thank you!  

Message body is not shown because sender requested not to inline it.

Subject: AW: [rt.cpan.org #86089] Suggestion for patch
Date: Thu, 13 Jun 2013 08:49:28 +0200
To: bug-win32-console-ansi [...] rt.cpan.org <bug-win32-console-ansi [...] rt.cpan.org>
From: Jörg Kreuzberger <j.kreuzberger [...] procitec.de>
Ok, i think the patch isn't so good, cause the default values for foreground and background should be initialised at an earlier point, maybe module load. I think i should try to compile and test it on windows and provide a full working patch. ---- Jörg Kreuzberger, System-Ingenieur PROCITEC GmbH Rastatter Strasse 41 D-75179 Pforzheim Fon: +49 (0) 7231 15561 49 Fax: +49 (0) 7231 15561-11 Mailto: j.kreuzberger@procitec.de Mannheim HRB 504702 Geschäftsführer: Dipl.-Ing. (FH) Michael Brenk This e-mail may contain confidential and/or legally protected information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Thank you!   Show quoted text
-----Ursprüngliche Nachricht----- Von: Jörg Kreuzberger <j.kreuzberger@procitec.de> Gesendet: Mi 12.06.2013 17:05 Betreff: [rt.cpan.org #86089] Suggestion for patch Anlage: ANSI.x.patch An: bug-Win32-Console-ANSI@rt.cpan.org;
> --- ANSI.xs 2009-03-22 16:47:53.000000000 +0100 > +++ update/ANSI.xs 2013-06-12 17:00:56.116694415 +0200 > @@ -447,8 +447,11 @@ > for(i=0; i<es_argc; i++) { > switch (es_argv[i]) { > case 0 : > - foreground = FOREGROUND_WHITE; > - background = BACKGROUND_BLACK; > + Info.wAttributes &= ~(COMMON_LVB_LEADING_BYTE | > COMMON_LVB_TRAILING_BYTE | COMMON_LVB_GRID_HORIZONTAL | > COMMON_LVB_GRID_LVERTICAL | COMMON_LVB_GRID_RVERTICAL | > COMMON_LVB_REVERSE_VIDEO | COMMON_LVB_UNDERSCORE); > + foreground = Info.wAttributes; > + foreground &= ~(BACKGROUND_BLUE | BACKGROUND_GREEN | > BACKGROUND_RED | BACKGROUND_INTENSITY); > + background = Info.wAttributes; > + foreground &= ~(FOREGROUND_BLUE | FOREGROUND_GREEN | > FOREGROUND_RED | FOREGROUND_INTENSITY); > bold = 0; > underline = 0; > rvideo = 0; > > > ---- > Jörg Kreuzberger, System-Ingenieur > PROCITEC GmbH > Rastatter Strasse 41 > D-75179 Pforzheim > Fon: +49 (0) 7231 15561 49 > Fax: +49 (0) 7231 15561-11 > Mailto: j.kreuzberger@procitec.de > Mannheim HRB 504702 > Geschäftsführer: Dipl.-Ing. (FH) Michael Brenk > This e-mail may contain confidential and/or legally protected information. > If you are not the intended recipient (or have received this e-mail in > error) please notify the sender immediately and delete this e-mail. Any > unauthorized copying, disclosure or distribution of the material in this e-mail > is strictly forbidden. Thank you! >  
Subject: [rt.cpan.org #86089] final patch
Date: Thu, 13 Jun 2013 12:29:57 +0200
To: bug-win32-console-ansi [...] rt.cpan.org <bug-win32-console-ansi [...] rt.cpan.org>
From: Jörg Kreuzberger <j.kreuzberger [...] procitec.de>
Hi! made it with a clean installed source copy, make, make test etc. not it works for me changes: - determine current fg/bg colors on dll load and initiales fg/bg to this values - reset fg/bg to defaults when 0 escape sequence is set - expand the colors from 8 Values to 16 (default on my win7 console is BRIGHT WHITE) Would be nice if you can make an update to the modules ---- Jörg Kreuzberger, System-Ingenieur PROCITEC GmbH Rastatter Strasse 41 D-75179 Pforzheim Fon: +49 (0) 7231 15561 49 Fax: +49 (0) 7231 15561-11 Mailto: j.kreuzberger@procitec.de Mannheim HRB 504702 Geschäftsführer: Dipl.-Ing. (FH) Michael Brenk This e-mail may contain confidential and/or legally protected information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Thank you!   Show quoted text
-----Ursprüngliche Nachricht----- Von: Jörg Kreuzberger <j.kreuzberger@procitec.de> Gesendet: Do 13.06.2013 08:49 Betreff: AW: [rt.cpan.org #86089] Suggestion for patch An: bug-win32-console-ansi@rt.cpan.org;
> Ok, i think the patch isn't so good, cause the default values for foreground > and background should be initialised at an earlier point, maybe module load. > > I think i should try to compile and test it on windows and provide a full > working patch. > > > ---- > Jörg Kreuzberger, System-Ingenieur > PROCITEC GmbH > Rastatter Strasse 41 > D-75179 Pforzheim > Fon: +49 (0) 7231 15561 49 > Fax: +49 (0) 7231 15561-11 > Mailto: j.kreuzberger@procitec.de > Mannheim HRB 504702 > Geschäftsführer: Dipl.-Ing. (FH) Michael Brenk > This e-mail may contain confidential and/or legally protected information. > If you are not the intended recipient (or have received this e-mail in > error) please notify the sender immediately and delete this e-mail. Any > unauthorized copying, disclosure or distribution of the material in this e-mail > is strictly forbidden. Thank you! >   > > -----Ursprüngliche Nachricht----- > Von: Jörg Kreuzberger <j.kreuzberger@procitec.de> > Gesendet: Mi 12.06.2013 17:05 > Betreff: [rt.cpan.org #86089] Suggestion for patch > Anlage: ANSI.x.patch > An: bug-Win32-Console-ANSI@rt.cpan.org;
> > --- ANSI.xs 2009-03-22 16:47:53.000000000 +0100 > > +++ update/ANSI.xs 2013-06-12 17:00:56.116694415 +0200 > > @@ -447,8 +447,11 @@ > > for(i=0; i<es_argc; i++) { > > switch (es_argv[i]) { > > case 0 : > > - foreground = FOREGROUND_WHITE; > > - background = BACKGROUND_BLACK; > > + Info.wAttributes &= ~(COMMON_LVB_LEADING_BYTE | > > COMMON_LVB_TRAILING_BYTE | COMMON_LVB_GRID_HORIZONTAL | > > COMMON_LVB_GRID_LVERTICAL | COMMON_LVB_GRID_RVERTICAL | > > COMMON_LVB_REVERSE_VIDEO | COMMON_LVB_UNDERSCORE); > > + foreground = Info.wAttributes; > > + foreground &= ~(BACKGROUND_BLUE | BACKGROUND_GREEN | > > BACKGROUND_RED | BACKGROUND_INTENSITY); > > + background = Info.wAttributes; > > + foreground &= ~(FOREGROUND_BLUE | FOREGROUND_GREEN | > > FOREGROUND_RED | FOREGROUND_INTENSITY); > > bold = 0; > > underline = 0; > > rvideo = 0; > > > > > > ---- > > Jörg Kreuzberger, System-Ingenieur > > PROCITEC GmbH > > Rastatter Strasse 41 > > D-75179 Pforzheim > > Fon: +49 (0) 7231 15561 49 > > Fax: +49 (0) 7231 15561-11 > > Mailto: j.kreuzberger@procitec.de > > Mannheim HRB 504702 > > Geschäftsführer: Dipl.-Ing. (FH) Michael Brenk > > This e-mail may contain confidential and/or legally protected information. > > If you are not the intended recipient (or have received this e-mail in > > error) please notify the sender immediately and delete this e-mail. Any > > unauthorized copying, disclosure or distribution of the material in this
> e-mail
> > is strictly forbidden. Thank you! > >  

Message body is not shown because sender requested not to inline it.

Message body is not shown because sender requested not to inline it.