diff options
Diffstat (limited to 'test/escp2-weavetest.c')
-rw-r--r-- | test/escp2-weavetest.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/test/escp2-weavetest.c b/test/escp2-weavetest.c index 48ebea8..f63b956 100644 --- a/test/escp2-weavetest.c +++ b/test/escp2-weavetest.c @@ -1,5 +1,5 @@ /* - * "$Id: escp2-weavetest.c,v 1.36 2005/05/27 02:11:51 rlk Exp $" + * "$Id: escp2-weavetest.c,v 1.37 2006/05/05 23:23:40 rlk Exp $" * * Print plug-in EPSON ESC/P2 driver for the GIMP. * @@ -379,6 +379,9 @@ run_weavetest_from_stdin(void) int total_cases = 0; int failures = 0; char linebuf[4096]; + const char *spinner = "/-\\|"; + int rotor = 0; + int do_spinner = isatty(fileno(stdout)); while (fgets(linebuf, 4096, stdin)) { int retval; @@ -409,6 +412,12 @@ run_weavetest_from_stdin(void) } if (previous_separation != physsep) printf("."); + if (do_spinner) + { + putchar((int) (spinner[rotor++])); + putchar((int) '\b'); + rotor &= 3; + } previous_strategy = strategy; previous_jets = physjets; previous_separation = physsep; |