Re: Colored output

2019-04-13 Thread Akim Demaille
Hi Bruno, > Le 1 avr. 2019 à 03:07, Bruno Haible a écrit : > > A week ago, I added the 'term-style-control' module to gnulib. > > Now, here is a new release of libtextstyle that makes use of this module: > https://alpha.gnu.org/gnu/gettext/libtextstyle-0.8.tar.gz It works well with Bison, tha

Re: Colored output

2019-03-31 Thread Bruno Haible
A week ago, I added the 'term-style-control' module to gnulib. Now, here is a new release of libtextstyle that makes use of this module: https://alpha.gnu.org/gnu/gettext/libtextstyle-0.8.tar.gz New in 0.8: * Fixed a couple of reliability bugs: - When a program exits while the terminal was in

Re: Colored output

2019-03-26 Thread Tom G. Christensen
On 26/03/19 02:23, Bruno Haible wrote: This patch should fix it. It does, thank you. -tgc

Re: Colored output

2019-03-25 Thread Bruno Haible
Tom G. Christensen wrote: > From Solaris 9/sparc: > > /usr/tgcware/gcc49/bin/gcc -std=gnu11 -g -O2 -L/usr/tgcware/lib > -R/usr/tgcware/lib -o test-term-style-control-hello test-term-style-co > ntrol-hello.o ../gllib/libgnu.a -lm -lm -lm-lm -lm -lm > Undefined fi

Re: Colored output

2019-03-25 Thread Tom G. Christensen
On 24/03/19 23:22, Bruno Haible wrote: 2019-03-24 Bruno Haible term-style-control: Add tests. * tests/test-term-style-control-hello.c: New file. * tests/test-term-style-control-yes.c: New file. * modules/term-style-control-tests: New file. The new tests fail

Re: Colored output

2019-03-24 Thread Bruno Haible
Hi Jim, > > Or would it be better to separate the pure signal handling and tty cleanup > > code from the code that looks up the appropriate escape sequences from > > termlib/termcap, and create a module in gnulib with only the signal handling > > and tty cleanup code? > > I'm happy to use whichev

Re: Colored output

2019-03-17 Thread Jim Meyering
On Sun, Mar 17, 2019 at 9:30 AM Bruno Haible wrote: > Hi Jim, > > You wrote in > : > > > I too would start with coreutils, noting that one must be careful to > > handle signals, so that the terminal is not left in a bad state whe

Re: Colored output

2019-03-17 Thread Bruno Haible
Hi Jim, You wrote in : > I too would start with coreutils, noting that one must be careful to > handle signals, so that the terminal is not left in a bad state when > output is interrupted between a pair of set/reset escape sequ

Re: Colored output

2019-02-15 Thread Bruno Haible
Hi Akim, > Ok, thanks! But what is the proper way to open a styled stream without style? > > $ ./_build/8d/hello --color=no > > ** (process:81925): CRITICAL **: 06:59:29.134: cr_om_parser_parse_file: > assertion 'a_this && a_file_uri && a_result' failed > Hello Akim Demaille! > > (after your

Re: Colored output

2019-02-14 Thread Akim Demaille
Hi Bruno! > Le 14 févr. 2019 à 23:01, Bruno Haible a écrit : > > Hi Akim, > >> I'm not sure handle_color_option works as expected. I always (independently >> of the argument of the option, and independently of whether the output is a >> tty) get colored output on Bison (https://github.com/ak

Re: Colored output

2019-02-14 Thread Bruno Haible
Hi Akim, > I'm not sure handle_color_option works as expected. I always (independently > of the argument of the option, and independently of whether the output is a > tty) get colored output on Bison (https://github.com/akimd/bison/pull/5), but > also in the two examples of libtextstyle. Oops

Re: Colored output

2019-02-13 Thread Akim Demaille
Hi Bruno, I'm not sure handle_color_option works as expected. I always (independently of the argument of the option, and independently of whether the output is a tty) get colored output on Bison (https://github.com/akimd/bison/pull/5), but also in the two examples of libtextstyle. As a workar

Re: Colored output

2019-02-13 Thread Bruno Haible
Hi Akim, > all the files point to libtextstyle.html as their > Top, but it's not there. I see. Fixed it now, also in the GNU libunistring documentation (which had the same mistake for 10 years). Thanks! Bruno

Re: Colored output

2019-02-12 Thread Akim Demaille
hi Bruno, > Le 12 févr. 2019 à 23:23, Bruno Haible a écrit : > >> The main html files is not included. > > You mean the documentation? > $ xdg-open doc/libtextstyle_toc.html > opens the main page of the documentation. Sorry, should have been "the main file", singular. I'm reporting this beca

Re: Colored output

2019-02-12 Thread Bruno Haible
Hi Akim, > There's something which is not quite clear to me: is it supported to mix > the ostream based interface with the regular FILE* one? If you have an ostream_t and a FILE* and they have different destinations (for example, one writes to stdout and the other one to a file), there is no prob

Re: Colored output

2019-02-12 Thread Bruno Haible
Hi Akim, > FWIW, the examples don't have their copy of libtextstyle.m4. Oops. Fixed now. (A last-minute change was not well tested.) > And the hello one does not support my kids' first names ;) Yes, the 'hello' sample has US-centric data. For a sample, it should be good enough. > The main html

Re: Colored output

2019-02-11 Thread Akim Demaille
Hi Bruno, There's something which is not quite clear to me: is it supported to mix the ostream based interface with the regular FILE* one? My initial motivation is to support colored diagnostics, which are built by tons of fprintf to stderr. Currently libtextstyle does not support formatting

Re: Colored output

2019-02-10 Thread Akim Demaille
> Le 10 févr. 2019 à 23:36, Jose E. Marchesi a écrit : > > >>> If you want the combination of (B) and (III): >> >> Well, I was going for B.II, but now that you teased me with B.III, I can't >> wait for it! > >You find the first alpha version of the GNU libtextstyle library in > htt

Re: Colored output

2019-02-10 Thread Jose E. Marchesi
> > If you want the combination of (B) and (III): > > Well, I was going for B.II, but now that you teased me with B.III, I can't > wait for it! You find the first alpha version of the GNU libtextstyle library in https://www.haible.de/bruno/gnu/libtextstyle-0.5.t

Re: Colored output

2019-02-10 Thread Bruno Haible
Hi Akim, > > If you want the combination of (B) and (III): > > Well, I was going for B.II, but now that you teased me with B.III, I can't > wait for it! You find the first alpha version of the GNU libtextstyle library in https://www.haible.de/bruno/gnu/libtextstyle-0.5.tar.gz It is pretty com

Re: Colored output

2019-01-27 Thread Akim Demaille
Hi Jim! > Le 27 janv. 2019 à 17:22, Jim Meyering a écrit : > > Hi Akim, > I too would start with coreutils, noting that one must be careful to > handle signals, so that the terminal is not left in a bad state when > output is interrupted between a pair of set/reset escape sequences. > https://gi

Re: Colored output

2019-01-27 Thread Akim Demaille
Hi Bruno, > Le 27 janv. 2019 à 18:39, Bruno Haible a écrit : > > Hi Akim, > >> I'd like to have colored diagnostics in Bison, I do feel on occasion it would >> make it easier to spot errors and warnings for instance. >> >> AFAICT, gnulib does not feature any module to help do this. Coreutils

Re: Colored output

2019-01-27 Thread Bruno Haible
Hi Akim, > I'd like to have colored diagnostics in Bison, I do feel on occasion it would > make it easier to spot errors and warnings for instance. > > AFAICT, gnulib does not feature any module to help do this. Coreutils (ls) > and GCC (maybe diffutils too) are probably good sources of inspirat

Re: Colored output

2019-01-27 Thread Jim Meyering
On Sun, Jan 27, 2019 at 7:53 AM Akim Demaille wrote: > I'd like to have colored diagnostics in Bison, I do feel on occasion it would > make it easier to spot errors and warnings for instance. > > AFAICT, gnulib does not feature any module to help do this. Coreutils (ls) > and GCC (maybe diffuti