;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\207" [require chess-fen chess-pgn] 2) #@72 A list of starting positions of individual records of this collection. (defvar chess-file-locations nil (#$ . 160)) (make-variable-buffer-local 'chess-file-locations) #@96 The file format type of this database instance (a symbol). See `chess-file-types' for details. (defvar chess-file-type nil (#$ . 333)) (make-variable-buffer-local 'chess-file-type) #@416 Alist of different file types. Entries have the form (TYPE BEGIN-REGEXP TO-GAME FROM-GAME SEPARATOR) where TYPE is a symbol (usually either 'pgn or 'epd), BEGIN-REGEXP is the regexp to use for matching the beginning of new records, TO-GAME and FROM-GAME are functions to use for reading and writing a game object from/into the buffer and SEPARATOR is a list of characters to insert inbetween of individual records. (defvar chess-file-types (byte-code "\301\302\303P\304BBD\207" [chess-fen-regexp (pgn "^\\[Event " chess-pgn-to-game chess-game-to-pgn (10 10)) epd "\\(\\s-+.+\\);\\s-*$" (chess-epd-to-game chess-game-to-epd (10))] 4) (#$ . 521)) #@65 Event handler for file database objects. (fn EVENT &rest ARGS) (defalias 'chess-file-handler #[385 "\305\267\202r\306@!q\210\307\310@\"\204\212\311\312\313\314#)\203#\315\202,\307\316@\"\205,\317\211\2056\320\321!\210p)\207\212eb\210\313\311\n\236A@\313\314#\203X\322\224b\210` B\323u\210\202> \237\211)\207 \207\f\207\324 \207 G\207\211@\313\322Y\205\237\320\325!W\205\237 8b\210\326\n\2368 \211\262\205\237\327\330p#\210\327\331#\210\327\332\320\325!#\210\211\207db\210`Sf\333>\203\262\334\335!\210\202\243\336\337\340\n\2368\"\210` B\341\n\2368@!\210\320\325!S\207\211A@\206\330\342@\331\"\320\325!\322Y\205W\205 8b\210`TU\203\370d\202\374T 8|\210\341\n\2368@!\210\315=\205\343c\207\313\207" [chess-file-type chess-file-locations chess-file-types buffer-read-only buffer-file-name #s(hash-table size 9 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (open 6 rescan 56 read-only-p 94 filename 96 save 98 count 101 read 104 write 160 replace 205)) find-file-noselect string-match "\\.pgn\\'" re-search-forward "^\\[Event" nil t pgn "\\.epd\\'" epd chess-file-handler rescan 0 1 save-buffer count 2 chess-game-set-data database database-index database-count (32 9 10 13) delete-char -1 apply insert 4 3 chess-game-data 10] 9 (#$ . 1173)]) (provide 'chess-file)