xref: /netbsd-src/external/bsd/mdocml/dist/st.c (revision e16833093deb05f9089dde96344fcb2554bf0de6)
1544c191cSchristos /*	Id: st.c,v 1.16 2018/12/14 01:18:26 schwarze Exp  */
24154958bSjoerg /*
3544c191cSchristos  * Copyright (c) 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
44154958bSjoerg  *
54154958bSjoerg  * Permission to use, copy, modify, and distribute this software for any
64154958bSjoerg  * purpose with or without fee is hereby granted, provided that the above
74154958bSjoerg  * copyright notice and this permission notice appear in all copies.
84154958bSjoerg  *
94154958bSjoerg  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
104154958bSjoerg  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
114154958bSjoerg  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
124154958bSjoerg  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
134154958bSjoerg  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
144154958bSjoerg  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
154154958bSjoerg  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
164154958bSjoerg  */
17d5e63c8dSjoerg #include "config.h"
18d5e63c8dSjoerg 
19fec65c98Schristos #include <sys/types.h>
20fec65c98Schristos 
21544c191cSchristos #include <stdio.h>
224154958bSjoerg #include <string.h>
234154958bSjoerg 
24c9bcef03Schristos #include "mandoc.h"
259ff1f2acSchristos #include "roff.h"
264154958bSjoerg #include "libmdoc.h"
274154958bSjoerg 
284154958bSjoerg #define LINE(x, y) \
294154958bSjoerg 	if (0 == strcmp(p, x)) return(y);
304154958bSjoerg 
314154958bSjoerg const char *
324154958bSjoerg mdoc_a2st(const char *p)
334154958bSjoerg {
34544c191cSchristos LINE("-p1003.1-88",	"IEEE Std 1003.1-1988 (\\(lqPOSIX.1\\(rq)")
35544c191cSchristos LINE("-p1003.1-90",	"IEEE Std 1003.1-1990 (\\(lqPOSIX.1\\(rq)")
36544c191cSchristos LINE("-p1003.1-96",	"ISO/IEC 9945-1:1996 (\\(lqPOSIX.1\\(rq)")
37544c191cSchristos LINE("-p1003.1-2001",	"IEEE Std 1003.1-2001 (\\(lqPOSIX.1\\(rq)")
38544c191cSchristos LINE("-p1003.1-2004",	"IEEE Std 1003.1-2004 (\\(lqPOSIX.1\\(rq)")
39544c191cSchristos LINE("-p1003.1-2008",	"IEEE Std 1003.1-2008 (\\(lqPOSIX.1\\(rq)")
4064ade81bSwiz LINE("-p1003.1-2024",	"IEEE Std 1003.1-2024 (\\(lqPOSIX.1\\(rq)")
41544c191cSchristos LINE("-p1003.1",	"IEEE Std 1003.1 (\\(lqPOSIX.1\\(rq)")
42544c191cSchristos LINE("-p1003.1b",	"IEEE Std 1003.1b (\\(lqPOSIX.1b\\(rq)")
43544c191cSchristos LINE("-p1003.1b-93",	"IEEE Std 1003.1b-1993 (\\(lqPOSIX.1b\\(rq)")
44544c191cSchristos LINE("-p1003.1c-95",	"IEEE Std 1003.1c-1995 (\\(lqPOSIX.1c\\(rq)")
45544c191cSchristos LINE("-p1003.1g-2000",	"IEEE Std 1003.1g-2000 (\\(lqPOSIX.1g\\(rq)")
46544c191cSchristos LINE("-p1003.1i-95",	"IEEE Std 1003.1i-1995 (\\(lqPOSIX.1i\\(rq)")
47544c191cSchristos LINE("-p1003.2",	"IEEE Std 1003.2 (\\(lqPOSIX.2\\(rq)")
48544c191cSchristos LINE("-p1003.2-92",	"IEEE Std 1003.2-1992 (\\(lqPOSIX.2\\(rq)")
49544c191cSchristos LINE("-p1003.2a-92",	"IEEE Std 1003.2a-1992 (\\(lqPOSIX.2\\(rq)")
50544c191cSchristos LINE("-isoC",		"ISO/IEC 9899:1990 (\\(lqISO\\~C90\\(rq)")
51544c191cSchristos LINE("-isoC-90",	"ISO/IEC 9899:1990 (\\(lqISO\\~C90\\(rq)")
52544c191cSchristos LINE("-isoC-amd1",	"ISO/IEC 9899/AMD1:1995 (\\(lqISO\\~C90, Amendment 1\\(rq)")
53544c191cSchristos LINE("-isoC-tcor1",	"ISO/IEC 9899/TCOR1:1994 (\\(lqISO\\~C90, Technical Corrigendum 1\\(rq)")
54544c191cSchristos LINE("-isoC-tcor2",	"ISO/IEC 9899/TCOR2:1995 (\\(lqISO\\~C90, Technical Corrigendum 2\\(rq)")
55544c191cSchristos LINE("-isoC-99",	"ISO/IEC 9899:1999 (\\(lqISO\\~C99\\(rq)")
56544c191cSchristos LINE("-isoC-2011",	"ISO/IEC 9899:2011 (\\(lqISO\\~C11\\(rq)")
57*9638f53fSwiz LINE("-isoC-2023",	"ISO/IEC 9899:2024 (\\(lqISO\\~C23\\(rq)")
58544c191cSchristos LINE("-iso9945-1-90",	"ISO/IEC 9945-1:1990 (\\(lqPOSIX.1\\(rq)")
59544c191cSchristos LINE("-iso9945-1-96",	"ISO/IEC 9945-1:1996 (\\(lqPOSIX.1\\(rq)")
60544c191cSchristos LINE("-iso9945-2-93",	"ISO/IEC 9945-2:1993 (\\(lqPOSIX.2\\(rq)")
61544c191cSchristos LINE("-ansiC",		"ANSI X3.159-1989 (\\(lqANSI\\~C89\\(rq)")
62544c191cSchristos LINE("-ansiC-89",	"ANSI X3.159-1989 (\\(lqANSI\\~C89\\(rq)")
63544c191cSchristos LINE("-ieee754",	"IEEE Std 754-1985")
64544c191cSchristos LINE("-iso8802-3",	"ISO 8802-3: 1989")
65544c191cSchristos LINE("-iso8601",	"ISO 8601")
66544c191cSchristos LINE("-ieee1275-94",	"IEEE Std 1275-1994 (\\(lqOpen Firmware\\(rq)")
67544c191cSchristos LINE("-xpg3",		"X/Open Portability Guide Issue\\~3 (\\(lqXPG3\\(rq)")
68544c191cSchristos LINE("-xpg4",		"X/Open Portability Guide Issue\\~4 (\\(lqXPG4\\(rq)")
69544c191cSchristos LINE("-xpg4.2",		"X/Open Portability Guide Issue\\~4, Version\\~2 (\\(lqXPG4.2\\(rq)")
70544c191cSchristos LINE("-xbd5",		"X/Open Base Definitions Issue\\~5 (\\(lqXBD5\\(rq)")
71544c191cSchristos LINE("-xcu5",		"X/Open Commands and Utilities Issue\\~5 (\\(lqXCU5\\(rq)")
72544c191cSchristos LINE("-xsh4.2",		"X/Open System Interfaces and Headers Issue\\~4, Version\\~2 (\\(lqXSH4.2\\(rq)")
73544c191cSchristos LINE("-xsh5",		"X/Open System Interfaces and Headers Issue\\~5 (\\(lqXSH5\\(rq)")
74544c191cSchristos LINE("-xns5",		"X/Open Networking Services Issue\\~5 (\\(lqXNS5\\(rq)")
75544c191cSchristos LINE("-xns5.2",		"X/Open Networking Services Issue\\~5.2 (\\(lqXNS5.2\\(rq)")
76544c191cSchristos LINE("-xcurses4.2",	"X/Open Curses Issue\\~4, Version\\~2 (\\(lqXCURSES4.2\\(rq)")
77544c191cSchristos LINE("-susv1",		"Version\\~1 of the Single UNIX Specification (\\(lqSUSv1\\(rq)")
78544c191cSchristos LINE("-susv2",		"Version\\~2 of the Single UNIX Specification (\\(lqSUSv2\\(rq)")
79544c191cSchristos LINE("-susv3",		"Version\\~3 of the Single UNIX Specification (\\(lqSUSv3\\(rq)")
80544c191cSchristos LINE("-susv4",		"Version\\~4 of the Single UNIX Specification (\\(lqSUSv4\\(rq)")
81544c191cSchristos LINE("-svid4",		"System\\~V Interface Definition, Fourth Edition (\\(lqSVID4\\(rq)")
824154958bSjoerg 
839ff1f2acSchristos 	return NULL;
844154958bSjoerg }
85