diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2014-11-28 18:35:38 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2014-11-28 18:35:38 +0000 |
commit | 1ab4cfa9ba2f0057000e23f3802c87cc4504a310 (patch) | |
tree | 6abe368e9d8101c86e4e35ea019a9c14bfc5be4a | |
parent | 282749d96921661582ca1ebedec616a0f9c66335 (diff) |
Retire support for CSRG supplementary document titles. These are
long obsolete and were never written in mdoc(7) in the first place.
Removes 100 lines from source files.
-rw-r--r-- | share/man/man7/mdoc.7 | 38 | ||||
-rw-r--r-- | usr.bin/mandoc/Makefile | 6 | ||||
-rw-r--r-- | usr.bin/mandoc/libmdoc.h | 3 | ||||
-rw-r--r-- | usr.bin/mandoc/mdoc_validate.c | 16 | ||||
-rw-r--r-- | usr.bin/mandoc/vol.c | 32 | ||||
-rw-r--r-- | usr.bin/mandoc/vol.in | 35 |
6 files changed, 11 insertions, 119 deletions
diff --git a/share/man/man7/mdoc.7 b/share/man/man7/mdoc.7 index 87d5b7bc991..805c6a75861 100644 --- a/share/man/man7/mdoc.7 +++ b/share/man/man7/mdoc.7 @@ -1,4 +1,4 @@ -.\" $OpenBSD: mdoc.7,v 1.124 2014/11/27 16:20:27 schwarze Exp $ +.\" $OpenBSD: mdoc.7,v 1.125 2014/11/28 18:35:37 schwarze Exp $ .\" .\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> .\" Copyright (c) 2010, 2011, 2013 Ingo Schwarze <schwarze@openbsd.org> @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: November 27 2014 $ +.Dd $Mdocdate: November 28 2014 $ .Dt MDOC 7 .Os .Sh NAME @@ -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. @@ -1410,7 +1381,6 @@ and .Pp Examples: .Dl \&.Dt FOO 1 -.Dl \&.Dt FOO 4 KM .Dl \&.Dt FOO 9 i386 .Pp See also diff --git a/usr.bin/mandoc/Makefile b/usr.bin/mandoc/Makefile index 2df9aa861aa..061ef38f2b1 100644 --- a/usr.bin/mandoc/Makefile +++ b/usr.bin/mandoc/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.86 2014/11/28 18:07:38 schwarze Exp $ +# $OpenBSD: Makefile,v 1.87 2014/11/28 18:35:37 schwarze Exp $ .include <bsd.own.mk> @@ -10,7 +10,7 @@ LDADD += -lsqlite3 -lutil SRCS= mandoc.c mandoc_aux.c preconv.c read.c \ roff.c tbl.c tbl_opts.c tbl_layout.c tbl_data.c eqn.c SRCS+= mdoc_macro.c mdoc.c mdoc_hash.c \ - mdoc_argv.c mdoc_validate.c att.c vol.c msec.c st.c + mdoc_argv.c mdoc_validate.c att.c msec.c st.c SRCS+= man_macro.c man.c man_hash.c man_validate.c SRCS+= main.c mdoc_term.c chars.c term.c tree.c man_term.c eqn_term.c SRCS+= mdoc_man.c @@ -40,7 +40,7 @@ CLEANFILES += man.cgi cgi.o man.cgi.8.manlint # After that, read: man man.cgi.8 LIBMDOC_OBJS = mdoc_argv.o mdoc_hash.o mdoc_macro.o mdoc_validate.o \ - mdoc.o att.o st.o vol.o + mdoc.o att.o st.o LIBMAN_OBJS = man.o man_hash.o man_macro.o man_validate.o LIBROFF_OBJS = roff.o eqn.o tbl.o tbl_data.o tbl_layout.o tbl_opts.o LIBMANDOC_OBJS = ${LIBMDOC_OBJS} ${LIBMAN_OBJS} ${LIBROFF_OBJS} \ diff --git a/usr.bin/mandoc/libmdoc.h b/usr.bin/mandoc/libmdoc.h index 3b18375ffea..37b9676d633 100644 --- a/usr.bin/mandoc/libmdoc.h +++ b/usr.bin/mandoc/libmdoc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: libmdoc.h,v 1.64 2014/11/28 17:23:34 schwarze Exp $ */ +/* $OpenBSD: libmdoc.h,v 1.65 2014/11/28 18:35:37 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2013, 2014 Ingo Schwarze <schwarze@openbsd.org> @@ -122,7 +122,6 @@ enum mdoct mdoc_hash_find(const char *); const char *mdoc_a2att(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, diff --git a/usr.bin/mandoc/mdoc_validate.c b/usr.bin/mandoc/mdoc_validate.c index 325214e3c91..f85936507aa 100644 --- a/usr.bin/mandoc/mdoc_validate.c +++ b/usr.bin/mandoc/mdoc_validate.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mdoc_validate.c,v 1.177 2014/11/28 18:07:38 schwarze Exp $ */ +/* $OpenBSD: mdoc_validate.c,v 1.178 2014/11/28 18:35:37 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010-2014 Ingo Schwarze <schwarze@openbsd.org> @@ -2271,19 +2271,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); diff --git a/usr.bin/mandoc/vol.c b/usr.bin/mandoc/vol.c deleted file mode 100644 index 5030ebd86e2..00000000000 --- a/usr.bin/mandoc/vol.c +++ /dev/null @@ -1,32 +0,0 @@ -/* $Id: vol.c,v 1.7 2014/03/21 22:17:01 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 <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/usr.bin/mandoc/vol.in b/usr.bin/mandoc/vol.in deleted file mode 100644 index 98134cdc950..00000000000 --- a/usr.bin/mandoc/vol.in +++ /dev/null @@ -1,35 +0,0 @@ -/* $Id: vol.in,v 1.3 2010/07/31 23:42:04 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. - */ - -/* - * 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") |