(in-package #:editor) (defun batch-help () (format t "Usage: c6le ~%") (format t "This editor is intended to be used on a different terminal than it's started from, please supply a terminal to run on. For testing on a terminal emulator, open it, check which pts it's running on using \"ps\", run a command like \"clear; while true; do sleep 1000;done\", then start the editor in another terminal giving the pts as a command-line parameter.~%")) (defun main (arguments) (format t "C64 Livecoding editor, v~A~%" #.(asdf:component-version (asdf:find-system '#:user-side-compiler))) (let ((tty (and (first arguments) (probe-file (first arguments))))) (unless tty (batch-help) (abort)) (let ((*terminal-path* tty)) (make-editor)) (editor-loop))) (defun batch-main () (restart-bind ((abort (lambda () (sb-ext:exit :code -1)))) (main (uiop:command-line-arguments)))) (defun build () (assert (not (member :swank *features*))) (usc:usc-init) (sb-ext:save-lisp-and-die "c6le" :toplevel #'batch-main :executable t :save-runtime-options t :root-structures 'batch-main :compression t))