From: Akshay S. <ak...@us...> - 2013-02-25 09:41:25
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "matlisp". The branch, tensor has been updated via 6d64374a148b18ceea55608f39b0bc0d5f8cca75 (commit) from 7338eb40c61c8fcab6a6180f68c0db7e013ad9ee (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 6d64374a148b18ceea55608f39b0bc0d5f8cca75 Author: Akshay Srinivasan <aks...@gm...> Date: Mon Feb 25 01:40:50 2013 -0800 Added CCL support to gnuplot.lisp diff --git a/lib-src/gnuplot/gnuplot.lisp b/lib-src/gnuplot/gnuplot.lisp index 906a981..e895bb4 100644 --- a/lib-src/gnuplot/gnuplot.lisp +++ b/lib-src/gnuplot/gnuplot.lisp @@ -1,15 +1,18 @@ (in-package :matlisp) -(defvar *current-gnuplot-stream* nil) -(defvar *gnuplot-binary* "/usr/bin/gnuplot") +(defvar *current-gnuplot-process* nil) -(defun open-gnuplot-stream () +(defun open-gnuplot-stream (&optional (gnuplot-binary (pathname "/usr/bin/gnuplot"))) (#+:sbcl sb-ext:run-program - *gnuplot-binary* nil :input :stream :wait nil :output t)) + #+:ccl + ccl:run-program + gnuplot-binary nil :input :stream :wait nil :output t)) (defun plot2d (data &key (color (list "#FF0000")) (stream (#+:sbcl - sb-ext:process-input - *current-gnuplot-stream*))) + sb-ext:process-input + #+:ccl + ccl:external-process-input-stream + *current-gnuplot-process*))) (with-open-file (s "/tmp/matlisp-gnuplot.out" :direction :output :if-exists :supersede :if-does-not-exist :create) (loop :for i :from 0 :below (loop :for x :in data :minimizing (number-of-elements x)) :do (loop :for x :in data :do (format s "~a " (tensor-ref x i)) :finally (format s "~%")))) @@ -18,7 +21,9 @@ (defun gnuplot-send (str &key (stream (#+:sbcl sb-ext:process-input - *current-gnuplot-stream*))) + #+:ccl + ccl:external-process-input-stream + *current-gnuplot-process*))) (format stream "~a~%" str) (finish-output stream)) ----------------------------------------------------------------------- Summary of changes: lib-src/gnuplot/gnuplot.lisp | 19 ++++++++++++------- 1 files changed, 12 insertions(+), 7 deletions(-) hooks/post-receive -- matlisp |