diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-11-28 18:36:35 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-11-28 18:36:35 +0000 |
commit | eb9e2934b8348c51d01cc87f4d2ab21263627cf3 (patch) | |
tree | d453fd594ce23528934b318370906ad0e63324ef | |
parent | e648fcd63ca4a6932755144a7cfaad0a3f55cffa (diff) | |
download | mandoc-eb9e2934b8348c51d01cc87f4d2ab21263627cf3.tar.gz |
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-- | Makefile | 5 | ||||
-rw-r--r-- | libmdoc.h | 1 | ||||
-rw-r--r-- | mdoc.7 | 34 | ||||
-rw-r--r-- | mdoc_validate.c | 14 | ||||
-rw-r--r-- | vol.c | 36 | ||||
-rw-r--r-- | vol.in | 35 |
6 files changed, 5 insertions, 120 deletions
@@ -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 \ @@ -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, @@ -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 adba1204..18946b52 100644 --- a/mdoc_validate.c +++ b/mdoc_validate.c @@ -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$ */ -/* - * 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 d03263cc..00000000 --- a/vol.in +++ /dev/null @@ -1,35 +0,0 @@ -/* $Id$ */ -/* - * 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") |