prout

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

commit 1db7617a472084a77b29fad1d9cec824505734f1
parent 52da6dce6856811d6c4051b402b561f6d290fad9
Author: Willy Goiffon <w.goiffon@gmail.com>
Date:   Tue, 15 Oct 2013 16:29:50 +0200

Added new line for error message

Diffstat:
Msrc/prout.c | 9++++-----
1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/prout.c b/src/prout.c @@ -29,7 +29,7 @@ static char* check_file(char *file) f = fopen(file, "r"); if (!f) { - fputs("Cannot open the given file", stderr); + fputs("Cannot open the given file\n", stderr); exit (1); } @@ -50,7 +50,7 @@ static cups_dest_t* check_dest() /* Leave if there is no default printer configured */ if (num_dests < 1) { - fputs("No default printer configured", stderr); + fputs("No default printer configured\n", stderr); exit (1); } @@ -88,8 +88,6 @@ static void check_job (cups_dest_t *dest, int job_id) ipp_jstate_t state = IPP_JOB_PENDING; - fputs("Current state of the job:\n", stdout); - while (state < IPP_JOB_STOPPED) { /* GET ALL THE JOBS "\_(°D°)/ */ num_jobs = cupsGetJobs(&jobs, dest->name, 1, CUPS_WHICHJOBS_ALL); @@ -151,7 +149,8 @@ int main(int argc, char **argv) /* check the input file */ if (argc != 2 ) { - fputs("I can only handle one file at a time", stderr); + fputs("I can only handle one file at a time\n", stderr); + exit (1); } /* check if the file is correct */