diff options
author | 2009-12-23 22:30:17 +0000 | |
---|---|---|
committer | 2009-12-23 22:30:17 +0000 | |
commit | aa2d850a73514fbc953b9870d29969cfb4f92948 (patch) | |
tree | 1fbb3f2227d6a4ab8e27d8e6aa708d34426aa3d8 /usr.bin/mandoc/main.c | |
parent | - add and enable uthum (diff) | |
download | wireguard-openbsd-aa2d850a73514fbc953b9870d29969cfb4f92948.tar.xz wireguard-openbsd-aa2d850a73514fbc953b9870d29969cfb4f92948.zip |
sync to 1.9.13: minor fixes:
correctness/functionality:
- bugfix: properly ignore lines with only a dot in -man
- bugfix: .Bl -ohang doesn't allow -width, warn about this
- improve date string handling by new function mandoc_a2time
- some HTML improvements
- significant documentation additions in man.7 and mdoc.7
portability:
- replace __dead by __attribute__((noreturn))
- bugfix: correct .Dx rendering
- some more library names for NetBSD
simplicity:
- replace hand-rolled putchar(3)-loops by fwrite(3)
- replace single-character printf(3) by putchar(3)
Diffstat (limited to 'usr.bin/mandoc/main.c')
-rw-r--r-- | usr.bin/mandoc/main.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/usr.bin/mandoc/main.c b/usr.bin/mandoc/main.c index 31b5455380a..f0f591d8e9d 100644 --- a/usr.bin/mandoc/main.c +++ b/usr.bin/mandoc/main.c @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.19 2009/12/22 23:58:00 schwarze Exp $ */ +/* $Id: main.c,v 1.20 2009/12/23 22:30:17 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -91,8 +91,8 @@ static int pset(const char *, int, struct curparse *, struct man **, struct mdoc **); static struct man *man_init(struct curparse *); static struct mdoc *mdoc_init(struct curparse *); -__dead static void version(void); -__dead static void usage(void); +static void version(void) __attribute__((noreturn)); +static void usage(void) __attribute__((noreturn)); static const char *progname; @@ -198,7 +198,7 @@ main(int argc, char *argv[]) } -__dead static void +static void version(void) { @@ -207,7 +207,7 @@ version(void) } -__dead static void +static void usage(void) { @@ -518,7 +518,7 @@ moptions(enum intt *tflags, char *arg) else if (0 == strcmp(arg, "an")) *tflags = INTT_MAN; else { - fprintf(stderr, "%s: Bad argument", arg); + fprintf(stderr, "%s: Bad argument\n", arg); return(0); } @@ -539,7 +539,7 @@ toptions(enum outt *tflags, char *arg) else if (0 == strcmp(arg, "html")) *tflags = OUTT_HTML; else { - fprintf(stderr, "%s: Bad argument", arg); + fprintf(stderr, "%s: Bad argument\n", arg); return(0); } @@ -588,7 +588,7 @@ foptions(int *fflags, char *arg) *fflags &= ~NO_IGN_ESCAPE; break; default: - fprintf(stderr, "%s: Bad argument", o); + fprintf(stderr, "%s: Bad argument\n", o); return(0); } } @@ -617,7 +617,7 @@ woptions(int *wflags, char *arg) *wflags |= WARN_WERR; break; default: - fprintf(stderr, "%s: Bad argument", o); + fprintf(stderr, "%s: Bad argument\n", o); return(0); } } |