;ELC   
;;; compiled by cthomp@willow on Thu Aug 12 00:32:46 1993
;;; from file /era/era-0.80/editor/lisp/games/cookie1.el
;;; emacs version 19.8 (beta8) Lucid.
;;; bytecomp version 2.15; 14-jul-93.
;;; optimization is on.
;;; this file uses opcodes which do not exist in Emacs 18.

(if (and (boundp 'emacs-version)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19")))
    (error "This file was compiled for Emacs 19."))

(random t)
(defconst cookie-delimiter "\n%%\n\\| " "\
Delimiter used to separate cookie file entries.")
(defvar cookie-cache (make-vector 511 0) "\
Cache of cookie files that have already been snarfed.")
(fset 'cookie #[(phrase-file startmsg endmsg) "	\n#!H)" [cookie-snarf phrase-file startmsg endmsg cookie-vector shuffle-vector 1] 4 "\
Return a random phrase from PHRASE-FILE.  When the phrase file
is read in, display STARTMSG at beginning of load, ENDMSG at end."])
(fset 'cookie-insert #[(phrase-file &optional count startmsg endmsg) "	\n#!`cGZ\n^\"c`#*" [cookie-snarf phrase-file startmsg endmsg cookie-vector shuffle-vector start 10 cookie1 1 count fill-region-as-paragraph nil] 4 "\
Insert random phrases from PHRASE-FILE; COUNT of them.  When the phrase file
is read in, display STARTMSG at beginning of load, ENDMSG at end."])
(fset 'cookie1 #[(arg cookie-vec) "UHccS\"" [arg 0 t cookie-vec " " cookie1] 3 "\
Inserts a cookie phrase ARG times."])
(fset 'cookie-snarf #[(phrase-file startmsg endmsg) "	\n\"K	!8	P!J	\n\"!!q	!8M	!!!wm`!`S{B)d!!\"L+)" [intern-soft phrase-file cookie-cache sym 5 file-attributes yes-or-no-p " has changed.  Read new contents? " nil intern message startmsg generate-new-buffer "*cookie*" result buf insert-file-contents expand-file-name re-search-forward cookie-delimiter " 	\n" beg kill-buffer endmsg apply vector] 5 "\
Reads in the PHRASE-FILE, returns it as a vector of strings.  Emit
STARTMSG and ENDMSG before and after.  Caches the result; second and
subsequent calls on the same file won't go to disk."])
(fset 'shuffle-vector #[(vector) "\nGWZ!\\\nH\n\nHI\nITX,\n" [0 nil vector len temp j i random] 5 "\
Randomly permute the elements of VECTOR (all permutations equally likely)"])
(provide 'cookie1)
