[bknr-cvs] r2100 - in trunk/modules: mail track

bknr at bknr.net bknr at bknr.net
Sun Dec 3 10:48:27 UTC 2006


Author: hhubner
Date: 2006-12-03 05:48:27 -0500 (Sun, 03 Dec 2006)
New Revision: 2100

Modified:
   trunk/modules/mail/package.lisp
   trunk/modules/track/media.lisp
   trunk/modules/track/track.lisp
Log:
SBCL compatibility changes.


Modified: trunk/modules/mail/package.lisp
===================================================================
--- trunk/modules/mail/package.lisp	2006-12-03 10:48:08 UTC (rev 2099)
+++ trunk/modules/mail/package.lisp	2006-12-03 10:48:27 UTC (rev 2100)
@@ -40,8 +40,8 @@
 	   #:mailinglist-send-mail))
 
 (defpackage :bknr.mail.imap
-  (:use :lisp
-	:ext)
+  (:use :common-lisp
+	#+cmu :ext #+sbcl :sb-ext)
   (:export 
    #:address-name
    #:address-additional

Modified: trunk/modules/track/media.lisp
===================================================================
--- trunk/modules/track/media.lisp	2006-12-03 10:48:08 UTC (rev 2099)
+++ trunk/modules/track/media.lisp	2006-12-03 10:48:27 UTC (rev 2100)
@@ -11,7 +11,7 @@
 							      :length 0
 							      :remain 0))
    (queue :accessor player-queue :initform nil)
-   (lock :accessor player-lock :initform (mp:make-lock))))
+   (lock :accessor player-lock :initform (mp-make-lock))))
 
 (defgeneric player-play (player mp3))
 (defgeneric player-stop (player))
@@ -24,12 +24,12 @@
 
 (defmethod queue-command ((player player) command)
   (with-slots (queue lock) player
-    (mp:with-lock-held (lock)
+    (mp-with-lock-held (lock)
       (setf queue (append queue (list command))))))
 
 (defmethod dequeue-command ((player player))
   (with-slots (queue lock) player
-    (mp:with-lock-held (lock)
+    (mp-with-lock-held (lock)
       (pop queue))))
 
 (defmethod player-play ((player player) mp3)
@@ -49,28 +49,28 @@
    (process :accessor mpg123-player-process :initform nil)))
 
 (defmethod start-mpg123 ((player mpg123-player))
-  (let ((proc (ext:run-program "mpg123" '("-R")
-			       :wait nil
-			       :input :stream
-			       :output :stream
-			       :error :output
-			       :status-hook #'(lambda (proc)
-						(declare (ignore proc))
-						(mpg123-status-changed player)))))
+  (let ((proc (run-program "mpg123" '("-R")
+			   :wait nil
+			   :input :stream
+			   :output :stream
+			   :error :output
+			   :status-hook #'(lambda (proc)
+					    (declare (ignore proc))
+					    (mpg123-status-changed player)))))
     (when proc
       (with-slots (stream process state) player
-	(setf stream (make-two-way-stream (ext:process-output proc)
-					  (ext:process-input proc))
+	(setf stream (make-two-way-stream (process-output proc)
+					  (process-input proc))
 	      process proc)))))
 
 (defmethod mpg123-status-changed ((player mpg123-player))
   (format t "status changed~%")
   (let ((proc (mpg123-player-process player)))
-    (case (ext:process-status proc)
+    (case (process-status proc)
       (:running)
       (:stopped (format t "mpg123 stopped~%"))
       (:signaled (format t "mpg123 stopped~%"))
-      (t (format t "mpg123 has status: ~a~%" (ext:process-status proc))))))
+      (t (format t "mpg123 has status: ~a~%" (process-status proc))))))
 
 (defmethod send-command ((player mpg123-player) command)
   (with-slots (process stream) player
@@ -87,7 +87,7 @@
 
 (defmethod actor-stop :before ((player mpg123-player))
   (when (mpg123-player-process player)
-    (ext:process-kill (mpg123-player-process player) 9)))
+    (process-kill (mpg123-player-process player) 9)))
 
 (defmethod mpg123-player-parse-status ((player mpg123-player) msg)
   #+nil(format t "msg: ~a~%" msg)

Modified: trunk/modules/track/track.lisp
===================================================================
--- trunk/modules/track/track.lisp	2006-12-03 10:48:08 UTC (rev 2099)
+++ trunk/modules/track/track.lisp	2006-12-03 10:48:27 UTC (rev 2100)
@@ -103,7 +103,7 @@
 ;			  (delete-file file)
 			  (when (directory-empty-p file-directory)
 			    #-allegro
-			    (unix:unix-rmdir (namestring file-directory))
+			    (#+cmu unix:unix-rmdir #+sbcl sb-posix:rmdir (namestring file-directory))
 			    #+allegro
 			    (delete-directory file-directory)))
 			(cons file mp3))




More information about the Bknr-cvs mailing list