aboutsummaryrefslogtreecommitdiffstats
path: root/man/man3/duplocale.3
diff options
context:
space:
mode:
Diffstat (limited to 'man/man3/duplocale.3')
-rw-r--r--man/man3/duplocale.38
1 files changed, 3 insertions, 5 deletions
diff --git a/man/man3/duplocale.3 b/man/man3/duplocale.3
index dfaaddd557..7f66c743bb 100644
--- a/man/man3/duplocale.3
+++ b/man/man3/duplocale.3
@@ -119,13 +119,11 @@ ABC
.EX
#define _XOPEN_SOURCE 700
#include <ctype.h>
+#include <err.h>
#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
\&
-#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \[rs]
- } while (0)
-\&
int
main(int argc, char *argv[])
{
@@ -142,11 +140,11 @@ main(int argc, char *argv[])
\&
loc = uselocale((locale_t) 0);
if (loc == (locale_t) 0)
- errExit("uselocale");
+ err(EXIT_FAILURE, "uselocale");
\&
nloc = duplocale(loc);
if (nloc == (locale_t) 0)
- errExit("duplocale");
+ err(EXIT_FAILURE, "duplocale");
\&
for (char *p = argv[1]; *p; p++)
putchar(toupper_l(*p, nloc));