summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-03-06 14:24:49 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-03-06 14:24:49 +0000
commita454003ad67073a51037d0dc5dcbf5b3cced1b8e (patch)
tree55c6dd71b1f4ad3af5079c7fc6a5c1d6def01a2a
parent236dae9fb3183b9c1d8bc6f77614797d65800987 (diff)
downloadmandoc-a454003ad67073a51037d0dc5dcbf5b3cced1b8e.tar.gz
mandoc-a454003ad67073a51037d0dc5dcbf5b3cced1b8e.tar.zst
mandoc-a454003ad67073a51037d0dc5dcbf5b3cced1b8e.zip
Documented the strings script.
-rw-r--r--action.c12
-rw-r--r--arch.in8
-rw-r--r--att.in8
-rw-r--r--lib.in8
-rw-r--r--msec.in8
-rw-r--r--st.in8
-rw-r--r--strings.sh5
-rw-r--r--validate.c5
-rw-r--r--vol.in8
9 files changed, 62 insertions, 8 deletions
diff --git a/action.c b/action.c
index 17aa05f5..d5605a38 100644
--- a/action.c
+++ b/action.c
@@ -1,4 +1,4 @@
-/* $Id: action.c,v 1.31 2009/03/06 14:13:47 kristaps Exp $ */
+/* $Id: action.c,v 1.32 2009/03/06 14:24:49 kristaps Exp $ */
/*
* Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -535,11 +535,13 @@ post_ar(struct mdoc *mdoc)
n = mdoc->last;
mdoc->next = MDOC_NEXT_CHILD;
- mdoc_word_alloc(mdoc, mdoc->last->line,
- mdoc->last->pos, "file");
+ if ( ! mdoc_word_alloc(mdoc, mdoc->last->line,
+ mdoc->last->pos, "file"))
+ return(0);
mdoc->next = MDOC_NEXT_SIBLING;
- mdoc_word_alloc(mdoc, mdoc->last->line,
- mdoc->last->pos, "...");
+ if ( ! mdoc_word_alloc(mdoc, mdoc->last->line,
+ mdoc->last->pos, "..."))
+ return(0);
mdoc->last = n;
mdoc->next = MDOC_NEXT_SIBLING;
diff --git a/arch.in b/arch.in
index 0c7d2dac..3e45ca7f 100644
--- a/arch.in
+++ b/arch.in
@@ -1,3 +1,11 @@
+# $Id: arch.in,v 1.2 2009/03/06 14:24:49 kristaps Exp $
+#
+# This file defines the `.Dt' macro 'arch' argument. Lines are composed
+# of tab-delimited fields -- multiple tabs may delimit fields. Comment
+# lines begin with '#'; blank lines are also ok.
+#
+# These were last grok'd from OpenBSD-4.4's mdoc.samples(7).
+
alpha Alpha
amd64 AMD64
amiga Amiga
diff --git a/att.in b/att.in
index 009a44c9..6784dc39 100644
--- a/att.in
+++ b/att.in
@@ -1,3 +1,11 @@
+# $Id: att.in,v 1.2 2009/03/06 14:24:49 kristaps Exp $
+#
+# This file defines the `.At' macro argument. Lines are composed of
+# tab-delimited fields -- multiple tabs may delimit fields. Comment
+# lines begin with '#'; blank lines are also ok.
+#
+# These were last grok'd from OpenBSD-4.4's mdoc.samples(7).
+
v1 Version 1 AT&T UNIX
v2 Version 2 AT&T UNIX
v3 Version 3 AT&T UNIX
diff --git a/lib.in b/lib.in
index c31fb4b5..f366cbab 100644
--- a/lib.in
+++ b/lib.in
@@ -1,3 +1,11 @@
+# $Id: lib.in,v 1.2 2009/03/06 14:24:49 kristaps Exp $
+#
+# This file defines the `.Lb' macro argument. Lines are composed of
+# tab-delimited fields -- multiple tabs may delimit fields. Comment
+# lines begin with '#'; blank lines are also ok.
+#
+# These were last grok'd from NetBSD-4.0.1's mdoc.samples(7).
+
libarm ARM Architecture Library (libarm, -larm)
libarm32 ARM32 Architecture Library (libarm32, -larm32)
libc Standard C Library (libc, -lc)
diff --git a/msec.in b/msec.in
index 9d7c1a96..97ac2069 100644
--- a/msec.in
+++ b/msec.in
@@ -1,3 +1,11 @@
+# $Id: msec.in,v 1.2 2009/03/06 14:24:49 kristaps Exp $
+#
+# This file defines the `.Dt' macro 'volume' argument. Lines are
+# composed of tab-delimited fields -- multiple tabs may delimit fields.
+# Comment lines begin with '#'; blank lines are also ok.
+#
+# These were last grok'd from OpenBSD-4.4's mdoc.samples(7).
+
1 General Commands Manual
2 System Calls Manual
3 Library Functions Manual
diff --git a/st.in b/st.in
index 4669b16e..f8168056 100644
--- a/st.in
+++ b/st.in
@@ -1,3 +1,11 @@
+# $Id: st.in,v 1.2 2009/03/06 14:24:49 kristaps Exp $
+#
+# This file defines the `.St' macro arguments. Lines are composed of
+# tab-delimited fields -- multiple tabs may delimit fields. Comment
+# lines begin with '#'; blank lines are also ok.
+#
+# These were last grok'd from OpenBSD-4.4's mdoc.samples(7).
+
-p1003.1-88 IEEE Std 1003.1-1988 (\\\\(lqPOSIX\\\\(rq)
-p1003.1-90 IEEE Std 1003.1-1990 (\\\\(lqPOSIX\\\\(rq)
-p1003.1-96 ISO/IEC 9945-1:1996 (\\\\(lqPOSIX\\\\(rq)
diff --git a/strings.sh b/strings.sh
index 84b7244c..18c54f28 100644
--- a/strings.sh
+++ b/strings.sh
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: strings.sh,v 1.1 2009/03/06 14:13:47 kristaps Exp $
+# $Id: strings.sh,v 1.2 2009/03/06 14:24:49 kristaps Exp $
# strings.sh [-o output] name input
#
@@ -67,6 +67,9 @@ mdoc_a2${name}(const char *p)
!
while read in ; do
+ [ -z "$in" ] && continue;
+ [ "#" == `echo "$in" | cut -c1` ] && continue;
+
key=`printf "%s\n" "$in" | cut -f 1`
val=`printf "%s\n" "$in" | cut -f 2- | sed 's!^[ ]*!!'`
cat <<!
diff --git a/validate.c b/validate.c
index c923d914..b27eb2ee 100644
--- a/validate.c
+++ b/validate.c
@@ -1,4 +1,4 @@
-/* $Id: validate.c,v 1.69 2009/03/06 14:13:47 kristaps Exp $ */
+/* $Id: validate.c,v 1.70 2009/03/06 14:24:49 kristaps Exp $ */
/*
* Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -484,7 +484,8 @@ check_sec(PRE_ARGS, ...)
va_start(ap, n);
for (;;) {
- if (SEC_CUSTOM == (sec = va_arg(ap, enum mdoc_sed)))
+ sec = (enum mdoc_sec)va_arg(ap, int);
+ if (SEC_CUSTOM == sec)
break;
if (sec != mdoc->lastsec)
continue;
diff --git a/vol.in b/vol.in
index 911d1bc1..2681cd2c 100644
--- a/vol.in
+++ b/vol.in
@@ -1,3 +1,11 @@
+# $Id: vol.in,v 1.2 2009/03/06 14:24:49 kristaps Exp $
+#
+# This file defines the `.Dt' macro 'volume' argument. Lines are
+# composed of tab-delimited fields -- multiple tabs may delimit fields.
+# Comment lines begin with '#'; blank lines are also ok.
+#
+# These were last grok'd from OpenBSD-4.4's mdoc.samples(7).
+
USD User's Supplementary Documents
PS1 Programmer's Supplementary Documents
AMD Ancestral Manual Documents