prout

smaller "lp" command
git clone git://git.2f30.org/prout
Log | Files | Refs | README | LICENSE

commit e5e9b0034bc40490eea41b4e111d8e1e78f88460
parent 4489a3be45967d9fcf44eeb7ca0b1b6909df5a5f
Author: z3bra <willy@mailoo.org>
Date:   Wed, 12 Feb 2014 14:32:17 +0100

Merge branch 'master' of z3bra.org:prout

Conflicts:
	prout.c

Diffstat:
Mprout.c | 22+++++++---------------
1 file changed, 7 insertions(+), 15 deletions(-)

diff --git a/prout.c b/prout.c @@ -110,36 +110,28 @@ static void check_job (cups_dest_t *dest, int job_id) switch (state) { case IPP_JOB_PENDING : - fprintf(stdout, "\rjob %d pending.", job_id); + fprintf(stdout, "job %d pending.\n", job_id); break; case IPP_JOB_HELD : - fprintf(stdout, "\rjob %d held.", job_id); + fprintf(stdout, "job %d held.\n", job_id); break; case IPP_JOB_PROCESSING : - fprintf(stdout, "\rjob %d processing.", job_id); + fprintf(stdout, "job %d processing.\n", job_id); break; case IPP_JOB_STOPPED : - fprintf(stdout, "\rjob %d stopped.", job_id); + fprintf(stdout, "job %d stopped.\n", job_id); break; case IPP_JOB_CANCELED : - fprintf(stdout, "\rjob %d canceled.", job_id); + fprintf(stdout, "job %d canceled.\n", job_id); break; case IPP_JOB_ABORTED : - fprintf(stdout, "\rjob %d aborted.", job_id); + fprintf(stdout, "job %d aborted.\n", job_id); break; case IPP_JOB_COMPLETED : - fprintf(stdout, "\rjob %d completed.\n", job_id); + fprintf(stdout, "job %d completed.\n", job_id); break; } - /* Actually print text to stdout */ - fflush(stdout); - - /* Wait just a second if the job is not finished */ - if (state < IPP_JOB_STOPPED) { - sleep(1); - } - return; }