;ELC   
;;; Compiled by pot@pot.cnuce.cnr.it on Tue Mar 18 15:39:21 2003
;;; from file /home/pot/gnu/emacs-pretest.new/lisp/emacs-lisp/ring.el
;;; in Emacs version 21.3
;;; with bytecomp version 2.85.4.1
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.
(if (and (boundp 'emacs-version)
	 (< (aref emacs-version (1- (length emacs-version))) ?A)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`ring.el' was compiled for Emacs 19.29 or later"))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


#@42 Returns t if X is a ring; nil otherwise.
(defalias 'ring-p #[(x) ":\205 @\250\205 A:\205 A@\250\205 \301AA!\207" [x vectorp] 2 (#$ . 621)])
#@45 Make a ring that can contain SIZE elements.
(defalias 'make-ring #[(size) "\301\211\302\303\"BB\207" [size 0 make-vector nil] 5 (#$ . 776)])
#@70 Add to RING the item ITEM.  Add it at the front, as the oldest item.
(defalias 'ring-insert-at-beginning #[(ring item) "AA\211G@A@\n\fT^\306\n\"	I\210\240\210A\f\240,\207" [ring vec veclen hd ln item ring-minus1] 4 (#$ . 924)])
#@35 Returns INDEX+1, with wraparound.
(defalias 'ring-plus1 #[(index veclen) "T\211\nU\203 \303\202 	)\207" [index new-index veclen 0] 3 (#$ . 1173)])
#@35 Returns INDEX-1, with wraparound.
(defalias 'ring-minus1 #[(index veclen) "\302U\203\n 	\202 S\207" [index veclen 0] 2 (#$ . 1330)])
#@45 Returns the number of elements in the RING.
(defalias 'ring-length #[(ring) "A@\207" [ring] 1 (#$ . 1472)])
#@283 Converts nominal ring index INDEX to an internal index.
The internal index refers to the items ordered from newest to oldest.
HEAD is the index of the oldest element in the ring.
RINGLEN is the number of elements currently in the ring.
VECLEN is the size of the vector in the ring.
(defalias 'ring-index #[(index head ringlen veclen) "\304	\"\304\n	Z\\S\"\207" [index ringlen head veclen mod] 4 (#$ . 1588)])
#@44 Returns t if RING is empty; nil otherwise.
(defalias 'ring-empty-p #[(ring) "A@\301U\207" [ring 0] 2 (#$ . 2007)])
#@74 Returns the size of RING, the maximum number of elements it can contain.
(defalias 'ring-size #[(ring) "AAG\207" [ring] 1 (#$ . 2129)])
#@25 Returns a copy of RING.
(defalias 'ring-copy #[(ring) "AA@A@\n\304	!+BB\207" [ring vec hd ln copy-sequence] 4 (#$ . 2272)])
#@121 Insert onto ring RING the item ITEM, as the newest (last) item.
If the ring is full, dump the oldest item to make room.
(defalias 'ring-insert #[(ring item) "AA\211G@A@	\306\f\\\n\"I\f\nU\203' \307\n\"\240\210\202- A\fT\240\210,\207" [ring vec veclen hd ln item mod ring-plus1] 6 (#$ . 2410)])
#@153 Remove an item from the RING.  Return the removed item.
If optional INDEX is nil, remove the oldest item.  If it's
numeric, remove the element indexed.
(defalias 'ring-remove #[(ring &optional index) "\306!\203\n \307\310!\207@A@AA\211G\311	\n\\S\f\"\312\204, \nS\313	\n\f$HU\204Y \314\f\"HI\210\314\f\"\211\202= \312I\210A\nS\240\210.\207" [ring hd ln vec veclen tl ring-empty-p error "Ring empty" mod nil ring-index ring-plus1 oldelt index] 7 (#$ . 2723)])
#@207 Returns RING's INDEX element.
INDEX = 0 is the most recently inserted; higher indices
correspond to older elements.
INDEX need not be <= the ring length; the appropriate modulo operation
will be performed.
(defalias 'ring-ref #[(ring index) "\305!\203\n \306\307!\207@A@AA\211\310\f	\nG$H+\207" [ring hd ln vec index ring-empty-p error "Accessing an empty ring" ring-index] 7 (#$ . 3232)])
#@39 Return a list of the lements of RING.
(defalias 'ring-elements #[(ring) "\302\303\211AA)\"\207" [ring x mapcar identity] 4 (#$ . 3636)])
(provide 'ring)
