;;;; This file is part of LilyPond, the GNU music typesetter.
;;;;
-;;;; Copyright (C) 2007--2010 Joe Neeman <joeneeman@gmail.com>
+;;;; Copyright (C) 2007--2011 Joe Neeman <joeneeman@gmail.com>
;;;;
;;;; LilyPond is free software: you can redistribute it and/or modify
;;;; it under the terms of the GNU General Public License as published by
(let ((ns (nodes graph))
(es (edges graph))
(cs (clusters graph)))
- (ly:message (format (_ "Writing graph `~a'...") (port-filename out)))
+ (ly:message (format #f (_ "Writing graph `~a'...") (port-filename out)))
(display "digraph G {\nrankdir=\"LR\"\nnode [shape=rectangle]\n" out)
- (map (lambda (n) (display (format "~a [label=\"~a\"]\n" (car n) (cdr n)) out))
- ns)
- (map (lambda (e) (display (format "~a -> ~a\n" (car e) (cdr e)) out))
- es)
- (map (lambda (c)
- (display (format "subgraph cluster_~a {\nlabel= \"~a\"\ncolor=blue\n"
- (string-filter (car c) char-alphabetic?)
- (car c))
- out)
- (map (lambda (n) (display (format "~a\n" n) out)) (cdr c))
- (display "}\n" out))
- cs)
+ (for-each (lambda (n) (format out "~a [label=\"~a\"]\n" (car n) (cdr n)))
+ ns)
+ (for-each (lambda (e) (format out "~a -> ~a\n" (car e) (cdr e)))
+ es)
+ (for-each (lambda (c)
+ (format out "subgraph cluster_~a {\nlabel= \"~a\"\ncolor=blue\n"
+ (string-filter (car c) char-alphabetic?)
+ (car c))
+ (for-each (lambda (n) (format out "~a\n" n)) (cdr c))
+ (display "}\n" out))
+ cs)
(display "}" out)))