From: Emden R. Gansner Date: Tue, 18 Jun 2013 18:14:37 +0000 (-0400) Subject: Fix non-portable notations in gvpr.1; requires use of tbl, so configure X-Git-Tag: LAST_LIBGRAPH~32^2~185 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=94668c02cf0dece1748ca001ce1c98e7df0a5351;p=graphviz Fix non-portable notations in gvpr.1; requires use of tbl, so configure and Makefile change also --- diff --git a/cmd/gvpr/Makefile.am b/cmd/gvpr/Makefile.am index 1b97b087b..a9ae17882 100644 --- a/cmd/gvpr/Makefile.am +++ b/cmd/gvpr/Makefile.am @@ -31,7 +31,7 @@ gvpr_CPPFLAGS = $(AM_CPPFLAGS) gvpr_LDADD = $(top_builddir)/lib/gvpr/libgvpr.la gvpr.1.pdf: $(srcdir)/gvpr.1 - - @GROFF@ -Tps -man $(srcdir)/gvpr.1 | @PS2PDF@ - - >gvpr.1.pdf + - @TBL@ $(srcdir)/gvpr.1 | @GROFF@ -Tps -man | @PS2PDF@ - - >gvpr.1.pdf gvpr_static_SOURCES = gvprmain.c gvpr_static_CPPFLAGS = $(AM_CPPFLAGS) diff --git a/cmd/gvpr/gvpr.1 b/cmd/gvpr/gvpr.1 index 7b2618917..0d89503be 100644 --- a/cmd/gvpr/gvpr.1 +++ b/cmd/gvpr/gvpr.1 @@ -7,9 +7,6 @@ .SH NAME gvpr \- graph pattern scanning and processing language .br -( previously known as -.B gpr -) .SH SYNOPSIS .B gvpr [\fB\-icnqV?\fP] @@ -32,6 +29,8 @@ gvpr \- graph pattern scanning and processing language ] .SH DESCRIPTION .B gvpr +(previously known as +.BR gpr ) is a graph stream editor inspired by \fBawk\fP. It copies input graphs to its output, possibly transforming their structure and attributes, @@ -144,7 +143,6 @@ These are separated into blocks, a block consisting of an optional the next \fBBEG_G\fP statement, if any. The top\(hylevel semantics of a \fBgvpr\fP program are: .PP -.ta \w'\f(CWdelete array[expression]'u .RS .nf Evaluate the \fBBEGIN\fP clause, if any. @@ -213,7 +211,6 @@ A statement can be a declaration of a function, a variable or an array, or an executable statement. For declarations, there is a single scope. Array declarations have the form: .PP -.ta \w'\f(CWdelete array[expression]'u .RS .nf \fI type array \fB[\fP type0 \fB]\fR @@ -230,9 +227,9 @@ as the name of an attribute of a node, edge or graph, depending on the context. .PP Executable statements can be one of the following: -.ta \w'\f(CWdelete array[expression]'u .RS -.nf +.TS +l l. \fB{\fR [\fI statement ... \fR] \fB}\fR \fIexpression\fP \fR// commonly\fP\fI var \fB=\fP expression\fR \fBif(\fI expression \fP)\fI statement \fR[ \fBelse\fI statement \fR] @@ -244,7 +241,7 @@ Executable statements can be one of the following: \fBbreak [\fI expression \fP] \fBcontinue [\fI expression \fP] \fBreturn [\fI expression \fP]\fR -.fi +.TE .RE .SM Items in brackets are optional. @@ -1031,7 +1028,6 @@ graph ignoring edge directions. See the item on \fBTV_dfs\fR above for the role of \fB$tvroot\fP. .SH EXAMPLES .PP -.ta \w'\f(CWdelete array[expression]'u .RS .nf \fBgvpr \-i 'N[color=="blue"]' file.gv\fP @@ -1041,7 +1037,6 @@ for the role of \fB$tvroot\fP. .PP Generate the node\(hyinduced subgraph of all nodes with color blue. .PP -.ta \w'\f(CWdelete array[expression]'u .RS .nf \fBgvpr \-c 'N[color=="blue"]{color = "red"}' file.gv\fP @@ -1051,7 +1046,6 @@ Generate the node\(hyinduced subgraph of all nodes with color blue. .PP Make all blue nodes red. .PP -.ta \w'\f(CWdelete array[expression]'u .RS .nf \fBBEGIN { int n, e; int tot_n = 0; int tot_e = 0; } @@ -1069,7 +1063,6 @@ END { printf ("%d nodes %d edges total\\n", tot_n, tot_e) }\fP .PP Version of the program \fBgc\fP. .PP -.ta \w'\f(CWdelete array[expression]'u .RS .nf \fBgvpr \-c ""\fP @@ -1079,7 +1072,6 @@ Version of the program \fBgc\fP. .PP Equivalent to \fBnop\fP. .PP -.ta \w'\f(CWdelete array[expression]'u .RS .nf \fBBEG_G { graph_t g = graph ("merge", "S"); } @@ -1097,7 +1089,6 @@ END_G { $O = g; }\fP Produces a strict version of the input graph, where the weight attribute of an edge indicates how many edges from the input graph the edge represents. .PP -.ta \w'\f(CWdelete array[expression]'u .RS .nf \fBBEGIN {node_t n; int deg[]} @@ -1113,7 +1104,6 @@ END_G { .PP Computes the degrees of nodes with edges. .PP -.ta \w'\f(CWdelete array[expression]'u .RS .nf \fBBEGIN { diff --git a/configure.ac b/configure.ac index 48fc5c01d..a7e0b303e 100644 --- a/configure.ac +++ b/configure.ac @@ -269,6 +269,7 @@ AC_CHECK_PROGS(SORT,gsort sort,false) AC_CHECK_PROG(EGREP,egrep,egrep,false) AC_CHECK_PROG(GROFF,groff,groff,false) +AC_CHECK_PROG(TBL,tbl,tbl,false) AC_CHECK_PROG(PS2PDF,ps2pdf,ps2pdf,false) AC_CHECK_PROG(PS2PDF,pstopdf,pstopdf,false)