home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: gnu.emacs.sources
- Path: sparky!uunet!wupost!gumby!destroyer!ubc-cs!uw-beaver!micro-heart-of-gold.mit.edu!mit-eddie!eddie.mit.edu!ronnie
- From: ronnie@eddie.mit.edu (Ron Schnell)
- Subject: dunnet - please replace dun-batch.el (included)
- Message-ID: <1992Jul29.183330.17304@eddie.mit.edu>
- Sender: news@eddie.mit.edu (Usenet News)
- Reply-To: ronnie@eddie.mit.edu (Ron Schnell)
- Organization: MIT EECS/ECF Facility, Cambridge Mass
- Date: Wed, 29 Jul 92 18:33:30 GMT
- Lines: 73
-
- For some reason, a line got deleted from the second sharfile as
- posted to gnu.emacs.sources only. The archived file is fine, as should
- be the one posted to comp.sources.games. Please replace
- dun-batch.el as it is below.
-
- #Ron
-
- -------------------------
-
- ;;;;;;;;;;;;;;;;;;;
- ;;;;;;;;;;;;;;;;;;;
-
-
- ; These are functions, and function re-definitions so that dungeon can
- ; be run in batch mode.
-
- (defun mprinc (arg)
- (if (stringp arg)
- (send-string-to-terminal arg)
- (send-string-to-terminal (prin1-to-string arg))))
-
- (defun mprincl (arg)
- (if (stringp arg)
- (progn
- (send-string-to-terminal arg)
- (send-string-to-terminal "\n"))
- (send-string-to-terminal (prin1-to-string arg))
- (send-string-to-terminal "\n")))
- (defun parse (ignore verblist line)
- (setq line-list (listify-string (concat line " ")))
- (doverb ignore verblist (car line-list) (cdr line-list)))
-
- (defun parse2 (ignore verblist line)
- (setq line-list (listify-string2 (concat line " ")))
- (doverb ignore verblist (car line-list) (cdr line-list)))
-
- (defun read-line ()
- (read-string ""))
-
- (setq batch-mode t)
-
- (defun dungeon-batch-loop ()
- (setq dead nil)
- (setq room 0)
- (while (not dead)
- (if (eq dungeon-mode 'dungeon)
- (progn
- (if (not (= room current-room))
- (progn
- (describe-room current-room)
- (setq room current-room)))
- (mprinc ">")
- (setq line (downcase (read-string "")))
- (if (eq (parse ignore verblist line) -1)
- (mprinc "I don't understand that.\n"))))))
-
- (defun unix-interface ()
- (login)
- (if logged-in
- (progn
- (setq dungeon-mode 'unix)
- (while (eq dungeon-mode 'unix)
- (mprinc "$ ")
- (setq line (downcase (read-string "")))
- (if (eq (parse2 nil unix-verbs line) -1)
- (progn
- (if (setq esign (string-match "=" line))
- (doassign line)
- (mprinc (car line-list))
- (mprincl ": not found.")))))
- (goto-char (point-max))
- (mprinc "\n"))))
-
-