projects
/
lifp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c338b0c
)
better load file interface
author
grue
<grue@mail.ru>
Wed, 26 Jul 2006 11:22:21 +0000
(11:22 +0000)
committer
grue
<grue@mail.ru>
Wed, 26 Jul 2006 11:22:21 +0000
(11:22 +0000)
darcs-hash:
8f1ea58dd31293e206217783193e636216c6d71d
console.lisp
patch
|
blob
|
history
diff --git
a/console.lisp
b/console.lisp
index 402d2afb3d90494b15f9f363a5667936529c0db6..545d1e62d5f73d8e5047b0c657ca9947511ca277 100644
(file)
--- a/
console.lisp
+++ b/
console.lisp
@@
-141,10
+141,26
@@
:defaults file))
\r
(values file dir))))
\r
\r
:defaults file))
\r
(values file dir))))
\r
\r
+(defun splice-filename (file)
\r
+ "Returns file itself and its directory as the second value"
\r
+ (values file (make-pathname
\r
+ :directory (pathname-directory file)
\r
+ :name nil
\r
+ :type nil
\r
+ :defaults file)))
\r
\r
(defun load-module (startup lib-loader)
\r
"Loads IF module into the interpreter"
\r
\r
(defun load-module (startup lib-loader)
\r
"Loads IF module into the interpreter"
\r
- (multiple-value-bind (file dir) (pick-file)
\r
+ (multiple-value-bind (file dir)
\r
+ (splice-filename (get-open-file :filetypes '(("Loadable files"
\r
+ "*.fas *.lisp")
\r
+ ("Compiled story files"
\r
+ "*.fas")
\r
+ ("Plain story files"
\r
+ "*.lisp")
\r
+ ("All files" "*"))
\r
+ :title "Load story file"))
\r
+ ;;(pick-file) <- was used before
\r
(unless file (append-text *text* (format nil "Failed to load module.~%"))
\r
(return-from load-module nil))
\r
(funcall lib-loader file dir)
\r
(unless file (append-text *text* (format nil "Failed to load module.~%"))
\r
(return-from load-module nil))
\r
(funcall lib-loader file dir)
\r
@@
-194,5
+210,4
@@
(terpri *standard-output*))
\r
(progn (configure *text* :state "normal")
\r
(append-text *text* (apply #'format nil string args))
\r
(terpri *standard-output*))
\r
(progn (configure *text* :state "normal")
\r
(append-text *text* (apply #'format nil string args))
\r
- (append-text *text* "
\r
-"))))
\ No newline at end of file
+ (append-text *text* (make-string 1 :initial-element #\Newline)))))
\r