diff options
author | ru <ru@FreeBSD.org> | 2000-12-05 18:49:44 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2000-12-05 18:49:44 +0000 |
commit | a812d8b090bc4edc23150bff257717b24f282e41 (patch) | |
tree | 19d4540966cb92612af25d5154efcc062eefb5c5 /contrib/groff/grog | |
parent | 2e2c9047c3a8b5b6fdcdcd4585d5b114f31cd386 (diff) | |
download | FreeBSD-src-a812d8b090bc4edc23150bff257717b24f282e41.zip FreeBSD-src-a812d8b090bc4edc23150bff257717b24f282e41.tar.gz |
Virgin import of FSF groff v1.16.1
Diffstat (limited to 'contrib/groff/grog')
-rw-r--r-- | contrib/groff/grog/Makefile.sub | 8 | ||||
-rw-r--r-- | contrib/groff/grog/grog.man | 8 | ||||
-rw-r--r-- | contrib/groff/grog/grog.pl | 20 | ||||
-rw-r--r-- | contrib/groff/grog/grog.sh | 12 |
4 files changed, 39 insertions, 9 deletions
diff --git a/contrib/groff/grog/Makefile.sub b/contrib/groff/grog/Makefile.sub index 5b8f089..35b2b3c 100644 --- a/contrib/groff/grog/Makefile.sub +++ b/contrib/groff/grog/Makefile.sub @@ -1,5 +1,6 @@ MAN1=grog.n CLEANADD=grog +NAMEPREFIX=$(g) all: grog @@ -9,14 +10,15 @@ grog: grog.pl grog.sh sed -e 's;/usr/bin/perl;$(PERLPATH);' $(srcdir)/grog.pl >$@; \ else \ rm -f $@; \ - sed "$(SH_SCRIPT_SED_CMD)" $(srcdir)/grog.sh >$@; \ + sed -e 's/@g@/$(g)/g' \ + -e "$(SH_SCRIPT_SED_CMD)" $(srcdir)/grog.sh >$@; \ fi chmod +x $@ install_data: grog - -test -d $(bindir) || mkdir $(bindir) + -test -d $(bindir) || $(mkinstalldirs) $(bindir) -rm -f $(bindir)/grog - $(INSTALL_PROGRAM) grog $(bindir)/grog + $(INSTALL_SCRIPT) grog $(bindir)/grog uninstall_sub: -rm -f $(bindir)/grog diff --git a/contrib/groff/grog/grog.man b/contrib/groff/grog/grog.man index 8e92657..86902d2 100644 --- a/contrib/groff/grog/grog.man +++ b/contrib/groff/grog/grog.man @@ -1,5 +1,5 @@ .ig \"-*- nroff -*- -Copyright (C) 1989-1995 Free Software Foundation, Inc. +Copyright (C) 1989-2000 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -41,6 +41,9 @@ options .BR \-mm , .BR \-ms , .BR \-p , +.BR \-R , +.BR \-g , +.BR \-G , .BR \-s , and .BR \-t @@ -69,4 +72,7 @@ option. .BR @g@tbl (@MAN1EXT@), .BR @g@pic (@MAN1EXT@), .BR @g@eqn (@MAN1EXT@), +.BR @g@refer (@MAN1EXT@), +.BR @g@grn (@MAN1EXT@), +.BR grap (1), .BR @g@soelim (@MAN1EXT@) diff --git a/contrib/groff/grog/grog.pl b/contrib/groff/grog/grog.pl index b131da6..416d5b3 100644 --- a/contrib/groff/grog/grog.pl +++ b/contrib/groff/grog/grog.pl @@ -47,6 +47,21 @@ sub process { $soelim++ if $level; } } + elsif (/^\.GS/) { + $_ = <FILE>; + if (!/^\./) { + $grn++; + $soelim++ if $level; + } + } + elsif (/^\.G1/) { + $_ = <FILE>; + if (!/^\./) { + $grap++; + $pic++; + $soelim++ if $level; + } + } elsif (/^\.PS([ 0-9.<].*)?$/) { if (/^\.PS\s*<\s*(\S+)/) { $pic++; @@ -108,11 +123,14 @@ sub process { close(FILE); } -if ($pic || $tbl || $eqn || $refer) { +if ($pic || $tbl || $eqn || $grn || $grap || $refer) { $s = "-"; $s .= "s" if $soelim; $s .= "R" if $refer; + # grap must be run before pic + $s .= "G" if $grap; $s .= "p" if $pic; + $s .= "g" if $grn; $s .= "t" if $tbl; $s .= "e" if $eqn; push(@command, $s); diff --git a/contrib/groff/grog/grog.sh b/contrib/groff/grog/grog.sh index 631b356..d872488 100644 --- a/contrib/groff/grog/grog.sh +++ b/contrib/groff/grog/grog.sh @@ -2,7 +2,7 @@ # grog -- guess options for groff command # Like doctype in Kernighan & Pike, Unix Programming Environment, pp 306-8. -soelim=gsoelim +soelim=@g@soelim opts= @@ -20,12 +20,12 @@ do esac done -egrep -h '^\.(P|[LI]P|[pnil]p|sh|Dd|Tp|Dp|De|Cx|Cl|Oo|Oc|TS|EQ|TH|SH|so|\[|R1|PH|SA)' $* \ +egrep -h '^\.(P|[LI]P|[pnil]p|sh|Dd|Tp|Dp|De|Cx|Cl|Oo|Oc|TS|EQ|TH|SH|so|\[|R1|GS|G1|PH|SA)' $* \ | sed -e '/^\.so/s/^.*$/.SO_START\ &\ .SO_END/' \ | $soelim \ -| egrep '^\.(P|[LI]P|[pnil]p|sh|Dd|Tp|Dp|De|Cx|Cl|Oo|Oc|TS|EQ|TH|SH|\[|R1|PH|SA|SO_START|SO_END)' \ +| egrep '^\.(P|[LI]P|[pnil]p|sh|Dd|Tp|Dp|De|Cx|Cl|Oo|Oc|TS|EQ|TH|SH|\[|R1|GS|G1|PH|SA|SO_START|SO_END)' \ | awk ' /^\.SO_START$/ { so = 1 } /^\.SO_END$/ { so = 0 } @@ -33,6 +33,8 @@ egrep -h '^\.(P|[LI]P|[pnil]p|sh|Dd|Tp|Dp|De|Cx|Cl|Oo|Oc|TS|EQ|TH|SH|so|\[|R1|PH /^\.PS([ 0-9.<].*)?$/ { pic++; if (so > 0) soelim++ } /^\.EQ/ { eqn++; if (so > 0) soelim++ } /^\.(R1|\[)/ { refer++; if (so > 0) soelim++ } +/^\.GS/ { grn++; if (so > 0) soelim++ } +/^\.G1/ { grap++; pic++; if (so > 0) soelim++ } /^\.TH/ { TH++ } /^\.[PLI]P/ { PP++ } /^\.P$/ { P++ } @@ -48,10 +50,12 @@ END { if (files ~ /^-/) files = "-- " files printf "groff" - if (pic > 0 || tbl > 0 || eqn > 0 || refer > 0) { + if (pic > 0 || tbl > 0 || grn > 0 || grap > 0 || eqn > 0 || refer > 0) { printf " -" if (soelim > 0) printf "s" if (refer > 0) printf "R" + if (grn > 0) printf "g" + if (grap > 0) printf "G" if (pic > 0) printf "p" if (tbl > 0) printf "t" if (eqn > 0) printf "e" |