Server IP : 111.118.215.189 / Your IP : 3.147.48.161 Web Server : Apache System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : a1673wkz ( 2475) PHP Version : 8.2.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /usr/share/emacs/24.3/lisp/emacs-lisp/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
;ELC ;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:09:04 2024 ;;; from file /builddir/build/BUILD/emacs-24.3/lisp/emacs-lisp/ring.el ;;; in Emacs version 24.3.1 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; #@41 Return t if X is a ring; nil otherwise. (defalias 'ring-p #[(x) ":\205# @\250\205# A:\205# \211A@)\250\205# \301\211AA)!\207" [x vectorp] 3 (#$ . 558)]) #@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 (#$ . 724)]) #@62 Add to RING the item ITEM, at the front, as the oldest item. (defalias 'ring-insert-at-beginning #[(ring item) "\211AA)\211G@\211A@) T^\306\f\"\n\fI\210\f\240\210A \240,\207" [ring x vec veclen hd ln ring-minus1 item] 4 (#$ . 872)]) #@34 Return INDEX+1, with wraparound. (defalias 'ring-plus1 #[(index veclen) "T\211\nU\203 \303\202 )\207" [index new-index veclen 0] 3 (#$ . 1128)]) #@34 Return INDEX-1, with wraparound. (defalias 'ring-minus1 #[(index veclen) "\302!\203\n \202 S\207" [index veclen zerop] 2 (#$ . 1284)]) #@44 Return the number of elements in the RING. (defalias 'ring-length #[(ring) "\211A@)\207" [ring x] 2 (#$ . 1429)]) #@282 Convert 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 (#$ . 1552)]) #@43 Return t if RING is empty; nil otherwise. (defalias 'ring-empty-p #[(ring) "\302\211A@)!\207" [ring x zerop] 3 (#$ . 1970)]) #@73 Return the size of RING, the maximum number of elements it can contain. (defalias 'ring-size #[(ring) "\211AA)G\207" [ring x] 2 (#$ . 2103)]) #@24 Return a copy of RING. (defalias 'ring-copy #[(ring) "\211AA)@\211A@)\n\305\f!+BB\207" [ring x ln hd vec copy-sequence] 5 (#$ . 2253)]) #@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) "\211AA)\211G@\211A@)\n\306\f \\\"I U\203. \307\f\"\240\210\2024 A T\240\210,\207" [ring x vec veclen hd ln mod ring-plus1 item] 6 (#$ . 2405)]) #@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@\211A@)\211AA)\211G\311 \\S \" \312\2043 S\313 $\fH U\204a \f\f\314 \"HI\210\314 \"\211\202D \f \312I\210AS\240\210.\207" [ring hd x ln vec veclen ring-empty-p error "Ring empty" mod nil ring-index ring-plus1 tl oldelt index] 7 (#$ . 2730)]) #@206 Return 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) "\306!\203\n \307\310!\207@\211A@)\211AA)\n\311 \f\nG$H+\207" [ring x vec ln hd index ring-empty-p error "Accessing an empty ring" ring-index] 7 (#$ . 3252)]) #@64 Return a list of the elements of RING, in order, newest first. (defalias 'ring-elements #[(ring) "@\306!\211AA)\307\211A@)\310\n\nW\2038 \311 \n\\\f\"H\nB\nT\211\n\202 \n.\207" [ring x lst vect size start ring-size nil 0 mod var --dotimes-limit--] 5 (#$ . 3667)]) #@99 Return index of ITEM if on RING, else nil. Comparison is done via `equal'. The index is 0-based. (defalias 'ring-member #[(ring item) "\300\301\215\207" [found (byte-code "\304!\305 \nW\203! \306 \"\232\203 \307\310 \"\210 T\211\202 *\311\207" [ring ind --dotimes-limit-- item ring-length 0 ring-ref throw found nil] 5)] 2 (#$ . 3960)]) #@87 Return the next item in the RING, after ITEM. Raise error if ITEM is not in the RING. (defalias 'ring-next #[(ring item) "\303 \"\211\204 \304\305 \"\210\306\307\n\310!\"\")\207" [ring item curr-index ring-member error "Item is not in the ring: `%s'" ring-ref ring-plus1 ring-length] 7 (#$ . 4312)]) #@92 Return the previous item in the RING, before ITEM. Raise error if ITEM is not in the RING. (defalias 'ring-previous #[(ring item) "\303 \"\211\204 \304\305 \"\210\306\307\n\310!\"\")\207" [ring item curr-index ring-member error "Item is not in the ring: `%s'" ring-ref ring-minus1 ring-length] 7 (#$ . 4623)]) #@33 Increase the size of RING by X. (defalias 'ring-extend #[(ring x) "\250\205W \306V\205W @\307 !\310 ! \211AA)\311\f\\\312\"\f \fB\241\210\306 W\203R \f \313\n \\\f\"HI\210 T\211 \2024 * \306\240-\207" [x ring hd length size old-vec 0 ring-length ring-size make-vector nil mod new-vec j --dotimes-limit--] 7 (#$ . 4944)]) #@316 Like `ring-insert', but if GROW-P is non-nil, then enlarge ring. Insert onto ring RING the item ITEM, as the newest (last) item. If the ring is full, behavior depends on GROW-P: If GROW-P is non-nil, enlarge the ring to accommodate the new item. If GROW-P is nil, dump the oldest item to make room for the new. (defalias 'ring-insert+extend #[(ring item &optional grow-p) "\203 \303 !\304 !U\203 \305 \306\"\210\307 \n\"\207" [grow-p ring item ring-length ring-size ring-extend 1 ring-insert] 3 (#$ . 5298)]) #@298 `ring-remove' ITEM from RING, then `ring-insert+extend' it. This ensures that there is only one ITEM on RING. If the RING is full, behavior depends on GROW-P: If GROW-P is non-nil, enlarge the ring to accommodate the new ITEM. If GROW-P is nil, dump the oldest item to make room for the new. (defalias 'ring-remove+insert+extend #[(ring item &optional grow-p) "\304\305 \n\"\211\203 \306 \"\210\202 )\307 \n#\207" [ind ring item grow-p nil ring-member ring-remove ring-insert+extend] 4 (#$ . 5821)]) #@88 Convert sequence SEQ to a ring. Return the ring. If SEQ is already a ring, return it. (defalias 'ring-convert-sequence-to-ring #[(seq) "\305!\203 \207G\306 ! \307\fW\2038 \310\n!\204* \311\n\307\"\234\232\2041 \312\n\234\"\210T\211\202 *\n*\207" [seq size ring count --dotimes-limit-- ring-p make-ring 0 ring-empty-p ring-ref ring-insert-at-beginning] 5 (#$ . 6338)]) (provide 'ring)