home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / emacs-19.16 / lisp / cookie1.elc < prev    next >
Emacs Compiled Lisp  |  1993-07-05  |  2.3 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text


This file was processed as: Emacs Compiled Lisp (other/emacsCompiledLisp).
This format is not currently supported by dexvert.

ConfidenceProgramDetectionMatch TypeSupport
1% dexvert Emacs Compiled Lisp (other/emacsCompiledLisp) magic Unsupported
1% dexvert Combustion 2 Particle Library (other/combustion2ParticleLibrary) ext Unsupported
100% file Emacs/XEmacs v19 byte-compiled Lisp data default
99% file data default
100% TrID Emacs/XEmacs byte-compiled Lisp (generic) default
100% xdgMime text/x-emacs-lisp default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 3b 45 4c 43 13 00 00 00 | 0a 3b 3b 3b 20 63 6f 6d |;ELC....|.;;; com|
|00000010| 70 69 6c 65 64 20 62 79 | 20 6a 69 6d 62 40 67 65 |piled by| jimb@ge|
|00000020| 65 63 68 2e 67 6e 75 2e | 61 69 2e 6d 69 74 2e 65 |ech.gnu.|ai.mit.e|
|00000030| 64 75 20 6f 6e 20 4d 6f | 6e 20 4a 75 6c 20 20 35 |du on Mo|n Jul 5|
|00000040| 20 32 32 3a 33 36 3a 35 | 35 20 31 39 39 33 0a 3b | 22:36:5|5 1993.;|
|00000050| 3b 3b 20 66 72 6f 6d 20 | 66 69 6c 65 20 2f 67 64 |;; from |file /gd|
|00000060| 2f 67 6e 75 2f 65 6d 61 | 63 73 2f 31 39 2e 30 2f |/gnu/ema|cs/19.0/|
|00000070| 6c 69 73 70 2f 63 6f 6f | 6b 69 65 31 2e 65 6c 0a |lisp/coo|kie1.el.|
|00000080| 3b 3b 3b 20 65 6d 61 63 | 73 20 76 65 72 73 69 6f |;;; emac|s versio|
|00000090| 6e 20 31 39 2e 31 35 2e | 31 36 2e 0a 3b 3b 3b 20 |n 19.15.|16..;;; |
|000000a0| 62 79 74 65 63 6f 6d 70 | 20 76 65 72 73 69 6f 6e |bytecomp| version|
|000000b0| 20 46 53 46 20 32 2e 31 | 30 0a 3b 3b 3b 20 6f 70 | FSF 2.1|0.;;; op|
|000000c0| 74 69 6d 69 7a 61 74 69 | 6f 6e 20 69 73 20 6f 6e |timizati|on is on|
|000000d0| 2e 0a 3b 3b 3b 20 74 68 | 69 73 20 66 69 6c 65 20 |..;;; th|is file |
|000000e0| 75 73 65 73 20 6f 70 63 | 6f 64 65 73 20 77 68 69 |uses opc|odes whi|
|000000f0| 63 68 20 64 6f 20 6e 6f | 74 20 65 78 69 73 74 20 |ch do no|t exist |
|00000100| 69 6e 20 45 6d 61 63 73 | 20 31 38 2e 0a 0a 28 69 |in Emacs| 18...(i|
|00000110| 66 20 28 61 6e 64 20 28 | 62 6f 75 6e 64 70 20 27 |f (and (|boundp '|
|00000120| 65 6d 61 63 73 2d 76 65 | 72 73 69 6f 6e 29 0a 09 |emacs-ve|rsion)..|
|00000130| 20 28 6f 72 20 28 61 6e | 64 20 28 62 6f 75 6e 64 | (or (an|d (bound|
|00000140| 70 20 27 65 70 6f 63 68 | 3a 3a 76 65 72 73 69 6f |p 'epoch|::versio|
|00000150| 6e 29 20 65 70 6f 63 68 | 3a 3a 76 65 72 73 69 6f |n) epoch|::versio|
|00000160| 6e 29 0a 09 20 20 20 20 | 20 28 73 74 72 69 6e 67 |n).. | (string|
|00000170| 2d 6c 65 73 73 70 20 65 | 6d 61 63 73 2d 76 65 72 |-lessp e|macs-ver|
|00000180| 73 69 6f 6e 20 22 31 39 | 22 29 29 29 0a 20 20 20 |sion "19|"))). |
|00000190| 20 28 65 72 72 6f 72 20 | 22 54 68 69 73 20 66 69 | (error |"This fi|
|000001a0| 6c 65 20 77 61 73 20 63 | 6f 6d 70 69 6c 65 64 20 |le was c|ompiled |
|000001b0| 66 6f 72 20 45 6d 61 63 | 73 20 31 39 22 29 29 0a |for Emac|s 19")).|
|000001c0| 0a 28 72 61 6e 64 6f 6d | 20 74 29 0a 28 64 65 66 |.(random| t).(def|
|000001d0| 63 6f 6e 73 74 20 63 6f | 6f 6b 69 65 2d 64 65 6c |const co|okie-del|
|000001e0| 69 6d 69 74 65 72 20 22 | 5c 6e 25 25 5c 6e 5c 5c |imiter "|\n%%\n\\|
|000001f0| 7c 00 22 20 22 5c 0a 44 | 65 6c 69 6d 69 74 65 72 ||." "\.D|elimiter|
|00000200| 20 75 73 65 64 20 74 6f | 20 73 65 70 61 72 61 74 | used to| separat|
|00000210| 65 20 63 6f 6f 6b 69 65 | 20 66 69 6c 65 20 65 6e |e cookie| file en|
|00000220| 74 72 69 65 73 2e 22 29 | 0a 28 64 65 66 61 6c 69 |tries.")|.(defali|
|00000230| 61 73 20 27 63 6f 6f 6b | 69 65 20 23 5b 28 70 68 |as 'cook|ie #[(ph|
|00000240| 72 61 73 65 2d 66 69 6c | 65 20 73 74 61 72 74 6d |rase-fil|e startm|
|00000250| 73 67 20 65 6e 64 6d 73 | 67 29 20 22 c0 09 5c 6e |sg endms|g) "..\n|
|00000260| 0b 23 1c c5 0c 21 88 0c | c6 48 29 87 22 20 5b 63 |.#...!..|.H)." [c|
|00000270| 6f 6f 6b 69 65 2d 73 6e | 61 72 66 20 70 68 72 61 |ookie-sn|arf phra|
|00000280| 73 65 2d 66 69 6c 65 20 | 73 74 61 72 74 6d 73 67 |se-file |startmsg|
|00000290| 20 65 6e 64 6d 73 67 20 | 63 6f 6f 6b 69 65 2d 76 | endmsg |cookie-v|
|000002a0| 65 63 74 6f 72 20 73 68 | 75 66 66 6c 65 2d 76 65 |ector sh|uffle-ve|
|000002b0| 63 74 6f 72 20 31 5d 20 | 34 20 22 5c 0a 52 65 74 |ctor 1] |4 "\.Ret|
|000002c0| 75 72 6e 20 61 20 72 61 | 6e 64 6f 6d 20 70 68 72 |urn a ra|ndom phr|
|000002d0| 61 73 65 20 66 72 6f 6d | 20 50 48 52 41 53 45 2d |ase from| PHRASE-|
|000002e0| 46 49 4c 45 2e 20 20 57 | 68 65 6e 20 74 68 65 20 |FILE. W|hen the |
|000002f0| 70 68 72 61 73 65 20 66 | 69 6c 65 0a 69 73 20 72 |phrase f|ile.is r|
|00000300| 65 61 64 20 69 6e 2c 20 | 64 69 73 70 6c 61 79 20 |ead in, |display |
|00000310| 53 54 41 52 54 4d 53 47 | 20 61 74 20 62 65 67 69 |STARTMSG| at begi|
|00000320| 6e 6e 69 6e 67 20 6f 66 | 20 6c 6f 61 64 2c 20 45 |nning of| load, E|
|00000330| 4e 44 4d 53 47 20 61 74 | 20 65 6e 64 2e 22 5d 29 |NDMSG at| end."])|
|00000340| 0a 28 64 65 66 61 6c 69 | 61 73 20 27 63 6f 6f 6b |.(defali|as 'cook|
|00000350| 69 65 2d 69 6e 73 65 72 | 74 20 23 5b 28 70 68 72 |ie-inser|t #[(phr|
|00000360| 61 73 65 2d 66 69 6c 65 | 20 26 6f 70 74 69 6f 6e |ase-file| &option|
|00000370| 61 6c 20 63 6f 75 6e 74 | 20 73 74 61 72 74 6d 73 |al count| startms|
|00000380| 67 20 65 6e 64 6d 73 67 | 29 20 22 c0 09 5c 6e 0b |g endmsg|) "..\n.|
|00000390| 23 1c c5 0c 21 88 60 1e | 06 c7 63 88 c8 0c 47 c9 |#...!.`.|..c...G.|
|000003a0| 5a 0e 5c 6e 86 1b 00 c9 | 5e 0c 5c 22 88 c7 63 88 |Z.\n....|^.\"..c.|
|000003b0| cb 0e 06 60 cc 23 2a 87 | 22 20 5b 63 6f 6f 6b 69 |...`.#*.|" [cooki|
|000003c0| 65 2d 73 6e 61 72 66 20 | 70 68 72 61 73 65 2d 66 |e-snarf |phrase-f|
|000003d0| 69 6c 65 20 73 74 61 72 | 74 6d 73 67 20 65 6e 64 |ile star|tmsg end|
|000003e0| 6d 73 67 20 63 6f 6f 6b | 69 65 2d 76 65 63 74 6f |msg cook|ie-vecto|
|000003f0| 72 20 73 68 75 66 66 6c | 65 2d 76 65 63 74 6f 72 |r shuffl|e-vector|
|00000400| 20 73 74 61 72 74 20 31 | 30 20 63 6f 6f 6b 69 65 | start 1|0 cookie|
|00000410| 31 20 31 20 63 6f 75 6e | 74 20 66 69 6c 6c 2d 72 |1 1 coun|t fill-r|
|00000420| 65 67 69 6f 6e 2d 61 73 | 2d 70 61 72 61 67 72 61 |egion-as|-paragra|
|00000430| 70 68 20 6e 69 6c 5d 20 | 34 20 22 5c 0a 49 6e 73 |ph nil] |4 "\.Ins|
|00000440| 65 72 74 20 72 61 6e 64 | 6f 6d 20 70 68 72 61 73 |ert rand|om phras|
|00000450| 65 73 20 66 72 6f 6d 20 | 50 48 52 41 53 45 2d 46 |es from |PHRASE-F|
|00000460| 49 4c 45 3b 20 43 4f 55 | 4e 54 20 6f 66 20 74 68 |ILE; COU|NT of th|
|00000470| 65 6d 2e 20 20 57 68 65 | 6e 20 74 68 65 20 70 68 |em. Whe|n the ph|
|00000480| 72 61 73 65 20 66 69 6c | 65 0a 69 73 20 72 65 61 |rase fil|e.is rea|
|00000490| 64 20 69 6e 2c 20 64 69 | 73 70 6c 61 79 20 53 54 |d in, di|splay ST|
|000004a0| 41 52 54 4d 53 47 20 61 | 74 20 62 65 67 69 6e 6e |ARTMSG a|t beginn|
|000004b0| 69 6e 67 20 6f 66 20 6c | 6f 61 64 2c 20 45 4e 44 |ing of l|oad, END|
|000004c0| 4d 53 47 20 61 74 20 65 | 6e 64 2e 22 5d 29 0a 28 |MSG at e|nd."]).(|
|000004d0| 64 65 66 61 6c 69 61 73 | 20 27 63 6f 6f 6b 69 65 |defalias| 'cookie|
|000004e0| 31 20 23 5b 28 61 72 67 | 20 63 6f 6f 6b 69 65 2d |1 #[(arg| cookie-|
|000004f0| 76 65 63 29 20 22 08 c1 | 55 83 08 00 c2 87 0b 08 |vec) "..|U.......|
|00000500| 48 63 88 c4 63 88 c5 08 | 53 0b 5c 22 87 22 20 5b |Hc..c...|S.\"." [|
|00000510| 61 72 67 20 30 20 74 20 | 63 6f 6f 6b 69 65 2d 76 |arg 0 t |cookie-v|
|00000520| 65 63 20 22 20 22 20 63 | 6f 6f 6b 69 65 31 5d 20 |ec " " c|ookie1] |
|00000530| 33 20 22 5c 0a 49 6e 73 | 65 72 74 73 20 61 20 63 |3 "\.Ins|erts a c|
|00000540| 6f 6f 6b 69 65 20 70 68 | 72 61 73 65 20 41 52 47 |ookie ph|rase ARG|
|00000550| 20 74 69 6d 65 73 2e 22 | 5d 29 0a 28 64 65 66 61 | times."|]).(defa|
|00000560| 6c 69 61 73 20 27 63 6f | 6f 6b 69 65 2d 73 6e 61 |lias 'co|okie-sna|
|00000570| 72 66 20 23 5b 28 70 68 | 72 61 73 65 2d 66 69 6c |rf #[(ph|rase-fil|
|00000580| 65 20 73 74 61 72 74 6d | 73 67 20 65 6e 64 6d 73 |e startm|sg endms|
|00000590| 67 29 20 22 c0 c1 5c 6e | 21 21 83 0e 00 c3 c1 5c |g) "..\n|!!.....\|
|000005a0| 6e 21 21 87 c4 0d 21 88 | 8a c6 c7 21 c8 1e 09 89 |n!!...!.|...!....|
|000005b0| 1e 5c 6e 71 88 cb cc 5c | 6e 21 21 88 cd 0e 0e 21 |.\nq...\|n!!....!|
|000005c0| 88 cf c8 77 88 6d 84 47 | 00 60 1e 10 cd 0e 0e 21 |...w.m.G|.`.....!|
|000005d0| 88 0e 10 60 53 7b 0e 09 | 42 16 09 29 82 29 00 d1 |...`S{..|B..).)..|
|000005e0| 0e 5c 6e 21 88 c4 0e 12 | 21 88 c1 5c 6e 21 d3 d4 |.\n!....|!..\n!..|
|000005f0| 0e 09 5c 22 4c 2b 87 22 | 20 5b 62 6f 75 6e 64 70 |..\"L+."| [boundp|
|00000600| 20 69 6e 74 65 72 6e 20 | 70 68 72 61 73 65 2d 66 | intern |phrase-f|
|00000610| 69 6c 65 20 65 76 61 6c | 20 6d 65 73 73 61 67 65 |ile eval| message|
|00000620| 20 73 74 61 72 74 6d 73 | 67 20 67 65 6e 65 72 61 | startms|g genera|
|00000630| 74 65 2d 6e 65 77 2d 62 | 75 66 66 65 72 20 22 2a |te-new-b|uffer "*|
|00000640| 63 6f 6f 6b 69 65 2a 22 | 20 6e 69 6c 20 72 65 73 |cookie*"| nil res|
|00000650| 75 6c 74 20 62 75 66 20 | 69 6e 73 65 72 74 2d 66 |ult buf |insert-f|
|00000660| 69 6c 65 2d 63 6f 6e 74 | 65 6e 74 73 20 65 78 70 |ile-cont|ents exp|
|00000670| 61 6e 64 2d 66 69 6c 65 | 2d 6e 61 6d 65 20 72 65 |and-file|-name re|
|00000680| 2d 73 65 61 72 63 68 2d | 66 6f 72 77 61 72 64 20 |-search-|forward |
|00000690| 63 6f 6f 6b 69 65 2d 64 | 65 6c 69 6d 69 74 65 72 |cookie-d|elimiter|
|000006a0| 20 22 20 09 5c 6e 0d 0c | 22 20 62 65 67 20 6b 69 | " .\n..|" beg ki|
|000006b0| 6c 6c 2d 62 75 66 66 65 | 72 20 65 6e 64 6d 73 67 |ll-buffe|r endmsg|
|000006c0| 20 61 70 70 6c 79 20 76 | 65 63 74 6f 72 5d 20 35 | apply v|ector] 5|
|000006d0| 20 22 5c 0a 52 65 61 64 | 73 20 69 6e 20 74 68 65 | "\.Read|s in the|
|000006e0| 20 50 48 52 41 53 45 2d | 46 49 4c 45 2c 20 72 65 | PHRASE-|FILE, re|
|000006f0| 74 75 72 6e 73 20 69 74 | 20 61 73 20 61 20 76 65 |turns it| as a ve|
|00000700| 63 74 6f 72 20 6f 66 20 | 73 74 72 69 6e 67 73 2e |ctor of |strings.|
|00000710| 20 20 45 6d 69 74 0a 53 | 54 41 52 54 4d 53 47 20 | Emit.S|TARTMSG |
|00000720| 61 6e 64 20 45 4e 44 4d | 53 47 20 62 65 66 6f 72 |and ENDM|SG befor|
|00000730| 65 20 61 6e 64 20 61 66 | 74 65 72 2e 20 20 43 61 |e and af|ter. Ca|
|00000740| 63 68 65 73 20 74 68 65 | 20 72 65 73 75 6c 74 3b |ches the| result;|
|00000750| 20 73 65 63 6f 6e 64 20 | 61 6e 64 0a 73 75 62 73 | second |and.subs|
|00000760| 65 71 75 65 6e 74 20 63 | 61 6c 6c 73 20 6f 6e 20 |equent c|alls on |
|00000770| 74 68 65 20 73 61 6d 65 | 20 66 69 6c 65 20 77 6f |the same| file wo|
|00000780| 6e 27 74 20 67 6f 20 74 | 6f 20 64 69 73 6b 2e 22 |n't go t|o disk."|
|00000790| 5d 29 0a 28 64 65 66 61 | 6c 69 61 73 20 27 70 69 |]).(defa|lias 'pi|
|000007a0| 63 6b 2d 72 61 6e 64 6f | 6d 20 23 5b 28 6e 29 20 |ck-rando|m #[(n) |
|000007b0| 22 c0 c1 20 c2 5c 22 0b | a6 87 22 20 5b 6c 6f 67 |".. .\".|.." [log|
|000007c0| 61 6e 64 20 72 61 6e 64 | 6f 6d 20 37 37 37 37 37 |and rand|om 77777|
|000007d0| 37 20 6e 5d 20 33 20 22 | 5c 0a 52 65 74 75 72 6e |7 n] 3 "|\.Return|
|000007e0| 73 20 61 20 72 61 6e 64 | 6f 6d 20 6e 75 6d 62 65 |s a rand|om numbe|
|000007f0| 72 20 66 72 6f 6d 20 30 | 20 74 6f 20 4e 2d 31 20 |r from 0| to N-1 |
|00000800| 69 6e 63 6c 75 73 69 76 | 65 2e 22 5d 29 0a 28 64 |inclusiv|e."]).(d|
|00000810| 65 66 61 6c 69 61 73 20 | 27 73 68 75 66 66 6c 65 |efalias |'shuffle|
|00000820| 2d 76 65 63 74 6f 72 20 | 23 5b 28 76 65 63 74 6f |-vector |#[(vecto|
|00000830| 72 29 20 22 c0 c1 89 5c | 6e 47 1b 1c 1d 89 1e 06 |r) "...\|nG......|
|00000840| 0b 57 83 35 00 0e 06 c7 | 0b 0e 06 5a 21 5c 5c 15 |.W.5....|...Z!\\.|
|00000850| 5c 6e 0e 06 48 14 5c 6e | 0e 06 5c 6e 0d 48 49 88 |\n..H.\n|..\n.HI.|
|00000860| 5c 6e 0d 0c 49 88 0e 06 | 54 89 16 06 82 0b 00 2c |\n..I...|T......,|
|00000870| 5c 6e 87 22 20 5b 30 20 | 6e 69 6c 20 76 65 63 74 |\n." [0 |nil vect|
|00000880| 6f 72 20 6c 65 6e 20 74 | 65 6d 70 20 6a 20 69 20 |or len t|emp j i |
|00000890| 70 69 63 6b 2d 72 61 6e | 64 6f 6d 5d 20 35 20 22 |pick-ran|dom] 5 "|
|000008a0| 5c 0a 52 61 6e 64 6f 6d | 6c 79 20 70 65 72 6d 75 |\.Random|ly permu|
|000008b0| 74 65 20 74 68 65 20 65 | 6c 65 6d 65 6e 74 73 20 |te the e|lements |
|000008c0| 6f 66 20 56 45 43 54 4f | 52 20 28 61 6c 6c 20 70 |of VECTO|R (all p|
|000008d0| 65 72 6d 75 74 61 74 69 | 6f 6e 73 20 65 71 75 61 |ermutati|ons equa|
|000008e0| 6c 6c 79 20 6c 69 6b 65 | 6c 79 29 22 5d 29 0a 28 |lly like|ly)"]).(|
|000008f0| 70 72 6f 76 69 64 65 20 | 28 71 75 6f 74 65 20 63 |provide |(quote c|
|00000900| 6f 6f 6b 69 65 31 29 29 | 0a |ookie1))|. |
+--------+-------------------------+-------------------------+--------+--------+