Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 369788 Details for
Bug 500614
sci-geosciences/grass-6.4.3 version bump
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
files/grass-colorize.patch
grass-colorize.patch (text/plain), 2.14 KB, created by
Ulf Norberg
on 2014-02-07 13:26:57 UTC
(
hide
)
Description:
files/grass-colorize.patch
Filename:
MIME Type:
Creator:
Ulf Norberg
Created:
2014-02-07 13:26:57 UTC
Size:
2.14 KB
patch
obsolete
>Index: grass/lib/gis/error.c >=================================================================== >--- grass.orig/lib/gis/error.c 2010-02-13 10:52:53.000000000 +0000 >+++ grass/lib/gis/error.c 2014-01-19 17:12:50.267381939 +0000 >@@ -246,6 +246,27 @@ > return 0; > } > >+static const char *sgr_start = "\33[%sm\33[K"; >+static const char *sgr_end = "\33[m\33[K"; >+static const char *colors[2][3] = { >+ {NULL, "01;35", "01;31"}, /* Bold magenta, bold red */ >+ {NULL, "35", "31"} /* (32 - green), 35 - magenta, 31 - red */ >+}; >+ >+static void colorize_start(FILE * fd, const int type, const int where) >+{ >+ if (colors[where][type] && isatty(fileno(fd))) { >+ fprintf(stderr, sgr_start, colors[where][type]); >+ } >+} >+ >+static void colorize_stop(FILE * fd, const int type, const int where) >+{ >+ if (colors[where][type] && isatty(fileno(fd))) { >+ fprintf(stderr, sgr_end); >+ } >+} >+ > /* Print info to stderr and optionally to log file and optionally send mail */ > static int print_error(const char *msg, const int type) > { >@@ -277,11 +298,15 @@ > log_error(msg, fatal); > } > >+ colorize_start(stderr, type, 0); > fprintf(stderr, "%s", prefix_std[type]); >+ colorize_stop(stderr, type, 0); > len = lead = strlen(prefix_std[type]); > w = (char *)msg; > >+ colorize_start(stderr, type, 1); > while (print_word(stderr, &w, &len, lead)) ; >+ colorize_stop(stderr, type, 1); > > if ((type != MSG) && isatty(fileno(stderr)) > && (G_info_format() == G_INFO_FORMAT_STANDARD)) { /* Bell */ >Index: grass/lib/gis/error.c >=================================================================== >--- grass.orig/lib/init/init.sh 2013-04-27 09:52:12.000000000 +0000 >+++ grass/lib/init/init.sh 2014-01-19 17:12:50.268381939 +0000 >@@ -886,6 +886,7 @@ > if [ -n "$GRASS_BATCH_JOB" ] ; then > say_hello > else >+ printf "\33[01;32m\33[K" > cat <<EOF > __________ ___ __________ _______________ > / ____/ __ \/ | / ___/ ___/ / ____/ _/ ___/ >@@ -894,6 +895,7 @@ > \____/_/ |_/_/ |_/____/____/ \____/___//____/ > > EOF >+ printf "\33[m\33[K" > > say_hello > echo "GRASS homepage: http://grass.osgeo.org/"
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 500614
:
369782
|
369784
|
369786
| 369788 |
369790