(:use :common-lisp :ltk :com.gigamonkeys.pathnames)\r
(:export :terminal-in :terminal-out\r
:run-console :console-running-p :textwidth :offset :style\r
(:use :common-lisp :ltk :com.gigamonkeys.pathnames)\r
(:export :terminal-in :terminal-out\r
:run-console :console-running-p :textwidth :offset :style\r
:close-console :load-module :print-message))\r
\r
(in-package :if-console)\r
\r
(defparameter *repl-mode* nil)\r
:close-console :load-module :print-message))\r
\r
(in-package :if-console)\r
\r
(defparameter *repl-mode* nil)\r
(defparameter *console-on* nil)\r
(defparameter *text* nil)\r
(defparameter *inp* nil)\r
(defparameter *console-on* nil)\r
(defparameter *text* nil)\r
(defparameter *inp* nil)\r
\r
(defmethod gray:stream-write-char ((s terminal-out) char)\r
(unless (console-running-p) (error "No console is running"))\r
\r
(defmethod gray:stream-write-char ((s terminal-out) char)\r
(unless (console-running-p) (error "No console is running"))\r
(defmethod gray:stream-write-char-sequence ((s terminal-out) str\r
&optional start end)\r
(unless (console-running-p) (error "No console is running"))\r
(defmethod gray:stream-write-char-sequence ((s terminal-out) str\r
&optional start end)\r
(unless (console-running-p) (error "No console is running"))\r
(let ((toprint (subseq str (if start start 0) (if end end nil))))\r
(if *repl-mode* (princ toprint)\r
(progn\r
(append-text (first *console-on*) toprint)\r
(let ((toprint (subseq str (if start start 0) (if end end nil))))\r
(if *repl-mode* (princ toprint)\r
(progn\r
(append-text (first *console-on*) toprint)\r
(defun load-module (startup lib-loader)\r
"Loads IF module into the interpreter"\r
(multiple-value-bind (file dir) (pick-file)\r
(defun load-module (startup lib-loader)\r
"Loads IF module into the interpreter"\r
(multiple-value-bind (file dir) (pick-file)\r