Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 29178 - patch for colorgcc to enable multiple lines colorization
Summary: patch for colorgcc to enable multiple lines colorization
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High enhancement
Assignee: Please assign to toolchain
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 15387
  Show dependency tree
 
Reported: 2003-09-20 03:45 UTC by XFred
Modified: 2007-02-28 11:28 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
My version of the patch that will apply after bug 15387's changes. (multi-line.patch,1.91 KB, patch)
2003-09-21 13:22 UTC, Wayne Davison
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description XFred 2003-09-20 03:45:08 UTC
I would like to submit a patch to colorgcc that makes it colorize gcc 3.x.x
output on multiple lines as version 1.3.2 only does this on 1 line. I have
corrected some minor colorization bugs too.

Reproducible: Always
Steps to Reproduce:
1. launch a compilation with gcc 3.x.x that produces a long warning or error.
2.
3.

Actual Results:  
no use

Expected Results:  
no use

patch is being built from :
*  dev-util/colorgcc
      Latest version available: 1.3.2-r3
      Latest version installed: 1.3.2-r3

please dowload the patch from http://www.chx-labs.org/XFred/colorgcc-1.3.2-r3.patch

-- 
frederic Delaunay <XFred@nekeme.net>
Comment 1 Wayne Davison 2003-09-21 13:19:32 UTC
There are some problems with this patch:

- The changes to srcscan() match in $_ but substitute in $line which means
  that it won't handle the srcscan($field, ...) calls correctly.
- The prefixes an extra $srcon when finishing a quote.
- The code commented with "the line follows" matches all lines, so nothing
  ever gets to the "Anything else" section. Does this mean we color too
  much? What about the non-gcc compilers we support?

Minor quibbles:

- Indentation is not consistent with original.
- All-upper-case variables traditionally indicate that a value is
  constant (after initialization) but these aren't constant.
- No need to look for finishing quote unless $CONT is set.

Changes needed to work with 15387:

- Code is now "use strict".
- Regex for ":...message..." lines already handled, so perhaps the regex
  change isn't needed for that version.

I'll attach a patch that is relative to the 15387 version.
Comment 2 Wayne Davison 2003-09-21 13:22:17 UTC
Created attachment 18094 [details, diff]
My version of the patch that will apply after bug 15387's changes.

I changed some of the variable names, tweaked some of the logic, and fixed all
the aforementioned bugs.  There's still the issue of whether we're outputting
too much color which I think should still be looked into.
Comment 3 Joshua Kinard gentoo-dev 2003-10-02 10:11:04 UTC
Resolving as FIXED.  The patch included on this bug is in CVS now in dev-util/colorgcc-1.3.2-r4.
 This clears the way for Bug #2679 to be dealt with.