From mboxrd@z Thu Jan 1 00:00:00 1970 Message-Id: From: Pietro Gagliardi To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Date: Mon, 19 May 2008 16:45:36 -0400 References: Subject: Re: [9fans] dag pic preprocessor Topicbox-Message-UUID: ab3ec312-ead3-11e9-9d60-3106f5b1d025 On May 19, 2008, at 10:08 AM, Steve Simon wrote: > Hi, > > I want to draw some DAGs. Dot (part of graphviz) seems to be the > way to do it these days, however looking at the sources I wondered > if there was a smaller simpler way to do this. > > I found a reference to dag, a pic preprocessor which seems to > be a forunner of dot. Is the source available anywhere? > > http://citeseer.ist.psu.edu/gansner89dag.html > > -Steve > I asked about that. Got one response so far, but no code yet. north@research.att.com I think you can make a simple dot preprocessor using awk and pipes (GraphViz is in /n/sources/extra): BEGIN { in_it = 0 } /^\.begin (dot|neato)/ { in_it = 1; program = $2 " -Tpic"; next } /^\.end/ { close(program); in_it = 0; next } !in_it { print; next } { print | program } END { if (in_it) print "unclosed graph" | "cat 1>&2" }