aboutsummaryrefslogtreecommitdiffstats
path: root/tools/abcprintd.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/abcprintd.c')
-rw-r--r--tools/abcprintd.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/abcprintd.c b/tools/abcprintd.c
index 43f9d7c..04a2590 100644
--- a/tools/abcprintd.c
+++ b/tools/abcprintd.c
@@ -171,7 +171,8 @@ static void output(int c, FILE *tf, enum print_state *psp)
break;
case ps_text:
- putwc(abc_to_unicode[(unsigned char)c], tf);
+ if (c != '\r')
+ putwc(abc_to_unicode[(unsigned char)c], tf);
break;
case ps_binary:
@@ -231,8 +232,9 @@ int main(int argc, char *argv[])
if ( badopt || optind >= argc ) {
fprintf(stderr,
- "Usage: %s [options] port lpr_program [lpr_args...]]\n"
+ "Usage: %s [options] port [lpr_program [lpr_args...]]\n"
"Options:\n"
+ " -f run in the foreground\n"
" -d dir enable file access to directory dir\n"
,
argv[0]);
@@ -244,7 +246,7 @@ int main(int argc, char *argv[])
exit(1);
}
- if ( argc == optind ) {
+ if ( !argv[optind+1] ) {
lpr_argc = sizeof(lpr_default_argv)/sizeof(const char *) - 1;
lpr_argv = lpr_default_argv;
} else {