1
0
mirror of https://codeberg.org/cage/tinmop/ synced 2025-01-26 03:44:50 +01:00

- added compilation macros to use ECl processes procedures;

- added compilation macro to skip SBCL specific muffling condition procedures;
- added purgatory as dependency to installing script.
This commit is contained in:
cage 2022-03-20 12:32:41 +01:00
parent f4d7bb1e94
commit 9910da1837
4 changed files with 19 additions and 22 deletions

View File

@ -140,6 +140,7 @@ install_dependency () {
--eval "(ql:quickload \"babel\")" \
--eval "(ql:quickload \"percent-encoding\")" \
--eval "(ql:quickload \"trivial-clipboard\")" \
--eval "(ql:quickload \"purgatory\")" \
--eval "(sb-ext:quit)"
}

View File

@ -16,12 +16,10 @@
(in-package :constants)
(eval-when (:compile-toplevel :load-toplevel :execute)
(defun actual-program-name ()
(declare (sb-ext:muffle-conditions sb-ext:compiler-note))
(if (string= +program-name+ "tinmop")
"tinmop"
(format nil "~a (original name: \"tinmop\")" +program-name+))))
(defmacro actual-program-name ()
`(if (string= +program-name+ "tinmop")
+program-name+
,(format nil "~a (original name: \"tinmop\")" +program-name+)))
(define-constant +help-about-message+
(format nil

View File

@ -77,10 +77,10 @@
(defun parse-subwin-w (w-as-string)
"Parse a window width, `w-as-string' a fraction of the main window width"
(declare (sb-ext:muffle-conditions sb-ext:compiler-note))
#+sbcl (declare (sb-ext:muffle-conditions sb-ext:compiler-note))
(parse-subwin-size w-as-string (win-width *main-window*)))
(defun parse-subwin-h (h-as-string)
"Parse a window height, `h-as-string' a fraction of the main window height"
(declare (sb-ext:muffle-conditions sb-ext:compiler-note))
#+sbcl (declare (sb-ext:muffle-conditions sb-ext:compiler-note))
(parse-subwin-size h-as-string (win-height *main-window*)))

View File

@ -77,19 +77,17 @@
&key
(wait t)
search
#-win32 pty
input
output
(error :output))
#-win32 (sb-ext:run-program program
args
:wait wait
:search search
:pty pty
:input input
:output output
:error error)
#+win32 (sb-ext:run-program program
(declare (ignorable search))
#+ecl (ext:run-program program
args
:input input
:output output
:error error
:wait wait)
#+sbcl (sb-ext:run-program program
args
:wait wait
:search search
@ -98,7 +96,8 @@
:error error))
(defun process-exit-code (process)
(sb-ext:process-exit-code process))
#+ecl (nth-value 1 (ext:external-process-status process))
#+sbcl (sb-ext:process-exit-code process))
(defun process-exit-success-p (process)
(= (process-exit-code process) 0))
@ -209,9 +208,8 @@
:search t
:wait t
:output stream
:error :output))
(exit-code (sb-ext:process-exit-code process)))
(when (/= exit-code 0)
:error :output)))
(when (not (process-exit-success-p process))
(error (format nil "File ~s extraction from ~s failed" file-entry zip-file))))))
(defun copy-to-clipboard (text)