--- a/.hgignore Thu Aug 04 17:42:53 2016 +0000
+++ b/.hgignore Thu Aug 04 17:45:05 2016 +0000
@@ -1,3 +1,5 @@
scratch.lisp
data
-silt
+
+syntax: re
+build/silt$
--- a/Makefile Thu Aug 04 17:42:53 2016 +0000
+++ b/Makefile Thu Aug 04 17:45:05 2016 +0000
@@ -1,4 +1,9 @@
.PHONY:
+lisps := $(shell ffind '\.(asd|lisp|ros)$$')
+
vendor/quickutils.lisp: make-quickutils.lisp
sbcl --noinform --load make-quickutils.lisp --eval '(quit)'
+
+build/silt: $(lisps)
+ ros build build/silt.ros
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/build/silt.ros Thu Aug 04 17:45:05 2016 +0000
@@ -0,0 +1,14 @@
+#!/bin/sh
+#|-*- mode:lisp -*-|#
+#|
+exec ros -Q -- $0 "$@"
+|#
+
+(declaim (optimize (debug 0) (safety 1) (speed 3)))
+
+(unless (find-package :silt)
+ (ql:quickload '(:silt) :silent t))
+
+(defun main (&rest argv)
+ (declare (ignore argv))
+ (silt::main))
--- a/package.lisp Thu Aug 04 17:42:53 2016 +0000
+++ b/package.lisp Thu Aug 04 17:45:05 2016 +0000
@@ -46,4 +46,6 @@
#:iterate
#:cl-arrows
#:silt.quickutils
- #:silt.utils))
+ #:silt.utils)
+ (:export
+ #:main))
--- a/src/main.lisp Thu Aug 04 17:42:53 2016 +0000
+++ b/src/main.lisp Thu Aug 04 17:45:05 2016 +0000
@@ -27,12 +27,13 @@
(define-constant +color-snow+ 4)
(define-constant +color-green+ 5)
-(charms/ll:init-pair +color-white+ charms/ll:COLOR_WHITE charms/ll:COLOR_BLACK)
-(charms/ll:init-pair +color-blue+ charms/ll:COLOR_BLUE charms/ll:COLOR_BLACK)
-(charms/ll:init-pair +color-yellow+ charms/ll:COLOR_YELLOW charms/ll:COLOR_BLACK)
-(charms/ll:init-pair +color-cyan+ charms/ll:COLOR_CYAN charms/ll:COLOR_BLACK)
-(charms/ll:init-pair +color-snow+ charms/ll:COLOR_BLACK charms/ll:COLOR_WHITE)
-(charms/ll:init-pair +color-green+ charms/ll:COLOR_GREEN charms/ll:COLOR_BLACK)
+(defun init-colors ()
+ (charms/ll:init-pair +color-white+ charms/ll:COLOR_WHITE charms/ll:COLOR_BLACK)
+ (charms/ll:init-pair +color-blue+ charms/ll:COLOR_BLUE charms/ll:COLOR_BLACK)
+ (charms/ll:init-pair +color-yellow+ charms/ll:COLOR_YELLOW charms/ll:COLOR_BLACK)
+ (charms/ll:init-pair +color-cyan+ charms/ll:COLOR_CYAN charms/ll:COLOR_BLACK)
+ (charms/ll:init-pair +color-snow+ charms/ll:COLOR_BLACK charms/ll:COLOR_WHITE)
+ (charms/ll:init-pair +color-green+ charms/ll:COLOR_GREEN charms/ll:COLOR_BLACK))
(defmacro with-color (color &body body)
(once-only (color)
@@ -266,6 +267,7 @@
(case key
((#\Q) (return :quit))
((#\R) (return :regen))
+ ((#\x) (/ 1 0))
((#\h) (move-view -5 0))
((#\j) (move-view 0 5))
@@ -327,6 +329,16 @@
(charms:enable-raw-input :interpret-control-characters t)
(charms:enable-extra-keys charms:*standard-window*)
(charms/ll:start-color)
+ (init-colors)
(state-title)))
+(defun main ()
+ (handler-case
+ (progn
+ (run)
+ (format t "Goodbye.~%"))
+ (t (e)
+ (declare (ignore e))
+ (format t "Something went wrong, sorry.~%"))))
+
; (run)