aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/term_ps.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2015-10-11 21:12:54 +0000
committerIngo Schwarze <schwarze@openbsd.org>2015-10-11 21:12:54 +0000
commitf9e640f1c0dc5d4fbffde207f2a4b0350d1a0019 (patch)
treeab150c9d46fcd3c701e8245e2f3d5ccbab0db7be /term_ps.c
parentede48977046b65029014a425213d622d938c74c4 (diff)
downloadmandoc-f9e640f1c0dc5d4fbffde207f2a4b0350d1a0019.tar.gz
mandoc-f9e640f1c0dc5d4fbffde207f2a4b0350d1a0019.tar.zst
mandoc-f9e640f1c0dc5d4fbffde207f2a4b0350d1a0019.zip
Finally use __progname, err(3) and warn(3).
That's more readable and less error-prone than fumbling around with argv[0], fprintf(3), strerror(3), perror(3), and exit(3). It's a bad idea to boycott good interfaces merely because standards committees ignore them. Instead, let's provide compatibility modules for archaic systems (like commercial Solaris) that still don't have them. The compat module has an UCB Copyright (c) 1993...
Diffstat (limited to 'term_ps.c')
-rw-r--r--term_ps.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/term_ps.c b/term_ps.c
index 1d3864f9..2d546e2e 100644
--- a/term_ps.c
+++ b/term_ps.c
@@ -1,4 +1,4 @@
-/* $Id: term_ps.c,v 1.75 2015/10/06 18:32:20 schwarze Exp $ */
+/* $Id: term_ps.c,v 1.76 2015/10/11 21:12:55 schwarze Exp $ */
/*
* Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014, 2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -20,6 +20,7 @@
#include <sys/types.h>
#include <assert.h>
+#include <err.h>
#include <stdarg.h>
#include <stdint.h>
#include <stdio.h>
@@ -582,7 +583,7 @@ pspdf_alloc(const struct mchars *mchars, const struct manoutput *outopts)
pagex = 216;
pagey = 356;
} else if (2 != sscanf(pp, "%ux%u", &pagex, &pagey))
- fprintf(stderr, "%s: Unknown paper\n", pp);
+ warnx("%s: Unknown paper", pp);
}
/*