aboutsummaryrefslogtreecommitdiff
path: root/src/guile/skribilo/package/pie.scm
diff options
context:
space:
mode:
authorLudovic Court`es2007-06-06 09:25:35 +0000
committerLudovic Court`es2007-06-06 09:25:35 +0000
commit6ec84d65e48bf0e6f7b682afdfed9f081d8baea7 (patch)
tree54983d24ab276ad6e5e263f983fdc2b3ed571677 /src/guile/skribilo/package/pie.scm
parent089f71c9b54b6714d5a83e9686c13b43c2b03d93 (diff)
downloadskribilo-6ec84d65e48bf0e6f7b682afdfed9f081d8baea7.tar.gz
skribilo-6ec84d65e48bf0e6f7b682afdfed9f081d8baea7.tar.lz
skribilo-6ec84d65e48bf0e6f7b682afdfed9f081d8baea7.zip
More package cleanups.
Various additional package cleanups, thanks to Guile-Lint. git-archimport-id: lcourtes@laas.fr--2006-libre/skribilo--devo--1.2--patch-61
Diffstat (limited to 'src/guile/skribilo/package/pie.scm')
-rw-r--r--src/guile/skribilo/package/pie.scm23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/guile/skribilo/package/pie.scm b/src/guile/skribilo/package/pie.scm
index 232ef9c..0292ccf 100644
--- a/src/guile/skribilo/package/pie.scm
+++ b/src/guile/skribilo/package/pie.scm
@@ -27,10 +27,9 @@
:use-module (skribilo utils syntax)
:use-module (skribilo utils keywords) ;; `the-options', etc.
:use-module (skribilo utils strings) ;; `make-string-replace'
- :use-module (skribilo module)
:autoload (skribilo color) (skribe-color->rgb)
:autoload (skribilo package base) (bold)
- :autoload (skribilo engine lout) (lout-illustration)
+ :autoload (srfi srfi-13) (string-concatenate)
:autoload (ice-9 popen) (open-output-pipe)
:use-module (ice-9 optargs)
:export (%ploticus-program %ploticus-debug?
@@ -125,7 +124,7 @@ the string \"hello\". Implement `sliceweight' markups too."
(number->string (percentage-round value)))
(pie-remove-markup (markup-body node)))
(if (list? node)
- (apply string-append (map pie-remove-markup node))
+ (string-concatenate (map pie-remove-markup node))
node)))
(define strip-newlines (make-string-replace '((#\newline " "))))
@@ -174,14 +173,16 @@ the string \"hello\". Implement `sliceweight' markups too."
(string-append (color-spec->ploticus c)
" ")))
(markup-body pie)))
- (total-weight (or (if (number? (markup-option pie
- :total))
- (markup-option pie :total)
- #f)
- (apply + weights)))
+ (total-weight
+ (let ((w (or (if (number? (markup-option pie
+ :total))
+ (markup-option pie :total)
+ #f)
+ (apply + weights))))
- ;; Attach useful information to the pie and its slices
- (-/- (markup-option-add! pie '&total-weight total-weight))
+ ;; Attach useful information to the pie and its slices
+ (markup-option-add! pie '&total-weight w)
+ w))
;; One slice label per line -- so we need to remove
;; newlines from labels.
@@ -215,7 +216,7 @@ the string \"hello\". Implement `sliceweight' markups too."
(* max-radius max-radius)) .
,(* max-radius max-radius))))
- (apply string-append
+ (string-concatenate
(append (list "#proc getdata\n" "data: ")
(map (lambda (weight)
(string-append (number->string weight)