diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-03-16 22:19:19 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-03-16 22:19:19 +0000 |
commit | 08508ed7e6368876201309aff6964a039f011045 (patch) | |
tree | df76daf7d386d0316d975ca1e126b77eb8efba16 /strings.sh | |
parent | c13583a4f480a20774e466fbef54590c6dd6bb48 (diff) | |
download | mandoc-08508ed7e6368876201309aff6964a039f011045.tar.gz mandoc-08508ed7e6368876201309aff6964a039f011045.tar.zst mandoc-08508ed7e6368876201309aff6964a039f011045.zip |
Fixed mdoc_phrase escape handling.
Added MDOC_IGNDELIM (Pf, soon Li, etc.).
macro_constant_delimited ignargs -> argv.c parsing.
Renamed macro functions to correspond to ontologies.
`Fo' and `St' made callable (compat documented).
strings.sh deprecated (directly using CPP).
Abstracted ASCII translation into ascii.{c,in}.
ASCII table uses a self-reordering chained hashtable.
Removed old regressions.
Diffstat (limited to 'strings.sh')
-rw-r--r-- | strings.sh | 89 |
1 files changed, 0 insertions, 89 deletions
diff --git a/strings.sh b/strings.sh deleted file mode 100644 index 54a00d4e..00000000 --- a/strings.sh +++ /dev/null @@ -1,89 +0,0 @@ -#! /bin/sh -# $Id: strings.sh,v 1.3 2009/03/08 19:32:03 kristaps Exp $ - -# strings.sh [-o output] name input -# -# Generate the file of strings. This will contain the following -# function: -# -# const char * -# mdoc_a2NAME(const char *); -# -# The input file must be tab-delimited as follows: -# -# attnam0 A longer description -# attnam1 Another longer description - -input= -output= -args=`getopt o: $*` - -if [ $? -ne 0 ]; then - echo "usage: $0 [-o output] name input" 1>&2 - exit 1 -fi - -set -- $args - -while [ $# -ge 0 ] -do - case "$1" in - -o) - output="$2" ; shift; shift ;; - --) - shift ; break ;; - esac -done - -name=$1 - -if [ -z "$name" ]; then - echo "usage: $0 [-o output] name input" 1>&2 - exit 1 -fi - -input=$2 - -if [ "$output" ]; then - exec >$output -fi - -if [ "$input" ]; then - exec <$input -fi - -cat <<! -/* - * DO NOT EDIT! Automatically generated by $0. - */ -#include <stdlib.h> - -#include "private.h" - -const char * -mdoc_a2${name}(const char *p) -{ - -! - -while read in ; do - if [ -z "$in" ]; then - continue - fi - if [ "#" = `echo "$in" | cut -c1` ]; then - continue - fi - key=`printf "%s\n" "$in" | cut -f 1` - val=`printf "%s\n" "$in" | cut -f 2- | sed 's!^[ ]*!!'` - cat <<! - if (xstrcmp(p, "$key")) - return("$val"); -! -done - -cat <<! - - /* No keys found. */ - return(NULL); -} -! |