summaryrefslogtreecommitdiffstats
path: root/strings.sh
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-03-08 19:32:03 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-03-08 19:32:03 +0000
commitafb2dbb6cd0e0214f352338c0abb880d02986242 (patch)
tree656e4abac4e2a6b649818cf07363b2d85af3e3f3 /strings.sh
parent7d74d4d5bc960b47e735e4f9539eb4b01e227f66 (diff)
downloadmandoc-afb2dbb6cd0e0214f352338c0abb880d02986242.tar.gz
Fixed strings.sh to work with NetBSD.
Fixed various lint warnings.
Diffstat (limited to 'strings.sh')
-rw-r--r--strings.sh13
1 files changed, 8 insertions, 5 deletions
diff --git a/strings.sh b/strings.sh
index 47753535..4fdb5273 100644
--- a/strings.sh
+++ b/strings.sh
@@ -45,11 +45,11 @@ fi
input=$2
if [ "$output" ]; then
- exec 1<>$output
+ exec >$output
fi
if [ "$input" ]; then
- exec 0<>$input
+ exec <$input
fi
cat <<!
@@ -67,9 +67,12 @@ mdoc_a2${name}(const char *p)
!
while read in ; do
- [ -z "$in" ] && continue;
- [ "#" == `echo "$in" | cut -c1` ] && continue;
-
+ 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 <<!