diff --git a/inferior-shell.asd b/inferior-shell.asd index 6aeb4996b8a6f5e76ac2b7ceb0a0fd81a9a2ea22..5389f9a5de740c1903921d3e5aef462ffc26517f 100644 --- a/inferior-shell.asd +++ b/inferior-shell.asd @@ -1,8 +1,9 @@ ;;; -*- Lisp -*- (defsystem :inferior-shell - :defsystem-depends-on (:asdf #-asdf3 :asdf-driver) - :depends-on (#-asdf3 :asdf-driver #+sbcl :sb-posix + :defsystem-depends-on (:asdf #-asdf3 :uiop) + :depends-on ((:version #+asdf3 :asdf #-asdf3 :uiop "3.0.3") + #+sbcl :sb-posix :alexandria :optima :fare-utils :fare-quasiquote-extras :fare-mop) :description "spawn local or remote processes and shell pipes" diff --git a/pkgdcl.lisp b/pkgdcl.lisp index ab1f9d0ad7ff05ce4eb0c4838ea20034c53a71f9..a4143a2996290be3602e6e334525dd70e6e0499d 100644 --- a/pkgdcl.lisp +++ b/pkgdcl.lisp @@ -1,9 +1,7 @@ #+xcvb (module ()) -(in-package :cl) - -(asdf/package:define-package :inferior-shell - (:mix :fare-utils :alexandria :asdf/driver) +(uiop/package:define-package :inferior-shell + (:mix :fare-utils :uiop :alexandria) (:use :cl :optima :named-readtables :fare-mop) (:export #:run #:run/s #:run/ss #:run/lines diff --git a/utilities.lisp b/utilities.lisp index aa564a99f2cc35934688c45b38c9da9e745119c8..be8e0a296e20bb6c5afac530dba590808b23915b 100644 --- a/utilities.lisp +++ b/utilities.lisp @@ -40,22 +40,6 @@ (with-input-from-string (stream string) (do-stream-lines fun stream))) -(defvar *cr* (coerce #(#\cr) 'string)) -(defvar *lf* (coerce #(#\newline) 'string)) -(defvar *crlf* (coerce #(#\cr #\newline) 'string)) - -(defun stripln (x) - (check-type x string) - (let* ((len (length x)) - (endlfp (equal (last-char x) #\linefeed)) - (endcrlfp (and endlfp (<= 2 len) (eql (char x (- len 2)) #\return))) - (endcrp (equal (last-char x) #\return))) - (cond - (endlfp (values (subseq x 0 (- len 1)) *lf*)) - (endcrp (values (subseq x 0 (- len 1)) *cr*)) - (endcrlfp (values (subseq x 0 (- len 2)) *crlf*)) - (t (values x nil))))) - (defun read-line* (&optional (stream *standard-input*) eof-error-p eof-value recursive-p cr lf) "Similar to READ-LINE, this function also returns as additional values the state about whether CR or LF were read. CR, LF and CR+LF are accepted only.