diff options
-rw-r--r-- | Makefile | 7 | ||||
-rw-r--r-- | libmdoc.h | 3 | ||||
-rw-r--r-- | mdoc.7 | 36 | ||||
-rw-r--r-- | mdoc_validate.c | 16 | ||||
-rw-r--r-- | vol.c | 36 | ||||
-rw-r--r-- | vol.in | 35 |
6 files changed, 9 insertions, 124 deletions
@@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.446 2014/11/28 18:09:01 schwarze Exp $ +# $Id: Makefile,v 1.447 2014/11/28 18:36:35 schwarze Exp $ # # Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv> # Copyright (c) 2011, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org> @@ -92,7 +92,6 @@ SRCS = att.c \ term_ascii.c \ term_ps.c \ tree.c \ - vol.c \ $(TESTSRCS) DISTFILES = INSTALL \ @@ -150,7 +149,6 @@ DISTFILES = INSTALL \ tbl.3 \ tbl.7 \ term.h \ - vol.in \ $(SRCS) LIBMAN_OBJS = man.o \ @@ -165,8 +163,7 @@ LIBMDOC_OBJS = att.o \ mdoc_hash.o \ mdoc_macro.o \ mdoc_validate.o \ - st.o \ - vol.o + st.o LIBROFF_OBJS = eqn.o \ roff.o \ @@ -1,4 +1,4 @@ -/* $Id: libmdoc.h,v 1.92 2014/11/28 04:47:03 schwarze Exp $ */ +/* $Id: libmdoc.h,v 1.93 2014/11/28 18:36:35 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2013, 2014 Ingo Schwarze <schwarze@openbsd.org> @@ -125,7 +125,6 @@ const char *mdoc_a2att(const char *); const char *mdoc_a2lib(const char *); const char *mdoc_a2st(const char *); const char *mdoc_a2arch(const char *); -const char *mdoc_a2vol(const char *); void mdoc_valid_pre(struct mdoc *, struct mdoc_node *); void mdoc_valid_post(struct mdoc *); enum margverr mdoc_argv(struct mdoc *, int, enum mdoct, @@ -1,4 +1,4 @@ -.\" $Id: mdoc.7,v 1.243 2014/11/28 18:09:01 schwarze Exp $ +.\" $Id: mdoc.7,v 1.244 2014/11/28 18:36:35 schwarze Exp $ .\" .\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> .\" Copyright (c) 2010, 2011, 2013 Ingo Schwarze <schwarze@openbsd.org> @@ -433,7 +433,7 @@ in the alphabetical .Ss Document preamble and NAME section macros .Bl -column "Brq, Bro, Brc" description .It Sx \&Dd Ta document date: Cm $\&Mdocdate$ | Ar month day , year -.It Sx \&Dt Ta document title: Ar TITLE section Op Ar volume | arch +.It Sx \&Dt Ta document title: Ar TITLE section Op Ar arch .It Sx \&Os Ta operating system version: Op Ar system Op Ar version .It Sx \&Nm Ta document name (one argument) .It Sx \&Nd Ta document description (one line) @@ -1299,7 +1299,7 @@ Its syntax is as follows: .Pf \. Sx \&Dt .Ar TITLE .Ar section -.Op Ar volume | arch +.Op Ar arch .Ed .Pp Its arguments are as follows: @@ -1348,35 +1348,6 @@ or .Pq paper . It should correspond to the manual's filename suffix and defaults to the empty string if unspecified. -.It Ar volume -This overrides the volume inferred from -.Ar section . -This field is optional, and if specified, must be one of -.Cm USD -.Pq users' supplementary documents , -.Cm PS1 -.Pq programmers' supplementary documents , -.Cm AMD -.Pq administrators' supplementary documents , -.Cm SMM -.Pq system managers' manuals , -.Cm URM -.Pq users' reference manuals , -.Cm PRM -.Pq programmers' reference manuals , -.Cm KM -.Pq kernel manuals , -.Cm IND -.Pq master index , -.Cm MMI -.Pq master index , -.Cm LOCAL -.Pq local manuals , -.Cm LOC -.Pq local manuals , -or -.Cm CON -.Pq contributed manuals . .It Ar arch This specifies the machine architecture a manual page applies to, where relevant, for example @@ -1390,7 +1361,6 @@ The list of valid architectures varies by operating system. .Pp Examples: .Dl \&.Dt FOO 1 -.Dl \&.Dt FOO 4 KM .Dl \&.Dt FOO 9 i386 .Pp See also diff --git a/mdoc_validate.c b/mdoc_validate.c index 72696041..5a07af3e 100644 --- a/mdoc_validate.c +++ b/mdoc_validate.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_validate.c,v 1.261 2014/11/28 18:09:01 schwarze Exp $ */ +/* $Id: mdoc_validate.c,v 1.262 2014/11/28 18:36:35 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010-2014 Ingo Schwarze <schwarze@openbsd.org> @@ -2280,19 +2280,9 @@ post_dt(POST_ARGS) mdoc->meta.msec = mandoc_strdup(nn->string); } - if (NULL == (nn = nn->next)) - goto out; - - /* - * If the third argument is a volume name, format is, - * otherwise assume it's an architecture. - */ + /* Handle an optional architecture */ - cp = mdoc_a2vol(nn->string); - if (cp) { - free(mdoc->meta.vol); - mdoc->meta.vol = mandoc_strdup(cp); - } else { + if ((nn = nn->next) != NULL) { for (p = nn->string; *p; p++) *p = tolower((unsigned char)*p); mdoc->meta.arch = mandoc_strdup(nn->string); @@ -1,36 +0,0 @@ -/* $Id: vol.c,v 1.11 2014/08/10 23:54:41 schwarze Exp $ */ -/* - * Copyright (c) 2009 Kristaps Dzonsons <kristaps@bsd.lv> - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ -#include "config.h" - -#include <sys/types.h> - -#include <string.h> - -#include "mdoc.h" -#include "libmdoc.h" - -#define LINE(x, y) \ - if (0 == strcmp(p, x)) return(y); - -const char * -mdoc_a2vol(const char *p) -{ - -#include "vol.in" - - return(NULL); -} diff --git a/vol.in b/vol.in deleted file mode 100644 index 7650b57a..00000000 --- a/vol.in +++ /dev/null @@ -1,35 +0,0 @@ -/* $Id: vol.in,v 1.6 2010/06/19 20:46:28 kristaps Exp $ */ -/* - * Copyright (c) 2009 Kristaps Dzonsons <kristaps@bsd.lv> - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -/* - * This file defines volume titles for .Dt. - * - * Be sure to escape strings. - */ - -LINE("USD", "User\'s Supplementary Documents") -LINE("PS1", "Programmer\'s Supplementary Documents") -LINE("AMD", "Ancestral Manual Documents") -LINE("SMM", "System Manager\'s Manual") -LINE("URM", "User\'s Reference Manual") -LINE("PRM", "Programmer\'s Manual") -LINE("KM", "Kernel Manual") -LINE("IND", "Manual Master Index") -LINE("MMI", "Manual Master Index") -LINE("LOCAL", "Local Manual") -LINE("LOC", "Local Manual") -LINE("CON", "Contributed Software Manual") |