~ubuntu-branches/ubuntu/lucid/graphviz/lucid-updates

« back to all changes in this revision

Viewing changes to cmd/gvpr/lib/collapse.g

  • Committer: Bazaar Package Importer
  • Author(s): Bryce Harrington
  • Date: 2008-06-19 20:23:23 UTC
  • mfrom: (1.2.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20080619202323-ls23h96ntj9ny94m
Tags: 2.18-1ubuntu1
* Merge from debian unstable, remaining changes:
  - Build depend on liblualib50-dev instead of liblua5.1-0-dev.
  - Drop libttf-dev (libttf-dev is in universe) (LP: #174749).
  - Replace gs-common with ghostscript.
  - Build-depend on python-dev instead of python2.4-dev or python2.5-dev.
  - Mention the correct python version for the python bindings in the
    package description.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Collapse all edges with same group attribute into a single edge */
 
2
BEG_G {
 
3
  int seen[string];
 
4
  $O = $;            // Use the input graph as output.
 
5
}
 
6
E {
 
7
  if (collapse == "") return;          // If no collapse, ignore.
 
8
  if (seen[collapse]) delete ($G, $);  // If already seen an edge with this collapse value, 
 
9
                                       // delete the edge.
 
10
  else seen[collapse] = 1;             // Else mark collapse value as seen and keep edge.
 
11
}