Skip to content
Snippets Groups Projects
Commit a24d3d7d authored by Francois-Rene Rideau's avatar Francois-Rene Rideau
Browse files

Require ASDF or UIOP 3.0.3 for its new RUN-PROGRAM

parent 694579f0
No related branches found
No related tags found
No related merge requests found
;;; -*- Lisp -*- ;;; -*- Lisp -*-
(defsystem :inferior-shell (defsystem :inferior-shell
:defsystem-depends-on (:asdf #-asdf3 :asdf-driver) :defsystem-depends-on (:asdf #-asdf3 :uiop)
:depends-on (#-asdf3 :asdf-driver #+sbcl :sb-posix :depends-on ((:version #+asdf3 :asdf #-asdf3 :uiop "3.0.3")
#+sbcl :sb-posix
:alexandria :optima :alexandria :optima
:fare-utils :fare-quasiquote-extras :fare-mop) :fare-utils :fare-quasiquote-extras :fare-mop)
:description "spawn local or remote processes and shell pipes" :description "spawn local or remote processes and shell pipes"
......
#+xcvb (module ()) #+xcvb (module ())
(in-package :cl) (uiop/package:define-package :inferior-shell
(:mix :fare-utils :uiop :alexandria)
(asdf/package:define-package :inferior-shell
(:mix :fare-utils :alexandria :asdf/driver)
(:use :cl :optima :named-readtables :fare-mop) (:use :cl :optima :named-readtables :fare-mop)
(:export (:export
#:run #:run/s #:run/ss #:run/lines #:run #:run/s #:run/ss #:run/lines
......
...@@ -40,22 +40,6 @@ ...@@ -40,22 +40,6 @@
(with-input-from-string (stream string) (with-input-from-string (stream string)
(do-stream-lines fun stream))) (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) (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 "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. whether CR or LF were read. CR, LF and CR+LF are accepted only.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment