;ELC ;;; compiled by kwzh@hal.gnu.ai.mit.edu on Mon Apr 17 19:49:06 1995 ;;; from file /gd/gnu/emacs/19.0/lisp/ring.el ;;; emacs version 19.28.90.26. ;;; bytecomp version FSF 2.10 ;;; 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 "`/gd/gnu/emacs/19.0/lisp/ring.el' was compiled for Emacs 19")) #@42 Returns t if X is a ring; nil otherwise. (defalias 'ring-p #[(x) ":…@¨…A:…A@¨…ÁAA!‡" [x vectorp] 2 (#$ . 477)]) #@45 Make a ring that can contain SIZE elements. (defalias 'make-ring #[(size) "À‰Á\nÃ\"BB‡" [0 make-vector size nil] 5 (#$ . 608)]) #@66 Add to RING the item ITEM. Add it at the front (the early end). (defalias 'ring-insert-at-beginning #[(ring item) "AA‰G@A@\n\fT^Å \n\" Iˆ  ˆA\f ,‡" [ring vec veclen hd ln ring-minus1 item] 4 (#$ . 742)]) #@26 INDEX+1, with wraparound (defalias 'ring-plus1 #[(index veclen) "Á\\‰ UƒÄ‚\n)‡" [index 1 new-index veclen 0] 3 (#$ . 967)]) #@26 INDEX-1, with wraparound (defalias 'ring-minus1 #[(index veclen) "ÁUƒ\n\n‚ ÃZ‡" [index 0 veclen 1] 2 (#$ . 1103)]) #@33 Number of elements in the ring. (defalias 'ring-length #[(ring) "A@‡" [ring] 1 (#$ . 1228)]) (defalias 'ring-empty-p #[(ring) "A@ÁU‡" [ring 0] 2]) (defalias 'ring-index #[(index head ringlen veclen) "À \n\"À \n Z\\S\f\"‡" [mod index ringlen head veclen] 4]) #@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‰G@A@ Å \f\\\n\"I\f\nUƒ(Ç \n\" ˆ‚.A\fT ˆ,‡" [ring vec veclen hd ln mod item ring-plus1] 6 (#$ . 1496)]) #@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) "À !ƒ\nÂÃ!‡ @ A@ AA‰GÈ\f \\S\" Ê \f„0 S\fÍ\f\f $\f\fH \f U„d\fÎ\f\"HIˆÎ\f\"‰\f‚C ÊIˆ A S ˆ .‡" [ring-empty-p ring error "Ring empty" hd ln vec veclen mod tl nil oldelt index ring-index ring-plus1] 7 (#$ . 1780)]) #@224 Returns RING's INDEX element. INDEX need not be <= the ring length, the appropriate modulo operation will be performed. Element 0 is the most recently inserted; higher indices correspond to older elements until they wrap. (defalias 'ring-ref #[(ring index) "À !ƒ\nÂÃ!‡ @ A@ AA‰Ç\f G$H+‡" [ring-empty-p ring error "indexed empty ring" hd ln vec ring-index index] 7 (#$ . 2243)]) (provide (quote ring))