vgrind stable port information

Package: vgrind
Version: 5.7
Revision: 2
License: BSD
Homepage: http://www.gnu.org/software/groff/groff.html
Description: Runoff preprocessor for program sources
DescDetail: <<
Vgrind formats programming language sources in a nice style using groff(1).
Comments are placed in italics, language keywords in bold face, and the name
of the current function is listed down the margin of each page as it is
encountered. Languages currently supported are:
C, C++, Fortran, ratfor, Pascal, Modula2, Icon, model, sh, csh, ldl, and yacc.

Vgrind runs in two basic modes, filter mode (see the -f option) or regular
mode. In regular mode, vgrind produces printer-ready output. In filter mode,
vgrind acts as a filter in a manner similar to tbl(1).
<<
Source: http://debian.ethz.ch/debian-archive/dists/Debian-2.2/main/source/text/%n_%v.orig.tar.gz
Source-MD5: f564099d41c79ac6dae36259b5721887
SourceDirectory: %n-%v.orig
BuildDepends: fink (>= 0.24.12)
PatchFile: %n.patch
PatchFile-MD5: 12ac936c0cf5955b8f574175ee994e87
PatchScript: <<
sed 's|@PREFIX@|%p|g' < %{PatchFile} | patch -p1
<<
CompileScript: make all DESTDIR=%i
InstallScript: <<
make install DESTDIR=%i
mkdir -p %i/share/doc/%n
cp README %i/share/doc/%n/README
awk '/ Copyright/,/ SUCH/{print substr($0,3)}' vgrind.sh > %i/share/doc/%n/LICENSE
<<
Maintainer: George Helffrich


vgrind stable port .patch

--- vgrind-5.7.orig/Makefile
+++ vgrind-5.7/Makefile
@@ -1,57 +1,36 @@
-# Makefile for vgrind Frank Swasey
-# 32 Hickok Place
-# Burlington, Vermont 05401-8515
-# USA
-# Email: Frank_Swasey@vnet.ibm.com
-#
-
-CC = gcc
-CFLAGS = -O
-PROG= vfontedpr
-SRCS= regexp.c vfontedpr.c vgrindefs.c
-DOCS= vgrind.1 vgrindefs.5
-OTHR= Makefile vgrind.sh vgrindefs.src tmac.vgrind pathnames.h
-INSTS= /usr/bin/vgrind /usr/lib/groff/tmac/vgrindefs \
- /usr/lib/groff/tmac/tmac.vgrind /usr/lib/groff/tmac/vfontedpr \
- /usr/man/cat1/vgrind.1 /usr/man/cat5/vgrindefs.5
-
-all: vfontedpr
-
-vfontedpr: regexp.o vfontedpr.o vgrindefs.o
-
-install: bininstall /usr/man/cat1/vgrind.1 /usr/man/cat5/vgrindefs.5
- touch install
-
-bininstall: vfontedpr vgrind.sh vgrindefs.src tmac.vgrind
- install -c -o bin -g bin -m 555 vgrind.sh /usr/bin/vgrind
- install -c -o bin -g bin -m 444 vgrindefs.src /usr/lib/groff/tmac/vgrindefs
- install -c -o bin -g bin -m 444 tmac.vgrind /usr/lib/groff/tmac
- install -c -o bin -g bin -m 555 vfontedpr /usr/lib/groff/tmac
- touch bininstall
-
-/usr/man/cat1/vgrind.1: vgrind.1
- nroff -mandoc vgrind.1 >/usr/man/cat1/vgrind.1
-
-/usr/man/cat5/vgrindefs.5: vgrindefs.5
- nroff -mandoc vgrindefs.5 >/usr/man/cat5/vgrindefs.5
-
-uninstall:
- rm -f /usr/bin/vgrind
- rm -f /usr/lib/groff/tmac/vgrindefs
- rm -f /usr/lib/groff/tmac/tmac.vgrind
- rm -f /usr/lib/groff/tmac/vfontedpr
- rm -f /usr/man/cat1/vgrind.1
- rm -f /usr/man/cat5/vgrindefs.5
+CC = gcc
+CPPFLAGS= -D_BSD_SOURCE
+#CFLAGS = -g3 -O2
+CFLAGS = -O2
+
+INSTALL_BIN = install -c -g root -m 0755 -o root -s
+INSTALL_DIR = install -d -g root -m 0755 -o root
+INSTALL_MAN = install -c -g root -m 0644 -o root
+INSTALL_SCR = install -c -g root -m 0755 -o root
+
+SOURCES = regexp.c vfontedpr.c vgrindefs.c
+
+all: vfontedpr vgrind
+
+vfontedpr: $(SOURCES:.c=.o)
+
+vgrind: vgrind.sh
+ cat vgrind.sh > vgrind
+
+install: all
+ $(INSTALL_DIR) $(DESTDIR)/bin
+ $(INSTALL_DIR) $(DESTDIR)/lib
+ $(INSTALL_DIR) $(DESTDIR)/share/groff
+ $(INSTALL_DIR) $(DESTDIR)/share/man/man1
+ $(INSTALL_DIR) $(DESTDIR)/share/man/man5
+
+ $(INSTALL_SCR) vgrind $(DESTDIR)/bin/vgrind
+ $(INSTALL_MAN) vgrindefs $(DESTDIR)/share/groff/vgrindefs
+ $(INSTALL_MAN) tmac.vgrind $(DESTDIR)/share/groff/tmac.vgrind
+ $(INSTALL_BIN) vfontedpr $(DESTDIR)/lib/vfontedpr
+ $(INSTALL_MAN) vgrind.1 $(DESTDIR)/share/man/man1/vgrind.1
+ $(INSTALL_MAN) vgrindefs.5 $(DESTDIR)/share/man/man5/vgrindefs.5

clean:
- rm -f *.o vfontedpr a.out *.bak core make.log
-
-srcdist: vgrindsrc.tgz
-
-vgrindsrc.tgz: $(OTHR) $(SRCS) $(DOCS)
- tar cvzf vgrindsrc.tgz $(OTHR) $(SRCS) $(DOCS)
-
-bindist: vgrindbin.tgz
-
-vgrindbin.tgz: $(INSTS)
- tar cvzf vgrindbin.tgz $(INSTS)
+ $(RM) *.o core
+ $(RM) vfontedpr vgrind
--- vgrind-5.7.orig/pathnames.h
+++ vgrind-5.7/pathnames.h
@@ -33,4 +33,4 @@
* @(#)pathnames.h 5.2 (Berkeley) 6/1/90
*/

-#define _PATH_VGRINDEFS "/usr/lib/groff/tmac/vgrindefs"
+#define _PATH_VGRINDEFS "@PREFIX@/share/groff/vgrindefs"
--- vgrind-5.7.orig/regexp.c
+++ vgrind-5.7/regexp.c
@@ -330,7 +330,7 @@
*/

boolean _escaped; /* true if we are currently _escaped */
-char *_start; /* start of string */
+char *str_start; /* start of string */

char *
expmatch (s, re, mstring)
@@ -498,7 +498,7 @@
ptr = s;
while (*s == ' ' || *s == '\t')
s++;
- if (s != ptr || s == _start) {
+ if (s != ptr || s == str_start) {

/* match, be happy */
matched = 1;
@@ -550,7 +550,7 @@

/* check for start of line */
case '^':
- if (s == _start) {
+ if (s == str_start) {

/* match, be happy */
matched = 1;
--- vgrind-5.7.orig/vfontedpr.c
+++ vgrind-5.7/vfontedpr.c
@@ -125,7 +125,7 @@
* global variables also used by expmatch
*/
boolean _escaped; /* if last character was an escape */
-char *_start; /* start of the current string */
+char *cur_start; /* start of the current string */
boolean l_onecase; /* upper and lower case are equivalent */

#define ps(x) printf("%s", x)
@@ -363,7 +363,7 @@
char *blksptr; /* end of a lexical block start */
char *blkeptr; /* end of a lexical block end */

- _start = os; /* remember the start for expmatch */
+ cur_start = os; /* remember the start for expmatch */
_escaped = FALSE;
if (nokeyw || incomm || instr)
goto skip;
@@ -556,14 +556,14 @@
if (*start == '\t') {
while (*start == '\t')
start++;
- i = tabs(_start, start) - margin / 8;
+ i = tabs(cur_start, start) - margin / 8;
printf("\\h'|%dn'", i * 10 + 1 - margin % 8);
continue;
}

if (!nokeyw && !force)
if ((*start == '#' || isidchr(*start))
- && (start == _start || !isidchr(start[-1]))) {
+ && (start == cur_start || !isidchr(start[-1]))) {
i = iskw(start);
if (i > 0) {
ps("\\*(+K");
--- vgrind-5.7.orig/vgrind.1
+++ vgrind-5.7/vgrind.1
@@ -54,7 +54,7 @@
.Nm Vgrind
formats the program sources which are arguments
in a nice style using
-.Xr troff 1
+.Xr groff 1
Comments are placed in italics, keywords in bold face,
and the name of the current function is listed down the margin of each
page as it is encountered.
@@ -68,7 +68,7 @@
.Xr tbl 1 .
The standard input is passed directly to the standard output except
for lines bracketed by the
-.Em troff-like
+.Em groff-like
macros:
.Bl -tag -width Ds
.It \&.vS
@@ -79,7 +79,7 @@
.Pp
These lines are formatted as described above. The output from this
filter can be passed to
-.Xr troff
+.Xr groff 1
for output. There need be no particular ordering with
.Xr eqn 1
or
@@ -88,7 +88,7 @@
In regular mode
.Nm vgrind
accepts input files, processes them, and passes them to
-.Xr troff 1
+.Xr groff 1
for output.
.Pp
In both modes
@@ -107,7 +107,7 @@
.It Fl d Ar file
specifies an alternate language definitions
file (default is
-.Pa /usr/lib/groff/tmac/vgrindefs )
+.Pa @PREFIX@/share/groff/tmac/vgrindefs )
.It Fl f
forces filter mode
.It Fl h Ar header
@@ -115,28 +115,34 @@
the file name)
.It Fl l
specifies the language to use. Currently known are
-.Tn PASCAL
-.Pq Fl l Ns Ar p ,
-.Tn MODEL
-.Pq Fl l Ns Ar m ,
-C
+.Tn C
.Pf ( Fl l Ns Ar c
or the default),
+.Tn C++
+.Pq Fl l Ns Ar c++ ,
.Tn CSH
.Pq Fl l Ns Ar csh ,
-.Tn SHELL
-.Pq Fl l Ns Ar sh ,
-.Tn RATFOR
-.Pq Fl l Ns Ar r ,
+.Tn EXPECT/TCL
+.Pq Fl l Ns Ar tcl ,
+.Tn ICON
+.Pq Fl l Ns Ar I .
+.Tn PASCAL
+.Pq Fl l Ns Ar p ,
+.Tn LISP
+.Pq Fl l Ns Ar isp ,
+.Tn MODEL
+.Pq Fl l Ns Ar m ,
.Tn MODULA2
.Pq Fl l Ns Ar mod2 ,
+.Tn Fortran
+.Pq Fl l Ns Ar f ,
+.Tn RATFOR
+.Pq Fl l Ns Ar r ,
+.Tn SHELL
+.Pq Fl l Ns Ar sh ,
+and
.Tn YACC
.Pq Fl l Ns Ar yacc ,
-.Tn LISP
-.Pq Fl l Ns Ar isp ,
-and
-.Tn ICON
-.Pq Fl l Ns Ar I .
.It Fl n
forces no keyword bolding
.It Fl s
@@ -144,8 +148,8 @@
of a .ps)
.It Fl t
similar to the same option in
-.Xr troff
-causing formatted text to go to the standard output
+.Xr groff 1
+causing formatted text to go to the standard output.
.It Fl x
outputs the index file in a ``pretty'' format.
The index file itself is produced whenever
@@ -163,19 +167,19 @@
as argument.
.El
.Sh FILES
-.Bl -tag -width /usr/lib/groff/tmac/vgrindefsxx -compact
+.Bl -tag -width @PREFIX@/share/groff/tmac/vgrindefsxx -compact
.It Pa index
file where source for index is created
-.It Pa /usr/lib/groff/tmac/tmac.vgrind
+.It Pa @PREFIX@/share/groff/tmac/tmac.vgrind
macro package
-.It Pa /usr/lib/groff/tmac/vfontedpr
+.It Pa @PREFIX@/lib/vgrind/vfontedpr
preprocessor
-.It Pa /usr/lib/groff/tmac/vgrindefs
+.It Pa @PREFIX@/share/groff/vgrindefs
language descriptions
.El
.Sh SEE ALSO
-.Xr vlp 1 ,
-.Xr vtroff 1 ,
+.Xr groff 1
+.Xr grops 1
.Xr vgrindefs 5
.Sh BUGS
Vfontedpr assumes that a certain programming style is followed:
--- vgrind-5.7.orig/vgrind.sh
+++ vgrind-5.7/vgrind.sh
@@ -1,4 +1,23 @@
-#!/bin/csh -f
+#!/bin/sh
+#
+# era@iki.fi Fri Jul 2 14:18:54 1999
+# $Id: vgrind.sh,v 1.8 1999/09/09 18:02:54 era Exp $
+#
+# Adapted from vgrind.sh 5.7 (Berkeley) 4/16/91
+#
+# Original Makefile mentions this address, but it's apparently
+# just the coder of the Makefile:
+#
+# Frank Swasey
+# 32 Hickok Place
+# Burlington, Vermont 05401-8515
+# USA
+# Email: Frank_Swasey@vnet.ibm.com
+#
+# The below copyright notice retained from the original (although
+# I guess I wouldn't really have to, since this is a substantial
+# rewrite of the csh version).
+# Resume trying to understand at first blank line.
#
# Copyright (c) 1980 The Regents of the University of California.
# All rights reserved.
@@ -31,113 +50,120 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
-# @(#)vgrind.sh 5.7 (Berkeley) 4/16/91
-#

-set voptions=
-set options=
-set files=
-set f=''
-set head=""
-set vf=/usr/lib/groff/tmac/vfontedpr
-set tm=/usr/lib/groff/tmac
-top:
-if ($#argv > 0) then
- switch ($1:q)
-
- case -f:
- set f='filter'
- set options = "$options $1:q"
- shift
- goto top
-
- case -t:
- set voptions = "$voptions -t"
- shift
- goto top
-
- case -o*:
- set voptions="$voptions $1:q"
- shift
- goto top
-
- case -W:
- set voptions = "$voptions -W"
- shift
- goto top
-
- case -d:
- if ($#argv < 2) then
- echo "vgrind: $1:q option must have argument"
- goto done
- else
- set options = ($options $1:q $2)
- shift
- shift
- goto top
- endif
-
- case -h:
- if ($#argv < 2) then
- echo "vgrind: $1:q option must have argument"
- goto done
- else
- set head="$2"
- shift
- shift
- goto top
- endif
-
- case -*:
- set options = "$options $1:q"
- shift
- goto top
-
- default:
- set files = "$files $1:q"
- shift
- goto top
- endsw
-endif
-if (-r index) then
- echo > nindex
- foreach i ($files)
- # make up a sed delete command for filenames
- # being careful about slashes.
- echo "? $i ?d" | sed -e "s:/:\\/:g" -e "s:?:/:g" >> nindex
- end
- sed -f nindex index >xindex
- if ($f == 'filter') then
- if ("$head" != "") then
- $vf $options -h "$head" $files | cat $tm/tmac.vgrind -
- else
- $vf $options $files | cat $tm/tmac.vgrind -
- endif
- else
- if ("$head" != "") then
- $vf $options -h "$head" $files | \
- sh -c "troff -rx1 $voptions -i -mvgrind 2>> xindex"
- else
- $vf $options $files | \
- sh -c "troff -rx1 $voptions -i -mvgrind 2>> xindex"
- endif
- endif
- sort -df +0 -2 xindex >index
- rm nindex xindex
-else
- if ($f == 'filter') then
- if ("$head" != "") then
- $vf $options -h "$head" $files | cat $tm/tmac.vgrind -
- else
- $vf $options $files | cat $tm/tmac.vgrind -
- endif
- else
- if ("$head" != "") then
- $vf $options -h "$head" $files | troff -i $voptions -mvgrind
- else
- $vf $options $files | troff -i $voptions -mvgrind
- endif
- endif
-endif
+#set -vx
+
+PATH=/usr/local/bin:/usr/bin:/bin
+
+voptions="-M @PREFIX@/share/groff" options= files= f= head=
+vf=@PREFIX@/lib/vfontedpr
+tm=@PREFIX@/share/groff
+
+# Ugly old option processing
+
+until [ $# = 0 ] ; do
+ case $1 in
+ -f)
+ f=filter
+ shift
+ ;;
+ -t|-o*|-W)
+ voptions="$voptions $1"
+ shift
+ ;;
+ -d)
+ case $# in
+ 0|1)
+ echo "$0: -d option must have argument" >&2
+ exit 1
+ ;;
+ *)
+ options="$options $1 $2"
+ shift
+ shift
+ ;;
+ esac
+ ;;
+ -h)
+ case $# in
+ 0|1)
+ echo "$0: -h option must have argument" >&2
+ exit 1
+ ;;
+ *)
+ head=$2
+ shift
+ shift
+ ;;
+ esac
+ ;;
+ -*)
+ options="$options $1"
+ shift
+ ;;
+ *)
+ break
+ ;;
+ esac
+done
+
+
+$vf $options ${head:+-h "$head"} "$@" |
+
+if [ -r index ]; then
+
+ test -w index || {
+ echo "$0: index not writable" >&2
+ exit 1
+ }
+
+ nindex=/tmp/nindex.$$
+ xindex=/tmp/xindex.$$
+
+ trap 'rm -f $nindex $xindex' 1 2 3 15
+
+ for i in "$@" ; do
+
+ # This is supposed to "disarm" file names but
+ # it will still break if a file name contains a newline
+ # ... The original Bezerkeley script only fixed slashes (!),
+ # and even that slightly badly
+
+ # Create a sed script to remove index entries for
+ # files we are processing now:
+
+ echo "$i" | sed -e 's%[[./*$^\\]%\\&%g' -e 's%.*%/^&:/d%'
+
+ # This is correct for my version of GNU sed (Debian 2.05-22)
+ # but will need to be tweaked for other seds
+ # (most notably, GNU sed doesn't have the regular expression
+ # (a) a{n,m} a? a+ constructs commonly found elsewhere)
+
+ done >$nindex
+
+ sed -f $nindex $xindex
+
+ case $f in
+ filter)
+ cat $tm/tmac.vgrind -
+ ;;
+ *)
+ # This -rx1 doesn't appear to do the right thing
+ groff -rx1 $voptions -i -mvgrind 2>>$xindex
+ ;;
+ esac

-done:
+ sort -df +0 -2 $xindex >index
+
+ rm -f $nindex $xindex
+
+else
+ case $f in
+ filter)
+ cat $tm/tmac.vgrind -
+ ;;
+ *)
+ groff -i $voptions -mvgrind
+ ;;
+ esac
+fi
--- vgrind-5.7.orig/vgrindefs
+++ vgrind-5.7/vgrindefs
@@ -0,0 +1,177 @@
+# Copyright (c) 1987 The Regents of the University of California.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. All advertising materials mentioning features or use of this software
+# must display the following acknowledgement:
+# This product includes software developed by the University of
+# California, Berkeley and its contributors.
+# 4. Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# @(#)vgrindefs.src 1.15 (Berkeley) 4/16/91
+#
+
+C|c:\
+ :pb=^\d?*?\d?\p\d?\(\a?\)(\d|{):bb={:be=}:cb=/*:ce=*/:sb=":se=\e":lb=':\
+ :le=\e':tl:\
+ :kw=asm auto break case char const continue default do double\
+ else enum extern float for fortran goto if int long register\
+ return short sizeof static struct switch typedef union unsigned\
+ void volatile while #define #else #endif #if #ifdef #ifndef\
+ #include #undef # define else endif if ifdef ifndef include undef:
+
+model|mod|m:\
+ :pb=^\d(space\d\p\drep)|(\p\dis|inline|public\dbeginproc):\
+ :bb=\dbeginproc|space|case\d:be=\dendproc|end\d|;:\
+ :cb=\$:ce=\$|$:sb=":se=":lb=':le=\a|$:\
+ :kw=abs and array beginproc boolean by case cdnl char copied dispose\
+ div do dynamic else elsif end endproc entry external FALSE false\
+ fi file for formal fortran global if iff ift\
+ in integer include inline is lbnd\
+ max min mod new NIL nil noresult not notin od of or procedure public\
+ read readln readonly record recursive rem rep repeat res\
+ result return set\
+ space string subscript such then TRUE true type ubnd union until\
+ varies while width:
+pascal|pasc|p:\
+ :pb=(^\d?procedure|function|program\d\p\d|\(|;|\:)|(=\d?record\d):\
+ :bb=\dcase|begin\d:be=\dend|forward\d|;:\
+ :cb={:ce=}:\
+ :ab=\(*:ae=*\):\
+ :sb=':se=':\
+ :kw=and array assert begin case const div do downto else end file for\
+ forward function goto if in label mod nil not of or packed procedure\
+ program record repeat set then to type until var while with oct hex\
+ external:
+ISP|isp|i:\
+ :cb=!:ce=!|$:oc:\
+ :kw=and begin decode define end eql eqv geq gtr if leave leq lss mod\
+ neq next not or otherwise repeat restart resume sr0 sr1 srd srr sl0 sl1\
+ sld slr tst xor:
+SH|sh:\
+ :bb={:be=}:cb=#:ce=$:sb=":se=\e":lb=':\
+ :le=\e':tl:\
+ :kw=break case cd continue do done \
+ elif else esac eval exec exit export \
+ fi for if in then while until \
+ read readonly set shift test trap umask wait:
+CSH|csh:\
+ :bb={:be=}:cb=#:ce=$:sb=":se=\e":lb=':\
+ :le=\e':tl:\
+ :kw=alias alloc break breaksw case cd chdir continue default\
+ echo else end endif endsw exec exit foreach \
+ glob goto history if logout nice nohup onintr repeat set\
+ setenv shift source switch then time \
+ while umask unalias unset wait while @ env \
+ argv child home ignoreeof noclobber noglob \
+ nomatch path prompt shell status verbose :
+ldl|LDL:\
+ :pb=^\p\::bb=\::be=;:cb=/*:ce=*/:sb=":se=\e":\
+ :kw=constant functions grammar reswords tokens add1 addste\
+ car cdr check colno cond cons copy defun divide empty enter\
+ eq equal findattr firstchild ge getattr getfield gt hash label\
+ lambda lastchild le leftsibling lookone lookup lt minus name ne\
+ newnode nextcom nil null parent plus precnl prevcom prog progn\
+ quote reglob return rightsibling self set setattr setfield setq\
+ stjoin sub1 t times tnull tokno ttype:
+Icon|icon|I:\
+ :pb=^\d?procedure\d\p\d?\(\a?\):\
+ :bb=(^\d?procedure\d\p\d?\(\a?\))|{:be=}|(^\d?end\d?$):\
+ :cb=#:ce=$:\
+ :sb=":se=\e":lb=':le=\e':tl:\
+ :kw=break by case create default do dynamic else end every external\
+ fail global if initial local next not of procedure record\
+ repeat return static suspend then to until using while\
+ &ascii &clock &cset &date &dateline &errout &fail &host &input\
+ &lcase &level &main &null &output &pos &random &source &subject\
+ &time &trace &ucase &version:
+ratfor|rat|r:\
+ :pb=(subroutine|function)\d\p\d?\(\a?\):\
+ :bb=(subroutine|function)\d\p\d?\(\a?\):be=^\d?end:\
+ :cb=#:ce=$:\
+ :sb=":se=\e":lb=':le=\e':oc:\
+ :kw=DRETURN DRIVER arith break case character default define do\
+ else elsedef enddef filedes for function goto if ifdef ifelse\
+ ifnotdef include incr integer linepointer next opeq pointer\
+ real repeat return select string subroutine substr until:
+modula2|mod2|m2:\
+ :pb=(^\d?(procedure|function|module)\d\p\d|\(|;|\:):\
+ :bb=\d(begin|case|for|if|loop|record|repeat|while|with)\d:\
+ :be=\dend|;:\
+ :cb={:ce=}:\
+ :ab=\(*:ae=*\):\
+ :sb=":se=":\
+ :oc:\
+ :kw=and array begin by case const\
+ definition div do else elsif end exit export\
+ for from if implementation import in\
+ loop mod module not of or pointer procedure qualified\
+ record repeat return set then to type\
+ until var while with:
+yacc|Yacc|y:\
+ :cb=/*:ce=*/:sb=":se=\e":lb=':le=\e':tl:\
+ :kw=%{ %} %% %union %token %type\
+ #else #endif #if #ifdef #ifndef #include #undef # define else endif\
+ if ifdef ifndef include undef:
+C++|c++:\
+ :pb=^\d?*?\d?\p\d?\(\a?\)(\d|{):bb={:be=}:cb=/*:ce=*/:ab=//:\
+ :ae=$:sb=":se=\e":lb=':\
+ :le=\e':tl:\
+ :kw=asm auto break case char continue default do double else enum\
+ extern float for fortran goto if int long register return short\
+ sizeof static struct switch typedef union unsigned while void #define\
+ #else #endif #if #ifdef #ifndef #include #undef # define endif\
+ ifdef ifndef include undef defined\
+ class const delete friend inline new operator overload private\
+ protected public virtual:
+# vgrindefs for Expect
+# Author: Brian Fitzgerald
+# Department of Mechanical Engineering
+# Rensselaer Polytechnic Institute
+# Date: Sat, 12 Oct 91 13:41:36 EDT
+#
+# To install this file, append it to /usr/share/groff/tmac/vgrindefs
+#
+# vgrind is a troff pretty-printer. For example, to use it on a Sun with the
+# Adobe Transcript package, install this file and do:
+#
+# setenv TROFF ptroff
+# vgrind -lexpect file
+#
+expect|tcl:\
+ :pb=(^|;)\d?proc\d\p\d:\
+ :id=!$%&'()*+,-./\:<=>?@^_`|}~:\
+ :bb={:be=}:\
+ :cb=#:ce=$:\
+ :sb=":se=\e":\
+ :kw=debug disconnect exit\
+ expect expect_user expect_before expect_after expect_version\
+ fork\
+ interact log_file log_user overlay\
+ send send_spawn send_user send_log send_error\
+ spawn system trace trap wait\
+ break case catch concat continue error eval exec expr file for foreach\
+ format glob global history if then else index info length list print\
+ proc range rename return scan set source string time uplevel upvar:
+
--- vgrind-5.7.orig/vgrindefs.src
+++ vgrind-5.7/vgrindefs.src
@@ -35,9 +35,9 @@
C|c:\
:pb=^\d?*?\d?\p\d?\(\a?\)(\d|{):bb={:be=}:cb=/*:ce=*/:sb=":se=\e":lb=':\
:le=\e':tl:\
- :kw=asm auto break case char continue default do double else enum\
+ :kw=asm auto break case char const continue default do double else enum\
extern float for fortran goto if int long register return short\
- sizeof static struct switch typedef union unsigned void while #define\
+ sizeof static struct switch typedef union unsigned void volatile while #define\
#else #endif #if #ifdef #ifndef #include #undef # define else endif\
if ifdef ifndef include undef:
model|mod|m:\
@@ -137,9 +137,9 @@
:pb=^\d?*?\d?\p\d?\(\a?\)(\d|{):bb={:be=}:cb=/*:ce=*/:ab=//:\
:ae=$:sb=":se=\e":lb=':\
:le=\e':tl:\
- :kw=asm auto break case char continue default do double else enum\
+ :kw=asm auto break case char const continue default do double else enum\
extern float for fortran goto if int long register return short\
- sizeof static struct switch typedef union unsigned while void #define\
+ sizeof static struct switch typedef union unsigned volatile while void #define\
#else #endif #if #ifdef #ifndef #include #undef # define endif\
ifdef ifndef include undef defined\
class const delete friend inline new operator overload private\
--- vgrind-5.7.orig/vgrindefs.tcl
+++ vgrind-5.7/vgrindefs.tcl
@@ -0,0 +1,30 @@
+# vgrindefs for Expect
+# Author: Brian Fitzgerald
+# Department of Mechanical Engineering
+# Rensselaer Polytechnic Institute
+# Date: Sat, 12 Oct 91 13:41:36 EDT
+#
+# To install this file, append it to /usr/share/groff/tmac/vgrindefs
+#
+# vgrind is a troff pretty-printer. For example, to use it on a Sun with the
+# Adobe Transcript package, install this file and do:
+#
+# setenv TROFF ptroff
+# vgrind -lexpect file
+#
+expect|tcl:\
+ :pb=(^|;)\d?proc\d\p\d:\
+ :id=!$%&'()*+,-./\:<=>?@^_`|}~:\
+ :bb={:be=}:\
+ :cb=#:ce=$:\
+ :sb=":se=\e":\
+ :kw=debug disconnect exit\
+ expect expect_user expect_before expect_after expect_version\
+ fork\
+ interact log_file log_user overlay\
+ send send_spawn send_user send_log send_error\
+ spawn system trace trap wait\
+ break case catch concat continue error eval exec expr file for foreach\
+ format glob global history if then else index info length list print\
+ proc range rename return scan set source string time uplevel upvar:
+
--- vgrind-5.7.orig/debian/README.debian
+++ vgrind-5.7/debian/README.debian
@@ -0,0 +1,9 @@
+vgrind for DEBIAN
+----------------------
+
+The original Linux port of vgrind has been cleaned up and fit into the
+Debian packaging system. Only source changes are due to the ELF transition
+(no symbols with leading underscore) and the addition of the vgrindefs
+for Expect/TCL.
+
+ , Tue, 18 Feb 1997 22:45:49 +0100
--- vgrind-5.7.orig/debian/changelog
+++ vgrind-5.7/debian/changelog
@@ -0,0 +1,110 @@
+vgrind (5.7-17) unstable; urgency=low
+
+ * Updated to latest Standards-Version, added Build-Depends for debhelper.
+ * Updated to put vfontedpr in the right place, updated manual page.
+
+ -- Jason Henry Parker Tue, 26 Dec 2000 13:17:37 +1000
+
+vgrind (5.7-16) unstable; urgency=low
+
+ * Added patch from Era Eriksson to fix vgrind.sh -f
+ option processing.
+ * Removed hyphen from debian/control Description: field.
+ (Closes: Bug#63524, Bug#63521)
+
+ -- Jason Henry Parker Sat, 6 May 2000 16:26:14 +1000
+
+vgrind (5.7-15) unstable; urgency=low
+
+ * Added patches from Era Eriksson .
+ (Closes: Bug#40621, Bug#40634)
+
+ -- Jason Henry Parker Sat, 8 Apr 2000 14:09:01 +1000
+
+vgrind (5.7-14) unstable; urgency=low
+
+ * -13 incorrectly fixed #29922 and #29923, this upload corrects
+ that packaging error.
+
+ -- Jason Henry Parker Wed, 17 Feb 1999 22:38:55 +1000
+
+vgrind (5.7-13) unstable; urgency=low
+
+ * New maintainer.
+ * Added the const and volatile keywords to vgrindefs; closes bugs
+ #29922 and #29923.
+ * Removed -g3 from CFLAGS.
+
+ -- Jason Henry Parker Thu, 4 Feb 1999 20:22:38 +1000
+
+vgrind (5.7-12) unstable; urgency=low
+
+ * Removed dh_du from debian/rules.
+
+ -- Joel Klecker Sun, 8 Mar 1998 14:06:12 -0800
+
+vgrind (5.7-11) unstable; urgency=low
+
+ * New maintainer.
+ * Now uses debhelper.
+ * Upgraded to standards version 2.3.0.1.
+
+ -- Joel Klecker Tue, 6 Jan 1998 00:52:00 -0800
+
+vgrind (5.7-10) unstable; urgency=low
+
+ * Updated manual page to reflect new directory structure and supported
+ languages.
+ * Added references to groff(1) and grops(1) to vgrind.1
+ * Added dependency to groff.
+ * Changed references to troff in vgrind.sh to groff.
+ * Repackaged using deb-make(1).
+
+ -- Dominik Kubla Sun, 23 Feb 1997 00:49:52 +0100
+
+vgrind (5.7-9) stable unstable; urgency=low
+
+ * Fixed _start symbol problem in regexp.c
+ * Changed maintainer address to
+
+ -- Dominik Kubla Sat, 1 Feb 1997 13:39:06 +0100
+
+vgrind (5.7-8) unstable; urgency=low
+
+ * added definitions for expect/tcl taken from expect-5.20beta sources.
+
+ -- Dominik Kubla Fri, 8 Nov 1996 17:27:10 +0100
+
+vgrind (5.7-7) unstable; urgency=low
+
+ * manual pages are now installed in 'gzip -9' format as per
+ "Debian Policy Manual", Section 3.2.1
+
+ * minor bugfixes in the debian/rules file. Should now comply with
+ "Debian Programmers Manual", Section 3.2.1
+
+ -- Dominik Kubla Mon, 30 Sep 1996 19:27:01 +0200
+
+vgrind (5.7-6) unstable; urgency=low
+
+ * copyright file is now installed in /usr/doc/vgrind as per
+ "Debian Policy Manual", section 3.2.5
+
+ * changelog file is now installed in /usr/doc/vgrind as per
+ "Debian Policy Manual", section 3.2.6
+
+ * package is now build with CFLAGS set to '-O2 -g -Wall' as per
+ "Debian Policy Manual", section 4.1
+
+ -- Dominik Kubla Sun, 29 Sep 1996 16:45:54 +0200
+
+vgrind (5.7-5) unstable; urgency=low
+
+ * Converted to new packaing standards.
+
+ -- Dominik Kubla Fri, 20 Sep 1996 15:00:00 +0200
+
+Local variables:
+mode: debian-changelog
+add-log-mailing-address: "jk@espy.org"
+End:
--- vgrind-5.7.orig/debian/control
+++ vgrind-5.7/debian/control
@@ -0,0 +1,19 @@
+Source: vgrind
+Section: text
+Priority: standard
+Maintainer: Jason Henry Parker
+Standards-Version: 3.2.1.0
+Build-Depends: debhelper
+
+Package: vgrind
+Architecture: any
+Depends: ${shlibs:Depends}, groff
+Description: Runoff preprocessor for program sources
+ Vgrind formats the program sources which are arguments in a nice style
+ using groff(1). Comments are placed in italics, keywords in bold face, and
+ the name of the current function is listed down the margin of each page
+ as it is encountered.
+ .
+ Vgrind runs in two basic modes, filter mode (see the -f option) or regu-
+ lar mode. In filter mode vgrind acts as a filter in a manner similar to
+ tbl(1).
--- vgrind-5.7.orig/debian/copyright
+++ vgrind-5.7/debian/copyright
@@ -0,0 +1,12 @@
+This package was (re-)debianized by dominik@debian.org
+Tue, 18 Feb 1997 22:45:49 +0100.
+
+It was downloaded from sunsite.unc.edu:/pub/Linux/system/Printing/vgrindsrc.tgz
+
+Copyright:
+
+Copyright (c) 1980-1991 by the Regents of the University of California.
+
+Modification and redistribution of this package is possible under terms
+of the BSD license which can be found on Debian systems in the file
+/usr/share/common-licenses/BSD.
--- vgrind-5.7.orig/debian/dirs
+++ vgrind-5.7/debian/dirs
@@ -0,0 +1,5 @@
+usr/bin
+usr/share
+usr/share/groff/tmac
+usr/lib
+usr/lib/vgrind
--- vgrind-5.7.orig/debian/rules
+++ vgrind-5.7/debian/rules
@@ -0,0 +1,42 @@
+#!/usr/bin/make -f
+
+build:
+ dh_testdir
+ make
+
+ touch stamp-build
+
+clean:
+ dh_testdir
+ dh_testroot
+ dh_clean
+ -rm -f stamp-build
+ make clean
+
+binary-indep: build
+
+binary-arch: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ make install DESTDIR=`pwd`/debian/tmp
+ dh_strip
+ dh_installdocs
+ dh_installmanpages
+ dh_installchangelogs
+ dh_strip
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary: binary-indep binary-arch
+
+source diff:
+ @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
+
+.PHONY: binary binary-arch binary-indep clean
--- vgrind-5.7.orig/vfontedpr.c.orig Sun Feb 26 17:49:29 2006
+++ vgrind-5.7/vfontedpr.c Sun Feb 26 18:48:01 2006
@@ -125,7 +125,7 @@
* global variables also used by expmatch
*/
boolean _escaped; /* if last character was an escape */
-char *cur_start; /* start of the current string */
+char *str_start; /* start of the current string */
boolean l_onecase; /* upper and lower case are equivalent */

#define ps(x) printf("%s", x)
@@ -363,7 +363,7 @@
char *blksptr; /* end of a lexical block start */
char *blkeptr; /* end of a lexical block end */

- cur_start = os; /* remember the start for expmatch */
+ str_start = os; /* remember the start for expmatch */
_escaped = FALSE;
if (nokeyw || incomm || instr)
goto skip;
@@ -556,14 +556,14 @@
if (*start == '\t') {
while (*start == '\t')
start++;
- i = tabs(cur_start, start) - margin / 8;
+ i = tabs(str_start, start) - margin / 8;
printf("\\h'|%dn'", i * 10 + 1 - margin % 8);
continue;
}

if (!nokeyw && !force)
if ((*start == '#' || isidchr(*start))
- && (start == cur_start || !isidchr(start[-1]))) {
+ && (start == str_start || !isidchr(start[-1]))) {
i = iskw(start);
if (i > 0) {
ps("\\*(+K");
--- vgrind-5.7.orig/Makefile.orig Sun Mar 5 17:53:58 2006
+++ vgrind-5.7/Makefile Sun Mar 5 17:55:52 2006
@@ -3,10 +3,10 @@
#CFLAGS = -g3 -O2
CFLAGS = -O2

-INSTALL_BIN = install -c -g root -m 0755 -o root -s
-INSTALL_DIR = install -d -g root -m 0755 -o root
-INSTALL_MAN = install -c -g root -m 0644 -o root
-INSTALL_SCR = install -c -g root -m 0755 -o root
+INSTALL_BIN = install -c -m 0755 -s
+INSTALL_DIR = install -d -m 0755
+INSTALL_MAN = install -c -m 0644
+INSTALL_SCR = install -c -m 0755

SOURCES = regexp.c vfontedpr.c vgrindefs.c

--- vgrind-5.7.orig/regexp.c.orig 2006-03-05 20:13:10.000000000 +0000
+++ vgrind-5.7/regexp.c 2006-03-05 20:22:14.000000000 +0000
@@ -36,6 +36,8 @@
#endif /* not lint */

#include
+#include
+#include

typedef int boolean;
#define TRUE 1
@@ -131,7 +133,6 @@

char *ure; /* pointer current position in unconverted exp */
char *ccre; /* pointer to current position in converted exp*/
-char *malloc();

char *
convexp(re)
--- vgrind-5.7.orig/vfontedpr.c.orig 2006-03-05 20:13:10.000000000 +0000
+++ vgrind-5.7./vfontedpr.c 2006-03-05 20:19:54.000000000 +0000
@@ -45,6 +45,8 @@
#include
#include
#include
+#include
+#include
#include "pathnames.h"

#define boolean int
@@ -85,7 +87,7 @@
boolean instr; /* in a string constant */
boolean inchr; /* in a string constant */
boolean nokeyw = FALSE; /* no keywords being flagged */
-boolean index = FALSE; /* form an index */
+boolean mkindex = FALSE; /* form an index */
boolean filter = FALSE; /* act as a filter (like eqn) */
boolean pass = FALSE; /* when acting as a filter, pass indicates
* whether we are currently processing
@@ -179,7 +181,7 @@

/* build an index */
if (!strcmp(argv[0], "-x")) {
- index++;
+ mkindex++;
argv[0] = "-n";
}

@@ -221,7 +223,7 @@
perror(argv[0]);
exit(1);
}
- if (index)
+ if (mkindex)
printf("'ta 4i 4.25i 5.5iR\n'in .5i\n");
fname = argv[0];
argc--, argv++;
@@ -540,7 +542,7 @@
int xfld = 0;

while (start <= end) {
- if (index) {
+ if (mkindex) {
if (*start == ' ' || *start == '\t') {
if (xfld == 0)
printf("");
--- vgrind-5.7.orig/vgrindefs.c.orig 1995-03-13 21:34:10.000000000 +0000
+++ vgrind-5.7./vgrindefs.c 2006-03-05 20:18:44.000000000 +0000
@@ -39,6 +39,7 @@
#define MAXHOP 32 /* max number of tc= indirections */

#include
+#include
/*
* grindcap - routines for dealing with the language definitions data base
* (code stolen almost totally from termcap)
--- vgrind-5.7.orig/tmac.vgrind.orig 1989-05-01 16:55:30.000000000 +0100
+++ vgrind-5.7./tmac.vgrind 2006-03-05 21:04:52.000000000 +0000
@@ -1,7 +1,7 @@
'ss 23
'ds _ \d\(mi\u
-'ps 9p
-'vs 10p
+'ps 12p
+'vs 13p
'ds - \(mi
'ds / \\h'\\w' 'u-\\w'/'u'/
'ds /* \\h'\\w' 'u-\\w'/'u'/*


--- vgrind-5.7.orig/vgrindefs.orig Sun Feb 26 17:49:29 2006
+++ vgrind-5.7./vgrindefs Sun Feb 26 18:32:40 2006
@@ -70,7 +71,7 @@
neq next not or otherwise repeat restart resume sr0 sr1 srd srr sl0 sl1\
sld slr tst xor:
SH|sh:\
- :bb={:be=}:cb=#:ce=$:sb=":se=\e":lb=':\
+ :bb={:be=}:cb=(^|\d)#:ce=$:sb=":se=\e":lb=':\
:le=\e':tl:\
:kw=break case cd continue do done \
elif else esac eval exec exit export \
@@ -174,4 +175,20 @@
break case catch concat continue error eval exec expr file for foreach\
format glob global history if then else index info length list print\
proc range rename return scan set source string time uplevel upvar:
-
+# Fortran entry modified by G. Helffrich/U. Bristol to restrict matches for
+# functions, add more keywords, fix end/endif confusion, add comments
+# starting with "*"
+fortran|FORTRAN|f77|fc|f:\
+ :pb=(^\d((((real|integer|complex)((\d?*\a\d)|\d))?function)|subroutine|program))\d\p\d?\(\a?\):\
+ :bb=(function|subroutine|program)\d\p\d?\(\a?\):be=^\dend\d$:\
+ :cb=^(C|c|*):\
+ :ce=$:\
+ :sb=':\
+ :se=\e':\
+ :oc:tl:\
+ :kw=call character close common complex continue \
+ data dimension do double else elseif \
+ end enddo endif entry equivalence external format function \
+ go goto if implicit include integer inquire logical \
+ open parameter pause precision print program \
+ read real return save stop subroutine to write:



--- /dev/null 2007-01-15 18:47:56.000000000 +0000
+++ vgrind-5.7/README 2007-01-15 18:46:34.000000000 +0000
@@ -0,0 +1,25 @@
+vgrind -- Source code prettyprinter
+
+Change Log:
+26 Feb. 2006 - George Helffrich
+
+regexp.c - Fix bug in handling of beginning-of-string pattern match. Kept
+ some language descriptions from parsing correctly.
+
+vgrindefs - Added Fortran language description, updated sh.
+
+5 Mar. 2006 - George Helffrich
+
+Fink 10.2 package, 5.7-1
+
+5 Mar. 2006 - George Helffrich
+
+regexp.c, vfontedpr.c, vgrindefs.c - quell compilation warnings on 10.4
+ system.
+
+tmac.vgrind - install in case groff not installed, and change default
+ point size to 12.
+
+Fink 10.4 package, 5.7-2
+
+


vgrind _unstable_ port .patch