: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
- (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
(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