home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: SHell self-extracting ARchive
(archive/shar).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Newsgroup Content (archive/news)
| magic
| Supported |
100%
| dexvert
| SHell self-extracting ARchive (archive/shar)
| magic
| Supported |
100%
| dexvert
| Internet Message Format (text/imf)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| news or mail text
| default
| |
99%
| file
| C source text
| default
| |
98%
| file
| C source, ASCII text
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/329 Shell Archive Format
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 44 61 74 65 3a 20 57 65 | 64 2c 20 31 33 20 4d 61 |Date: We|d, 13 Ma|
|00000010| 72 20 38 35 20 31 36 3a | 35 36 3a 34 31 20 70 73 |r 85 16:|56:41 ps|
|00000020| 74 0a 46 72 6f 6d 3a 20 | 64 65 63 76 61 78 21 75 |t.From: |decvax!u|
|00000030| 63 62 76 61 78 21 55 43 | 42 4a 41 44 45 21 75 63 |cbvax!UC|BJADE!uc|
|00000040| 62 6a 61 64 65 3a 6d 77 | 6d 20 28 4d 69 6b 65 20 |bjade:mw|m (Mike |
|00000050| 4d 65 79 65 72 29 0a 53 | 75 62 6a 65 63 74 3a 20 |Meyer).S|ubject: |
|00000060| 58 4c 49 53 50 20 31 2e | 34 20 70 61 72 74 20 33 |XLISP 1.|4 part 3|
|00000070| 20 28 6f 66 20 34 29 0a | 0a 0a 23 21 20 2f 62 69 | (of 4).|..#! /bi|
|00000080| 6e 2f 73 68 0a 23 20 54 | 68 69 73 20 69 73 20 61 |n/sh.# T|his is a|
|00000090| 20 73 68 65 6c 6c 20 61 | 72 63 68 69 76 65 2c 20 | shell a|rchive, |
|000000a0| 6d 65 61 6e 69 6e 67 3a | 0a 23 20 31 2e 20 52 65 |meaning:|.# 1. Re|
|000000b0| 6d 6f 76 65 20 65 76 65 | 72 79 74 68 69 6e 67 20 |move eve|rything |
|000000c0| 61 62 6f 76 65 20 74 68 | 65 20 23 21 20 2f 62 69 |above th|e #! /bi|
|000000d0| 6e 2f 73 68 20 6c 69 6e | 65 2e 0a 23 20 32 2e 20 |n/sh lin|e..# 2. |
|000000e0| 53 61 76 65 20 74 68 65 | 20 72 65 73 75 6c 74 69 |Save the| resulti|
|000000f0| 6e 67 20 74 65 78 74 20 | 69 6e 20 61 20 66 69 6c |ng text |in a fil|
|00000100| 65 2e 0a 23 20 33 2e 20 | 45 78 65 63 75 74 65 20 |e..# 3. |Execute |
|00000110| 74 68 65 20 66 69 6c 65 | 20 77 69 74 68 20 2f 62 |the file| with /b|
|00000120| 69 6e 2f 73 68 20 28 6e | 6f 74 20 63 73 68 29 20 |in/sh (n|ot csh) |
|00000130| 74 6f 20 63 72 65 61 74 | 65 20 74 68 65 20 66 69 |to creat|e the fi|
|00000140| 6c 65 73 3a 0a 23 09 78 | 6c 64 6d 65 6d 2e 63 0a |les:.#.x|ldmem.c.|
|00000150| 23 09 78 6c 65 76 61 6c | 2e 63 0a 23 09 78 6c 66 |#.xleval|.c.#.xlf|
|00000160| 69 6f 2e 63 0a 23 09 78 | 6c 66 74 61 62 2e 63 0a |io.c.#.x|lftab.c.|
|00000170| 23 09 78 6c 67 6c 6f 62 | 2e 63 0a 23 09 78 6c 69 |#.xlglob|.c.#.xli|
|00000180| 6e 69 74 2e 63 0a 23 09 | 78 6c 69 6f 2e 63 0a 23 |nit.c.#.|xlio.c.#|
|00000190| 09 78 6c 69 73 70 2e 63 | 0a 23 09 78 6c 6a 75 6d |.xlisp.c|.#.xljum|
|000001a0| 70 2e 63 0a 23 09 78 6c | 6d 61 74 68 2e 63 0a 23 |p.c.#.xl|math.c.#|
|000001b0| 09 78 6c 70 72 69 6e 2e | 63 0a 23 09 78 6c 72 65 |.xlprin.|c.#.xlre|
|000001c0| 61 64 2e 63 0a 23 20 54 | 68 69 73 20 61 72 63 68 |ad.c.# T|his arch|
|000001d0| 69 76 65 20 63 72 65 61 | 74 65 64 3a 20 4d 6f 6e |ive crea|ted: Mon|
|000001e0| 20 44 65 63 20 20 32 20 | 31 30 3a 31 37 3a 33 38 | Dec 2 |10:17:38|
|000001f0| 20 31 39 38 35 0a 65 78 | 70 6f 72 74 20 50 41 54 | 1985.ex|port PAT|
|00000200| 48 3b 20 50 41 54 48 3d | 2f 62 69 6e 3a 24 50 41 |H; PATH=|/bin:$PA|
|00000210| 54 48 0a 65 63 68 6f 20 | 73 68 61 72 3a 20 65 78 |TH.echo |shar: ex|
|00000220| 74 72 61 63 74 69 6e 67 | 20 22 27 78 6c 64 6d 65 |tracting| "'xldme|
|00000230| 6d 2e 63 27 22 20 27 28 | 36 35 35 32 20 63 68 61 |m.c'" '(|6552 cha|
|00000240| 72 61 63 74 65 72 73 29 | 27 0a 69 66 20 74 65 73 |racters)|'.if tes|
|00000250| 74 20 2d 66 20 27 78 6c | 64 6d 65 6d 2e 63 27 0a |t -f 'xl|dmem.c'.|
|00000260| 74 68 65 6e 0a 09 65 63 | 68 6f 20 73 68 61 72 3a |then..ec|ho shar:|
|00000270| 20 77 69 6c 6c 20 6e 6f | 74 20 6f 76 65 72 2d 77 | will no|t over-w|
|00000280| 72 69 74 65 20 65 78 69 | 73 74 69 6e 67 20 66 69 |rite exi|sting fi|
|00000290| 6c 65 20 22 27 78 6c 64 | 6d 65 6d 2e 63 27 22 0a |le "'xld|mem.c'".|
|000002a0| 65 6c 73 65 0a 73 65 64 | 20 27 73 2f 5e 58 2f 2f |else.sed| 's/^X//|
|000002b0| 27 20 3c 3c 20 5c 53 48 | 41 52 5f 45 4f 46 20 3e |' << \SH|AR_EOF >|
|000002c0| 20 27 78 6c 64 6d 65 6d | 2e 63 27 0a 2f 2a 20 78 | 'xldmem|.c'./* x|
|000002d0| 6c 64 6d 65 6d 20 2d 20 | 78 6c 69 73 70 20 64 79 |ldmem - |xlisp dy|
|000002e0| 6e 61 6d 69 63 20 6d 65 | 6d 6f 72 79 20 6d 61 6e |namic me|mory man|
|000002f0| 61 67 65 6d 65 6e 74 20 | 72 6f 75 74 69 6e 65 73 |agement |routines|
|00000300| 20 2a 2f 0a 0a 23 69 6e | 63 6c 75 64 65 20 22 78 | */..#in|clude "x|
|00000310| 6c 69 73 70 2e 68 22 0a | 0a 2f 2a 20 75 73 65 66 |lisp.h".|./* usef|
|00000320| 75 6c 20 64 65 66 69 6e | 69 74 69 6f 6e 73 20 2a |ul defin|itions *|
|00000330| 2f 0a 23 64 65 66 69 6e | 65 20 41 4c 4c 4f 43 53 |/.#defin|e ALLOCS|
|00000340| 49 5a 45 20 28 73 69 7a | 65 6f 66 28 73 74 72 75 |IZE (siz|eof(stru|
|00000350| 63 74 20 73 65 67 6d 65 | 6e 74 29 20 2b 20 28 61 |ct segme|nt) + (a|
|00000360| 6e 6f 64 65 73 2d 31 29 | 20 2a 20 73 69 7a 65 6f |nodes-1)| * sizeo|
|00000370| 66 28 4e 4f 44 45 29 29 | 0a 0a 2f 2a 20 65 78 74 |f(NODE))|../* ext|
|00000380| 65 72 6e 61 6c 20 76 61 | 72 69 61 62 6c 65 73 20 |ernal va|riables |
|00000390| 2a 2f 0a 65 78 74 65 72 | 6e 20 4e 4f 44 45 20 2a |*/.exter|n NODE *|
|000003a0| 6f 62 6c 69 73 74 2c 2a | 6b 65 79 6c 69 73 74 3b |oblist,*|keylist;|
|000003b0| 0a 65 78 74 65 72 6e 20 | 4e 4f 44 45 20 2a 78 6c |.extern |NODE *xl|
|000003c0| 73 74 61 63 6b 3b 0a 65 | 78 74 65 72 6e 20 4e 4f |stack;.e|xtern NO|
|000003d0| 44 45 20 2a 78 6c 65 6e | 76 2c 2a 78 6c 6e 65 77 |DE *xlen|v,*xlnew|
|000003e0| 65 6e 76 3b 0a 65 78 74 | 65 72 6e 20 6c 6f 6e 67 |env;.ext|ern long|
|000003f0| 20 74 6f 74 61 6c 3b 0a | 65 78 74 65 72 6e 20 69 | total;.|extern i|
|00000400| 6e 74 20 61 6e 6f 64 65 | 73 2c 6e 6e 6f 64 65 73 |nt anode|s,nnodes|
|00000410| 2c 6e 73 65 67 73 2c 6e | 66 72 65 65 2c 67 63 63 |,nsegs,n|free,gcc|
|00000420| 61 6c 6c 73 3b 0a 65 78 | 74 65 72 6e 20 73 74 72 |alls;.ex|tern str|
|00000430| 75 63 74 20 73 65 67 6d | 65 6e 74 20 2a 73 65 67 |uct segm|ent *seg|
|00000440| 73 3b 0a 65 78 74 65 72 | 6e 20 4e 4f 44 45 20 2a |s;.exter|n NODE *|
|00000450| 66 6e 6f 64 65 73 3b 0a | 0a 2f 2a 20 65 78 74 65 |fnodes;.|./* exte|
|00000460| 72 6e 61 6c 20 70 72 6f | 63 65 64 75 72 65 73 20 |rnal pro|cedures |
|00000470| 2a 2f 0a 65 78 74 65 72 | 6e 20 63 68 61 72 20 2a |*/.exter|n char *|
|00000480| 6d 61 6c 6c 6f 63 28 29 | 3b 0a 65 78 74 65 72 6e |malloc()|;.extern|
|00000490| 20 63 68 61 72 20 2a 63 | 61 6c 6c 6f 63 28 29 3b | char *c|alloc();|
|000004a0| 0a 0a 2f 2a 20 6e 65 77 | 6e 6f 64 65 20 2d 20 61 |../* new|node - a|
|000004b0| 6c 6c 6f 63 61 74 65 20 | 61 20 6e 65 77 20 6e 6f |llocate |a new no|
|000004c0| 64 65 20 2a 2f 0a 4e 4f | 44 45 20 2a 6e 65 77 6e |de */.NO|DE *newn|
|000004d0| 6f 64 65 28 74 79 70 65 | 29 0a 20 20 69 6e 74 20 |ode(type|). int |
|000004e0| 74 79 70 65 3b 0a 7b 0a | 20 20 20 20 4e 4f 44 45 |type;.{.| NODE|
|000004f0| 20 2a 6e 6e 6f 64 65 3b | 0a 0a 20 20 20 20 2f 2a | *nnode;|.. /*|
|00000500| 20 67 65 74 20 61 20 66 | 72 65 65 20 6e 6f 64 65 | get a f|ree node|
|00000510| 20 2a 2f 0a 20 20 20 20 | 69 66 20 28 28 6e 6e 6f | */. |if ((nno|
|00000520| 64 65 20 3d 20 66 6e 6f | 64 65 73 29 20 3d 3d 20 |de = fno|des) == |
|00000530| 4e 49 4c 29 20 7b 0a 09 | 67 63 28 29 3b 0a 09 69 |NIL) {..|gc();..i|
|00000540| 66 20 28 28 6e 6e 6f 64 | 65 20 3d 20 66 6e 6f 64 |f ((nnod|e = fnod|
|00000550| 65 73 29 20 3d 3d 20 4e | 49 4c 29 0a 09 20 20 20 |es) == N|IL).. |
|00000560| 20 78 6c 61 62 6f 72 74 | 28 22 69 6e 73 75 66 66 | xlabort|("insuff|
|00000570| 69 63 69 65 6e 74 20 6e | 6f 64 65 20 73 70 61 63 |icient n|ode spac|
|00000580| 65 22 29 3b 0a 20 20 20 | 20 7d 0a 0a 20 20 20 20 |e");. | }.. |
|00000590| 2f 2a 20 75 6e 6c 69 6e | 6b 20 74 68 65 20 6e 6f |/* unlin|k the no|
|000005a0| 64 65 20 66 72 6f 6d 20 | 74 68 65 20 66 72 65 65 |de from |the free|
|000005b0| 20 6c 69 73 74 20 2a 2f | 0a 20 20 20 20 66 6e 6f | list */|. fno|
|000005c0| 64 65 73 20 3d 20 63 64 | 72 28 6e 6e 6f 64 65 29 |des = cd|r(nnode)|
|000005d0| 3b 0a 20 20 20 20 6e 66 | 72 65 65 20 2d 3d 20 31 |;. nf|ree -= 1|
|000005e0| 3b 0a 0a 20 20 20 20 2f | 2a 20 69 6e 69 74 69 61 |;.. /|* initia|
|000005f0| 6c 69 7a 65 20 74 68 65 | 20 6e 65 77 20 6e 6f 64 |lize the| new nod|
|00000600| 65 20 2a 2f 0a 20 20 20 | 20 6e 6e 6f 64 65 2d 3e |e */. | nnode->|
|00000610| 6e 5f 74 79 70 65 20 3d | 20 74 79 70 65 3b 0a 20 |n_type =| type;. |
|00000620| 20 20 20 72 70 6c 61 63 | 64 28 6e 6e 6f 64 65 2c | rplac|d(nnode,|
|00000630| 4e 49 4c 29 3b 0a 0a 20 | 20 20 20 2f 2a 20 72 65 |NIL);.. | /* re|
|00000640| 74 75 72 6e 20 74 68 65 | 20 6e 65 77 20 6e 6f 64 |turn the| new nod|
|00000650| 65 20 2a 2f 0a 20 20 20 | 20 72 65 74 75 72 6e 20 |e */. | return |
|00000660| 28 6e 6e 6f 64 65 29 3b | 0a 7d 0a 0a 2f 2a 20 73 |(nnode);|.}../* s|
|00000670| 74 72 61 6c 6c 6f 63 20 | 2d 20 61 6c 6c 6f 63 61 |tralloc |- alloca|
|00000680| 74 65 20 6d 65 6d 6f 72 | 79 20 66 6f 72 20 61 20 |te memor|y for a |
|00000690| 73 74 72 69 6e 67 20 61 | 64 64 69 6e 67 20 61 20 |string a|dding a |
|000006a0| 62 79 74 65 20 66 6f 72 | 20 74 68 65 20 74 65 72 |byte for| the ter|
|000006b0| 6d 69 6e 61 74 6f 72 20 | 2a 2f 0a 63 68 61 72 20 |minator |*/.char |
|000006c0| 2a 73 74 72 61 6c 6c 6f | 63 28 73 69 7a 65 29 0a |*strallo|c(size).|
|000006d0| 20 20 69 6e 74 20 73 69 | 7a 65 3b 0a 7b 0a 20 20 | int si|ze;.{. |
|000006e0| 20 20 63 68 61 72 20 2a | 73 70 74 72 3b 0a 0a 20 | char *|sptr;.. |
|000006f0| 20 20 20 2f 2a 20 61 6c | 6c 6f 63 61 74 65 20 6d | /* al|locate m|
|00000700| 65 6d 6f 72 79 20 66 6f | 72 20 74 68 65 20 73 74 |emory fo|r the st|
|00000710| 72 69 6e 67 20 63 6f 70 | 79 20 2a 2f 0a 20 20 20 |ring cop|y */. |
|00000720| 20 69 66 20 28 28 73 70 | 74 72 20 3d 20 6d 61 6c | if ((sp|tr = mal|
|00000730| 6c 6f 63 28 73 69 7a 65 | 2b 31 29 29 20 3d 3d 20 |loc(size|+1)) == |
|00000740| 4e 55 4c 4c 29 20 7b 0a | 09 67 63 28 29 3b 0a 09 |NULL) {.|.gc();..|
|00000750| 69 66 20 28 28 73 70 74 | 72 20 3d 20 6d 61 6c 6c |if ((spt|r = mall|
|00000760| 6f 63 28 73 69 7a 65 2b | 31 29 29 20 3d 3d 20 4e |oc(size+|1)) == N|
|00000770| 55 4c 4c 29 0a 09 20 20 | 20 20 78 6c 66 61 69 6c |ULL).. | xlfail|
|00000780| 28 22 69 6e 73 75 66 66 | 69 63 69 65 6e 74 20 73 |("insuff|icient s|
|00000790| 74 72 69 6e 67 20 73 70 | 61 63 65 22 29 3b 0a 20 |tring sp|ace");. |
|000007a0| 20 20 20 7d 0a 20 20 20 | 20 74 6f 74 61 6c 20 2b | }. | total +|
|000007b0| 3d 20 28 6c 6f 6e 67 29 | 20 28 73 69 7a 65 2b 31 |= (long)| (size+1|
|000007c0| 29 3b 0a 0a 20 20 20 20 | 2f 2a 20 72 65 74 75 72 |);.. |/* retur|
|000007d0| 6e 20 74 68 65 20 6e 65 | 77 20 73 74 72 69 6e 67 |n the ne|w string|
|000007e0| 20 6d 65 6d 6f 72 79 20 | 2a 2f 0a 20 20 20 20 72 | memory |*/. r|
|000007f0| 65 74 75 72 6e 20 28 73 | 70 74 72 29 3b 0a 7d 0a |eturn (s|ptr);.}.|
|00000800| 0a 2f 2a 20 73 74 72 73 | 61 76 65 20 2d 20 67 65 |./* strs|ave - ge|
|00000810| 6e 65 72 61 74 65 20 61 | 20 64 79 6e 61 6d 69 63 |nerate a| dynamic|
|00000820| 20 63 6f 70 79 20 6f 66 | 20 61 20 73 74 72 69 6e | copy of| a strin|
|00000830| 67 20 2a 2f 0a 63 68 61 | 72 20 2a 73 74 72 73 61 |g */.cha|r *strsa|
|00000840| 76 65 28 73 74 72 29 0a | 20 20 63 68 61 72 20 2a |ve(str).| char *|
|00000850| 73 74 72 3b 0a 7b 0a 20 | 20 20 20 63 68 61 72 20 |str;.{. | char |
|00000860| 2a 73 70 74 72 3b 0a 0a | 20 20 20 20 2f 2a 20 63 |*sptr;..| /* c|
|00000870| 72 65 61 74 65 20 61 20 | 6e 65 77 20 73 74 72 69 |reate a |new stri|
|00000880| 6e 67 20 2a 2f 0a 20 20 | 20 20 73 70 74 72 20 3d |ng */. | sptr =|
|00000890| 20 73 74 72 61 6c 6c 6f | 63 28 73 74 72 6c 65 6e | strallo|c(strlen|
|000008a0| 28 73 74 72 29 29 3b 0a | 20 20 20 20 73 74 72 63 |(str));.| strc|
|000008b0| 70 79 28 73 70 74 72 2c | 73 74 72 29 3b 0a 0a 20 |py(sptr,|str);.. |
|000008c0| 20 20 20 2f 2a 20 72 65 | 74 75 72 6e 20 74 68 65 | /* re|turn the|
|000008d0| 20 6e 65 77 20 73 74 72 | 69 6e 67 20 2a 2f 0a 20 | new str|ing */. |
|000008e0| 20 20 20 72 65 74 75 72 | 6e 20 28 73 70 74 72 29 | retur|n (sptr)|
|000008f0| 3b 0a 7d 0a 0a 2f 2a 20 | 73 74 72 66 72 65 65 20 |;.}../* |strfree |
|00000900| 2d 20 66 72 65 65 20 73 | 74 72 69 6e 67 20 6d 65 |- free s|tring me|
|00000910| 6d 6f 72 79 20 2a 2f 0a | 73 74 72 66 72 65 65 28 |mory */.|strfree(|
|00000920| 73 74 72 29 0a 20 20 63 | 68 61 72 20 2a 73 74 72 |str). c|har *str|
|00000930| 3b 0a 7b 0a 20 20 20 20 | 74 6f 74 61 6c 20 2d 3d |;.{. |total -=|
|00000940| 20 28 6c 6f 6e 67 29 20 | 28 73 74 72 6c 65 6e 28 | (long) |(strlen(|
|00000950| 73 74 72 29 2b 31 29 3b | 0a 20 20 20 20 66 72 65 |str)+1);|. fre|
|00000960| 65 28 73 74 72 29 3b 0a | 7d 0a 0a 2f 2a 20 67 63 |e(str);.|}../* gc|
|00000970| 20 2d 20 67 61 72 62 61 | 67 65 20 63 6f 6c 6c 65 | - garba|ge colle|
|00000980| 63 74 20 2a 2f 0a 67 63 | 28 29 0a 7b 0a 20 20 20 |ct */.gc|().{. |
|00000990| 20 4e 4f 44 45 20 2a 70 | 3b 0a 0a 20 20 20 20 2f | NODE *p|;.. /|
|000009a0| 2a 20 6d 61 72 6b 20 61 | 6c 6c 20 61 63 63 65 73 |* mark a|ll acces|
|000009b0| 73 69 62 6c 65 20 6e 6f | 64 65 73 20 2a 2f 0a 20 |sible no|des */. |
|000009c0| 20 20 20 6d 61 72 6b 28 | 6f 62 6c 69 73 74 29 3b | mark(|oblist);|
|000009d0| 20 6d 61 72 6b 28 6b 65 | 79 6c 69 73 74 29 3b 0a | mark(ke|ylist);.|
|000009e0| 20 20 20 20 6d 61 72 6b | 28 78 6c 65 6e 76 29 3b | mark|(xlenv);|
|000009f0| 0a 20 20 20 20 6d 61 72 | 6b 28 78 6c 6e 65 77 65 |. mar|k(xlnewe|
|00000a00| 6e 76 29 3b 0a 0a 20 20 | 20 20 2f 2a 20 6d 61 72 |nv);.. | /* mar|
|00000a10| 6b 20 74 68 65 20 65 76 | 61 6c 75 61 74 69 6f 6e |k the ev|aluation|
|00000a20| 20 73 74 61 63 6b 20 2a | 2f 0a 20 20 20 20 66 6f | stack *|/. fo|
|00000a30| 72 20 28 70 20 3d 20 78 | 6c 73 74 61 63 6b 3b 20 |r (p = x|lstack; |
|00000a40| 70 3b 20 70 20 3d 20 63 | 64 72 28 70 29 29 0a 09 |p; p = c|dr(p))..|
|00000a50| 6d 61 72 6b 28 63 61 72 | 28 70 29 29 3b 0a 0a 20 |mark(car|(p));.. |
|00000a60| 20 20 20 2f 2a 20 73 77 | 65 65 70 20 6d 65 6d 6f | /* sw|eep memo|
|00000a70| 72 79 20 63 6f 6c 6c 65 | 63 74 69 6e 67 20 61 6c |ry colle|cting al|
|00000a80| 6c 20 75 6e 6d 61 72 6b | 65 64 20 6e 6f 64 65 73 |l unmark|ed nodes|
|00000a90| 20 2a 2f 0a 20 20 20 20 | 73 77 65 65 70 28 29 3b | */. |sweep();|
|00000aa0| 0a 0a 20 20 20 20 2f 2a | 20 69 66 20 74 68 65 72 |.. /*| if ther|
|00000ab0| 65 27 73 20 73 74 69 6c | 6c 20 6e 6f 74 68 69 6e |e's stil|l nothin|
|00000ac0| 67 20 61 76 61 69 6c 61 | 62 6c 65 2c 20 61 6c 6c |g availa|ble, all|
|00000ad0| 6f 63 61 74 65 20 6d 6f | 72 65 20 6d 65 6d 6f 72 |ocate mo|re memor|
|00000ae0| 79 20 2a 2f 0a 20 20 20 | 20 69 66 20 28 66 6e 6f |y */. | if (fno|
|00000af0| 64 65 73 20 3d 3d 20 4e | 49 4c 29 0a 09 61 64 64 |des == N|IL)..add|
|00000b00| 73 65 67 28 29 3b 0a 0a | 20 20 20 20 2f 2a 20 63 |seg();..| /* c|
|00000b10| 6f 75 6e 74 20 74 68 65 | 20 67 63 20 63 61 6c 6c |ount the| gc call|
|00000b20| 20 2a 2f 0a 20 20 20 20 | 67 63 63 61 6c 6c 73 2b | */. |gccalls+|
|00000b30| 2b 3b 0a 7d 0a 0a 2f 2a | 20 6d 61 72 6b 20 2d 20 |+;.}../*| mark - |
|00000b40| 6d 61 72 6b 20 61 6c 6c | 20 61 63 63 65 73 73 69 |mark all| accessi|
|00000b50| 62 6c 65 20 6e 6f 64 65 | 73 20 2a 2f 0a 4c 4f 43 |ble node|s */.LOC|
|00000b60| 41 4c 20 6d 61 72 6b 28 | 70 74 72 29 0a 20 20 4e |AL mark(|ptr). N|
|00000b70| 4f 44 45 20 2a 70 74 72 | 3b 0a 7b 0a 20 20 20 20 |ODE *ptr|;.{. |
|00000b80| 4e 4f 44 45 20 2a 74 68 | 69 73 2c 2a 70 72 65 76 |NODE *th|is,*prev|
|00000b90| 2c 2a 74 6d 70 3b 0a 0a | 20 20 20 20 2f 2a 20 6a |,*tmp;..| /* j|
|00000ba0| 75 73 74 20 72 65 74 75 | 72 6e 20 6f 6e 20 6e 69 |ust retu|rn on ni|
|00000bb0| 6c 20 2a 2f 0a 20 20 20 | 20 69 66 20 28 70 74 72 |l */. | if (ptr|
|00000bc0| 20 3d 3d 20 4e 49 4c 29 | 0a 09 72 65 74 75 72 6e | == NIL)|..return|
|00000bd0| 3b 0a 0a 20 20 20 20 2f | 2a 20 69 6e 69 74 69 61 |;.. /|* initia|
|00000be0| 6c 69 7a 65 20 2a 2f 0a | 20 20 20 20 70 72 65 76 |lize */.| prev|
|00000bf0| 20 3d 20 4e 49 4c 3b 0a | 20 20 20 20 74 68 69 73 | = NIL;.| this|
|00000c00| 20 3d 20 70 74 72 3b 0a | 0a 20 20 20 20 2f 2a 20 | = ptr;.|. /* |
|00000c10| 6d 61 72 6b 20 74 68 69 | 73 20 6c 69 73 74 20 2a |mark thi|s list *|
|00000c20| 2f 0a 20 20 20 20 77 68 | 69 6c 65 20 28 54 52 55 |/. wh|ile (TRU|
|00000c30| 45 29 20 7b 0a 0a 09 2f | 2a 20 64 65 73 63 65 6e |E) {.../|* descen|
|00000c40| 64 20 61 73 20 66 61 72 | 20 61 73 20 77 65 20 63 |d as far| as we c|
|00000c50| 61 6e 20 2a 2f 0a 09 77 | 68 69 6c 65 20 28 54 52 |an */..w|hile (TR|
|00000c60| 55 45 29 20 7b 0a 0a 09 | 20 20 20 20 2f 2a 20 63 |UE) {...| /* c|
|00000c70| 68 65 63 6b 20 66 6f 72 | 20 74 68 69 73 20 6e 6f |heck for| this no|
|00000c80| 64 65 20 62 65 69 6e 67 | 20 6d 61 72 6b 65 64 20 |de being| marked |
|00000c90| 2a 2f 0a 09 20 20 20 20 | 69 66 20 28 74 68 69 73 |*/.. |if (this|
|00000ca0| 2d 3e 6e 5f 66 6c 61 67 | 73 20 26 20 4d 41 52 4b |->n_flag|s & MARK|
|00000cb0| 29 0a 09 09 62 72 65 61 | 6b 3b 0a 0a 09 20 20 20 |)...brea|k;... |
|00000cc0| 20 2f 2a 20 6d 61 72 6b | 20 69 74 20 61 6e 64 20 | /* mark| it and |
|00000cd0| 69 74 73 20 64 65 73 63 | 65 6e 64 61 6e 74 73 20 |its desc|endants |
|00000ce0| 2a 2f 0a 09 20 20 20 20 | 65 6c 73 65 20 7b 0a 0a |*/.. |else {..|
|00000cf0| 09 09 2f 2a 20 6d 61 72 | 6b 20 74 68 65 20 6e 6f |../* mar|k the no|
|00000d00| 64 65 20 2a 2f 0a 09 09 | 74 68 69 73 2d 3e 6e 5f |de */...|this->n_|
|00000d10| 66 6c 61 67 73 20 7c 3d | 20 4d 41 52 4b 3b 0a 0a |flags |=| MARK;..|
|00000d20| 09 09 2f 2a 20 66 6f 6c | 6c 6f 77 20 74 68 65 20 |../* fol|low the |
|00000d30| 6c 65 66 74 20 73 75 62 | 6c 69 73 74 20 69 66 20 |left sub|list if |
|00000d40| 74 68 65 72 65 20 69 73 | 20 6f 6e 65 20 2a 2f 0a |there is| one */.|
|00000d50| 09 09 69 66 20 28 6c 69 | 76 65 63 61 72 28 74 68 |..if (li|vecar(th|
|00000d60| 69 73 29 29 20 7b 0a 09 | 09 20 20 20 20 74 68 69 |is)) {..|. thi|
|00000d70| 73 2d 3e 6e 5f 66 6c 61 | 67 73 20 7c 3d 20 4c 45 |s->n_fla|gs |= LE|
|00000d80| 46 54 3b 0a 09 09 20 20 | 20 20 74 6d 70 20 3d 20 |FT;... | tmp = |
|00000d90| 70 72 65 76 3b 0a 09 09 | 20 20 20 20 70 72 65 76 |prev;...| prev|
|00000da0| 20 3d 20 74 68 69 73 3b | 0a 09 09 20 20 20 20 74 | = this;|... t|
|00000db0| 68 69 73 20 3d 20 63 61 | 72 28 70 72 65 76 29 3b |his = ca|r(prev);|
|00000dc0| 0a 09 09 20 20 20 20 72 | 70 6c 61 63 61 28 70 72 |... r|placa(pr|
|00000dd0| 65 76 2c 74 6d 70 29 3b | 0a 09 09 7d 0a 0a 09 09 |ev,tmp);|...}....|
|00000de0| 2f 2a 20 6f 74 68 65 72 | 77 69 73 65 2c 20 66 6f |/* other|wise, fo|
|00000df0| 6c 6c 6f 77 20 74 68 65 | 20 72 69 67 68 74 20 73 |llow the| right s|
|00000e00| 75 62 6c 69 73 74 20 69 | 66 20 74 68 65 72 65 20 |ublist i|f there |
|00000e10| 69 73 20 6f 6e 65 20 2a | 2f 0a 09 09 65 6c 73 65 |is one *|/...else|
|00000e20| 20 69 66 20 28 6c 69 76 | 65 63 64 72 28 74 68 69 | if (liv|ecdr(thi|
|00000e30| 73 29 29 20 7b 0a 09 09 | 20 20 20 20 74 68 69 73 |s)) {...| this|
|00000e40| 2d 3e 6e 5f 66 6c 61 67 | 73 20 26 3d 20 7e 4c 45 |->n_flag|s &= ~LE|
|00000e50| 46 54 3b 0a 09 09 20 20 | 20 20 74 6d 70 20 3d 20 |FT;... | tmp = |
|00000e60| 70 72 65 76 3b 0a 09 09 | 20 20 20 20 70 72 65 76 |prev;...| prev|
|00000e70| 20 3d 20 74 68 69 73 3b | 0a 09 09 20 20 20 20 74 | = this;|... t|
|00000e80| 68 69 73 20 3d 20 63 64 | 72 28 70 72 65 76 29 3b |his = cd|r(prev);|
|00000e90| 0a 09 09 20 20 20 20 72 | 70 6c 61 63 64 28 70 72 |... r|placd(pr|
|00000ea0| 65 76 2c 74 6d 70 29 3b | 0a 09 09 7d 0a 09 09 65 |ev,tmp);|...}...e|
|00000eb0| 6c 73 65 0a 09 09 20 20 | 20 20 62 72 65 61 6b 3b |lse... | break;|
|00000ec0| 0a 09 20 20 20 20 7d 0a | 09 7d 0a 0a 09 2f 2a 20 |.. }.|.}.../* |
|00000ed0| 62 61 63 6b 75 70 20 74 | 6f 20 61 20 70 6f 69 6e |backup t|o a poin|
|00000ee0| 74 20 77 68 65 72 65 20 | 77 65 20 63 61 6e 20 63 |t where |we can c|
|00000ef0| 6f 6e 74 69 6e 75 65 20 | 64 65 73 63 65 6e 64 69 |ontinue |descendi|
|00000f00| 6e 67 20 2a 2f 0a 09 77 | 68 69 6c 65 20 28 54 52 |ng */..w|hile (TR|
|00000f10| 55 45 29 20 7b 0a 0a 09 | 20 20 20 20 2f 2a 20 63 |UE) {...| /* c|
|00000f20| 68 65 63 6b 20 66 6f 72 | 20 74 65 72 6d 69 6e 61 |heck for| termina|
|00000f30| 74 69 6f 6e 20 63 6f 6e | 64 69 74 69 6f 6e 20 2a |tion con|dition *|
|00000f40| 2f 0a 09 20 20 20 20 69 | 66 20 28 70 72 65 76 20 |/.. i|f (prev |
|00000f50| 3d 3d 20 4e 49 4c 29 0a | 09 09 72 65 74 75 72 6e |== NIL).|..return|
|00000f60| 3b 0a 0a 09 20 20 20 20 | 2f 2a 20 63 68 65 63 6b |;... |/* check|
|00000f70| 20 66 6f 72 20 63 6f 6d | 69 6e 67 20 66 72 6f 6d | for com|ing from|
|00000f80| 20 74 68 65 20 6c 65 66 | 74 20 73 69 64 65 20 2a | the lef|t side *|
|00000f90| 2f 0a 09 20 20 20 20 69 | 66 20 28 70 72 65 76 2d |/.. i|f (prev-|
|00000fa0| 3e 6e 5f 66 6c 61 67 73 | 20 26 20 4c 45 46 54 29 |>n_flags| & LEFT)|
|00000fb0| 0a 09 09 69 66 20 28 6c | 69 76 65 63 64 72 28 70 |...if (l|ivecdr(p|
|00000fc0| 72 65 76 29 29 20 7b 0a | 09 09 20 20 20 20 70 72 |rev)) {.|.. pr|
|00000fd0| 65 76 2d 3e 6e 5f 66 6c | 61 67 73 20 26 3d 20 7e |ev->n_fl|ags &= ~|
|00000fe0| 4c 45 46 54 3b 0a 09 09 | 20 20 20 20 74 6d 70 20 |LEFT;...| tmp |
|00000ff0| 3d 20 63 61 72 28 70 72 | 65 76 29 3b 0a 09 09 20 |= car(pr|ev);... |
|00001000| 20 20 20 72 70 6c 61 63 | 61 28 70 72 65 76 2c 74 | rplac|a(prev,t|
|00001010| 68 69 73 29 3b 0a 09 09 | 20 20 20 20 74 68 69 73 |his);...| this|
|00001020| 20 3d 20 63 64 72 28 70 | 72 65 76 29 3b 0a 09 09 | = cdr(p|rev);...|
|00001030| 20 20 20 20 72 70 6c 61 | 63 64 28 70 72 65 76 2c | rpla|cd(prev,|
|00001040| 74 6d 70 29 3b 0a 09 09 | 20 20 20 20 62 72 65 61 |tmp);...| brea|
|00001050| 6b 3b 0a 09 09 7d 0a 09 | 09 65 6c 73 65 20 7b 0a |k;...}..|.else {.|
|00001060| 09 09 20 20 20 20 74 6d | 70 20 3d 20 70 72 65 76 |.. tm|p = prev|
|00001070| 3b 0a 09 09 20 20 20 20 | 70 72 65 76 20 3d 20 63 |;... |prev = c|
|00001080| 61 72 28 74 6d 70 29 3b | 0a 09 09 20 20 20 20 72 |ar(tmp);|... r|
|00001090| 70 6c 61 63 61 28 74 6d | 70 2c 74 68 69 73 29 3b |placa(tm|p,this);|
|000010a0| 0a 09 09 20 20 20 20 74 | 68 69 73 20 3d 20 74 6d |... t|his = tm|
|000010b0| 70 3b 0a 09 09 7d 0a 0a | 09 20 20 20 20 2f 2a 20 |p;...}..|. /* |
|000010c0| 6f 74 68 65 72 77 69 73 | 65 2c 20 63 61 6d 65 20 |otherwis|e, came |
|000010d0| 66 72 6f 6d 20 74 68 65 | 20 72 69 67 68 74 20 73 |from the| right s|
|000010e0| 69 64 65 20 2a 2f 0a 09 | 20 20 20 20 65 6c 73 65 |ide */..| else|
|000010f0| 20 7b 0a 09 09 74 6d 70 | 20 3d 20 70 72 65 76 3b | {...tmp| = prev;|
|00001100| 0a 09 09 70 72 65 76 20 | 3d 20 63 64 72 28 74 6d |...prev |= cdr(tm|
|00001110| 70 29 3b 0a 09 09 72 70 | 6c 61 63 64 28 74 6d 70 |p);...rp|lacd(tmp|
|00001120| 2c 74 68 69 73 29 3b 0a | 09 09 74 68 69 73 20 3d |,this);.|..this =|
|00001130| 20 74 6d 70 3b 0a 09 20 | 20 20 20 7d 0a 09 7d 0a | tmp;.. | }..}.|
|00001140| 20 20 20 20 7d 0a 7d 0a | 0a 2f 2a 20 73 77 65 65 | }.}.|./* swee|
|00001150| 70 20 2d 20 73 77 65 65 | 70 20 61 6c 6c 20 75 6e |p - swee|p all un|
|00001160| 6d 61 72 6b 65 64 20 6e | 6f 64 65 73 20 61 6e 64 |marked n|odes and|
|00001170| 20 61 64 64 20 74 68 65 | 6d 20 74 6f 20 74 68 65 | add the|m to the|
|00001180| 20 66 72 65 65 20 6c 69 | 73 74 20 2a 2f 0a 4c 4f | free li|st */.LO|
|00001190| 43 41 4c 20 73 77 65 65 | 70 28 29 0a 7b 0a 20 20 |CAL swee|p().{. |
|000011a0| 20 20 73 74 72 75 63 74 | 20 73 65 67 6d 65 6e 74 | struct| segment|
|000011b0| 20 2a 73 65 67 3b 0a 20 | 20 20 20 4e 4f 44 45 20 | *seg;. | NODE |
|000011c0| 2a 70 3b 0a 20 20 20 20 | 69 6e 74 20 6e 3b 0a 0a |*p;. |int n;..|
|000011d0| 20 20 20 20 2f 2a 20 65 | 6d 70 74 79 20 74 68 65 | /* e|mpty the|
|000011e0| 20 66 72 65 65 20 6c 69 | 73 74 20 2a 2f 0a 20 20 | free li|st */. |
|000011f0| 20 20 66 6e 6f 64 65 73 | 20 3d 20 4e 49 4c 3b 0a | fnodes| = NIL;.|
|00001200| 20 20 20 20 6e 66 72 65 | 65 20 3d 20 30 3b 0a 0a | nfre|e = 0;..|
|00001210| 20 20 20 20 2f 2a 20 61 | 64 64 20 61 6c 6c 20 75 | /* a|dd all u|
|00001220| 6e 6d 61 72 6b 65 64 20 | 6e 6f 64 65 73 20 2a 2f |nmarked |nodes */|
|00001230| 0a 20 20 20 20 66 6f 72 | 20 28 73 65 67 20 3d 20 |. for| (seg = |
|00001240| 73 65 67 73 3b 20 73 65 | 67 20 21 3d 20 4e 55 4c |segs; se|g != NUL|
|00001250| 4c 3b 20 73 65 67 20 3d | 20 73 65 67 2d 3e 73 67 |L; seg =| seg->sg|
|00001260| 5f 6e 65 78 74 29 20 7b | 0a 09 70 20 3d 20 26 73 |_next) {|..p = &s|
|00001270| 65 67 2d 3e 73 67 5f 6e | 6f 64 65 73 5b 30 5d 3b |eg->sg_n|odes[0];|
|00001280| 0a 09 66 6f 72 20 28 6e | 20 3d 20 73 65 67 2d 3e |..for (n| = seg->|
|00001290| 73 67 5f 73 69 7a 65 3b | 20 6e 2d 2d 3b 20 70 2b |sg_size;| n--; p+|
|000012a0| 2b 29 0a 09 20 20 20 20 | 69 66 20 28 21 28 70 2d |+).. |if (!(p-|
|000012b0| 3e 6e 5f 66 6c 61 67 73 | 20 26 20 4d 41 52 4b 29 |>n_flags| & MARK)|
|000012c0| 29 20 7b 0a 09 09 73 77 | 69 74 63 68 20 28 6e 74 |) {...sw|itch (nt|
|000012d0| 79 70 65 28 70 29 29 20 | 7b 0a 09 09 63 61 73 65 |ype(p)) |{...case|
|000012e0| 20 53 54 52 3a 0a 09 09 | 09 69 66 20 28 70 2d 3e | STR:...|.if (p->|
|000012f0| 6e 5f 73 74 72 74 79 70 | 65 20 3d 3d 20 44 59 4e |n_strtyp|e == DYN|
|00001300| 41 4d 49 43 20 26 26 20 | 70 2d 3e 6e 5f 73 74 72 |AMIC && |p->n_str|
|00001310| 20 21 3d 20 4e 55 4c 4c | 29 0a 09 09 09 20 20 20 | != NULL|).... |
|00001320| 20 73 74 72 66 72 65 65 | 28 70 2d 3e 6e 5f 73 74 | strfree|(p->n_st|
|00001330| 72 29 3b 0a 09 09 09 62 | 72 65 61 6b 3b 0a 09 09 |r);....b|reak;...|
|00001340| 63 61 73 65 20 46 50 54 | 52 3a 0a 09 09 09 69 66 |case FPT|R:....if|
|00001350| 20 28 70 2d 3e 6e 5f 66 | 70 29 0a 09 09 09 20 20 | (p->n_f|p).... |
|00001360| 20 20 66 63 6c 6f 73 65 | 28 70 2d 3e 6e 5f 66 70 | fclose|(p->n_fp|
|00001370| 29 3b 0a 09 09 09 62 72 | 65 61 6b 3b 0a 09 09 7d |);....br|eak;...}|
|00001380| 0a 09 09 70 2d 3e 6e 5f | 74 79 70 65 20 3d 20 46 |...p->n_|type = F|
|00001390| 52 45 45 3b 0a 09 09 70 | 2d 3e 6e 5f 66 6c 61 67 |REE;...p|->n_flag|
|000013a0| 73 20 3d 20 30 3b 0a 09 | 09 72 70 6c 61 63 61 28 |s = 0;..|.rplaca(|
|000013b0| 70 2c 4e 49 4c 29 3b 0a | 09 09 72 70 6c 61 63 64 |p,NIL);.|..rplacd|
|000013c0| 28 70 2c 66 6e 6f 64 65 | 73 29 3b 0a 09 09 66 6e |(p,fnode|s);...fn|
|000013d0| 6f 64 65 73 20 3d 20 70 | 3b 0a 09 09 6e 66 72 65 |odes = p|;...nfre|
|000013e0| 65 2b 2b 3b 0a 09 20 20 | 20 20 7d 0a 09 20 20 20 |e++;.. | }.. |
|000013f0| 20 65 6c 73 65 0a 09 09 | 70 2d 3e 6e 5f 66 6c 61 | else...|p->n_fla|
|00001400| 67 73 20 26 3d 20 7e 28 | 4d 41 52 4b 20 7c 20 4c |gs &= ~(|MARK | L|
|00001410| 45 46 54 29 3b 0a 20 20 | 20 20 7d 0a 7d 0a 0a 2f |EFT);. | }.}../|
|00001420| 2a 20 61 64 64 73 65 67 | 20 2d 20 61 64 64 20 61 |* addseg| - add a|
|00001430| 20 73 65 67 6d 65 6e 74 | 20 74 6f 20 74 68 65 20 | segment| to the |
|00001440| 61 76 61 69 6c 61 62 6c | 65 20 6d 65 6d 6f 72 79 |availabl|e memory|
|00001450| 20 2a 2f 0a 69 6e 74 20 | 61 64 64 73 65 67 28 29 | */.int |addseg()|
|00001460| 0a 7b 0a 20 20 20 20 73 | 74 72 75 63 74 20 73 65 |.{. s|truct se|
|00001470| 67 6d 65 6e 74 20 2a 6e | 65 77 73 65 67 3b 0a 20 |gment *n|ewseg;. |
|00001480| 20 20 20 4e 4f 44 45 20 | 2a 70 3b 0a 20 20 20 20 | NODE |*p;. |
|00001490| 69 6e 74 20 6e 3b 0a 0a | 20 20 20 20 2f 2a 20 63 |int n;..| /* c|
|000014a0| 68 65 63 6b 20 66 6f 72 | 20 7a 65 72 6f 20 61 6c |heck for| zero al|
|000014b0| 6c 6f 63 61 74 69 6f 6e | 20 2a 2f 0a 20 20 20 20 |location| */. |
|000014c0| 69 66 20 28 61 6e 6f 64 | 65 73 20 3d 3d 20 30 29 |if (anod|es == 0)|
|000014d0| 0a 09 72 65 74 75 72 6e | 20 28 46 41 4c 53 45 29 |..return| (FALSE)|
|000014e0| 3b 0a 0a 20 20 20 20 2f | 2a 20 61 6c 6c 6f 63 61 |;.. /|* alloca|
|000014f0| 74 65 20 61 20 6e 65 77 | 20 73 65 67 6d 65 6e 74 |te a new| segment|
|00001500| 20 2a 2f 0a 20 20 20 20 | 69 66 20 28 28 6e 65 77 | */. |if ((new|
|00001510| 73 65 67 20 3d 20 28 73 | 74 72 75 63 74 20 73 65 |seg = (s|truct se|
|00001520| 67 6d 65 6e 74 20 2a 29 | 20 63 61 6c 6c 6f 63 28 |gment *)| calloc(|
|00001530| 31 2c 41 4c 4c 4f 43 53 | 49 5a 45 29 29 20 21 3d |1,ALLOCS|IZE)) !=|
|00001540| 20 4e 55 4c 4c 29 20 7b | 0a 0a 09 2f 2a 20 69 6e | NULL) {|.../* in|
|00001550| 69 74 69 61 6c 69 7a 65 | 20 74 68 65 20 6e 65 77 |itialize| the new|
|00001560| 20 73 65 67 6d 65 6e 74 | 20 2a 2f 0a 09 6e 65 77 | segment| */..new|
|00001570| 73 65 67 2d 3e 73 67 5f | 73 69 7a 65 20 3d 20 61 |seg->sg_|size = a|
|00001580| 6e 6f 64 65 73 3b 0a 09 | 6e 65 77 73 65 67 2d 3e |nodes;..|newseg->|
|00001590| 73 67 5f 6e 65 78 74 20 | 3d 20 73 65 67 73 3b 0a |sg_next |= segs;.|
|000015a0| 09 73 65 67 73 20 3d 20 | 6e 65 77 73 65 67 3b 0a |.segs = |newseg;.|
|000015b0| 0a 09 2f 2a 20 61 64 64 | 20 65 61 63 68 20 6e 65 |../* add| each ne|
|000015c0| 77 20 6e 6f 64 65 20 74 | 6f 20 74 68 65 20 66 72 |w node t|o the fr|
|000015d0| 65 65 20 6c 69 73 74 20 | 2a 2f 0a 09 70 20 3d 20 |ee list |*/..p = |
|000015e0| 26 6e 65 77 73 65 67 2d | 3e 73 67 5f 6e 6f 64 65 |&newseg-|>sg_node|
|000015f0| 73 5b 30 5d 3b 0a 09 66 | 6f 72 20 28 6e 20 3d 20 |s[0];..f|or (n = |
|00001600| 61 6e 6f 64 65 73 3b 20 | 6e 2d 2d 3b 20 29 20 7b |anodes; |n--; ) {|
|00001610| 0a 09 20 20 20 20 72 70 | 6c 61 63 64 28 70 2c 66 |.. rp|lacd(p,f|
|00001620| 6e 6f 64 65 73 29 3b 0a | 09 20 20 20 20 66 6e 6f |nodes);.|. fno|
|00001630| 64 65 73 20 3d 20 70 2b | 2b 3b 0a 09 7d 0a 0a 09 |des = p+|+;..}...|
|00001640| 2f 2a 20 75 70 64 61 74 | 65 20 74 68 65 20 73 74 |/* updat|e the st|
|00001650| 61 74 69 73 74 69 63 73 | 20 2a 2f 0a 09 74 6f 74 |atistics| */..tot|
|00001660| 61 6c 20 2b 3d 20 28 6c | 6f 6e 67 29 20 41 4c 4c |al += (l|ong) ALL|
|00001670| 4f 43 53 49 5a 45 3b 0a | 09 6e 6e 6f 64 65 73 20 |OCSIZE;.|.nnodes |
|00001680| 2b 3d 20 61 6e 6f 64 65 | 73 3b 0a 09 6e 66 72 65 |+= anode|s;..nfre|
|00001690| 65 20 2b 3d 20 61 6e 6f | 64 65 73 3b 0a 09 6e 73 |e += ano|des;..ns|
|000016a0| 65 67 73 2b 2b 3b 0a 0a | 09 2f 2a 20 72 65 74 75 |egs++;..|./* retu|
|000016b0| 72 6e 20 73 75 63 63 65 | 73 73 66 75 6c 6c 79 20 |rn succe|ssfully |
|000016c0| 2a 2f 0a 09 72 65 74 75 | 72 6e 20 28 54 52 55 45 |*/..retu|rn (TRUE|
|000016d0| 29 3b 0a 20 20 20 20 7d | 0a 20 20 20 20 65 6c 73 |);. }|. els|
|000016e0| 65 0a 09 72 65 74 75 72 | 6e 20 28 46 41 4c 53 45 |e..retur|n (FALSE|
|000016f0| 29 3b 0a 7d 0a 20 0a 2f | 2a 20 6c 69 76 65 63 61 |);.}. ./|* liveca|
|00001700| 72 20 2d 20 64 6f 20 77 | 65 20 6e 65 65 64 20 74 |r - do w|e need t|
|00001710| 6f 20 66 6f 6c 6c 6f 77 | 20 74 68 65 20 63 61 72 |o follow| the car|
|00001720| 3f 20 2a 2f 0a 4c 4f 43 | 41 4c 20 69 6e 74 20 6c |? */.LOC|AL int l|
|00001730| 69 76 65 63 61 72 28 6e | 29 0a 20 20 4e 4f 44 45 |ivecar(n|). NODE|
|00001740| 20 2a 6e 3b 0a 7b 0a 20 | 20 20 20 73 77 69 74 63 | *n;.{. | switc|
|00001750| 68 20 28 6e 74 79 70 65 | 28 6e 29 29 20 7b 0a 20 |h (ntype|(n)) {. |
|00001760| 20 20 20 63 61 73 65 20 | 53 55 42 52 3a 0a 20 20 | case |SUBR:. |
|00001770| 20 20 63 61 73 65 20 46 | 53 55 42 52 3a 0a 20 20 | case F|SUBR:. |
|00001780| 20 20 63 61 73 65 20 49 | 4e 54 3a 0a 20 20 20 20 | case I|NT:. |
|00001790| 63 61 73 65 20 53 54 52 | 3a 0a 20 20 20 20 63 61 |case STR|:. ca|
|000017a0| 73 65 20 46 50 54 52 3a | 0a 09 20 20 20 20 72 65 |se FPTR:|.. re|
|000017b0| 74 75 72 6e 20 28 46 41 | 4c 53 45 29 3b 0a 20 20 |turn (FA|LSE);. |
|000017c0| 20 20 63 61 73 65 20 53 | 59 4d 3a 0a 20 20 20 20 | case S|YM:. |
|000017d0| 63 61 73 65 20 4c 49 53 | 54 3a 0a 20 20 20 20 63 |case LIS|T:. c|
|000017e0| 61 73 65 20 4f 42 4a 3a | 0a 09 20 20 20 20 72 65 |ase OBJ:|.. re|
|000017f0| 74 75 72 6e 20 28 63 61 | 72 28 6e 29 20 21 3d 20 |turn (ca|r(n) != |
|00001800| 4e 49 4c 29 3b 0a 20 20 | 20 20 64 65 66 61 75 6c |NIL);. | defaul|
|00001810| 74 3a 0a 09 20 20 20 20 | 70 72 69 6e 74 66 28 22 |t:.. |printf("|
|00001820| 62 61 64 20 6e 6f 64 65 | 20 74 79 70 65 20 28 25 |bad node| type (%|
|00001830| 64 29 20 66 6f 75 6e 64 | 20 64 75 72 69 6e 67 20 |d) found| during |
|00001840| 6c 65 66 74 20 73 63 61 | 6e 5c 6e 22 2c 6e 74 79 |left sca|n\n",nty|
|00001850| 70 65 28 6e 29 29 3b 0a | 09 20 20 20 20 65 78 69 |pe(n));.|. exi|
|00001860| 74 28 29 3b 0a 20 20 20 | 20 7d 0a 7d 0a 0a 2f 2a |t();. | }.}../*|
|00001870| 20 6c 69 76 65 63 64 72 | 20 2d 20 64 6f 20 77 65 | livecdr| - do we|
|00001880| 20 6e 65 65 64 20 74 6f | 20 66 6f 6c 6c 6f 77 20 | need to| follow |
|00001890| 74 68 65 20 63 64 72 3f | 20 2a 2f 0a 4c 4f 43 41 |the cdr?| */.LOCA|
|000018a0| 4c 20 69 6e 74 20 6c 69 | 76 65 63 64 72 28 6e 29 |L int li|vecdr(n)|
|000018b0| 0a 20 20 4e 4f 44 45 20 | 2a 6e 3b 0a 7b 0a 20 20 |. NODE |*n;.{. |
|000018c0| 20 20 73 77 69 74 63 68 | 20 28 6e 74 79 70 65 28 | switch| (ntype(|
|000018d0| 6e 29 29 20 7b 0a 20 20 | 20 20 63 61 73 65 20 53 |n)) {. | case S|
|000018e0| 55 42 52 3a 0a 20 20 20 | 20 63 61 73 65 20 46 53 |UBR:. | case FS|
|000018f0| 55 42 52 3a 0a 20 20 20 | 20 63 61 73 65 20 49 4e |UBR:. | case IN|
|00001900| 54 3a 0a 20 20 20 20 63 | 61 73 65 20 53 54 52 3a |T:. c|ase STR:|
|00001910| 0a 20 20 20 20 63 61 73 | 65 20 46 50 54 52 3a 0a |. cas|e FPTR:.|
|00001920| 09 20 20 20 20 72 65 74 | 75 72 6e 20 28 46 41 4c |. ret|urn (FAL|
|00001930| 53 45 29 3b 0a 20 20 20 | 20 63 61 73 65 20 53 59 |SE);. | case SY|
|00001940| 4d 3a 0a 20 20 20 20 63 | 61 73 65 20 4c 49 53 54 |M:. c|ase LIST|
|00001950| 3a 0a 20 20 20 20 63 61 | 73 65 20 4f 42 4a 3a 0a |:. ca|se OBJ:.|
|00001960| 09 20 20 20 20 72 65 74 | 75 72 6e 20 28 63 64 72 |. ret|urn (cdr|
|00001970| 28 6e 29 20 21 3d 20 4e | 49 4c 29 3b 0a 20 20 20 |(n) != N|IL);. |
|00001980| 20 64 65 66 61 75 6c 74 | 3a 0a 09 20 20 20 20 70 | default|:.. p|
|00001990| 72 69 6e 74 66 28 22 62 | 61 64 20 6e 6f 64 65 20 |rintf("b|ad node |
|000019a0| 74 79 70 65 20 28 25 64 | 29 20 66 6f 75 6e 64 20 |type (%d|) found |
|000019b0| 64 75 72 69 6e 67 20 72 | 69 67 68 74 20 73 63 61 |during r|ight sca|
|000019c0| 6e 5c 6e 22 2c 6e 74 79 | 70 65 28 6e 29 29 3b 0a |n\n",nty|pe(n));.|
|000019d0| 09 20 20 20 20 65 78 69 | 74 28 29 3b 0a 20 20 20 |. exi|t();. |
|000019e0| 20 7d 0a 7d 0a 0a 2f 2a | 20 73 74 61 74 73 20 2d | }.}../*| stats -|
|000019f0| 20 70 72 69 6e 74 20 6d | 65 6d 6f 72 79 20 73 74 | print m|emory st|
|00001a00| 61 74 69 73 74 69 63 73 | 20 2a 2f 0a 73 74 61 74 |atistics| */.stat|
|00001a10| 73 28 29 0a 7b 0a 20 20 | 20 20 70 72 69 6e 74 66 |s().{. | printf|
|00001a20| 28 22 4e 6f 64 65 73 3a | 20 20 20 20 20 20 20 25 |("Nodes:| %|
|00001a30| 64 5c 6e 22 2c 6e 6e 6f | 64 65 73 29 3b 0a 20 20 |d\n",nno|des);. |
|00001a40| 20 20 70 72 69 6e 74 66 | 28 22 46 72 65 65 20 6e | printf|("Free n|
|00001a50| 6f 64 65 73 3a 20 20 25 | 64 5c 6e 22 2c 6e 66 72 |odes: %|d\n",nfr|
|00001a60| 65 65 29 3b 0a 20 20 20 | 20 70 72 69 6e 74 66 28 |ee);. | printf(|
|00001a70| 22 53 65 67 6d 65 6e 74 | 73 3a 20 20 20 20 25 64 |"Segment|s: %d|
|00001a80| 5c 6e 22 2c 6e 73 65 67 | 73 29 3b 0a 20 20 20 20 |\n",nseg|s);. |
|00001a90| 70 72 69 6e 74 66 28 22 | 41 6c 6c 6f 63 61 74 65 |printf("|Allocate|
|00001aa0| 3a 20 20 20 20 25 64 5c | 6e 22 2c 61 6e 6f 64 65 |: %d\|n",anode|
|00001ab0| 73 29 3b 0a 20 20 20 20 | 70 72 69 6e 74 66 28 22 |s);. |printf("|
|00001ac0| 54 6f 74 61 6c 3a 20 20 | 20 20 20 20 20 25 6c 64 |Total: | %ld|
|00001ad0| 5c 6e 22 2c 74 6f 74 61 | 6c 29 3b 0a 20 20 20 20 |\n",tota|l);. |
|00001ae0| 70 72 69 6e 74 66 28 22 | 43 6f 6c 6c 65 63 74 69 |printf("|Collecti|
|00001af0| 6f 6e 73 3a 20 25 64 5c | 6e 22 2c 67 63 63 61 6c |ons: %d\|n",gccal|
|00001b00| 6c 73 29 3b 0a 7d 0a 0a | 2f 2a 20 78 6c 6d 69 6e |ls);.}..|/* xlmin|
|00001b10| 69 74 20 2d 20 69 6e 69 | 74 69 61 6c 69 7a 65 20 |it - ini|tialize |
|00001b20| 74 68 65 20 64 79 6e 61 | 6d 69 63 20 6d 65 6d 6f |the dyna|mic memo|
|00001b30| 72 79 20 6d 6f 64 75 6c | 65 20 2a 2f 0a 78 6c 6d |ry modul|e */.xlm|
|00001b40| 69 6e 69 74 28 29 0a 7b | 0a 20 20 20 20 2f 2a 20 |init().{|. /* |
|00001b50| 69 6e 69 74 69 61 6c 69 | 7a 65 20 6f 75 72 20 69 |initiali|ze our i|
|00001b60| 6e 74 65 72 6e 61 6c 20 | 76 61 72 69 61 62 6c 65 |nternal |variable|
|00001b70| 73 20 2a 2f 0a 20 20 20 | 20 61 6e 6f 64 65 73 20 |s */. | anodes |
|00001b80| 3d 20 4e 4e 4f 44 45 53 | 3b 0a 20 20 20 20 74 6f |= NNODES|;. to|
|00001b90| 74 61 6c 20 3d 20 30 4c | 3b 0a 20 20 20 20 6e 6e |tal = 0L|;. nn|
|00001ba0| 6f 64 65 73 20 3d 20 6e | 73 65 67 73 20 3d 20 6e |odes = n|segs = n|
|00001bb0| 66 72 65 65 20 3d 20 67 | 63 63 61 6c 6c 73 20 3d |free = g|ccalls =|
|00001bc0| 20 30 3b 0a 20 20 20 20 | 66 6e 6f 64 65 73 20 3d | 0;. |fnodes =|
|00001bd0| 20 4e 49 4c 3b 0a 20 20 | 20 20 73 65 67 73 20 3d | NIL;. | segs =|
|00001be0| 20 4e 55 4c 4c 3b 0a 0a | 20 20 20 20 2f 2a 20 69 | NULL;..| /* i|
|00001bf0| 6e 69 74 69 61 6c 69 7a | 65 20 73 74 72 75 63 74 |nitializ|e struct|
|00001c00| 75 72 65 73 20 74 68 61 | 74 20 61 72 65 20 6d 61 |ures tha|t are ma|
|00001c10| 72 6b 65 64 20 62 79 20 | 74 68 65 20 63 6f 6c 6c |rked by |the coll|
|00001c20| 65 63 74 6f 72 20 2a 2f | 0a 20 20 20 20 78 6c 73 |ector */|. xls|
|00001c30| 74 61 63 6b 20 3d 20 78 | 6c 65 6e 76 20 3d 20 78 |tack = x|lenv = x|
|00001c40| 6c 6e 65 77 65 6e 76 20 | 3d 20 6f 62 6c 69 73 74 |lnewenv |= oblist|
|00001c50| 20 3d 20 6b 65 79 6c 69 | 73 74 20 3d 20 4e 49 4c | = keyli|st = NIL|
|00001c60| 3b 0a 7d 0a 53 48 41 52 | 5f 45 4f 46 0a 69 66 20 |;.}.SHAR|_EOF.if |
|00001c70| 74 65 73 74 20 36 35 35 | 32 20 2d 6e 65 20 22 60 |test 655|2 -ne "`|
|00001c80| 77 63 20 2d 63 20 3c 20 | 27 78 6c 64 6d 65 6d 2e |wc -c < |'xldmem.|
|00001c90| 63 27 60 22 0a 74 68 65 | 6e 0a 09 65 63 68 6f 20 |c'`".the|n..echo |
|00001ca0| 73 68 61 72 3a 20 65 72 | 72 6f 72 20 74 72 61 6e |shar: er|ror tran|
|00001cb0| 73 6d 69 74 74 69 6e 67 | 20 22 27 78 6c 64 6d 65 |smitting| "'xldme|
|00001cc0| 6d 2e 63 27 22 20 27 28 | 73 68 6f 75 6c 64 20 68 |m.c'" '(|should h|
|00001cd0| 61 76 65 20 62 65 65 6e | 20 36 35 35 32 20 63 68 |ave been| 6552 ch|
|00001ce0| 61 72 61 63 74 65 72 73 | 29 27 0a 66 69 0a 66 69 |aracters|)'.fi.fi|
|00001cf0| 20 23 20 65 6e 64 20 6f | 66 20 6f 76 65 72 77 72 | # end o|f overwr|
|00001d00| 69 74 69 6e 67 20 63 68 | 65 63 6b 0a 65 63 68 6f |iting ch|eck.echo|
|00001d10| 20 73 68 61 72 3a 20 65 | 78 74 72 61 63 74 69 6e | shar: e|xtractin|
|00001d20| 67 20 22 27 78 6c 65 76 | 61 6c 2e 63 27 22 20 27 |g "'xlev|al.c'" '|
|00001d30| 28 37 36 38 38 20 63 68 | 61 72 61 63 74 65 72 73 |(7688 ch|aracters|
|00001d40| 29 27 0a 69 66 20 74 65 | 73 74 20 2d 66 20 27 78 |)'.if te|st -f 'x|
|00001d50| 6c 65 76 61 6c 2e 63 27 | 0a 74 68 65 6e 0a 09 65 |leval.c'|.then..e|
|00001d60| 63 68 6f 20 73 68 61 72 | 3a 20 77 69 6c 6c 20 6e |cho shar|: will n|
|00001d70| 6f 74 20 6f 76 65 72 2d | 77 72 69 74 65 20 65 78 |ot over-|write ex|
|00001d80| 69 73 74 69 6e 67 20 66 | 69 6c 65 20 22 27 78 6c |isting f|ile "'xl|
|00001d90| 65 76 61 6c 2e 63 27 22 | 0a 65 6c 73 65 0a 73 65 |eval.c'"|.else.se|
|00001da0| 64 20 27 73 2f 5e 58 2f | 2f 27 20 3c 3c 20 5c 53 |d 's/^X/|/' << \S|
|00001db0| 48 41 52 5f 45 4f 46 20 | 3e 20 27 78 6c 65 76 61 |HAR_EOF |> 'xleva|
|00001dc0| 6c 2e 63 27 0a 2f 2a 20 | 78 6c 65 76 61 6c 20 2d |l.c'./* |xleval -|
|00001dd0| 20 78 6c 69 73 70 20 65 | 76 61 6c 75 61 74 6f 72 | xlisp e|valuator|
|00001de0| 20 2a 2f 0a 0a 23 69 6e | 63 6c 75 64 65 20 22 78 | */..#in|clude "x|
|00001df0| 6c 69 73 70 2e 68 22 0a | 0a 2f 2a 20 65 78 74 65 |lisp.h".|./* exte|
|00001e00| 72 6e 61 6c 20 76 61 72 | 69 61 62 6c 65 73 20 2a |rnal var|iables *|
|00001e10| 2f 0a 65 78 74 65 72 6e | 20 4e 4f 44 45 20 2a 78 |/.extern| NODE *x|
|00001e20| 6c 73 74 61 63 6b 2c 2a | 78 6c 65 6e 76 2c 2a 78 |lstack,*|xlenv,*x|
|00001e30| 6c 6e 65 77 65 6e 76 3b | 0a 65 78 74 65 72 6e 20 |lnewenv;|.extern |
|00001e40| 4e 4f 44 45 20 2a 73 5f | 6c 61 6d 62 64 61 2c 2a |NODE *s_|lambda,*|
|00001e50| 73 5f 6d 61 63 72 6f 3b | 0a 65 78 74 65 72 6e 20 |s_macro;|.extern |
|00001e60| 4e 4f 44 45 20 2a 6b 5f | 6f 70 74 69 6f 6e 61 6c |NODE *k_|optional|
|00001e70| 2c 2a 6b 5f 72 65 73 74 | 2c 2a 6b 5f 61 75 78 3b |,*k_rest|,*k_aux;|
|00001e80| 0a 65 78 74 65 72 6e 20 | 4e 4f 44 45 20 2a 73 5f |.extern |NODE *s_|
|00001e90| 65 76 61 6c 68 6f 6f 6b | 2c 2a 73 5f 61 70 70 6c |evalhook|,*s_appl|
|00001ea0| 79 68 6f 6f 6b 3b 0a 65 | 78 74 65 72 6e 20 4e 4f |yhook;.e|xtern NO|
|00001eb0| 44 45 20 2a 73 5f 75 6e | 62 6f 75 6e 64 3b 0a 65 |DE *s_un|bound;.e|
|00001ec0| 78 74 65 72 6e 20 4e 4f | 44 45 20 2a 73 5f 73 74 |xtern NO|DE *s_st|
|00001ed0| 64 6f 75 74 3b 0a 0a 2f | 2a 20 66 6f 72 77 61 72 |dout;../|* forwar|
|00001ee0| 64 20 64 65 63 6c 61 72 | 61 74 69 6f 6e 73 20 2a |d declar|ations *|
|00001ef0| 2f 0a 58 46 4f 52 57 41 | 52 44 20 4e 4f 44 45 20 |/.XFORWA|RD NODE |
|00001f00| 2a 78 6c 78 65 76 61 6c | 28 29 3b 0a 58 46 4f 52 |*xlxeval|();.XFOR|
|00001f10| 57 41 52 44 20 4e 4f 44 | 45 20 2a 65 76 61 6c 68 |WARD NOD|E *evalh|
|00001f20| 6f 6f 6b 28 29 3b 0a 58 | 46 4f 52 57 41 52 44 20 |ook();.X|FORWARD |
|00001f30| 4e 4f 44 45 20 2a 65 76 | 66 6f 72 6d 28 29 3b 0a |NODE *ev|form();.|
|00001f40| 58 46 4f 52 57 41 52 44 | 20 4e 4f 44 45 20 2a 65 |XFORWARD| NODE *e|
|00001f50| 76 73 79 6d 28 29 3b 0a | 58 46 4f 52 57 41 52 44 |vsym();.|XFORWARD|
|00001f60| 20 4e 4f 44 45 20 2a 65 | 76 66 75 6e 28 29 3b 0a | NODE *e|vfun();.|
|00001f70| 0a 2f 2a 20 78 6c 65 76 | 61 6c 20 2d 20 65 76 61 |./* xlev|al - eva|
|00001f80| 6c 75 61 74 65 20 61 6e | 20 78 6c 69 73 70 20 65 |luate an| xlisp e|
|00001f90| 78 70 72 65 73 73 69 6f | 6e 20 28 63 68 65 63 6b |xpressio|n (check|
|00001fa0| 69 6e 67 20 66 6f 72 20 | 2a 65 76 61 6c 68 6f 6f |ing for |*evalhoo|
|00001fb0| 6b 2a 29 20 2a 2f 0a 4e | 4f 44 45 20 2a 78 6c 65 |k*) */.N|ODE *xle|
|00001fc0| 76 61 6c 28 65 78 70 72 | 29 0a 20 20 4e 4f 44 45 |val(expr|). NODE|
|00001fd0| 20 2a 65 78 70 72 3b 0a | 7b 0a 20 20 20 20 72 65 | *expr;.|{. re|
|00001fe0| 74 75 72 6e 20 28 73 5f | 65 76 61 6c 68 6f 6f 6b |turn (s_|evalhook|
|00001ff0| 2d 3e 6e 5f 73 79 6d 76 | 61 6c 75 65 20 3f 20 65 |->n_symv|alue ? e|
|00002000| 76 61 6c 68 6f 6f 6b 28 | 65 78 70 72 29 20 3a 20 |valhook(|expr) : |
|00002010| 78 6c 78 65 76 61 6c 28 | 65 78 70 72 29 29 3b 0a |xlxeval(|expr));.|
|00002020| 7d 0a 0a 2f 2a 20 78 6c | 78 65 76 61 6c 20 2d 20 |}../* xl|xeval - |
|00002030| 65 76 61 6c 75 61 74 65 | 20 61 6e 20 78 6c 69 73 |evaluate| an xlis|
|00002040| 70 20 65 78 70 72 65 73 | 73 69 6f 6e 20 28 62 79 |p expres|sion (by|
|00002050| 70 61 73 73 69 6e 67 20 | 2a 65 76 61 6c 68 6f 6f |passing |*evalhoo|
|00002060| 6b 2a 29 20 2a 2f 0a 4e | 4f 44 45 20 2a 78 6c 78 |k*) */.N|ODE *xlx|
|00002070| 65 76 61 6c 28 65 78 70 | 72 29 0a 20 20 4e 4f 44 |eval(exp|r). NOD|
|00002080| 45 20 2a 65 78 70 72 3b | 0a 7b 0a 20 20 20 20 2f |E *expr;|.{. /|
|00002090| 2a 20 65 76 61 6c 75 61 | 74 65 20 6e 69 6c 20 74 |* evalua|te nil t|
|000020a0| 6f 20 69 74 73 65 6c 66 | 20 2a 2f 0a 20 20 20 20 |o itself| */. |
|000020b0| 69 66 20 28 65 78 70 72 | 20 3d 3d 20 4e 49 4c 29 |if (expr| == NIL)|
|000020c0| 0a 09 72 65 74 75 72 6e | 20 28 4e 49 4c 29 3b 0a |..return| (NIL);.|
|000020d0| 0a 20 20 20 20 2f 2a 20 | 61 64 64 20 74 72 61 63 |. /* |add trac|
|000020e0| 65 20 65 6e 74 72 79 20 | 2a 2f 0a 20 20 20 20 78 |e entry |*/. x|
|000020f0| 6c 74 70 75 73 68 28 65 | 78 70 72 29 3b 0a 0a 20 |ltpush(e|xpr);.. |
|00002100| 20 20 20 2f 2a 20 63 68 | 65 63 6b 20 74 79 70 65 | /* ch|eck type|
|00002110| 20 6f 66 20 76 61 6c 75 | 65 20 2a 2f 0a 20 20 20 | of valu|e */. |
|00002120| 20 69 66 20 28 63 6f 6e | 73 70 28 65 78 70 72 29 | if (con|sp(expr)|
|00002130| 29 0a 09 65 78 70 72 20 | 3d 20 65 76 66 6f 72 6d |)..expr |= evform|
|00002140| 28 65 78 70 72 29 3b 0a | 20 20 20 20 65 6c 73 65 |(expr);.| else|
|00002150| 20 69 66 20 28 73 79 6d | 62 6f 6c 70 28 65 78 70 | if (sym|bolp(exp|
|00002160| 72 29 29 0a 09 65 78 70 | 72 20 3d 20 65 76 73 79 |r))..exp|r = evsy|
|00002170| 6d 28 65 78 70 72 29 3b | 0a 0a 20 20 20 20 2f 2a |m(expr);|.. /*|
|00002180| 20 72 65 6d 6f 76 65 20 | 74 72 61 63 65 20 65 6e | remove |trace en|
|00002190| 74 72 79 20 2a 2f 0a 20 | 20 20 20 78 6c 74 70 6f |try */. | xltpo|
|000021a0| 70 28 29 3b 0a 0a 20 20 | 20 20 2f 2a 20 72 65 74 |p();.. | /* ret|
|000021b0| 75 72 6e 20 74 68 65 20 | 76 61 6c 75 65 20 2a 2f |urn the |value */|
|000021c0| 0a 20 20 20 20 72 65 74 | 75 72 6e 20 28 65 78 70 |. ret|urn (exp|
|000021d0| 72 29 3b 0a 7d 0a 0a 2f | 2a 20 78 6c 61 70 70 6c |r);.}../|* xlappl|
|000021e0| 79 20 2d 20 61 70 70 6c | 79 20 61 20 66 75 6e 63 |y - appl|y a func|
|000021f0| 74 69 6f 6e 20 74 6f 20 | 61 20 6c 69 73 74 20 6f |tion to |a list o|
|00002200| 66 20 61 72 67 75 6d 65 | 6e 74 73 20 2a 2f 0a 4e |f argume|nts */.N|
|00002210| 4f 44 45 20 2a 78 6c 61 | 70 70 6c 79 28 66 75 6e |ODE *xla|pply(fun|
|00002220| 2c 61 72 67 73 29 0a 20 | 20 4e 4f 44 45 20 2a 66 |,args). | NODE *f|
|00002230| 75 6e 2c 2a 61 72 67 73 | 3b 0a 7b 0a 20 20 20 20 |un,*args|;.{. |
|00002240| 4e 4f 44 45 20 2a 76 61 | 6c 3b 0a 0a 20 20 20 20 |NODE *va|l;.. |
|00002250| 2f 2a 20 63 68 65 63 6b | 20 66 6f 72 20 61 20 6e |/* check| for a n|
|00002260| 75 6c 6c 20 66 75 6e 63 | 74 69 6f 6e 20 2a 2f 0a |ull func|tion */.|
|00002270| 20 20 20 20 69 66 20 28 | 66 75 6e 20 3d 3d 20 4e | if (|fun == N|
|00002280| 49 4c 29 0a 09 78 6c 66 | 61 69 6c 28 22 62 61 64 |IL)..xlf|ail("bad|
|00002290| 20 66 75 6e 63 74 69 6f | 6e 22 29 3b 0a 0a 20 20 | functio|n");.. |
|000022a0| 20 20 2f 2a 20 65 76 61 | 6c 75 61 74 65 20 74 68 | /* eva|luate th|
|000022b0| 65 20 66 75 6e 63 74 69 | 6f 6e 20 2a 2f 0a 20 20 |e functi|on */. |
|000022c0| 20 20 69 66 20 28 73 75 | 62 72 70 28 66 75 6e 29 | if (su|brp(fun)|
|000022d0| 29 0a 09 76 61 6c 20 3d | 20 28 2a 66 75 6e 2d 3e |)..val =| (*fun->|
|000022e0| 6e 5f 73 75 62 72 29 28 | 61 72 67 73 29 3b 0a 20 |n_subr)(|args);. |
|000022f0| 20 20 20 65 6c 73 65 20 | 69 66 20 28 63 6f 6e 73 | else |if (cons|
|00002300| 70 28 66 75 6e 29 29 20 | 7b 0a 09 69 66 20 28 63 |p(fun)) |{..if (c|
|00002310| 61 72 28 66 75 6e 29 20 | 21 3d 20 73 5f 6c 61 6d |ar(fun) |!= s_lam|
|00002320| 62 64 61 29 0a 09 20 20 | 20 20 78 6c 66 61 69 6c |bda).. | xlfail|
|00002330| 28 22 62 61 64 20 66 75 | 6e 63 74 69 6f 6e 20 74 |("bad fu|nction t|
|00002340| 79 70 65 22 29 3b 0a 09 | 76 61 6c 20 3d 20 65 76 |ype");..|val = ev|
|00002350| 66 75 6e 28 66 75 6e 2c | 61 72 67 73 29 3b 0a 20 |fun(fun,|args);. |
|00002360| 20 20 20 7d 0a 20 20 20 | 20 65 6c 73 65 0a 09 78 | }. | else..x|
|00002370| 6c 66 61 69 6c 28 22 62 | 61 64 20 66 75 6e 63 74 |lfail("b|ad funct|
|00002380| 69 6f 6e 22 29 3b 0a 0a | 20 20 20 20 2f 2a 20 72 |ion");..| /* r|
|00002390| 65 74 75 72 6e 20 74 68 | 65 20 72 65 73 75 6c 74 |eturn th|e result|
|000023a0| 20 76 61 6c 75 65 20 2a | 2f 0a 20 20 20 20 72 65 | value *|/. re|
|000023b0| 74 75 72 6e 20 28 76 61 | 6c 29 3b 0a 7d 0a 0a 2f |turn (va|l);.}../|
|000023c0| 2a 20 65 76 66 6f 72 6d | 20 2d 20 65 76 61 6c 75 |* evform| - evalu|
|000023d0| 61 74 65 20 61 20 66 6f | 72 6d 20 2a 2f 0a 4c 4f |ate a fo|rm */.LO|
|000023e0| 43 41 4c 20 4e 4f 44 45 | 20 2a 65 76 66 6f 72 6d |CAL NODE| *evform|
|000023f0| 28 65 78 70 72 29 0a 20 | 20 4e 4f 44 45 20 2a 65 |(expr). | NODE *e|
|00002400| 78 70 72 3b 0a 7b 0a 20 | 20 20 20 4e 4f 44 45 20 |xpr;.{. | NODE |
|00002410| 2a 6f 6c 64 73 74 6b 2c | 66 75 6e 2c 61 72 67 73 |*oldstk,|fun,args|
|00002420| 2c 2a 76 61 6c 2c 2a 74 | 79 70 65 3b 0a 0a 20 20 |,*val,*t|ype;.. |
|00002430| 20 20 2f 2a 20 63 72 65 | 61 74 65 20 61 20 73 74 | /* cre|ate a st|
|00002440| 61 63 6b 20 66 72 61 6d | 65 20 2a 2f 0a 20 20 20 |ack fram|e */. |
|00002450| 20 6f 6c 64 73 74 6b 20 | 3d 20 78 6c 73 61 76 65 | oldstk |= xlsave|
|00002460| 28 26 66 75 6e 2c 26 61 | 72 67 73 2c 4e 55 4c 4c |(&fun,&a|rgs,NULL|
|00002470| 29 3b 0a 0a 20 20 20 20 | 2f 2a 20 67 65 74 20 74 |);.. |/* get t|
|00002480| 68 65 20 66 75 6e 63 74 | 69 6f 6e 20 61 6e 64 20 |he funct|ion and |
|00002490| 74 68 65 20 61 72 67 75 | 6d 65 6e 74 20 6c 69 73 |the argu|ment lis|
|000024a0| 74 20 2a 2f 0a 20 20 20 | 20 66 75 6e 2e 6e 5f 70 |t */. | fun.n_p|
|000024b0| 74 72 20 3d 20 63 61 72 | 28 65 78 70 72 29 3b 0a |tr = car|(expr);.|
|000024c0| 20 20 20 20 61 72 67 73 | 2e 6e 5f 70 74 72 20 3d | args|.n_ptr =|
|000024d0| 20 63 64 72 28 65 78 70 | 72 29 3b 0a 0a 20 20 20 | cdr(exp|r);.. |
|000024e0| 20 2f 2a 20 65 76 61 6c | 75 61 74 65 20 74 68 65 | /* eval|uate the|
|000024f0| 20 66 69 72 73 74 20 65 | 78 70 72 65 73 73 69 6f | first e|xpressio|
|00002500| 6e 20 2a 2f 0a 20 20 20 | 20 69 66 20 28 28 66 75 |n */. | if ((fu|
|00002510| 6e 2e 6e 5f 70 74 72 20 | 3d 20 78 6c 65 76 61 6c |n.n_ptr |= xleval|
|00002520| 28 66 75 6e 2e 6e 5f 70 | 74 72 29 29 20 3d 3d 20 |(fun.n_p|tr)) == |
|00002530| 4e 49 4c 29 0a 09 78 6c | 66 61 69 6c 28 22 62 61 |NIL)..xl|fail("ba|
|00002540| 64 20 66 75 6e 63 74 69 | 6f 6e 22 29 3b 0a 0a 20 |d functi|on");.. |
|00002550| 20 20 20 2f 2a 20 65 76 | 61 6c 75 61 74 65 20 74 | /* ev|aluate t|
|00002560| 68 65 20 66 75 6e 63 74 | 69 6f 6e 20 2a 2f 0a 20 |he funct|ion */. |
|00002570| 20 20 20 69 66 20 28 73 | 75 62 72 70 28 66 75 6e | if (s|ubrp(fun|
|00002580| 2e 6e 5f 70 74 72 29 20 | 7c 7c 20 66 73 75 62 72 |.n_ptr) ||| fsubr|
|00002590| 70 28 66 75 6e 2e 6e 5f | 70 74 72 29 29 20 7b 0a |p(fun.n_|ptr)) {.|
|000025a0| 09 69 66 20 28 73 75 62 | 72 70 28 66 75 6e 2e 6e |.if (sub|rp(fun.n|
|000025b0| 5f 70 74 72 29 29 0a 09 | 20 20 20 20 61 72 67 73 |_ptr))..| args|
|000025c0| 2e 6e 5f 70 74 72 20 3d | 20 78 6c 65 76 6c 69 73 |.n_ptr =| xlevlis|
|000025d0| 74 28 61 72 67 73 2e 6e | 5f 70 74 72 29 3b 0a 09 |t(args.n|_ptr);..|
|000025e0| 76 61 6c 20 3d 20 28 2a | 66 75 6e 2e 6e 5f 70 74 |val = (*|fun.n_pt|
|000025f0| 72 2d 3e 6e 5f 73 75 62 | 72 29 28 61 72 67 73 2e |r->n_sub|r)(args.|
|00002600| 6e 5f 70 74 72 29 3b 0a | 20 20 20 20 7d 0a 20 20 |n_ptr);.| }. |
|00002610| 20 20 65 6c 73 65 20 69 | 66 20 28 63 6f 6e 73 70 | else i|f (consp|
|00002620| 28 66 75 6e 2e 6e 5f 70 | 74 72 29 29 20 7b 0a 09 |(fun.n_p|tr)) {..|
|00002630| 69 66 20 28 28 74 79 70 | 65 20 3d 20 63 61 72 28 |if ((typ|e = car(|
|00002640| 66 75 6e 2e 6e 5f 70 74 | 72 29 29 20 3d 3d 20 73 |fun.n_pt|r)) == s|
|00002650| 5f 6c 61 6d 62 64 61 29 | 20 7b 0a 09 20 20 20 20 |_lambda)| {.. |
|00002660| 61 72 67 73 2e 6e 5f 70 | 74 72 20 3d 20 78 6c 65 |args.n_p|tr = xle|
|00002670| 76 6c 69 73 74 28 61 72 | 67 73 2e 6e 5f 70 74 72 |vlist(ar|gs.n_ptr|
|00002680| 29 3b 0a 09 20 20 20 20 | 76 61 6c 20 3d 20 65 76 |);.. |val = ev|
|00002690| 66 75 6e 28 66 75 6e 2e | 6e 5f 70 74 72 2c 61 72 |fun(fun.|n_ptr,ar|
|000026a0| 67 73 2e 6e 5f 70 74 72 | 29 3b 0a 09 7d 0a 09 65 |gs.n_ptr|);..}..e|
|000026b0| 6c 73 65 20 69 66 20 28 | 74 79 70 65 20 3d 3d 20 |lse if (|type == |
|000026c0| 73 5f 6d 61 63 72 6f 29 | 20 7b 0a 09 20 20 20 20 |s_macro)| {.. |
|000026d0| 61 72 67 73 2e 6e 5f 70 | 74 72 20 3d 20 65 76 66 |args.n_p|tr = evf|
|000026e0| 75 6e 28 66 75 6e 2e 6e | 5f 70 74 72 2c 61 72 67 |un(fun.n|_ptr,arg|
|000026f0| 73 2e 6e 5f 70 74 72 29 | 3b 0a 09 20 20 20 20 76 |s.n_ptr)|;.. v|
|00002700| 61 6c 20 3d 20 78 6c 65 | 76 61 6c 28 61 72 67 73 |al = xle|val(args|
|00002710| 2e 6e 5f 70 74 72 29 3b | 0a 09 7d 0a 09 65 6c 73 |.n_ptr);|..}..els|
|00002720| 65 0a 09 20 20 20 20 78 | 6c 66 61 69 6c 28 22 62 |e.. x|lfail("b|
|00002730| 61 64 20 66 75 6e 63 74 | 69 6f 6e 20 74 79 70 65 |ad funct|ion type|
|00002740| 22 29 3b 0a 20 20 20 20 | 7d 0a 20 20 20 20 65 6c |");. |}. el|
|00002750| 73 65 20 69 66 20 28 6f | 62 6a 65 63 74 70 28 66 |se if (o|bjectp(f|
|00002760| 75 6e 2e 6e 5f 70 74 72 | 29 29 0a 09 76 61 6c 20 |un.n_ptr|))..val |
|00002770| 3d 20 78 6c 73 65 6e 64 | 28 66 75 6e 2e 6e 5f 70 |= xlsend|(fun.n_p|
|00002780| 74 72 2c 61 72 67 73 2e | 6e 5f 70 74 72 29 3b 0a |tr,args.|n_ptr);.|
|00002790| 20 20 20 20 65 6c 73 65 | 0a 09 78 6c 66 61 69 6c | else|..xlfail|
|000027a0| 28 22 62 61 64 20 66 75 | 6e 63 74 69 6f 6e 22 29 |("bad fu|nction")|
|000027b0| 3b 0a 0a 20 20 20 20 2f | 2a 20 72 65 73 74 6f 72 |;.. /|* restor|
|000027c0| 65 20 74 68 65 20 70 72 | 65 76 69 6f 75 73 20 73 |e the pr|evious s|
|000027d0| 74 61 63 6b 20 66 72 61 | 6d 65 20 2a 2f 0a 20 20 |tack fra|me */. |
|000027e0| 20 20 78 6c 73 74 61 63 | 6b 20 3d 20 6f 6c 64 73 | xlstac|k = olds|
|000027f0| 74 6b 3b 0a 0a 20 20 20 | 20 2f 2a 20 72 65 74 75 |tk;.. | /* retu|
|00002800| 72 6e 20 74 68 65 20 72 | 65 73 75 6c 74 20 76 61 |rn the r|esult va|
|00002810| 6c 75 65 20 2a 2f 0a 20 | 20 20 20 72 65 74 75 72 |lue */. | retur|
|00002820| 6e 20 28 76 61 6c 29 3b | 0a 7d 0a 0a 2f 2a 20 65 |n (val);|.}../* e|
|00002830| 76 61 6c 68 6f 6f 6b 20 | 2d 20 63 61 6c 6c 20 74 |valhook |- call t|
|00002840| 68 65 20 65 76 61 6c 68 | 6f 6f 6b 20 66 75 6e 63 |he evalh|ook func|
|00002850| 74 69 6f 6e 20 2a 2f 0a | 4c 4f 43 41 4c 20 4e 4f |tion */.|LOCAL NO|
|00002860| 44 45 20 2a 65 76 61 6c | 68 6f 6f 6b 28 65 78 70 |DE *eval|hook(exp|
|00002870| 72 29 0a 20 20 4e 4f 44 | 45 20 2a 65 78 70 72 3b |r). NOD|E *expr;|
|00002880| 0a 7b 0a 20 20 20 20 4e | 4f 44 45 20 2a 6f 6c 64 |.{. N|ODE *old|
|00002890| 73 74 6b 2c 2a 6f 6c 64 | 65 6e 76 2c 66 75 6e 2c |stk,*old|env,fun,|
|000028a0| 61 72 67 73 2c 2a 76 61 | 6c 3b 0a 0a 20 20 20 20 |args,*va|l;.. |
|000028b0| 2f 2a 20 63 72 65 61 74 | 65 20 61 20 6e 65 77 20 |/* creat|e a new |
|000028c0| 73 74 61 63 6b 20 66 72 | 61 6d 65 20 2a 2f 0a 20 |stack fr|ame */. |
|000028d0| 20 20 20 6f 6c 64 73 74 | 6b 20 3d 20 78 6c 73 61 | oldst|k = xlsa|
|000028e0| 76 65 28 26 66 75 6e 2c | 26 61 72 67 73 2c 4e 55 |ve(&fun,|&args,NU|
|000028f0| 4c 4c 29 3b 0a 0a 20 20 | 20 20 2f 2a 20 67 65 74 |LL);.. | /* get|
|00002900| 20 74 68 65 20 68 6f 6f | 6b 20 66 75 6e 63 74 69 | the hoo|k functi|
|00002910| 6f 6e 20 2a 2f 0a 20 20 | 20 20 66 75 6e 2e 6e 5f |on */. | fun.n_|
|00002920| 70 74 72 20 3d 20 73 5f | 65 76 61 6c 68 6f 6f 6b |ptr = s_|evalhook|
|00002930| 2d 3e 6e 5f 73 79 6d 76 | 61 6c 75 65 3b 0a 0a 20 |->n_symv|alue;.. |
|00002940| 20 20 20 2f 2a 20 6d 61 | 6b 65 20 61 6e 20 61 72 | /* ma|ke an ar|
|00002950| 67 75 6d 65 6e 74 20 6c | 69 73 74 20 2a 2f 0a 20 |gument l|ist */. |
|00002960| 20 20 20 61 72 67 73 2e | 6e 5f 70 74 72 20 3d 20 | args.|n_ptr = |
|00002970| 6e 65 77 6e 6f 64 65 28 | 4c 49 53 54 29 3b 0a 20 |newnode(|LIST);. |
|00002980| 20 20 20 72 70 6c 61 63 | 61 28 61 72 67 73 2e 6e | rplac|a(args.n|
|00002990| 5f 70 74 72 2c 65 78 70 | 72 29 3b 0a 0a 20 20 20 |_ptr,exp|r);.. |
|000029a0| 20 2f 2a 20 72 65 62 69 | 6e 64 20 74 68 65 20 68 | /* rebi|nd the h|
|000029b0| 6f 6f 6b 20 66 75 6e 63 | 74 69 6f 6e 73 20 74 6f |ook func|tions to|
|000029c0| 20 6e 69 6c 20 2a 2f 0a | 20 20 20 20 6f 6c 64 65 | nil */.| olde|
|000029d0| 6e 76 20 3d 20 78 6c 65 | 6e 76 3b 0a 20 20 20 20 |nv = xle|nv;. |
|000029e0| 78 6c 73 62 69 6e 64 28 | 73 5f 65 76 61 6c 68 6f |xlsbind(|s_evalho|
|000029f0| 6f 6b 2c 4e 49 4c 29 3b | 0a 20 20 20 20 78 6c 73 |ok,NIL);|. xls|
|00002a00| 62 69 6e 64 28 73 5f 61 | 70 70 6c 79 68 6f 6f 6b |bind(s_a|pplyhook|
|00002a10| 2c 4e 49 4c 29 3b 0a 0a | 20 20 20 20 2f 2a 20 63 |,NIL);..| /* c|
|00002a20| 61 6c 6c 20 74 68 65 20 | 68 6f 6f 6b 20 66 75 6e |all the |hook fun|
|00002a30| 63 74 69 6f 6e 20 2a 2f | 0a 20 20 20 20 76 61 6c |ction */|. val|
|00002a40| 20 3d 20 78 6c 61 70 70 | 6c 79 28 66 75 6e 2e 6e | = xlapp|ly(fun.n|
|00002a50| 5f 70 74 72 2c 61 72 67 | 73 2e 6e 5f 70 74 72 29 |_ptr,arg|s.n_ptr)|
|00002a60| 3b 0a 0a 20 20 20 20 2f | 2a 20 75 6e 62 69 6e 64 |;.. /|* unbind|
|00002a70| 20 74 68 65 20 73 79 6d | 62 6f 6c 73 20 2a 2f 0a | the sym|bols */.|
|00002a80| 20 20 20 20 78 6c 75 6e | 62 69 6e 64 28 6f 6c 64 | xlun|bind(old|
|00002a90| 65 6e 76 29 3b 0a 0a 20 | 20 20 20 2f 2a 20 72 65 |env);.. | /* re|
|00002aa0| 73 74 6f 72 65 20 74 68 | 65 20 70 72 65 76 69 6f |store th|e previo|
|00002ab0| 75 73 20 73 74 61 63 6b | 20 66 72 61 6d 65 20 2a |us stack| frame *|
|00002ac0| 2f 0a 20 20 20 20 78 6c | 73 74 61 63 6b 20 3d 20 |/. xl|stack = |
|00002ad0| 6f 6c 64 73 74 6b 3b 0a | 0a 20 20 20 20 2f 2a 20 |oldstk;.|. /* |
|00002ae0| 72 65 74 75 72 6e 20 74 | 68 65 20 76 61 6c 75 65 |return t|he value|
|00002af0| 20 2a 2f 0a 20 20 20 20 | 72 65 74 75 72 6e 20 28 | */. |return (|
|00002b00| 76 61 6c 29 3b 0a 7d 0a | 0a 2f 2a 20 78 6c 65 76 |val);.}.|./* xlev|
|00002b10| 6c 69 73 74 20 2d 20 65 | 76 61 6c 75 61 74 65 20 |list - e|valuate |
|00002b20| 61 20 6c 69 73 74 20 6f | 66 20 61 72 67 75 6d 65 |a list o|f argume|
|00002b30| 6e 74 73 20 2a 2f 0a 4e | 4f 44 45 20 2a 78 6c 65 |nts */.N|ODE *xle|
|00002b40| 76 6c 69 73 74 28 61 72 | 67 73 29 0a 20 20 4e 4f |vlist(ar|gs). NO|
|00002b50| 44 45 20 2a 61 72 67 73 | 3b 0a 7b 0a 20 20 20 20 |DE *args|;.{. |
|00002b60| 4e 4f 44 45 20 2a 6f 6c | 64 73 74 6b 2c 73 72 63 |NODE *ol|dstk,src|
|00002b70| 2c 64 73 74 2c 2a 6e 65 | 77 2c 2a 6c 61 73 74 2c |,dst,*ne|w,*last,|
|00002b80| 2a 76 61 6c 3b 0a 0a 20 | 20 20 20 2f 2a 20 63 72 |*val;.. | /* cr|
|00002b90| 65 61 74 65 20 61 20 73 | 74 61 63 6b 20 66 72 61 |eate a s|tack fra|
|00002ba0| 6d 65 20 2a 2f 0a 20 20 | 20 20 6f 6c 64 73 74 6b |me */. | oldstk|
|00002bb0| 20 3d 20 78 6c 73 61 76 | 65 28 26 73 72 63 2c 26 | = xlsav|e(&src,&|
|00002bc0| 64 73 74 2c 4e 55 4c 4c | 29 3b 0a 0a 20 20 20 20 |dst,NULL|);.. |
|00002bd0| 2f 2a 20 69 6e 69 74 69 | 61 6c 69 7a 65 20 2a 2f |/* initi|alize */|
|00002be0| 0a 20 20 20 20 73 72 63 | 2e 6e 5f 70 74 72 20 3d |. src|.n_ptr =|
|00002bf0| 20 61 72 67 73 3b 0a 0a | 20 20 20 20 2f 2a 20 65 | args;..| /* e|
|00002c00| 76 61 6c 75 61 74 65 20 | 65 61 63 68 20 61 72 67 |valuate |each arg|
|00002c10| 75 6d 65 6e 74 20 2a 2f | 0a 20 20 20 20 66 6f 72 |ument */|. for|
|00002c20| 20 28 76 61 6c 20 3d 20 | 4e 49 4c 3b 20 73 72 63 | (val = |NIL; src|
|00002c30| 2e 6e 5f 70 74 72 3b 20 | 73 72 63 2e 6e 5f 70 74 |.n_ptr; |src.n_pt|
|00002c40| 72 20 3d 20 63 64 72 28 | 73 72 63 2e 6e 5f 70 74 |r = cdr(|src.n_pt|
|00002c50| 72 29 29 20 7b 0a 0a 09 | 2f 2a 20 63 68 65 63 6b |r)) {...|/* check|
|00002c60| 20 74 68 69 73 20 65 6e | 74 72 79 20 2a 2f 0a 09 | this en|try */..|
|00002c70| 69 66 20 28 21 63 6f 6e | 73 70 28 73 72 63 2e 6e |if (!con|sp(src.n|
|00002c80| 5f 70 74 72 29 29 0a 09 | 20 20 20 20 78 6c 66 61 |_ptr))..| xlfa|
|00002c90| 69 6c 28 22 62 61 64 20 | 61 72 67 75 6d 65 6e 74 |il("bad |argument|
|00002ca0| 20 6c 69 73 74 22 29 3b | 0a 0a 09 2f 2a 20 61 6c | list");|.../* al|
|00002cb0| 6c 6f 63 61 74 65 20 61 | 20 6e 65 77 20 6c 69 73 |locate a| new lis|
|00002cc0| 74 20 65 6e 74 72 79 20 | 2a 2f 0a 09 6e 65 77 20 |t entry |*/..new |
|00002cd0| 3d 20 6e 65 77 6e 6f 64 | 65 28 4c 49 53 54 29 3b |= newnod|e(LIST);|
|00002ce0| 0a 09 69 66 20 28 76 61 | 6c 29 0a 09 20 20 20 20 |..if (va|l).. |
|00002cf0| 72 70 6c 61 63 64 28 6c | 61 73 74 2c 6e 65 77 29 |rplacd(l|ast,new)|
|00002d00| 3b 0a 09 65 6c 73 65 0a | 09 20 20 20 20 76 61 6c |;..else.|. val|
|00002d10| 20 3d 20 64 73 74 2e 6e | 5f 70 74 72 20 3d 20 6e | = dst.n|_ptr = n|
|00002d20| 65 77 3b 0a 09 72 70 6c | 61 63 61 28 6e 65 77 2c |ew;..rpl|aca(new,|
|00002d30| 78 6c 65 76 61 6c 28 63 | 61 72 28 73 72 63 2e 6e |xleval(c|ar(src.n|
|00002d40| 5f 70 74 72 29 29 29 3b | 0a 09 6c 61 73 74 20 3d |_ptr)));|..last =|
|00002d50| 20 6e 65 77 3b 0a 20 20 | 20 20 7d 0a 0a 20 20 20 | new;. | }.. |
|00002d60| 20 2f 2a 20 72 65 73 74 | 6f 72 65 20 74 68 65 20 | /* rest|ore the |
|00002d70| 70 72 65 76 69 6f 75 73 | 20 73 74 61 63 6b 20 66 |previous| stack f|
|00002d80| 72 61 6d 65 20 2a 2f 0a | 20 20 20 20 78 6c 73 74 |rame */.| xlst|
|00002d90| 61 63 6b 20 3d 20 6f 6c | 64 73 74 6b 3b 0a 0a 20 |ack = ol|dstk;.. |
|00002da0| 20 20 20 2f 2a 20 72 65 | 74 75 72 6e 20 74 68 65 | /* re|turn the|
|00002db0| 20 6e 65 77 20 6c 69 73 | 74 20 2a 2f 0a 20 20 20 | new lis|t */. |
|00002dc0| 20 72 65 74 75 72 6e 20 | 28 76 61 6c 29 3b 0a 7d | return |(val);.}|
|00002dd0| 0a 0a 2f 2a 20 65 76 73 | 79 6d 20 2d 20 65 76 61 |../* evs|ym - eva|
|00002de0| 6c 75 61 74 65 20 61 20 | 73 79 6d 62 6f 6c 20 2a |luate a |symbol *|
|00002df0| 2f 0a 4c 4f 43 41 4c 20 | 4e 4f 44 45 20 2a 65 76 |/.LOCAL |NODE *ev|
|00002e00| 73 79 6d 28 73 79 6d 29 | 0a 20 20 4e 4f 44 45 20 |sym(sym)|. NODE |
|00002e10| 2a 73 79 6d 3b 0a 7b 0a | 20 20 20 20 4e 4f 44 45 |*sym;.{.| NODE|
|00002e20| 20 2a 70 3b 0a 0a 20 20 | 20 20 2f 2a 20 63 68 65 | *p;.. | /* che|
|00002e30| 63 6b 20 66 6f 72 20 61 | 20 72 65 66 65 72 65 6e |ck for a| referen|
|00002e40| 63 65 20 74 6f 20 61 6e | 20 69 6e 73 74 61 6e 63 |ce to an| instanc|
|00002e50| 65 20 76 61 72 69 61 62 | 6c 65 20 2a 2f 0a 20 20 |e variab|le */. |
|00002e60| 20 20 69 66 20 28 28 70 | 20 3d 20 78 6c 6f 62 73 | if ((p| = xlobs|
|00002e70| 79 6d 28 73 79 6d 29 29 | 20 21 3d 20 4e 49 4c 29 |ym(sym))| != NIL)|
|00002e80| 0a 09 72 65 74 75 72 6e | 20 28 63 61 72 28 70 29 |..return| (car(p)|
|00002e90| 29 3b 0a 0a 20 20 20 20 | 2f 2a 20 67 65 74 20 74 |);.. |/* get t|
|00002ea0| 68 65 20 76 61 6c 75 65 | 20 6f 66 20 74 68 65 20 |he value| of the |
|00002eb0| 76 61 72 69 61 62 6c 65 | 20 2a 2f 0a 20 20 20 20 |variable| */. |
|00002ec0| 77 68 69 6c 65 20 28 28 | 70 20 3d 20 73 79 6d 2d |while ((|p = sym-|
|00002ed0| 3e 6e 5f 73 79 6d 76 61 | 6c 75 65 29 20 3d 3d 20 |>n_symva|lue) == |
|00002ee0| 73 5f 75 6e 62 6f 75 6e | 64 29 0a 09 78 6c 75 6e |s_unboun|d)..xlun|
|00002ef0| 62 6f 75 6e 64 28 73 79 | 6d 29 3b 0a 0a 20 20 20 |bound(sy|m);.. |
|00002f00| 20 2f 2a 20 72 65 74 75 | 72 6e 20 74 68 65 20 76 | /* retu|rn the v|
|00002f10| 61 6c 75 65 20 2a 2f 0a | 20 20 20 20 72 65 74 75 |alue */.| retu|
|00002f20| 72 6e 20 28 70 29 3b 0a | 7d 0a 0a 2f 2a 20 78 6c |rn (p);.|}../* xl|
|00002f30| 75 6e 62 6f 75 6e 64 20 | 2d 20 73 69 67 6e 61 6c |unbound |- signal|
|00002f40| 20 61 6e 20 75 6e 62 6f | 75 6e 64 20 76 61 72 69 | an unbo|und vari|
|00002f50| 61 62 6c 65 20 65 72 72 | 6f 72 20 2a 2f 0a 78 6c |able err|or */.xl|
|00002f60| 75 6e 62 6f 75 6e 64 28 | 73 79 6d 29 0a 20 20 4e |unbound(|sym). N|
|00002f70| 4f 44 45 20 2a 73 79 6d | 3b 0a 7b 0a 20 20 20 20 |ODE *sym|;.{. |
|00002f80| 78 6c 63 65 72 72 6f 72 | 28 22 74 72 79 20 65 76 |xlcerror|("try ev|
|00002f90| 61 6c 75 61 74 69 6e 67 | 20 73 79 6d 62 6f 6c 20 |aluating| symbol |
|00002fa0| 61 67 61 69 6e 22 2c 22 | 75 6e 62 6f 75 6e 64 20 |again","|unbound |
|00002fb0| 76 61 72 69 61 62 6c 65 | 22 2c 73 79 6d 29 3b 0a |variable|",sym);.|
|00002fc0| 7d 0a 0a 2f 2a 20 65 76 | 66 75 6e 20 2d 20 65 76 |}../* ev|fun - ev|
|00002fd0| 61 6c 75 61 74 65 20 61 | 20 66 75 6e 63 74 69 6f |aluate a| functio|
|00002fe0| 6e 20 2a 2f 0a 4c 4f 43 | 41 4c 20 4e 4f 44 45 20 |n */.LOC|AL NODE |
|00002ff0| 2a 65 76 66 75 6e 28 66 | 75 6e 2c 61 72 67 73 29 |*evfun(f|un,args)|
|00003000| 0a 20 20 4e 4f 44 45 20 | 2a 66 75 6e 2c 2a 61 72 |. NODE |*fun,*ar|
|00003010| 67 73 3b 0a 7b 0a 20 20 | 20 20 4e 4f 44 45 20 2a |gs;.{. | NODE *|
|00003020| 6f 6c 64 73 74 6b 2c 2a | 6f 6c 64 65 6e 76 2c 2a |oldstk,*|oldenv,*|
|00003030| 6f 6c 64 6e 65 77 65 6e | 76 2c 63 70 74 72 2c 2a |oldnewen|v,cptr,*|
|00003040| 66 61 72 67 73 2c 2a 76 | 61 6c 3b 0a 0a 20 20 20 |fargs,*v|al;.. |
|00003050| 20 2f 2a 20 63 72 65 61 | 74 65 20 61 20 73 74 61 | /* crea|te a sta|
|00003060| 63 6b 20 66 72 61 6d 65 | 20 2a 2f 0a 20 20 20 20 |ck frame| */. |
|00003070| 6f 6c 64 73 74 6b 20 3d | 20 78 6c 73 61 76 65 28 |oldstk =| xlsave(|
|00003080| 26 63 70 74 72 2c 4e 55 | 4c 4c 29 3b 0a 0a 20 20 |&cptr,NU|LL);.. |
|00003090| 20 20 2f 2a 20 73 6b 69 | 70 20 74 68 65 20 66 75 | /* ski|p the fu|
|000030a0| 6e 63 74 69 6f 6e 20 74 | 79 70 65 20 2a 2f 0a 20 |nction t|ype */. |
|000030b0| 20 20 20 69 66 20 28 28 | 66 75 6e 20 3d 20 63 64 | if ((|fun = cd|
|000030c0| 72 28 66 75 6e 29 29 20 | 3d 3d 20 4e 49 4c 20 7c |r(fun)) |== NIL ||
|000030d0| 7c 20 21 63 6f 6e 73 70 | 28 66 75 6e 29 29 0a 09 || !consp|(fun))..|
|000030e0| 78 6c 66 61 69 6c 28 22 | 62 61 64 20 66 75 6e 63 |xlfail("|bad func|
|000030f0| 74 69 6f 6e 20 64 65 66 | 69 6e 69 74 69 6f 6e 22 |tion def|inition"|
|00003100| 29 3b 0a 0a 20 20 20 20 | 2f 2a 20 67 65 74 20 74 |);.. |/* get t|
|00003110| 68 65 20 66 6f 72 6d 61 | 6c 20 61 72 67 75 6d 65 |he forma|l argume|
|00003120| 6e 74 20 6c 69 73 74 20 | 2a 2f 0a 20 20 20 20 69 |nt list |*/. i|
|00003130| 66 20 28 28 66 61 72 67 | 73 20 3d 20 63 61 72 28 |f ((farg|s = car(|
|00003140| 66 75 6e 29 29 20 26 26 | 20 21 63 6f 6e 73 70 28 |fun)) &&| !consp(|
|00003150| 66 61 72 67 73 29 29 0a | 09 78 6c 66 61 69 6c 28 |fargs)).|.xlfail(|
|00003160| 22 62 61 64 20 66 6f 72 | 6d 61 6c 20 61 72 67 75 |"bad for|mal argu|
|00003170| 6d 65 6e 74 20 6c 69 73 | 74 22 29 3b 0a 0a 20 20 |ment lis|t");.. |
|00003180| 20 20 2f 2a 20 62 69 6e | 64 20 74 68 65 20 66 6f | /* bin|d the fo|
|00003190| 72 6d 61 6c 20 70 61 72 | 61 6d 65 74 65 72 73 20 |rmal par|ameters |
|000031a0| 2a 2f 0a 20 20 20 20 6f | 6c 64 6e 65 77 65 6e 76 |*/. o|ldnewenv|
|000031b0| 20 3d 20 78 6c 6e 65 77 | 65 6e 76 3b 20 6f 6c 64 | = xlnew|env; old|
|000031c0| 65 6e 76 20 3d 20 78 6c | 6e 65 77 65 6e 76 20 3d |env = xl|newenv =|
|000031d0| 20 78 6c 65 6e 76 3b 0a | 20 20 20 20 78 6c 61 62 | xlenv;.| xlab|
|000031e0| 69 6e 64 28 66 61 72 67 | 73 2c 61 72 67 73 29 3b |ind(farg|s,args);|
|000031f0| 0a 20 20 20 20 78 6c 66 | 69 78 62 69 6e 64 69 6e |. xlf|ixbindin|
|00003200| 67 73 28 29 3b 0a 0a 20 | 20 20 20 2f 2a 20 65 78 |gs();.. | /* ex|
|00003210| 65 63 75 74 65 20 74 68 | 65 20 63 6f 64 65 20 2a |ecute th|e code *|
|00003220| 2f 0a 20 20 20 20 66 6f | 72 20 28 63 70 74 72 2e |/. fo|r (cptr.|
|00003230| 6e 5f 70 74 72 20 3d 20 | 63 64 72 28 66 75 6e 29 |n_ptr = |cdr(fun)|
|00003240| 3b 20 63 70 74 72 2e 6e | 5f 70 74 72 20 21 3d 20 |; cptr.n|_ptr != |
|00003250| 4e 49 4c 3b 20 29 0a 09 | 76 61 6c 20 3d 20 78 6c |NIL; )..|val = xl|
|00003260| 65 76 61 72 67 28 26 63 | 70 74 72 2e 6e 5f 70 74 |evarg(&c|ptr.n_pt|
|00003270| 72 29 3b 0a 0a 20 20 20 | 20 2f 2a 20 72 65 73 74 |r);.. | /* rest|
|00003280| 6f 72 65 20 74 68 65 20 | 65 6e 76 69 72 6f 6e 6d |ore the |environm|
|00003290| 65 6e 74 20 2a 2f 0a 20 | 20 20 20 78 6c 75 6e 62 |ent */. | xlunb|
|000032a0| 69 6e 64 28 6f 6c 64 65 | 6e 76 29 3b 20 78 6c 6e |ind(olde|nv); xln|
|000032b0| 65 77 65 6e 76 20 3d 20 | 6f 6c 64 6e 65 77 65 6e |ewenv = |oldnewen|
|000032c0| 76 3b 0a 0a 20 20 20 20 | 2f 2a 20 72 65 73 74 6f |v;.. |/* resto|
|000032d0| 72 65 20 74 68 65 20 70 | 72 65 76 69 6f 75 73 20 |re the p|revious |
|000032e0| 73 74 61 63 6b 20 66 72 | 61 6d 65 20 2a 2f 0a 20 |stack fr|ame */. |
|000032f0| 20 20 20 78 6c 73 74 61 | 63 6b 20 3d 20 6f 6c 64 | xlsta|ck = old|
|00003300| 73 74 6b 3b 0a 0a 20 20 | 20 20 2f 2a 20 72 65 74 |stk;.. | /* ret|
|00003310| 75 72 6e 20 74 68 65 20 | 72 65 73 75 6c 74 20 76 |urn the |result v|
|00003320| 61 6c 75 65 20 2a 2f 0a | 20 20 20 20 72 65 74 75 |alue */.| retu|
|00003330| 72 6e 20 28 76 61 6c 29 | 3b 0a 7d 0a 0a 2f 2a 20 |rn (val)|;.}../* |
|00003340| 78 6c 61 62 69 6e 64 20 | 2d 20 62 69 6e 64 20 74 |xlabind |- bind t|
|00003350| 68 65 20 61 72 67 75 6d | 65 6e 74 73 20 66 6f 72 |he argum|ents for|
|00003360| 20 61 20 66 75 6e 63 74 | 69 6f 6e 20 2a 2f 0a 78 | a funct|ion */.x|
|00003370| 6c 61 62 69 6e 64 28 66 | 61 72 67 73 2c 61 61 72 |labind(f|args,aar|
|00003380| 67 73 29 0a 20 20 4e 4f | 44 45 20 2a 66 61 72 67 |gs). NO|DE *farg|
|00003390| 73 2c 2a 61 61 72 67 73 | 3b 0a 7b 0a 20 20 20 20 |s,*aargs|;.{. |
|000033a0| 4e 4f 44 45 20 2a 61 72 | 67 3b 0a 0a 20 20 20 20 |NODE *ar|g;.. |
|000033b0| 2f 2a 20 65 76 61 6c 75 | 61 74 65 20 61 6e 64 20 |/* evalu|ate and |
|000033c0| 62 69 6e 64 20 65 61 63 | 68 20 72 65 71 75 69 72 |bind eac|h requir|
|000033d0| 65 64 20 61 72 67 75 6d | 65 6e 74 20 2a 2f 0a 20 |ed argum|ent */. |
|000033e0| 20 20 20 77 68 69 6c 65 | 20 28 63 6f 6e 73 70 28 | while| (consp(|
|000033f0| 66 61 72 67 73 29 20 26 | 26 20 21 69 73 6b 65 79 |fargs) &|& !iskey|
|00003400| 77 6f 72 64 28 61 72 67 | 20 3d 20 63 61 72 28 66 |word(arg| = car(f|
|00003410| 61 72 67 73 29 29 20 26 | 26 20 63 6f 6e 73 70 28 |args)) &|& consp(|
|00003420| 61 61 72 67 73 29 29 20 | 7b 0a 0a 09 2f 2a 20 62 |aargs)) |{.../* b|
|00003430| 69 6e 64 20 74 68 65 20 | 66 6f 72 6d 61 6c 20 76 |ind the |formal v|
|00003440| 61 72 69 61 62 6c 65 20 | 74 6f 20 74 68 65 20 61 |ariable |to the a|
|00003450| 72 67 75 6d 65 6e 74 20 | 76 61 6c 75 65 20 2a 2f |rgument |value */|
|00003460| 0a 09 78 6c 62 69 6e 64 | 28 61 72 67 2c 63 61 72 |..xlbind|(arg,car|
|00003470| 28 61 61 72 67 73 29 29 | 3b 0a 0a 09 2f 2a 20 6d |(aargs))|;.../* m|
|00003480| 6f 76 65 20 74 68 65 20 | 61 72 67 75 6d 65 6e 74 |ove the |argument|
|00003490| 20 6c 69 73 74 20 70 6f | 69 6e 74 65 72 73 20 61 | list po|inters a|
|000034a0| 68 65 61 64 20 2a 2f 0a | 09 66 61 72 67 73 20 3d |head */.|.fargs =|
|000034b0| 20 63 64 72 28 66 61 72 | 67 73 29 3b 0a 09 61 61 | cdr(far|gs);..aa|
|000034c0| 72 67 73 20 3d 20 63 64 | 72 28 61 61 72 67 73 29 |rgs = cd|r(aargs)|
|000034d0| 3b 0a 20 20 20 20 7d 0a | 0a 20 20 20 20 2f 2a 20 |;. }.|. /* |
|000034e0| 63 68 65 63 6b 20 66 6f | 72 20 74 68 65 20 27 26 |check fo|r the '&|
|000034f0| 6f 70 74 69 6f 6e 61 6c | 27 20 6b 65 79 77 6f 72 |optional|' keywor|
|00003500| 64 20 2a 2f 0a 20 20 20 | 20 69 66 20 28 63 6f 6e |d */. | if (con|
|00003510| 73 70 28 66 61 72 67 73 | 29 20 26 26 20 63 61 72 |sp(fargs|) && car|
|00003520| 28 66 61 72 67 73 29 20 | 3d 3d 20 6b 5f 6f 70 74 |(fargs) |== k_opt|
|00003530| 69 6f 6e 61 6c 29 20 7b | 0a 09 66 61 72 67 73 20 |ional) {|..fargs |
|00003540| 3d 20 63 64 72 28 66 61 | 72 67 73 29 3b 0a 0a 09 |= cdr(fa|rgs);...|
|00003550| 2f 2a 20 62 69 6e 64 20 | 74 68 65 20 61 72 67 75 |/* bind |the argu|
|00003560| 6d 65 6e 74 73 20 74 68 | 61 74 20 77 65 72 65 20 |ments th|at were |
|00003570| 73 75 70 70 6c 69 65 64 | 20 2a 2f 0a 09 77 68 69 |supplied| */..whi|
|00003580| 6c 65 20 28 63 6f 6e 73 | 70 28 66 61 72 67 73 29 |le (cons|p(fargs)|
|00003590| 20 26 26 20 21 69 73 6b | 65 79 77 6f 72 64 28 61 | && !isk|eyword(a|
|000035a0| 72 67 20 3d 20 63 61 72 | 28 66 61 72 67 73 29 29 |rg = car|(fargs))|
|000035b0| 20 26 26 20 63 6f 6e 73 | 70 28 61 61 72 67 73 29 | && cons|p(aargs)|
|000035c0| 29 20 7b 0a 0a 09 20 20 | 20 20 2f 2a 20 62 69 6e |) {... | /* bin|
|000035d0| 64 20 74 68 65 20 66 6f | 72 6d 61 6c 20 76 61 72 |d the fo|rmal var|
|000035e0| 69 61 62 6c 65 20 74 6f | 20 74 68 65 20 61 72 67 |iable to| the arg|
|000035f0| 75 6d 65 6e 74 20 76 61 | 6c 75 65 20 2a 2f 0a 09 |ument va|lue */..|
|00003600| 20 20 20 20 78 6c 62 69 | 6e 64 28 61 72 67 2c 63 | xlbi|nd(arg,c|
|00003610| 61 72 28 61 61 72 67 73 | 29 29 3b 0a 0a 09 20 20 |ar(aargs|));... |
|00003620| 20 20 2f 2a 20 6d 6f 76 | 65 20 74 68 65 20 61 72 | /* mov|e the ar|
|00003630| 67 75 6d 65 6e 74 20 6c | 69 73 74 20 70 6f 69 6e |gument l|ist poin|
|00003640| 74 65 72 73 20 61 68 65 | 61 64 20 2a 2f 0a 09 20 |ters ahe|ad */.. |
|00003650| 20 20 20 66 61 72 67 73 | 20 3d 20 63 64 72 28 66 | fargs| = cdr(f|
|00003660| 61 72 67 73 29 3b 0a 09 | 20 20 20 20 61 61 72 67 |args);..| aarg|
|00003670| 73 20 3d 20 63 64 72 28 | 61 61 72 67 73 29 3b 0a |s = cdr(|aargs);.|
|00003680| 09 7d 0a 0a 09 2f 2a 20 | 62 69 6e 64 20 74 68 65 |.}.../* |bind the|
|00003690| 20 72 65 73 74 20 74 6f | 20 6e 69 6c 20 2a 2f 0a | rest to| nil */.|
|000036a0| 09 77 68 69 6c 65 20 28 | 63 6f 6e 73 70 28 66 61 |.while (|consp(fa|
|000036b0| 72 67 73 29 20 26 26 20 | 21 69 73 6b 65 79 77 6f |rgs) && |!iskeywo|
|000036c0| 72 64 28 61 72 67 20 3d | 20 63 61 72 28 66 61 72 |rd(arg =| car(far|
|000036d0| 67 73 29 29 29 20 7b 0a | 0a 09 20 20 20 20 2f 2a |gs))) {.|.. /*|
|000036e0| 20 62 69 6e 64 20 74 68 | 65 20 66 6f 72 6d 61 6c | bind th|e formal|
|000036f0| 20 76 61 72 69 61 62 6c | 65 20 74 6f 20 6e 69 6c | variabl|e to nil|
|00003700| 20 2a 2f 0a 09 20 20 20 | 20 78 6c 62 69 6e 64 28 | */.. | xlbind(|
|00003710| 61 72 67 2c 4e 49 4c 29 | 3b 0a 0a 09 20 20 20 20 |arg,NIL)|;... |
|00003720| 2f 2a 20 6d 6f 76 65 20 | 74 68 65 20 61 72 67 75 |/* move |the argu|
|00003730| 6d 65 6e 74 20 6c 69 73 | 74 20 70 6f 69 6e 74 65 |ment lis|t pointe|
|00003740| 72 20 61 68 65 61 64 20 | 2a 2f 0a 09 20 20 20 20 |r ahead |*/.. |
|00003750| 66 61 72 67 73 20 3d 20 | 63 64 72 28 66 61 72 67 |fargs = |cdr(farg|
|00003760| 73 29 3b 0a 09 7d 0a 20 | 20 20 20 7d 0a 0a 20 20 |s);..}. | }.. |
|00003770| 20 20 2f 2a 20 63 68 65 | 63 6b 20 66 6f 72 20 74 | /* che|ck for t|
|00003780| 68 65 20 27 26 72 65 73 | 74 27 20 6b 65 79 77 6f |he '&res|t' keywo|
|00003790| 72 64 20 2a 2f 0a 20 20 | 20 20 69 66 20 28 63 6f |rd */. | if (co|
|000037a0| 6e 73 70 28 66 61 72 67 | 73 29 20 26 26 20 63 61 |nsp(farg|s) && ca|
|000037b0| 72 28 66 61 72 67 73 29 | 20 3d 3d 20 6b 5f 72 65 |r(fargs)| == k_re|
|000037c0| 73 74 29 20 7b 0a 09 66 | 61 72 67 73 20 3d 20 63 |st) {..f|args = c|
|000037d0| 64 72 28 66 61 72 67 73 | 29 3b 0a 09 69 66 20 28 |dr(fargs|);..if (|
|000037e0| 63 6f 6e 73 70 28 66 61 | 72 67 73 29 20 26 26 20 |consp(fa|rgs) && |
|000037f0| 28 61 72 67 20 3d 20 63 | 61 72 28 66 61 72 67 73 |(arg = c|ar(fargs|
|00003800| 29 29 20 26 26 20 21 69 | 73 6b 65 79 77 6f 72 64 |)) && !i|skeyword|
|00003810| 28 61 72 67 29 29 0a 09 | 20 20 20 20 78 6c 62 69 |(arg))..| xlbi|
|00003820| 6e 64 28 61 72 67 2c 61 | 61 72 67 73 29 3b 0a 09 |nd(arg,a|args);..|
|00003830| 65 6c 73 65 0a 09 20 20 | 20 20 78 6c 66 61 69 6c |else.. | xlfail|
|00003840| 28 22 73 79 6d 62 6f 6c | 20 6d 69 73 73 69 6e 67 |("symbol| missing|
|00003850| 20 61 66 74 65 72 20 26 | 72 65 73 74 22 29 3b 0a | after &|rest");.|
|00003860| 09 66 61 72 67 73 20 3d | 20 63 64 72 28 66 61 72 |.fargs =| cdr(far|
|00003870| 67 73 29 3b 0a 09 61 61 | 72 67 73 20 3d 20 4e 49 |gs);..aa|rgs = NI|
|00003880| 4c 3b 0a 20 20 20 20 7d | 0a 0a 20 20 20 20 2f 2a |L;. }|.. /*|
|00003890| 20 63 68 65 63 6b 20 66 | 6f 72 20 74 68 65 20 27 | check f|or the '|
|000038a0| 26 61 75 78 27 20 6b 65 | 79 77 6f 72 64 20 2a 2f |&aux' ke|yword */|
|000038b0| 0a 20 20 20 20 69 66 20 | 28 63 6f 6e 73 70 28 66 |. if |(consp(f|
|000038c0| 61 72 67 73 29 20 26 26 | 20 63 61 72 28 66 61 72 |args) &&| car(far|
|000038d0| 67 73 29 20 3d 3d 20 6b | 5f 61 75 78 29 0a 09 77 |gs) == k|_aux)..w|
|000038e0| 68 69 6c 65 20 28 28 66 | 61 72 67 73 20 3d 20 63 |hile ((f|args = c|
|000038f0| 64 72 28 66 61 72 67 73 | 29 29 20 21 3d 20 4e 49 |dr(fargs|)) != NI|
|00003900| 4c 20 26 26 20 63 6f 6e | 73 70 28 66 61 72 67 73 |L && con|sp(fargs|
|00003910| 29 29 0a 09 20 20 20 20 | 78 6c 62 69 6e 64 28 63 |)).. |xlbind(c|
|00003920| 61 72 28 66 61 72 67 73 | 29 2c 4e 49 4c 29 3b 0a |ar(fargs|),NIL);.|
|00003930| 0a 20 20 20 20 2f 2a 20 | 6d 61 6b 65 20 73 75 72 |. /* |make sur|
|00003940| 65 20 74 68 65 20 63 6f | 72 72 65 63 74 20 6e 75 |e the co|rrect nu|
|00003950| 6d 62 65 72 20 6f 66 20 | 61 72 67 75 6d 65 6e 74 |mber of |argument|
|00003960| 73 20 77 65 72 65 20 73 | 75 70 70 6c 69 65 64 20 |s were s|upplied |
|00003970| 2a 2f 0a 20 20 20 20 69 | 66 20 28 66 61 72 67 73 |*/. i|f (fargs|
|00003980| 20 21 3d 20 61 61 72 67 | 73 29 0a 09 78 6c 66 61 | != aarg|s)..xlfa|
|00003990| 69 6c 28 66 61 72 67 73 | 20 3f 20 22 74 6f 6f 20 |il(fargs| ? "too |
|000039a0| 66 65 77 20 61 72 67 75 | 6d 65 6e 74 73 22 20 3a |few argu|ments" :|
|000039b0| 20 22 74 6f 6f 20 6d 61 | 6e 79 20 61 72 67 75 6d | "too ma|ny argum|
|000039c0| 65 6e 74 73 22 29 3b 0a | 7d 0a 0a 2f 2a 20 69 73 |ents");.|}../* is|
|000039d0| 6b 65 79 77 6f 72 64 20 | 2d 20 63 68 65 63 6b 20 |keyword |- check |
|000039e0| 74 6f 20 73 65 65 20 69 | 66 20 61 20 73 79 6d 62 |to see i|f a symb|
|000039f0| 6f 6c 20 69 73 20 61 20 | 6b 65 79 77 6f 72 64 20 |ol is a |keyword |
|00003a00| 2a 2f 0a 4c 4f 43 41 4c | 20 69 6e 74 20 69 73 6b |*/.LOCAL| int isk|
|00003a10| 65 79 77 6f 72 64 28 73 | 79 6d 29 0a 20 20 4e 4f |eyword(s|ym). NO|
|00003a20| 44 45 20 2a 73 79 6d 3b | 0a 7b 0a 20 20 20 20 72 |DE *sym;|.{. r|
|00003a30| 65 74 75 72 6e 20 28 73 | 79 6d 20 3d 3d 20 6b 5f |eturn (s|ym == k_|
|00003a40| 6f 70 74 69 6f 6e 61 6c | 20 7c 7c 20 73 79 6d 20 |optional| || sym |
|00003a50| 3d 3d 20 6b 5f 72 65 73 | 74 20 7c 7c 20 73 79 6d |== k_res|t || sym|
|00003a60| 20 3d 3d 20 6b 5f 61 75 | 78 29 3b 0a 7d 0a 0a 2f | == k_au|x);.}../|
|00003a70| 2a 20 78 6c 73 61 76 65 | 20 2d 20 73 61 76 65 20 |* xlsave| - save |
|00003a80| 6e 6f 64 65 73 20 6f 6e | 20 74 68 65 20 73 74 61 |nodes on| the sta|
|00003a90| 63 6b 20 2a 2f 0a 4e 4f | 44 45 20 2a 78 6c 73 61 |ck */.NO|DE *xlsa|
|00003aa0| 76 65 28 6e 29 0a 20 20 | 4e 4f 44 45 20 2a 6e 3b |ve(n). |NODE *n;|
|00003ab0| 0a 7b 0a 20 20 20 20 4e | 4f 44 45 20 2a 2a 6e 70 |.{. N|ODE **np|
|00003ac0| 74 72 2c 2a 6f 6c 64 73 | 74 6b 3b 0a 0a 20 20 20 |tr,*olds|tk;.. |
|00003ad0| 20 2f 2a 20 73 61 76 65 | 20 74 68 65 20 6f 6c 64 | /* save| the old|
|00003ae0| 20 73 74 61 63 6b 20 70 | 6f 69 6e 74 65 72 20 2a | stack p|ointer *|
|00003af0| 2f 0a 20 20 20 20 6f 6c | 64 73 74 6b 20 3d 20 78 |/. ol|dstk = x|
|00003b00| 6c 73 74 61 63 6b 3b 0a | 0a 20 20 20 20 2f 2a 20 |lstack;.|. /* |
|00003b10| 73 61 76 65 20 65 61 63 | 68 20 6e 6f 64 65 20 2a |save eac|h node *|
|00003b20| 2f 0a 20 20 20 20 66 6f | 72 20 28 6e 70 74 72 20 |/. fo|r (nptr |
|00003b30| 3d 20 26 6e 3b 20 2a 6e | 70 74 72 20 21 3d 20 4e |= &n; *n|ptr != N|
|00003b40| 55 4c 4c 3b 20 6e 70 74 | 72 2b 2b 29 20 7b 0a 09 |ULL; npt|r++) {..|
|00003b50| 72 70 6c 61 63 61 28 2a | 6e 70 74 72 2c 4e 49 4c |rplaca(*|nptr,NIL|
|00003b60| 29 3b 0a 09 72 70 6c 61 | 63 64 28 2a 6e 70 74 72 |);..rpla|cd(*nptr|
|00003b70| 2c 78 6c 73 74 61 63 6b | 29 3b 0a 09 78 6c 73 74 |,xlstack|);..xlst|
|00003b80| 61 63 6b 20 3d 20 2a 6e | 70 74 72 3b 0a 20 20 20 |ack = *n|ptr;. |
|00003b90| 20 7d 0a 0a 20 20 20 20 | 2f 2a 20 72 65 74 75 72 | }.. |/* retur|
|00003ba0| 6e 20 74 68 65 20 6f 6c | 64 20 73 74 61 63 6b 20 |n the ol|d stack |
|00003bb0| 70 6f 69 6e 74 65 72 20 | 2a 2f 0a 20 20 20 20 72 |pointer |*/. r|
|00003bc0| 65 74 75 72 6e 20 28 6f | 6c 64 73 74 6b 29 3b 0a |eturn (o|ldstk);.|
|00003bd0| 7d 0a 53 48 41 52 5f 45 | 4f 46 0a 69 66 20 74 65 |}.SHAR_E|OF.if te|
|00003be0| 73 74 20 37 36 38 38 20 | 2d 6e 65 20 22 60 77 63 |st 7688 |-ne "`wc|
|00003bf0| 20 2d 63 20 3c 20 27 78 | 6c 65 76 61 6c 2e 63 27 | -c < 'x|leval.c'|
|00003c00| 60 22 0a 74 68 65 6e 0a | 09 65 63 68 6f 20 73 68 |`".then.|.echo sh|
|00003c10| 61 72 3a 20 65 72 72 6f | 72 20 74 72 61 6e 73 6d |ar: erro|r transm|
|00003c20| 69 74 74 69 6e 67 20 22 | 27 78 6c 65 76 61 6c 2e |itting "|'xleval.|
|00003c30| 63 27 22 20 27 28 73 68 | 6f 75 6c 64 20 68 61 76 |c'" '(sh|ould hav|
|00003c40| 65 20 62 65 65 6e 20 37 | 36 38 38 20 63 68 61 72 |e been 7|688 char|
|00003c50| 61 63 74 65 72 73 29 27 | 0a 66 69 0a 66 69 20 23 |acters)'|.fi.fi #|
|00003c60| 20 65 6e 64 20 6f 66 20 | 6f 76 65 72 77 72 69 74 | end of |overwrit|
|00003c70| 69 6e 67 20 63 68 65 63 | 6b 0a 65 63 68 6f 20 73 |ing chec|k.echo s|
|00003c80| 68 61 72 3a 20 65 78 74 | 72 61 63 74 69 6e 67 20 |har: ext|racting |
|00003c90| 22 27 78 6c 66 69 6f 2e | 63 27 22 20 27 28 38 39 |"'xlfio.|c'" '(89|
|00003ca0| 36 30 20 63 68 61 72 61 | 63 74 65 72 73 29 27 0a |60 chara|cters)'.|
|00003cb0| 69 66 20 74 65 73 74 20 | 2d 66 20 27 78 6c 66 69 |if test |-f 'xlfi|
|00003cc0| 6f 2e 63 27 0a 74 68 65 | 6e 0a 09 65 63 68 6f 20 |o.c'.the|n..echo |
|00003cd0| 73 68 61 72 3a 20 77 69 | 6c 6c 20 6e 6f 74 20 6f |shar: wi|ll not o|
|00003ce0| 76 65 72 2d 77 72 69 74 | 65 20 65 78 69 73 74 69 |ver-writ|e existi|
|00003cf0| 6e 67 20 66 69 6c 65 20 | 22 27 78 6c 66 69 6f 2e |ng file |"'xlfio.|
|00003d00| 63 27 22 0a 65 6c 73 65 | 0a 73 65 64 20 27 73 2f |c'".else|.sed 's/|
|00003d10| 5e 58 2f 2f 27 20 3c 3c | 20 5c 53 48 41 52 5f 45 |^X//' <<| \SHAR_E|
|00003d20| 4f 46 20 3e 20 27 78 6c | 66 69 6f 2e 63 27 0a 2f |OF > 'xl|fio.c'./|
|00003d30| 2a 20 78 6c 66 69 6f 2e | 63 20 2d 20 78 6c 69 73 |* xlfio.|c - xlis|
|00003d40| 70 20 66 69 6c 65 20 69 | 2f 6f 20 2a 2f 0a 0a 23 |p file i|/o */..#|
|00003d50| 69 6e 63 6c 75 64 65 20 | 22 78 6c 69 73 70 2e 68 |include |"xlisp.h|
|00003d60| 22 0a 23 69 6e 63 6c 75 | 64 65 20 22 63 74 79 70 |".#inclu|de "ctyp|
|00003d70| 65 2e 68 22 0a 0a 2f 2a | 20 65 78 74 65 72 6e 61 |e.h"../*| externa|
|00003d80| 6c 20 76 61 72 69 61 62 | 6c 65 73 20 2a 2f 0a 65 |l variab|les */.e|
|00003d90| 78 74 65 72 6e 20 4e 4f | 44 45 20 2a 73 5f 73 74 |xtern NO|DE *s_st|
|00003da0| 64 69 6e 2c 2a 73 5f 73 | 74 64 6f 75 74 3b 0a 65 |din,*s_s|tdout;.e|
|00003db0| 78 74 65 72 6e 20 4e 4f | 44 45 20 2a 78 6c 73 74 |xtern NO|DE *xlst|
|00003dc0| 61 63 6b 3b 0a 65 78 74 | 65 72 6e 20 69 6e 74 20 |ack;.ext|ern int |
|00003dd0| 78 6c 66 73 69 7a 65 3b | 0a 65 78 74 65 72 6e 20 |xlfsize;|.extern |
|00003de0| 63 68 61 72 20 62 75 66 | 5b 5d 3b 0a 0a 2f 2a 20 |char buf|[];../* |
|00003df0| 65 78 74 65 72 6e 61 6c | 20 72 6f 75 74 69 6e 65 |external| routine|
|00003e00| 73 20 2a 2f 0a 65 78 74 | 65 72 6e 20 46 49 4c 45 |s */.ext|ern FILE|
|00003e10| 20 2a 66 6f 70 65 6e 28 | 29 3b 0a 0a 2f 2a 20 66 | *fopen(|);../* f|
|00003e20| 6f 72 77 61 72 64 20 64 | 65 63 6c 61 72 61 74 69 |orward d|eclarati|
|00003e30| 6f 6e 73 20 2a 2f 0a 58 | 46 4f 52 57 41 52 44 20 |ons */.X|FORWARD |
|00003e40| 4e 4f 44 45 20 2a 70 72 | 69 6e 74 69 74 28 29 3b |NODE *pr|intit();|
|00003e50| 0a 58 46 4f 52 57 41 52 | 44 20 4e 4f 44 45 20 2a |.XFORWAR|D NODE *|
|00003e60| 66 6c 61 74 73 69 7a 65 | 28 29 3b 0a 58 46 4f 52 |flatsize|();.XFOR|
|00003e70| 57 41 52 44 20 4e 4f 44 | 45 20 2a 65 78 70 6c 6f |WARD NOD|E *explo|
|00003e80| 64 65 28 29 3b 0a 58 46 | 4f 52 57 41 52 44 20 4e |de();.XF|ORWARD N|
|00003e90| 4f 44 45 20 2a 69 6d 70 | 6c 6f 64 65 28 29 3b 0a |ODE *imp|lode();.|
|00003ea0| 58 46 4f 52 57 41 52 44 | 20 4e 4f 44 45 20 2a 6f |XFORWARD| NODE *o|
|00003eb0| 70 65 6e 69 74 28 29 3b | 0a 58 46 4f 52 57 41 52 |penit();|.XFORWAR|
|00003ec0| 44 20 4e 4f 44 45 20 2a | 67 65 74 66 69 6c 65 28 |D NODE *|getfile(|
|00003ed0| 29 3b 0a 0a 2f 2a 20 78 | 72 65 61 64 20 2d 20 72 |);../* x|read - r|
|00003ee0| 65 61 64 20 61 6e 20 65 | 78 70 72 65 73 73 69 6f |ead an e|xpressio|
|00003ef0| 6e 20 2a 2f 0a 4e 4f 44 | 45 20 2a 78 72 65 61 64 |n */.NOD|E *xread|
|00003f00| 28 61 72 67 73 29 0a 20 | 20 4e 4f 44 45 20 2a 61 |(args). | NODE *a|
|00003f10| 72 67 73 3b 0a 7b 0a 20 | 20 20 20 4e 4f 44 45 20 |rgs;.{. | NODE |
|00003f20| 2a 6f 6c 64 73 74 6b 2c | 66 70 74 72 2c 65 6f 66 |*oldstk,|fptr,eof|
|00003f30| 2c 2a 76 61 6c 3b 0a 0a | 20 20 20 20 2f 2a 20 63 |,*val;..| /* c|
|00003f40| 72 65 61 74 65 20 61 20 | 6e 65 77 20 73 74 61 63 |reate a |new stac|
|00003f50| 6b 20 66 72 61 6d 65 20 | 2a 2f 0a 20 20 20 20 6f |k frame |*/. o|
|00003f60| 6c 64 73 74 6b 20 3d 20 | 78 6c 73 61 76 65 28 26 |ldstk = |xlsave(&|
|00003f70| 66 70 74 72 2c 26 65 6f | 66 2c 4e 55 4c 4c 29 3b |fptr,&eo|f,NULL);|
|00003f80| 0a 0a 20 20 20 20 2f 2a | 20 67 65 74 20 66 69 6c |.. /*| get fil|
|00003f90| 65 20 70 6f 69 6e 74 65 | 72 20 61 6e 64 20 65 6f |e pointe|r and eo|
|00003fa0| 66 20 76 61 6c 75 65 20 | 2a 2f 0a 20 20 20 20 66 |f value |*/. f|
|00003fb0| 70 74 72 2e 6e 5f 70 74 | 72 20 3d 20 28 61 72 67 |ptr.n_pt|r = (arg|
|00003fc0| 73 20 3f 20 67 65 74 66 | 69 6c 65 28 26 61 72 67 |s ? getf|ile(&arg|
|00003fd0| 73 29 20 3a 20 73 5f 73 | 74 64 69 6e 2d 3e 6e 5f |s) : s_s|tdin->n_|
|00003fe0| 73 79 6d 76 61 6c 75 65 | 29 3b 0a 20 20 20 20 65 |symvalue|);. e|
|00003ff0| 6f 66 2e 6e 5f 70 74 72 | 20 3d 20 28 61 72 67 73 |of.n_ptr| = (args|
|00004000| 20 3f 20 78 6c 61 72 67 | 28 26 61 72 67 73 29 20 | ? xlarg|(&args) |
|00004010| 3a 20 4e 49 4c 29 3b 0a | 20 20 20 20 78 6c 6c 61 |: NIL);.| xlla|
|00004020| 73 74 61 72 67 28 61 72 | 67 73 29 3b 0a 0a 20 20 |starg(ar|gs);.. |
|00004030| 20 20 2f 2a 20 72 65 61 | 64 20 61 6e 20 65 78 70 | /* rea|d an exp|
|00004040| 72 65 73 73 69 6f 6e 20 | 2a 2f 0a 20 20 20 20 69 |ression |*/. i|
|00004050| 66 20 28 21 78 6c 72 65 | 61 64 28 66 70 74 72 2e |f (!xlre|ad(fptr.|
|00004060| 6e 5f 70 74 72 2c 26 76 | 61 6c 29 29 0a 09 76 61 |n_ptr,&v|al))..va|
|00004070| 6c 20 3d 20 65 6f 66 2e | 6e 5f 70 74 72 3b 0a 0a |l = eof.|n_ptr;..|
|00004080| 20 20 20 20 2f 2a 20 72 | 65 73 74 6f 72 65 20 74 | /* r|estore t|
|00004090| 68 65 20 70 72 65 76 69 | 6f 75 73 20 73 74 61 63 |he previ|ous stac|
|000040a0| 6b 20 66 72 61 6d 65 20 | 2a 2f 0a 20 20 20 20 78 |k frame |*/. x|
|000040b0| 6c 73 74 61 63 6b 20 3d | 20 6f 6c 64 73 74 6b 3b |lstack =| oldstk;|
|000040c0| 0a 0a 20 20 20 20 2f 2a | 20 72 65 74 75 72 6e 20 |.. /*| return |
|000040d0| 74 68 65 20 65 78 70 72 | 65 73 73 69 6f 6e 20 2a |the expr|ession *|
|000040e0| 2f 0a 20 20 20 20 72 65 | 74 75 72 6e 20 28 76 61 |/. re|turn (va|
|000040f0| 6c 29 3b 0a 7d 0a 0a 2f | 2a 20 78 70 72 69 6e 74 |l);.}../|* xprint|
|00004100| 20 2d 20 62 75 69 6c 74 | 69 6e 20 66 75 6e 63 74 | - built|in funct|
|00004110| 69 6f 6e 20 27 70 72 69 | 6e 74 27 20 2a 2f 0a 4e |ion 'pri|nt' */.N|
|00004120| 4f 44 45 20 2a 78 70 72 | 69 6e 74 28 61 72 67 73 |ODE *xpr|int(args|
|00004130| 29 0a 20 20 4e 4f 44 45 | 20 2a 61 72 67 73 3b 0a |). NODE| *args;.|
|00004140| 7b 0a 20 20 20 20 72 65 | 74 75 72 6e 20 28 70 72 |{. re|turn (pr|
|00004150| 69 6e 74 69 74 28 61 72 | 67 73 2c 54 52 55 45 2c |intit(ar|gs,TRUE,|
|00004160| 54 52 55 45 29 29 3b 0a | 7d 0a 0a 2f 2a 20 78 70 |TRUE));.|}../* xp|
|00004170| 72 69 6e 31 20 2d 20 62 | 75 69 6c 74 69 6e 20 66 |rin1 - b|uiltin f|
|00004180| 75 6e 63 74 69 6f 6e 20 | 27 70 72 69 6e 31 27 20 |unction |'prin1' |
|00004190| 2a 2f 0a 4e 4f 44 45 20 | 2a 78 70 72 69 6e 31 28 |*/.NODE |*xprin1(|
|000041a0| 61 72 67 73 29 0a 20 20 | 4e 4f 44 45 20 2a 61 72 |args). |NODE *ar|
|000041b0| 67 73 3b 0a 7b 0a 20 20 | 20 20 72 65 74 75 72 6e |gs;.{. | return|
|000041c0| 20 28 70 72 69 6e 74 69 | 74 28 61 72 67 73 2c 54 | (printi|t(args,T|
|000041d0| 52 55 45 2c 46 41 4c 53 | 45 29 29 3b 0a 7d 0a 0a |RUE,FALS|E));.}..|
|000041e0| 2f 2a 20 78 70 72 69 6e | 63 20 2d 20 62 75 69 6c |/* xprin|c - buil|
|000041f0| 74 69 6e 20 66 75 6e 63 | 74 69 6f 6e 20 70 72 69 |tin func|tion pri|
|00004200| 6e 63 20 2a 2f 0a 4e 4f | 44 45 20 2a 78 70 72 69 |nc */.NO|DE *xpri|
|00004210| 6e 63 28 61 72 67 73 29 | 0a 20 20 4e 4f 44 45 20 |nc(args)|. NODE |
|00004220| 2a 61 72 67 73 3b 0a 7b | 0a 20 20 20 20 72 65 74 |*args;.{|. ret|
|00004230| 75 72 6e 20 28 70 72 69 | 6e 74 69 74 28 61 72 67 |urn (pri|ntit(arg|
|00004240| 73 2c 46 41 4c 53 45 2c | 46 41 4c 53 45 29 29 3b |s,FALSE,|FALSE));|
|00004250| 0a 7d 0a 0a 2f 2a 20 78 | 74 65 72 70 72 69 20 2d |.}../* x|terpri -|
|00004260| 20 74 65 72 6d 69 6e 61 | 74 65 20 74 68 65 20 63 | termina|te the c|
|00004270| 75 72 72 65 6e 74 20 70 | 72 69 6e 74 20 6c 69 6e |urrent p|rint lin|
|00004280| 65 20 2a 2f 0a 4e 4f 44 | 45 20 2a 78 74 65 72 70 |e */.NOD|E *xterp|
|00004290| 72 69 28 61 72 67 73 29 | 0a 20 20 4e 4f 44 45 20 |ri(args)|. NODE |
|000042a0| 2a 61 72 67 73 3b 0a 7b | 0a 20 20 20 20 4e 4f 44 |*args;.{|. NOD|
|000042b0| 45 20 2a 66 70 74 72 3b | 0a 0a 20 20 20 20 2f 2a |E *fptr;|.. /*|
|000042c0| 20 67 65 74 20 66 69 6c | 65 20 70 6f 69 6e 74 65 | get fil|e pointe|
|000042d0| 72 20 2a 2f 0a 20 20 20 | 20 66 70 74 72 20 3d 20 |r */. | fptr = |
|000042e0| 28 61 72 67 73 20 3f 20 | 67 65 74 66 69 6c 65 28 |(args ? |getfile(|
|000042f0| 26 61 72 67 73 29 20 3a | 20 73 5f 73 74 64 6f 75 |&args) :| s_stdou|
|00004300| 74 2d 3e 6e 5f 73 79 6d | 76 61 6c 75 65 29 3b 0a |t->n_sym|value);.|
|00004310| 20 20 20 20 78 6c 6c 61 | 73 74 61 72 67 28 61 72 | xlla|starg(ar|
|00004320| 67 73 29 3b 0a 0a 20 20 | 20 20 2f 2a 20 74 65 72 |gs);.. | /* ter|
|00004330| 6d 69 6e 61 74 65 20 74 | 68 65 20 70 72 69 6e 74 |minate t|he print|
|00004340| 20 6c 69 6e 65 20 61 6e | 64 20 72 65 74 75 72 6e | line an|d return|
|00004350| 20 6e 69 6c 20 2a 2f 0a | 20 20 20 20 78 6c 74 65 | nil */.| xlte|
|00004360| 72 70 72 69 28 66 70 74 | 72 29 3b 0a 20 20 20 20 |rpri(fpt|r);. |
|00004370| 72 65 74 75 72 6e 20 28 | 4e 49 4c 29 3b 0a 7d 0a |return (|NIL);.}.|
|00004380| 0a 2f 2a 20 70 72 69 6e | 74 69 74 20 2d 20 63 6f |./* prin|tit - co|
|00004390| 6d 6d 6f 6e 20 70 72 69 | 6e 74 20 66 75 6e 63 74 |mmon pri|nt funct|
|000043a0| 69 6f 6e 20 2a 2f 0a 4c | 4f 43 41 4c 20 4e 4f 44 |ion */.L|OCAL NOD|
|000043b0| 45 20 2a 70 72 69 6e 74 | 69 74 28 61 72 67 73 2c |E *print|it(args,|
|000043c0| 70 66 6c 61 67 2c 74 66 | 6c 61 67 29 0a 20 20 4e |pflag,tf|lag). N|
|000043d0| 4f 44 45 20 2a 61 72 67 | 73 3b 20 69 6e 74 20 70 |ODE *arg|s; int p|
|000043e0| 66 6c 61 67 2c 74 66 6c | 61 67 3b 0a 7b 0a 20 20 |flag,tfl|ag;.{. |
|000043f0| 20 20 4e 4f 44 45 20 2a | 6f 6c 64 73 74 6b 2c 66 | NODE *|oldstk,f|
|00004400| 70 74 72 2c 76 61 6c 3b | 0a 0a 20 20 20 20 2f 2a |ptr,val;|.. /*|
|00004410| 20 63 72 65 61 74 65 20 | 61 20 6e 65 77 20 73 74 | create |a new st|
|00004420| 61 63 6b 20 66 72 61 6d | 65 20 2a 2f 0a 20 20 20 |ack fram|e */. |
|00004430| 20 6f 6c 64 73 74 6b 20 | 3d 20 78 6c 73 61 76 65 | oldstk |= xlsave|
|00004440| 28 26 66 70 74 72 2c 26 | 76 61 6c 2c 4e 55 4c 4c |(&fptr,&|val,NULL|
|00004450| 29 3b 0a 0a 20 20 20 20 | 2f 2a 20 67 65 74 20 65 |);.. |/* get e|
|00004460| 78 70 72 65 73 73 69 6f | 6e 20 74 6f 20 70 72 69 |xpressio|n to pri|
|00004470| 6e 74 20 61 6e 64 20 66 | 69 6c 65 20 70 6f 69 6e |nt and f|ile poin|
|00004480| 74 65 72 20 2a 2f 0a 20 | 20 20 20 76 61 6c 2e 6e |ter */. | val.n|
|00004490| 5f 70 74 72 20 3d 20 78 | 6c 61 72 67 28 26 61 72 |_ptr = x|larg(&ar|
|000044a0| 67 73 29 3b 0a 20 20 20 | 20 66 70 74 72 2e 6e 5f |gs);. | fptr.n_|
|000044b0| 70 74 72 20 3d 20 28 61 | 72 67 73 20 3f 20 67 65 |ptr = (a|rgs ? ge|
|000044c0| 74 66 69 6c 65 28 26 61 | 72 67 73 29 20 3a 20 73 |tfile(&a|rgs) : s|
|000044d0| 5f 73 74 64 6f 75 74 2d | 3e 6e 5f 73 79 6d 76 61 |_stdout-|>n_symva|
|000044e0| 6c 75 65 29 3b 0a 20 20 | 20 20 78 6c 6c 61 73 74 |lue);. | xllast|
|000044f0| 61 72 67 28 61 72 67 73 | 29 3b 0a 0a 20 20 20 20 |arg(args|);.. |
|00004500| 2f 2a 20 70 72 69 6e 74 | 20 74 68 65 20 76 61 6c |/* print| the val|
|00004510| 75 65 20 2a 2f 0a 20 20 | 20 20 78 6c 70 72 69 6e |ue */. | xlprin|
|00004520| 74 28 66 70 74 72 2e 6e | 5f 70 74 72 2c 76 61 6c |t(fptr.n|_ptr,val|
|00004530| 2e 6e 5f 70 74 72 2c 70 | 66 6c 61 67 29 3b 0a 0a |.n_ptr,p|flag);..|
|00004540| 20 20 20 20 2f 2a 20 74 | 65 72 6d 69 6e 61 74 65 | /* t|erminate|
|00004550| 20 74 68 65 20 70 72 69 | 6e 74 20 6c 69 6e 65 20 | the pri|nt line |
|00004560| 69 66 20 6e 65 63 65 73 | 73 61 72 79 20 2a 2f 0a |if neces|sary */.|
|00004570| 20 20 20 20 69 66 20 28 | 74 66 6c 61 67 29 0a 09 | if (|tflag)..|
|00004580| 78 6c 74 65 72 70 72 69 | 28 66 70 74 72 2e 6e 5f |xlterpri|(fptr.n_|
|00004590| 70 74 72 29 3b 0a 0a 20 | 20 20 20 2f 2a 20 72 65 |ptr);.. | /* re|
|000045a0| 73 74 6f 72 65 20 74 68 | 65 20 70 72 65 76 69 6f |store th|e previo|
|000045b0| 75 73 20 73 74 61 63 6b | 20 66 72 61 6d 65 20 2a |us stack| frame *|
|000045c0| 2f 0a 20 20 20 20 78 6c | 73 74 61 63 6b 20 3d 20 |/. xl|stack = |
|000045d0| 6f 6c 64 73 74 6b 3b 0a | 0a 20 20 20 20 2f 2a 20 |oldstk;.|. /* |
|000045e0| 72 65 74 75 72 6e 20 74 | 68 65 20 72 65 73 75 6c |return t|he resul|
|000045f0| 74 20 2a 2f 0a 20 20 20 | 20 72 65 74 75 72 6e 20 |t */. | return |
|00004600| 28 76 61 6c 2e 6e 5f 70 | 74 72 29 3b 0a 7d 0a 0a |(val.n_p|tr);.}..|
|00004610| 2f 2a 20 78 66 6c 61 74 | 73 69 7a 65 20 2d 20 63 |/* xflat|size - c|
|00004620| 6f 6d 70 75 74 65 20 74 | 68 65 20 73 69 7a 65 20 |ompute t|he size |
|00004630| 6f 66 20 61 20 70 72 69 | 6e 74 65 64 20 72 65 70 |of a pri|nted rep|
|00004640| 72 65 73 65 6e 74 61 74 | 69 6f 6e 20 75 73 69 6e |resentat|ion usin|
|00004650| 67 20 70 72 69 6e 31 20 | 2a 2f 0a 4e 4f 44 45 20 |g prin1 |*/.NODE |
|00004660| 2a 78 66 6c 61 74 73 69 | 7a 65 28 61 72 67 73 29 |*xflatsi|ze(args)|
|00004670| 0a 20 20 4e 4f 44 45 20 | 2a 61 72 67 73 3b 0a 7b |. NODE |*args;.{|
|00004680| 0a 20 20 20 20 72 65 74 | 75 72 6e 20 28 66 6c 61 |. ret|urn (fla|
|00004690| 74 73 69 7a 65 28 61 72 | 67 73 2c 54 52 55 45 29 |tsize(ar|gs,TRUE)|
|000046a0| 29 3b 0a 7d 0a 0a 2f 2a | 20 78 66 6c 61 74 63 20 |);.}../*| xflatc |
|000046b0| 2d 20 63 6f 6d 70 75 74 | 65 20 74 68 65 20 73 69 |- comput|e the si|
|000046c0| 7a 65 20 6f 66 20 61 20 | 70 72 69 6e 74 65 64 20 |ze of a |printed |
|000046d0| 72 65 70 72 65 73 65 6e | 74 61 74 69 6f 6e 20 75 |represen|tation u|
|000046e0| 73 69 6e 67 20 70 72 69 | 6e 63 20 2a 2f 0a 4e 4f |sing pri|nc */.NO|
|000046f0| 44 45 20 2a 78 66 6c 61 | 74 63 28 61 72 67 73 29 |DE *xfla|tc(args)|
|00004700| 0a 20 20 4e 4f 44 45 20 | 2a 61 72 67 73 3b 0a 7b |. NODE |*args;.{|
|00004710| 0a 20 20 20 20 72 65 74 | 75 72 6e 20 28 66 6c 61 |. ret|urn (fla|
|00004720| 74 73 69 7a 65 28 61 72 | 67 73 2c 46 41 4c 53 45 |tsize(ar|gs,FALSE|
|00004730| 29 29 3b 0a 7d 0a 0a 2f | 2a 20 66 6c 61 74 73 69 |));.}../|* flatsi|
|00004740| 7a 65 20 2d 20 63 6f 6d | 70 75 74 65 20 74 68 65 |ze - com|pute the|
|00004750| 20 73 69 7a 65 20 6f 66 | 20 61 20 70 72 69 6e 74 | size of| a print|
|00004760| 65 64 20 65 78 70 72 65 | 73 73 69 6f 6e 20 2a 2f |ed expre|ssion */|
|00004770| 0a 4c 4f 43 41 4c 20 4e | 4f 44 45 20 2a 66 6c 61 |.LOCAL N|ODE *fla|
|00004780| 74 73 69 7a 65 28 61 72 | 67 73 2c 70 66 6c 61 67 |tsize(ar|gs,pflag|
|00004790| 29 0a 20 20 4e 4f 44 45 | 20 2a 61 72 67 73 3b 20 |). NODE| *args; |
|000047a0| 69 6e 74 20 70 66 6c 61 | 67 3b 0a 7b 0a 20 20 20 |int pfla|g;.{. |
|000047b0| 20 4e 4f 44 45 20 2a 6f | 6c 64 73 74 6b 2c 76 61 | NODE *o|ldstk,va|
|000047c0| 6c 3b 0a 0a 20 20 20 20 | 2f 2a 20 63 72 65 61 74 |l;.. |/* creat|
|000047d0| 65 20 61 20 6e 65 77 20 | 73 74 61 63 6b 20 66 72 |e a new |stack fr|
|000047e0| 61 6d 65 20 2a 2f 0a 20 | 20 20 20 6f 6c 64 73 74 |ame */. | oldst|
|000047f0| 6b 20 3d 20 78 6c 73 61 | 76 65 28 26 76 61 6c 2c |k = xlsa|ve(&val,|
|00004800| 4e 55 4c 4c 29 3b 0a 0a | 20 20 20 20 2f 2a 20 67 |NULL);..| /* g|
|00004810| 65 74 20 74 68 65 20 65 | 78 70 72 65 73 73 69 6f |et the e|xpressio|
|00004820| 6e 20 2a 2f 0a 20 20 20 | 20 76 61 6c 2e 6e 5f 70 |n */. | val.n_p|
|00004830| 74 72 20 3d 20 78 6c 61 | 72 67 28 26 61 72 67 73 |tr = xla|rg(&args|
|00004840| 29 3b 0a 20 20 20 20 78 | 6c 6c 61 73 74 61 72 67 |);. x|llastarg|
|00004850| 28 61 72 67 73 29 3b 0a | 0a 20 20 20 20 2f 2a 20 |(args);.|. /* |
|00004860| 70 72 69 6e 74 20 74 68 | 65 20 76 61 6c 75 65 20 |print th|e value |
|00004870| 74 6f 20 63 6f 6d 70 75 | 74 65 20 69 74 73 20 73 |to compu|te its s|
|00004880| 69 7a 65 20 2a 2f 0a 20 | 20 20 20 78 6c 66 73 69 |ize */. | xlfsi|
|00004890| 7a 65 20 3d 20 30 3b 0a | 20 20 20 20 78 6c 70 72 |ze = 0;.| xlpr|
|000048a0| 69 6e 74 28 4e 49 4c 2c | 76 61 6c 2e 6e 5f 70 74 |int(NIL,|val.n_pt|
|000048b0| 72 2c 70 66 6c 61 67 29 | 3b 0a 0a 20 20 20 20 2f |r,pflag)|;.. /|
|000048c0| 2a 20 72 65 73 74 6f 72 | 65 20 74 68 65 20 70 72 |* restor|e the pr|
|000048d0| 65 76 69 6f 75 73 20 73 | 74 61 63 6b 20 66 72 61 |evious s|tack fra|
|000048e0| 6d 65 20 2a 2f 0a 20 20 | 20 20 78 6c 73 74 61 63 |me */. | xlstac|
|000048f0| 6b 20 3d 20 6f 6c 64 73 | 74 6b 3b 0a 0a 20 20 20 |k = olds|tk;.. |
|00004900| 20 2f 2a 20 72 65 74 75 | 72 6e 20 74 68 65 20 6c | /* retu|rn the l|
|00004910| 65 6e 67 74 68 20 6f 66 | 20 74 68 65 20 65 78 70 |ength of| the exp|
|00004920| 72 65 73 73 69 6f 6e 20 | 2a 2f 0a 20 20 20 20 76 |ression |*/. v|
|00004930| 61 6c 2e 6e 5f 70 74 72 | 20 3d 20 6e 65 77 6e 6f |al.n_ptr| = newno|
|00004940| 64 65 28 49 4e 54 29 3b | 0a 20 20 20 20 76 61 6c |de(INT);|. val|
|00004950| 2e 6e 5f 70 74 72 2d 3e | 6e 5f 69 6e 74 20 3d 20 |.n_ptr->|n_int = |
|00004960| 78 6c 66 73 69 7a 65 3b | 0a 20 20 20 20 72 65 74 |xlfsize;|. ret|
|00004970| 75 72 6e 20 28 76 61 6c | 2e 6e 5f 70 74 72 29 3b |urn (val|.n_ptr);|
|00004980| 0a 7d 0a 0a 2f 2a 20 78 | 65 78 70 6c 6f 64 65 20 |.}../* x|explode |
|00004990| 2d 20 65 78 70 6c 6f 64 | 65 20 61 6e 20 65 78 70 |- explod|e an exp|
|000049a0| 72 65 73 73 69 6f 6e 20 | 2a 2f 0a 4e 4f 44 45 20 |ression |*/.NODE |
|000049b0| 2a 78 65 78 70 6c 6f 64 | 65 28 61 72 67 73 29 0a |*xexplod|e(args).|
|000049c0| 20 20 4e 4f 44 45 20 2a | 61 72 67 73 3b 0a 7b 0a | NODE *|args;.{.|
|000049d0| 20 20 20 20 72 65 74 75 | 72 6e 20 28 65 78 70 6c | retu|rn (expl|
|000049e0| 6f 64 65 28 61 72 67 73 | 2c 54 52 55 45 29 29 3b |ode(args|,TRUE));|
|000049f0| 0a 7d 0a 0a 2f 2a 20 78 | 65 78 70 6c 63 20 2d 20 |.}../* x|explc - |
|00004a00| 65 78 70 6c 6f 64 65 20 | 61 6e 20 65 78 70 72 65 |explode |an expre|
|00004a10| 73 73 69 6f 6e 20 75 73 | 69 6e 67 20 70 72 69 6e |ssion us|ing prin|
|00004a20| 63 20 2a 2f 0a 4e 4f 44 | 45 20 2a 78 65 78 70 6c |c */.NOD|E *xexpl|
|00004a30| 63 28 61 72 67 73 29 0a | 20 20 4e 4f 44 45 20 2a |c(args).| NODE *|
|00004a40| 61 72 67 73 3b 0a 7b 0a | 20 20 20 20 72 65 74 75 |args;.{.| retu|
|00004a50| 72 6e 20 28 65 78 70 6c | 6f 64 65 28 61 72 67 73 |rn (expl|ode(args|
|00004a60| 2c 46 41 4c 53 45 29 29 | 3b 0a 7d 0a 0a 2f 2a 20 |,FALSE))|;.}../* |
|00004a70| 65 78 70 6c 6f 64 65 20 | 2d 20 69 6e 74 65 72 6e |explode |- intern|
|00004a80| 61 6c 20 65 78 70 6c 6f | 64 65 20 72 6f 75 74 69 |al explo|de routi|
|00004a90| 6e 65 20 2a 2f 0a 4c 4f | 43 41 4c 20 4e 4f 44 45 |ne */.LO|CAL NODE|
|00004aa0| 20 2a 65 78 70 6c 6f 64 | 65 28 61 72 67 73 2c 70 | *explod|e(args,p|
|00004ab0| 66 6c 61 67 29 0a 20 20 | 4e 4f 44 45 20 2a 61 72 |flag). |NODE *ar|
|00004ac0| 67 73 3b 20 69 6e 74 20 | 70 66 6c 61 67 3b 0a 7b |gs; int |pflag;.{|
|00004ad0| 0a 20 20 20 20 4e 4f 44 | 45 20 2a 6f 6c 64 73 74 |. NOD|E *oldst|
|00004ae0| 6b 2c 76 61 6c 2c 73 74 | 72 6d 3b 0a 0a 20 20 20 |k,val,st|rm;.. |
|00004af0| 20 2f 2a 20 63 72 65 61 | 74 65 20 61 20 6e 65 77 | /* crea|te a new|
|00004b00| 20 73 74 61 63 6b 20 66 | 72 61 6d 65 20 2a 2f 0a | stack f|rame */.|
|00004b10| 20 20 20 20 6f 6c 64 73 | 74 6b 20 3d 20 78 6c 73 | olds|tk = xls|
|00004b20| 61 76 65 28 26 76 61 6c | 2c 26 73 74 72 6d 2c 4e |ave(&val|,&strm,N|
|00004b30| 55 4c 4c 29 3b 0a 0a 20 | 20 20 20 2f 2a 20 67 65 |ULL);.. | /* ge|
|00004b40| 74 20 74 68 65 20 65 78 | 70 72 65 73 73 69 6f 6e |t the ex|pression|
|00004b50| 20 2a 2f 0a 20 20 20 20 | 76 61 6c 2e 6e 5f 70 74 | */. |val.n_pt|
|00004b60| 72 20 3d 20 78 6c 61 72 | 67 28 26 61 72 67 73 29 |r = xlar|g(&args)|
|00004b70| 3b 0a 20 20 20 20 78 6c | 6c 61 73 74 61 72 67 28 |;. xl|lastarg(|
|00004b80| 61 72 67 73 29 3b 0a 0a | 20 20 20 20 2f 2a 20 63 |args);..| /* c|
|00004b90| 72 65 61 74 65 20 61 20 | 73 74 72 65 61 6d 20 2a |reate a |stream *|
|00004ba0| 2f 0a 20 20 20 20 73 74 | 72 6d 2e 6e 5f 70 74 72 |/. st|rm.n_ptr|
|00004bb0| 20 3d 20 6e 65 77 6e 6f | 64 65 28 4c 49 53 54 29 | = newno|de(LIST)|
|00004bc0| 3b 0a 0a 20 20 20 20 2f | 2a 20 70 72 69 6e 74 20 |;.. /|* print |
|00004bd0| 74 68 65 20 76 61 6c 75 | 65 20 69 6e 74 6f 20 74 |the valu|e into t|
|00004be0| 68 65 20 73 74 72 65 61 | 6d 20 2a 2f 0a 20 20 20 |he strea|m */. |
|00004bf0| 20 78 6c 70 72 69 6e 74 | 28 73 74 72 6d 2e 6e 5f | xlprint|(strm.n_|
|00004c00| 70 74 72 2c 76 61 6c 2e | 6e 5f 70 74 72 2c 70 66 |ptr,val.|n_ptr,pf|
|00004c10| 6c 61 67 29 3b 0a 0a 20 | 20 20 20 2f 2a 20 72 65 |lag);.. | /* re|
|00004c20| 73 74 6f 72 65 20 74 68 | 65 20 70 72 65 76 69 6f |store th|e previo|
|00004c30| 75 73 20 73 74 61 63 6b | 20 66 72 61 6d 65 20 2a |us stack| frame *|
|00004c40| 2f 0a 20 20 20 20 78 6c | 73 74 61 63 6b 20 3d 20 |/. xl|stack = |
|00004c50| 6f 6c 64 73 74 6b 3b 0a | 0a 20 20 20 20 2f 2a 20 |oldstk;.|. /* |
|00004c60| 72 65 74 75 72 6e 20 74 | 68 65 20 6c 69 73 74 20 |return t|he list |
|00004c70| 6f 66 20 63 68 61 72 61 | 63 74 65 72 73 20 2a 2f |of chara|cters */|
|00004c80| 0a 20 20 20 20 72 65 74 | 75 72 6e 20 28 63 61 72 |. ret|urn (car|
|00004c90| 28 73 74 72 6d 2e 6e 5f | 70 74 72 29 29 3b 0a 7d |(strm.n_|ptr));.}|
|00004ca0| 0a 0a 2f 2a 20 78 69 6d | 70 6c 6f 64 65 20 2d 20 |../* xim|plode - |
|00004cb0| 69 6d 70 6c 6f 64 65 20 | 61 20 6c 69 73 74 20 6f |implode |a list o|
|00004cc0| 66 20 63 68 61 72 61 63 | 74 65 72 73 20 69 6e 74 |f charac|ters int|
|00004cd0| 6f 20 61 20 73 79 6d 62 | 6f 6c 20 2a 2f 0a 4e 4f |o a symb|ol */.NO|
|00004ce0| 44 45 20 2a 78 69 6d 70 | 6c 6f 64 65 28 61 72 67 |DE *ximp|lode(arg|
|00004cf0| 73 29 0a 20 20 4e 4f 44 | 45 20 2a 61 72 67 73 3b |s). NOD|E *args;|
|00004d00| 0a 7b 0a 20 20 20 20 72 | 65 74 75 72 6e 20 28 69 |.{. r|eturn (i|
|00004d10| 6d 70 6c 6f 64 65 28 61 | 72 67 73 2c 54 52 55 45 |mplode(a|rgs,TRUE|
|00004d20| 29 29 3b 0a 7d 0a 0a 2f | 2a 20 78 6d 61 6b 6e 61 |));.}../|* xmakna|
|00004d30| 6d 20 2d 20 69 6d 70 6c | 6f 64 65 20 61 20 6c 69 |m - impl|ode a li|
|00004d40| 73 74 20 6f 66 20 63 68 | 61 72 61 63 74 65 72 73 |st of ch|aracters|
|00004d50| 20 69 6e 74 6f 20 61 6e | 20 75 6e 69 6e 74 65 72 | into an| uninter|
|00004d60| 6e 65 64 20 73 79 6d 62 | 6f 6c 20 2a 2f 0a 4e 4f |ned symb|ol */.NO|
|00004d70| 44 45 20 2a 78 6d 61 6b | 6e 61 6d 28 61 72 67 73 |DE *xmak|nam(args|
|00004d80| 29 0a 20 20 4e 4f 44 45 | 20 2a 61 72 67 73 3b 0a |). NODE| *args;.|
|00004d90| 7b 0a 20 20 20 20 72 65 | 74 75 72 6e 20 28 69 6d |{. re|turn (im|
|00004da0| 70 6c 6f 64 65 28 61 72 | 67 73 2c 46 41 4c 53 45 |plode(ar|gs,FALSE|
|00004db0| 29 29 3b 0a 7d 0a 0a 2f | 2a 20 69 6d 70 6c 6f 64 |));.}../|* implod|
|00004dc0| 65 20 2d 20 69 6e 74 65 | 72 6e 61 6c 20 69 6d 70 |e - inte|rnal imp|
|00004dd0| 6c 6f 64 65 20 72 6f 75 | 74 69 6e 65 20 2a 2f 0a |lode rou|tine */.|
|00004de0| 4c 4f 43 41 4c 20 4e 4f | 44 45 20 2a 69 6d 70 6c |LOCAL NO|DE *impl|
|00004df0| 6f 64 65 28 61 72 67 73 | 2c 69 6e 74 66 6c 61 67 |ode(args|,intflag|
|00004e00| 29 0a 20 20 4e 4f 44 45 | 20 2a 61 72 67 73 3b 20 |). NODE| *args; |
|00004e10| 69 6e 74 20 69 6e 74 66 | 6c 61 67 3b 0a 7b 0a 20 |int intf|lag;.{. |
|00004e20| 20 20 20 4e 4f 44 45 20 | 2a 6c 69 73 74 2c 2a 76 | NODE |*list,*v|
|00004e30| 61 6c 3b 0a 20 20 20 20 | 63 68 61 72 20 2a 70 3b |al;. |char *p;|
|00004e40| 0a 0a 20 20 20 20 2f 2a | 20 67 65 74 20 74 68 65 |.. /*| get the|
|00004e50| 20 6c 69 73 74 20 2a 2f | 0a 20 20 20 20 6c 69 73 | list */|. lis|
|00004e60| 74 20 3d 20 78 6c 61 72 | 67 28 26 61 72 67 73 29 |t = xlar|g(&args)|
|00004e70| 3b 0a 20 20 20 20 78 6c | 6c 61 73 74 61 72 67 28 |;. xl|lastarg(|
|00004e80| 61 72 67 73 29 3b 0a 0a | 20 20 20 20 2f 2a 20 61 |args);..| /* a|
|00004e90| 73 73 65 6d 62 6c 65 20 | 74 68 65 20 73 79 6d 62 |ssemble |the symb|
|00004ea0| 6f 6c 27 73 20 70 6e 61 | 6d 65 20 2a 2f 0a 20 20 |ol's pna|me */. |
|00004eb0| 20 20 66 6f 72 20 28 70 | 20 3d 20 62 75 66 3b 20 | for (p| = buf; |
|00004ec0| 63 6f 6e 73 70 28 6c 69 | 73 74 29 3b 20 6c 69 73 |consp(li|st); lis|
|00004ed0| 74 20 3d 20 63 64 72 28 | 6c 69 73 74 29 29 20 7b |t = cdr(|list)) {|
|00004ee0| 0a 09 69 66 20 28 28 76 | 61 6c 20 3d 20 63 61 72 |..if ((v|al = car|
|00004ef0| 28 6c 69 73 74 29 29 20 | 3d 3d 20 4e 49 4c 20 7c |(list)) |== NIL ||
|00004f00| 7c 20 21 66 69 78 70 28 | 76 61 6c 29 29 0a 09 20 || !fixp(|val)).. |
|00004f10| 20 20 20 78 6c 66 61 69 | 6c 28 22 62 61 64 20 63 | xlfai|l("bad c|
|00004f20| 68 61 72 61 63 74 65 72 | 20 6c 69 73 74 22 29 3b |haracter| list");|
|00004f30| 0a 09 69 66 20 28 28 69 | 6e 74 29 28 70 20 2d 20 |..if ((i|nt)(p - |
|00004f40| 62 75 66 29 20 3c 20 53 | 54 52 4d 41 58 29 0a 09 |buf) < S|TRMAX)..|
|00004f50| 20 20 20 20 2a 70 2b 2b | 20 3d 20 76 61 6c 2d 3e | *p++| = val->|
|00004f60| 6e 5f 69 6e 74 3b 0a 20 | 20 20 20 7d 0a 20 20 20 |n_int;. | }. |
|00004f70| 20 2a 70 20 3d 20 30 3b | 0a 0a 20 20 20 20 2f 2a | *p = 0;|.. /*|
|00004f80| 20 63 72 65 61 74 65 20 | 61 20 73 79 6d 62 6f 6c | create |a symbol|
|00004f90| 20 2a 2f 0a 20 20 20 20 | 76 61 6c 20 3d 20 28 69 | */. |val = (i|
|00004fa0| 6e 74 66 6c 61 67 20 3f | 20 78 6c 65 6e 74 65 72 |ntflag ?| xlenter|
|00004fb0| 28 62 75 66 2c 44 59 4e | 41 4d 49 43 29 20 3a 20 |(buf,DYN|AMIC) : |
|00004fc0| 78 6c 6d 61 6b 65 73 79 | 6d 28 62 75 66 2c 44 59 |xlmakesy|m(buf,DY|
|00004fd0| 4e 41 4d 49 43 29 29 3b | 0a 0a 20 20 20 20 2f 2a |NAMIC));|.. /*|
|00004fe0| 20 72 65 74 75 72 6e 20 | 74 68 65 20 73 79 6d 62 | return |the symb|
|00004ff0| 6f 6c 20 2a 2f 0a 20 20 | 20 20 72 65 74 75 72 6e |ol */. | return|
|00005000| 20 28 76 61 6c 29 3b 0a | 7d 0a 0a 2f 2a 20 78 6f | (val);.|}../* xo|
|00005010| 70 65 6e 69 20 2d 20 6f | 70 65 6e 20 61 6e 20 69 |peni - o|pen an i|
|00005020| 6e 70 75 74 20 66 69 6c | 65 20 2a 2f 0a 4e 4f 44 |nput fil|e */.NOD|
|00005030| 45 20 2a 78 6f 70 65 6e | 69 28 61 72 67 73 29 0a |E *xopen|i(args).|
|00005040| 20 20 4e 4f 44 45 20 2a | 61 72 67 73 3b 0a 7b 0a | NODE *|args;.{.|
|00005050| 20 20 20 20 72 65 74 75 | 72 6e 20 28 6f 70 65 6e | retu|rn (open|
|00005060| 69 74 28 61 72 67 73 2c | 22 72 22 29 29 3b 0a 7d |it(args,|"r"));.}|
|00005070| 0a 0a 2f 2a 20 78 6f 70 | 65 6e 6f 20 2d 20 6f 70 |../* xop|eno - op|
|00005080| 65 6e 20 61 6e 20 6f 75 | 74 70 75 74 20 66 69 6c |en an ou|tput fil|
|00005090| 65 20 2a 2f 0a 4e 4f 44 | 45 20 2a 78 6f 70 65 6e |e */.NOD|E *xopen|
|000050a0| 6f 28 61 72 67 73 29 0a | 20 20 4e 4f 44 45 20 2a |o(args).| NODE *|
|000050b0| 61 72 67 73 3b 0a 7b 0a | 20 20 20 20 72 65 74 75 |args;.{.| retu|
|000050c0| 72 6e 20 28 6f 70 65 6e | 69 74 28 61 72 67 73 2c |rn (open|it(args,|
|000050d0| 22 77 22 29 29 3b 0a 7d | 0a 0a 2f 2a 20 6f 70 65 |"w"));.}|../* ope|
|000050e0| 6e 69 74 20 2d 20 63 6f | 6d 6d 6f 6e 20 66 69 6c |nit - co|mmon fil|
|000050f0| 65 20 6f 70 65 6e 20 72 | 6f 75 74 69 6e 65 20 2a |e open r|outine *|
|00005100| 2f 0a 4c 4f 43 41 4c 20 | 4e 4f 44 45 20 2a 6f 70 |/.LOCAL |NODE *op|
|00005110| 65 6e 69 74 28 61 72 67 | 73 2c 6d 6f 64 65 29 0a |enit(arg|s,mode).|
|00005120| 20 20 4e 4f 44 45 20 2a | 61 72 67 73 3b 20 63 68 | NODE *|args; ch|
|00005130| 61 72 20 2a 6d 6f 64 65 | 3b 0a 7b 0a 20 20 20 20 |ar *mode|;.{. |
|00005140| 4e 4f 44 45 20 2a 66 6e | 61 6d 65 2c 2a 76 61 6c |NODE *fn|ame,*val|
|00005150| 3b 0a 20 20 20 20 46 49 | 4c 45 20 2a 66 70 3b 0a |;. FI|LE *fp;.|
|00005160| 0a 20 20 20 20 2f 2a 20 | 67 65 74 20 74 68 65 20 |. /* |get the |
|00005170| 66 69 6c 65 20 6e 61 6d | 65 20 2a 2f 0a 20 20 20 |file nam|e */. |
|00005180| 20 66 6e 61 6d 65 20 3d | 20 78 6c 6d 61 74 63 68 | fname =| xlmatch|
|00005190| 28 53 54 52 2c 26 61 72 | 67 73 29 3b 0a 20 20 20 |(STR,&ar|gs);. |
|000051a0| 20 78 6c 6c 61 73 74 61 | 72 67 28 61 72 67 73 29 | xllasta|rg(args)|
|000051b0| 3b 0a 0a 20 20 20 20 2f | 2a 20 74 72 79 20 74 6f |;.. /|* try to|
|000051c0| 20 6f 70 65 6e 20 74 68 | 65 20 66 69 6c 65 20 2a | open th|e file *|
|000051d0| 2f 0a 20 20 20 20 69 66 | 20 28 28 66 70 20 3d 20 |/. if| ((fp = |
|000051e0| 66 6f 70 65 6e 28 66 6e | 61 6d 65 2d 3e 6e 5f 73 |fopen(fn|ame->n_s|
|000051f0| 74 72 2c 6d 6f 64 65 29 | 29 20 21 3d 20 4e 55 4c |tr,mode)|) != NUL|
|00005200| 4c 29 20 7b 0a 09 76 61 | 6c 20 3d 20 6e 65 77 6e |L) {..va|l = newn|
|00005210| 6f 64 65 28 46 50 54 52 | 29 3b 0a 09 76 61 6c 2d |ode(FPTR|);..val-|
|00005220| 3e 6e 5f 66 70 20 3d 20 | 66 70 3b 0a 09 76 61 6c |>n_fp = |fp;..val|
|00005230| 2d 3e 6e 5f 73 61 76 65 | 63 68 20 3d 20 30 3b 0a |->n_save|ch = 0;.|
|00005240| 20 20 20 20 7d 0a 20 20 | 20 20 65 6c 73 65 0a 09 | }. | else..|
|00005250| 76 61 6c 20 3d 20 4e 49 | 4c 3b 0a 0a 20 20 20 20 |val = NI|L;.. |
|00005260| 2f 2a 20 72 65 74 75 72 | 6e 20 74 68 65 20 66 69 |/* retur|n the fi|
|00005270| 6c 65 20 70 6f 69 6e 74 | 65 72 20 2a 2f 0a 20 20 |le point|er */. |
|00005280| 20 20 72 65 74 75 72 6e | 20 28 76 61 6c 29 3b 0a | return| (val);.|
|00005290| 7d 0a 0a 2f 2a 20 78 63 | 6c 6f 73 65 20 2d 20 63 |}../* xc|lose - c|
|000052a0| 6c 6f 73 65 20 61 20 66 | 69 6c 65 20 2a 2f 0a 4e |lose a f|ile */.N|
|000052b0| 4f 44 45 20 2a 78 63 6c | 6f 73 65 28 61 72 67 73 |ODE *xcl|ose(args|
|000052c0| 29 0a 20 20 4e 4f 44 45 | 20 2a 61 72 67 73 3b 0a |). NODE| *args;.|
|000052d0| 7b 0a 20 20 20 20 4e 4f | 44 45 20 2a 66 70 74 72 |{. NO|DE *fptr|
|000052e0| 3b 0a 0a 20 20 20 20 2f | 2a 20 67 65 74 20 66 69 |;.. /|* get fi|
|000052f0| 6c 65 20 70 6f 69 6e 74 | 65 72 20 2a 2f 0a 20 20 |le point|er */. |
|00005300| 20 20 66 70 74 72 20 3d | 20 78 6c 6d 61 74 63 68 | fptr =| xlmatch|
|00005310| 28 46 50 54 52 2c 26 61 | 72 67 73 29 3b 0a 20 20 |(FPTR,&a|rgs);. |
|00005320| 20 20 78 6c 6c 61 73 74 | 61 72 67 28 61 72 67 73 | xllast|arg(args|
|00005330| 29 3b 0a 0a 20 20 20 20 | 2f 2a 20 6d 61 6b 65 20 |);.. |/* make |
|00005340| 73 75 72 65 20 74 68 65 | 20 66 69 6c 65 20 65 78 |sure the| file ex|
|00005350| 69 73 74 73 20 2a 2f 0a | 20 20 20 20 69 66 20 28 |ists */.| if (|
|00005360| 66 70 74 72 2d 3e 6e 5f | 66 70 20 3d 3d 20 4e 55 |fptr->n_|fp == NU|
|00005370| 4c 4c 29 0a 09 78 6c 66 | 61 69 6c 28 22 66 69 6c |LL)..xlf|ail("fil|
|00005380| 65 20 6e 6f 74 20 6f 70 | 65 6e 22 29 3b 0a 0a 20 |e not op|en");.. |
|00005390| 20 20 20 2f 2a 20 63 6c | 6f 73 65 20 74 68 65 20 | /* cl|ose the |
|000053a0| 66 69 6c 65 20 2a 2f 0a | 20 20 20 20 66 63 6c 6f |file */.| fclo|
|000053b0| 73 65 28 66 70 74 72 2d | 3e 6e 5f 66 70 29 3b 0a |se(fptr-|>n_fp);.|
|000053c0| 20 20 20 20 66 70 74 72 | 2d 3e 6e 5f 66 70 20 3d | fptr|->n_fp =|
|000053d0| 20 4e 55 4c 4c 3b 0a 0a | 20 20 20 20 2f 2a 20 72 | NULL;..| /* r|
|000053e0| 65 74 75 72 6e 20 6e 69 | 6c 20 2a 2f 0a 20 20 20 |eturn ni|l */. |
|000053f0| 20 72 65 74 75 72 6e 20 | 28 4e 49 4c 29 3b 0a 7d | return |(NIL);.}|
|00005400| 0a 0a 2f 2a 20 78 72 64 | 63 68 61 72 20 2d 20 72 |../* xrd|char - r|
|00005410| 65 61 64 20 61 20 63 68 | 61 72 61 63 74 65 72 20 |ead a ch|aracter |
|00005420| 66 72 6f 6d 20 61 20 66 | 69 6c 65 20 2a 2f 0a 4e |from a f|ile */.N|
|00005430| 4f 44 45 20 2a 78 72 64 | 63 68 61 72 28 61 72 67 |ODE *xrd|char(arg|
|00005440| 73 29 0a 20 20 4e 4f 44 | 45 20 2a 61 72 67 73 3b |s). NOD|E *args;|
|00005450| 0a 7b 0a 20 20 20 20 4e | 4f 44 45 20 2a 66 70 74 |.{. N|ODE *fpt|
|00005460| 72 2c 2a 76 61 6c 3b 0a | 20 20 20 20 69 6e 74 20 |r,*val;.| int |
|00005470| 63 68 3b 0a 0a 20 20 20 | 20 2f 2a 20 67 65 74 20 |ch;.. | /* get |
|00005480| 66 69 6c 65 20 70 6f 69 | 6e 74 65 72 20 2a 2f 0a |file poi|nter */.|
|00005490| 20 20 20 20 66 70 74 72 | 20 3d 20 28 61 72 67 73 | fptr| = (args|
|000054a0| 20 3f 20 67 65 74 66 69 | 6c 65 28 26 61 72 67 73 | ? getfi|le(&args|
|000054b0| 29 20 3a 20 73 5f 73 74 | 64 69 6e 2d 3e 6e 5f 73 |) : s_st|din->n_s|
|000054c0| 79 6d 76 61 6c 75 65 29 | 3b 0a 20 20 20 20 78 6c |ymvalue)|;. xl|
|000054d0| 6c 61 73 74 61 72 67 28 | 61 72 67 73 29 3b 0a 0a |lastarg(|args);..|
|000054e0| 20 20 20 20 2f 2a 20 67 | 65 74 20 63 68 61 72 61 | /* g|et chara|
|000054f0| 63 74 65 72 20 61 6e 64 | 20 63 68 65 63 6b 20 66 |cter and| check f|
|00005500| 6f 72 20 65 6f 66 20 2a | 2f 0a 20 20 20 20 69 66 |or eof *|/. if|
|00005510| 20 28 28 63 68 20 3d 20 | 78 6c 67 65 74 63 28 66 | ((ch = |xlgetc(f|
|00005520| 70 74 72 29 29 20 3d 3d | 20 45 4f 46 29 0a 09 76 |ptr)) ==| EOF)..v|
|00005530| 61 6c 20 3d 20 4e 49 4c | 3b 0a 20 20 20 20 65 6c |al = NIL|;. el|
|00005540| 73 65 20 7b 0a 09 76 61 | 6c 20 3d 20 6e 65 77 6e |se {..va|l = newn|
|00005550| 6f 64 65 28 49 4e 54 29 | 3b 0a 09 76 61 6c 2d 3e |ode(INT)|;..val->|
|00005560| 6e 5f 69 6e 74 20 3d 20 | 63 68 3b 0a 20 20 20 20 |n_int = |ch;. |
|00005570| 7d 0a 0a 20 20 20 20 2f | 2a 20 72 65 74 75 72 6e |}.. /|* return|
|00005580| 20 74 68 65 20 63 68 61 | 72 61 63 74 65 72 20 2a | the cha|racter *|
|00005590| 2f 0a 20 20 20 20 72 65 | 74 75 72 6e 20 28 76 61 |/. re|turn (va|
|000055a0| 6c 29 3b 0a 7d 0a 0a 2f | 2a 20 78 70 6b 63 68 61 |l);.}../|* xpkcha|
|000055b0| 72 20 2d 20 70 65 65 6b | 20 61 74 20 61 20 63 68 |r - peek| at a ch|
|000055c0| 61 72 61 63 74 65 72 20 | 66 72 6f 6d 20 61 20 66 |aracter |from a f|
|000055d0| 69 6c 65 20 2a 2f 0a 4e | 4f 44 45 20 2a 78 70 6b |ile */.N|ODE *xpk|
|000055e0| 63 68 61 72 28 61 72 67 | 73 29 0a 20 20 4e 4f 44 |char(arg|s). NOD|
|000055f0| 45 20 2a 61 72 67 73 3b | 0a 7b 0a 20 20 20 20 4e |E *args;|.{. N|
|00005600| 4f 44 45 20 2a 66 6c 61 | 67 2c 2a 66 70 74 72 2c |ODE *fla|g,*fptr,|
|00005610| 2a 76 61 6c 3b 0a 20 20 | 20 20 69 6e 74 20 63 68 |*val;. | int ch|
|00005620| 3b 0a 0a 20 20 20 20 2f | 2a 20 70 65 65 6b 20 66 |;.. /|* peek f|
|00005630| 6c 61 67 20 61 6e 64 20 | 67 65 74 20 66 69 6c 65 |lag and |get file|
|00005640| 20 70 6f 69 6e 74 65 72 | 20 2a 2f 0a 20 20 20 20 | pointer| */. |
|00005650| 66 6c 61 67 20 3d 20 28 | 61 72 67 73 20 3f 20 78 |flag = (|args ? x|
|00005660| 6c 61 72 67 28 26 61 72 | 67 73 29 20 3a 20 4e 49 |larg(&ar|gs) : NI|
|00005670| 4c 29 3b 0a 20 20 20 20 | 66 70 74 72 20 3d 20 28 |L);. |fptr = (|
|00005680| 61 72 67 73 20 3f 20 67 | 65 74 66 69 6c 65 28 26 |args ? g|etfile(&|
|00005690| 61 72 67 73 29 20 3a 20 | 73 5f 73 74 64 69 6e 2d |args) : |s_stdin-|
|000056a0| 3e 6e 5f 73 79 6d 76 61 | 6c 75 65 29 3b 0a 20 20 |>n_symva|lue);. |
|000056b0| 20 20 78 6c 6c 61 73 74 | 61 72 67 28 61 72 67 73 | xllast|arg(args|
|000056c0| 29 3b 0a 0a 20 20 20 20 | 2f 2a 20 73 6b 69 70 20 |);.. |/* skip |
|000056d0| 6c 65 61 64 69 6e 67 20 | 77 68 69 74 65 20 73 70 |leading |white sp|
|000056e0| 61 63 65 20 61 6e 64 20 | 67 65 74 20 61 20 63 68 |ace and |get a ch|
|000056f0| 61 72 61 63 74 65 72 20 | 2a 2f 0a 20 20 20 20 69 |aracter |*/. i|
|00005700| 66 20 28 66 6c 61 67 29 | 0a 09 77 68 69 6c 65 20 |f (flag)|..while |
|00005710| 28 28 63 68 20 3d 20 78 | 6c 70 65 65 6b 28 66 70 |((ch = x|lpeek(fp|
|00005720| 74 72 29 29 20 21 3d 20 | 45 4f 46 20 26 26 20 69 |tr)) != |EOF && i|
|00005730| 73 73 70 61 63 65 28 63 | 68 29 29 0a 09 20 20 20 |sspace(c|h)).. |
|00005740| 20 78 6c 67 65 74 63 28 | 66 70 74 72 29 3b 0a 20 | xlgetc(|fptr);. |
|00005750| 20 20 20 65 6c 73 65 0a | 09 63 68 20 3d 20 78 6c | else.|.ch = xl|
|00005760| 70 65 65 6b 28 66 70 74 | 72 29 3b 0a 0a 20 20 20 |peek(fpt|r);.. |
|00005770| 20 2f 2a 20 63 68 65 63 | 6b 20 66 6f 72 20 65 6f | /* chec|k for eo|
|00005780| 66 20 2a 2f 0a 20 20 20 | 20 69 66 20 28 63 68 20 |f */. | if (ch |
|00005790| 3d 3d 20 45 4f 46 29 0a | 09 76 61 6c 20 3d 20 4e |== EOF).|.val = N|
|000057a0| 49 4c 3b 0a 20 20 20 20 | 65 6c 73 65 20 7b 0a 09 |IL;. |else {..|
|000057b0| 76 61 6c 20 3d 20 6e 65 | 77 6e 6f 64 65 28 49 4e |val = ne|wnode(IN|
|000057c0| 54 29 3b 0a 09 76 61 6c | 2d 3e 6e 5f 69 6e 74 20 |T);..val|->n_int |
|000057d0| 3d 20 63 68 3b 0a 20 20 | 20 20 7d 0a 0a 20 20 20 |= ch;. | }.. |
|000057e0| 20 2f 2a 20 72 65 74 75 | 72 6e 20 74 68 65 20 63 | /* retu|rn the c|
|000057f0| 68 61 72 61 63 74 65 72 | 20 2a 2f 0a 20 20 20 20 |haracter| */. |
|00005800| 72 65 74 75 72 6e 20 28 | 76 61 6c 29 3b 0a 7d 0a |return (|val);.}.|
|00005810| 0a 2f 2a 20 78 77 72 63 | 68 61 72 20 2d 20 77 72 |./* xwrc|har - wr|
|00005820| 69 74 65 20 61 20 63 68 | 61 72 61 63 74 65 72 20 |ite a ch|aracter |
|00005830| 74 6f 20 61 20 66 69 6c | 65 20 2a 2f 0a 4e 4f 44 |to a fil|e */.NOD|
|00005840| 45 20 2a 78 77 72 63 68 | 61 72 28 61 72 67 73 29 |E *xwrch|ar(args)|
|00005850| 0a 20 20 4e 4f 44 45 20 | 2a 61 72 67 73 3b 0a 7b |. NODE |*args;.{|
|00005860| 0a 20 20 20 20 4e 4f 44 | 45 20 2a 66 70 74 72 2c |. NOD|E *fptr,|
|00005870| 2a 63 68 72 3b 0a 0a 20 | 20 20 20 2f 2a 20 67 65 |*chr;.. | /* ge|
|00005880| 74 20 74 68 65 20 63 68 | 61 72 61 63 74 65 72 20 |t the ch|aracter |
|00005890| 61 6e 64 20 66 69 6c 65 | 20 70 6f 69 6e 74 65 72 |and file| pointer|
|000058a0| 20 2a 2f 0a 20 20 20 20 | 63 68 72 20 3d 20 78 6c | */. |chr = xl|
|000058b0| 6d 61 74 63 68 28 49 4e | 54 2c 26 61 72 67 73 29 |match(IN|T,&args)|
|000058c0| 3b 0a 20 20 20 20 66 70 | 74 72 20 3d 20 28 61 72 |;. fp|tr = (ar|
|000058d0| 67 73 20 3f 20 67 65 74 | 66 69 6c 65 28 26 61 72 |gs ? get|file(&ar|
|000058e0| 67 73 29 20 3a 20 73 5f | 73 74 64 6f 75 74 2d 3e |gs) : s_|stdout->|
|000058f0| 6e 5f 73 79 6d 76 61 6c | 75 65 29 3b 0a 20 20 20 |n_symval|ue);. |
|00005900| 20 78 6c 6c 61 73 74 61 | 72 67 28 61 72 67 73 29 | xllasta|rg(args)|
|00005910| 3b 0a 0a 20 20 20 20 2f | 2a 20 70 75 74 20 63 68 |;.. /|* put ch|
|00005920| 61 72 61 63 74 65 72 20 | 74 6f 20 74 68 65 20 66 |aracter |to the f|
|00005930| 69 6c 65 20 2a 2f 0a 20 | 20 20 20 78 6c 70 75 74 |ile */. | xlput|
|00005940| 63 28 66 70 74 72 2c 63 | 68 72 2d 3e 6e 5f 69 6e |c(fptr,c|hr->n_in|
|00005950| 74 29 3b 0a 0a 20 20 20 | 20 2f 2a 20 72 65 74 75 |t);.. | /* retu|
|00005960| 72 6e 20 74 68 65 20 63 | 68 61 72 61 63 74 65 72 |rn the c|haracter|
|00005970| 20 2a 2f 0a 20 20 20 20 | 72 65 74 75 72 6e 20 28 | */. |return (|
|00005980| 63 68 72 29 3b 0a 7d 0a | 0a 2f 2a 20 78 72 65 61 |chr);.}.|./* xrea|
|00005990| 64 6c 69 6e 65 20 2d 20 | 72 65 61 64 20 61 20 6c |dline - |read a l|
|000059a0| 69 6e 65 20 66 72 6f 6d | 20 61 20 66 69 6c 65 20 |ine from| a file |
|000059b0| 2a 2f 0a 4e 4f 44 45 20 | 2a 78 72 65 61 64 6c 69 |*/.NODE |*xreadli|
|000059c0| 6e 65 28 61 72 67 73 29 | 0a 20 20 4e 4f 44 45 20 |ne(args)|. NODE |
|000059d0| 2a 61 72 67 73 3b 0a 7b | 0a 20 20 20 20 4e 4f 44 |*args;.{|. NOD|
|000059e0| 45 20 2a 6f 6c 64 73 74 | 6b 2c 66 70 74 72 2c 73 |E *oldst|k,fptr,s|
|000059f0| 74 72 3b 0a 20 20 20 20 | 63 68 61 72 20 2a 70 2c |tr;. |char *p,|
|00005a00| 2a 73 70 74 72 3b 0a 20 | 20 20 20 69 6e 74 20 6c |*sptr;. | int l|
|00005a10| 65 6e 2c 63 68 3b 0a 0a | 20 20 20 20 2f 2a 20 63 |en,ch;..| /* c|
|00005a20| 72 65 61 74 65 20 61 20 | 6e 65 77 20 73 74 61 63 |reate a |new stac|
|00005a30| 6b 20 66 72 61 6d 65 20 | 2a 2f 0a 20 20 20 20 6f |k frame |*/. o|
|00005a40| 6c 64 73 74 6b 20 3d 20 | 78 6c 73 61 76 65 28 26 |ldstk = |xlsave(&|
|00005a50| 66 70 74 72 2c 26 73 74 | 72 2c 4e 55 4c 4c 29 3b |fptr,&st|r,NULL);|
|00005a60| 0a 0a 20 20 20 20 2f 2a | 20 67 65 74 20 66 69 6c |.. /*| get fil|
|00005a70| 65 20 70 6f 69 6e 74 65 | 72 20 2a 2f 0a 20 20 20 |e pointe|r */. |
|00005a80| 20 66 70 74 72 2e 6e 5f | 70 74 72 20 3d 20 28 61 | fptr.n_|ptr = (a|
|00005a90| 72 67 73 20 3f 20 67 65 | 74 66 69 6c 65 28 26 61 |rgs ? ge|tfile(&a|
|00005aa0| 72 67 73 29 20 3a 20 73 | 5f 73 74 64 69 6e 2d 3e |rgs) : s|_stdin->|
|00005ab0| 6e 5f 73 79 6d 76 61 6c | 75 65 29 3b 0a 20 20 20 |n_symval|ue);. |
|00005ac0| 20 78 6c 6c 61 73 74 61 | 72 67 28 61 72 67 73 29 | xllasta|rg(args)|
|00005ad0| 3b 0a 0a 20 20 20 20 2f | 2a 20 6d 61 6b 65 20 61 |;.. /|* make a|
|00005ae0| 20 73 74 72 69 6e 67 20 | 6e 6f 64 65 20 2a 2f 0a | string |node */.|
|00005af0| 20 20 20 20 73 74 72 2e | 6e 5f 70 74 72 20 3d 20 | str.|n_ptr = |
|00005b00| 6e 65 77 6e 6f 64 65 28 | 53 54 52 29 3b 0a 20 20 |newnode(|STR);. |
|00005b10| 20 20 73 74 72 2e 6e 5f | 70 74 72 2d 3e 6e 5f 73 | str.n_|ptr->n_s|
|00005b20| 74 72 74 79 70 65 20 3d | 20 44 59 4e 41 4d 49 43 |trtype =| DYNAMIC|
|00005b30| 3b 0a 0a 20 20 20 20 2f | 2a 20 67 65 74 20 63 68 |;.. /|* get ch|
|00005b40| 61 72 61 63 74 65 72 20 | 61 6e 64 20 63 68 65 63 |aracter |and chec|
|00005b50| 6b 20 66 6f 72 20 65 6f | 66 20 2a 2f 0a 20 20 20 |k for eo|f */. |
|00005b60| 20 6c 65 6e 20 3d 20 30 | 3b 20 70 20 3d 20 62 75 | len = 0|; p = bu|
|00005b70| 66 3b 0a 20 20 20 20 77 | 68 69 6c 65 20 28 28 63 |f;. w|hile ((c|
|00005b80| 68 20 3d 20 78 6c 67 65 | 74 63 28 66 70 74 72 2e |h = xlge|tc(fptr.|
|00005b90| 6e 5f 70 74 72 29 29 20 | 21 3d 20 45 4f 46 20 26 |n_ptr)) |!= EOF &|
|00005ba0| 26 20 63 68 20 21 3d 20 | 27 5c 6e 27 29 20 7b 0a |& ch != |'\n') {.|
|00005bb0| 0a 09 2f 2a 20 63 68 65 | 63 6b 20 66 6f 72 20 62 |../* che|ck for b|
|00005bc0| 75 66 66 65 72 20 6f 76 | 65 72 66 6c 6f 77 20 2a |uffer ov|erflow *|
|00005bd0| 2f 0a 09 69 66 20 28 28 | 69 6e 74 29 28 70 20 2d |/..if ((|int)(p -|
|00005be0| 20 62 75 66 29 20 3d 3d | 20 53 54 52 4d 41 58 29 | buf) ==| STRMAX)|
|00005bf0| 20 7b 0a 09 20 20 20 20 | 2a 70 20 3d 20 30 3b 0a | {.. |*p = 0;.|
|00005c00| 20 09 20 20 20 20 73 70 | 74 72 20 3d 20 73 74 72 | . sp|tr = str|
|00005c10| 61 6c 6c 6f 63 28 6c 65 | 6e 20 2b 20 53 54 52 4d |alloc(le|n + STRM|
|00005c20| 41 58 29 3b 20 2a 73 70 | 74 72 20 3d 20 30 3b 0a |AX); *sp|tr = 0;.|
|00005c30| 09 20 20 20 20 69 66 20 | 28 6c 65 6e 29 20 7b 0a |. if |(len) {.|
|00005c40| 09 09 73 74 72 63 70 79 | 28 73 70 74 72 2c 73 74 |..strcpy|(sptr,st|
|00005c50| 72 2e 6e 5f 70 74 72 2d | 3e 6e 5f 73 74 72 29 3b |r.n_ptr-|>n_str);|
|00005c60| 0a 09 09 73 74 72 66 72 | 65 65 28 73 74 72 2e 6e |...strfr|ee(str.n|
|00005c70| 5f 70 74 72 2d 3e 6e 5f | 73 74 72 29 3b 0a 09 20 |_ptr->n_|str);.. |
|00005c80| 20 20 20 7d 0a 09 20 20 | 20 20 73 74 72 2e 6e 5f | }.. | str.n_|
|00005c90| 70 74 72 2d 3e 6e 5f 73 | 74 72 20 3d 20 73 70 74 |ptr->n_s|tr = spt|
|00005ca0| 72 3b 0a 09 20 20 20 20 | 73 74 72 63 61 74 28 73 |r;.. |strcat(s|
|00005cb0| 70 74 72 2c 62 75 66 29 | 3b 0a 09 20 20 20 20 6c |ptr,buf)|;.. l|
|00005cc0| 65 6e 20 2b 3d 20 53 54 | 52 4d 41 58 3b 0a 09 20 |en += ST|RMAX;.. |
|00005cd0| 20 20 20 70 20 3d 20 62 | 75 66 3b 0a 09 7d 0a 0a | p = b|uf;..}..|
|00005ce0| 09 2f 2a 20 73 74 6f 72 | 65 20 74 68 65 20 63 68 |./* stor|e the ch|
|00005cf0| 61 72 61 63 74 65 72 20 | 2a 2f 0a 09 2a 70 2b 2b |aracter |*/..*p++|
|00005d00| 20 3d 20 63 68 3b 0a 20 | 20 20 20 7d 0a 0a 20 20 | = ch;. | }.. |
|00005d10| 20 20 2f 2a 20 63 68 65 | 63 6b 20 66 6f 72 20 65 | /* che|ck for e|
|00005d20| 6e 64 20 6f 66 20 66 69 | 6c 65 20 2a 2f 0a 20 20 |nd of fi|le */. |
|00005d30| 20 20 69 66 20 28 6c 65 | 6e 20 3d 3d 20 30 20 26 | if (le|n == 0 &|
|00005d40| 26 20 70 20 3d 3d 20 62 | 75 66 20 26 26 20 63 68 |& p == b|uf && ch|
|00005d50| 20 3d 3d 20 45 4f 46 29 | 20 7b 0a 09 78 6c 73 74 | == EOF)| {..xlst|
|00005d60| 61 63 6b 20 3d 20 6f 6c | 64 73 74 6b 3b 0a 09 72 |ack = ol|dstk;..r|
|00005d70| 65 74 75 72 6e 20 28 4e | 49 4c 29 3b 0a 20 20 20 |eturn (N|IL);. |
|00005d80| 20 7d 0a 0a 20 20 20 20 | 2f 2a 20 61 70 70 65 6e | }.. |/* appen|
|00005d90| 64 20 74 68 65 20 6c 61 | 73 74 20 73 75 62 73 74 |d the la|st subst|
|00005da0| 72 69 6e 67 20 2a 2f 0a | 20 20 20 20 2a 70 20 3d |ring */.| *p =|
|00005db0| 20 30 3b 0a 20 20 20 20 | 73 70 74 72 20 3d 20 73 | 0;. |sptr = s|
|00005dc0| 74 72 61 6c 6c 6f 63 28 | 6c 65 6e 20 2b 20 28 69 |tralloc(|len + (i|
|00005dd0| 6e 74 29 28 70 20 2d 20 | 62 75 66 29 29 3b 20 2a |nt)(p - |buf)); *|
|00005de0| 73 70 74 72 20 3d 20 30 | 3b 0a 20 20 20 20 69 66 |sptr = 0|;. if|
|00005df0| 20 28 6c 65 6e 29 20 7b | 0a 09 73 74 72 63 70 79 | (len) {|..strcpy|
|00005e00| 28 73 70 74 72 2c 73 74 | 72 2e 6e 5f 70 74 72 2d |(sptr,st|r.n_ptr-|
|00005e10| 3e 6e 5f 73 74 72 29 3b | 0a 09 73 74 72 66 72 65 |>n_str);|..strfre|
|00005e20| 65 28 73 74 72 2e 6e 5f | 70 74 72 2d 3e 6e 5f 73 |e(str.n_|ptr->n_s|
|00005e30| 74 72 29 3b 0a 20 20 20 | 20 7d 0a 20 20 20 20 73 |tr);. | }. s|
|00005e40| 74 72 2e 6e 5f 70 74 72 | 2d 3e 6e 5f 73 74 72 20 |tr.n_ptr|->n_str |
|00005e50| 3d 20 73 70 74 72 3b 0a | 20 20 20 20 73 74 72 63 |= sptr;.| strc|
|00005e60| 61 74 28 73 70 74 72 2c | 62 75 66 29 3b 0a 0a 20 |at(sptr,|buf);.. |
|00005e70| 20 20 20 2f 2a 20 72 65 | 73 74 6f 72 65 20 74 68 | /* re|store th|
|00005e80| 65 20 70 72 65 76 69 6f | 75 73 20 73 74 61 63 6b |e previo|us stack|
|00005e90| 20 66 72 61 6d 65 20 2a | 2f 0a 20 20 20 20 78 6c | frame *|/. xl|
|00005ea0| 73 74 61 63 6b 20 3d 20 | 6f 6c 64 73 74 6b 3b 0a |stack = |oldstk;.|
|00005eb0| 0a 20 20 20 20 2f 2a 20 | 72 65 74 75 72 6e 20 74 |. /* |return t|
|00005ec0| 68 65 20 73 74 72 69 6e | 67 20 2a 2f 0a 20 20 20 |he strin|g */. |
|00005ed0| 20 72 65 74 75 72 6e 20 | 28 73 74 72 2e 6e 5f 70 | return |(str.n_p|
|00005ee0| 74 72 29 3b 0a 7d 0a 0a | 2f 2a 20 67 65 74 66 69 |tr);.}..|/* getfi|
|00005ef0| 6c 65 20 2d 20 67 65 74 | 20 61 20 66 69 6c 65 20 |le - get| a file |
|00005f00| 6f 72 20 73 74 72 65 61 | 6d 20 2a 2f 0a 4c 4f 43 |or strea|m */.LOC|
|00005f10| 41 4c 20 4e 4f 44 45 20 | 2a 67 65 74 66 69 6c 65 |AL NODE |*getfile|
|00005f20| 28 70 61 72 67 73 29 0a | 20 20 4e 4f 44 45 20 2a |(pargs).| NODE *|
|00005f30| 2a 70 61 72 67 73 3b 0a | 7b 0a 20 20 20 20 4e 4f |*pargs;.|{. NO|
|00005f40| 44 45 20 2a 61 72 67 3b | 0a 0a 20 20 20 20 2f 2a |DE *arg;|.. /*|
|00005f50| 20 67 65 74 20 61 20 66 | 69 6c 65 20 6f 72 20 73 | get a f|ile or s|
|00005f60| 74 72 65 61 6d 20 28 63 | 6f 6e 73 29 20 6f 72 20 |tream (c|ons) or |
|00005f70| 6e 69 6c 20 2a 2f 0a 20 | 20 20 20 69 66 20 28 61 |nil */. | if (a|
|00005f80| 72 67 20 3d 20 78 6c 61 | 72 67 28 70 61 72 67 73 |rg = xla|rg(pargs|
|00005f90| 29 29 20 7b 0a 09 69 66 | 20 28 66 69 6c 65 70 28 |)) {..if| (filep(|
|00005fa0| 61 72 67 29 29 20 7b 0a | 09 20 20 20 20 69 66 20 |arg)) {.|. if |
|00005fb0| 28 61 72 67 2d 3e 6e 5f | 66 70 20 3d 3d 20 4e 55 |(arg->n_|fp == NU|
|00005fc0| 4c 4c 29 0a 09 09 78 6c | 66 61 69 6c 28 22 66 69 |LL)...xl|fail("fi|
|00005fd0| 6c 65 20 6e 6f 74 20 6f | 70 65 6e 22 29 3b 0a 09 |le not o|pen");..|
|00005fe0| 7d 0a 09 65 6c 73 65 20 | 69 66 20 28 21 63 6f 6e |}..else |if (!con|
|00005ff0| 73 70 28 61 72 67 29 29 | 0a 09 20 20 20 20 78 6c |sp(arg))|.. xl|
|00006000| 66 61 69 6c 28 22 62 61 | 64 20 61 72 67 75 6d 65 |fail("ba|d argume|
|00006010| 6e 74 20 74 79 70 65 22 | 29 3b 0a 20 20 20 20 7d |nt type"|);. }|
|00006020| 0a 20 20 20 20 72 65 74 | 75 72 6e 20 28 61 72 67 |. ret|urn (arg|
|00006030| 29 3b 0a 7d 0a 53 48 41 | 52 5f 45 4f 46 0a 69 66 |);.}.SHA|R_EOF.if|
|00006040| 20 74 65 73 74 20 38 39 | 36 30 20 2d 6e 65 20 22 | test 89|60 -ne "|
|00006050| 60 77 63 20 2d 63 20 3c | 20 27 78 6c 66 69 6f 2e |`wc -c <| 'xlfio.|
|00006060| 63 27 60 22 0a 74 68 65 | 6e 0a 09 65 63 68 6f 20 |c'`".the|n..echo |
|00006070| 73 68 61 72 3a 20 65 72 | 72 6f 72 20 74 72 61 6e |shar: er|ror tran|
|00006080| 73 6d 69 74 74 69 6e 67 | 20 22 27 78 6c 66 69 6f |smitting| "'xlfio|
|00006090| 2e 63 27 22 20 27 28 73 | 68 6f 75 6c 64 20 68 61 |.c'" '(s|hould ha|
|000060a0| 76 65 20 62 65 65 6e 20 | 38 39 36 30 20 63 68 61 |ve been |8960 cha|
|000060b0| 72 61 63 74 65 72 73 29 | 27 0a 66 69 0a 66 69 20 |racters)|'.fi.fi |
|000060c0| 23 20 65 6e 64 20 6f 66 | 20 6f 76 65 72 77 72 69 |# end of| overwri|
|000060d0| 74 69 6e 67 20 63 68 65 | 63 6b 0a 65 63 68 6f 20 |ting che|ck.echo |
|000060e0| 73 68 61 72 3a 20 65 78 | 74 72 61 63 74 69 6e 67 |shar: ex|tracting|
|000060f0| 20 22 27 78 6c 66 74 61 | 62 2e 63 27 22 20 27 28 | "'xlfta|b.c'" '(|
|00006100| 35 39 39 38 20 63 68 61 | 72 61 63 74 65 72 73 29 |5998 cha|racters)|
|00006110| 27 0a 69 66 20 74 65 73 | 74 20 2d 66 20 27 78 6c |'.if tes|t -f 'xl|
|00006120| 66 74 61 62 2e 63 27 0a | 74 68 65 6e 0a 09 65 63 |ftab.c'.|then..ec|
|00006130| 68 6f 20 73 68 61 72 3a | 20 77 69 6c 6c 20 6e 6f |ho shar:| will no|
|00006140| 74 20 6f 76 65 72 2d 77 | 72 69 74 65 20 65 78 69 |t over-w|rite exi|
|00006150| 73 74 69 6e 67 20 66 69 | 6c 65 20 22 27 78 6c 66 |sting fi|le "'xlf|
|00006160| 74 61 62 2e 63 27 22 0a | 65 6c 73 65 0a 73 65 64 |tab.c'".|else.sed|
|00006170| 20 27 73 2f 5e 58 2f 2f | 27 20 3c 3c 20 5c 53 48 | 's/^X//|' << \SH|
|00006180| 41 52 5f 45 4f 46 20 3e | 20 27 78 6c 66 74 61 62 |AR_EOF >| 'xlftab|
|00006190| 2e 63 27 0a 2f 2a 20 78 | 6c 66 74 61 62 2e 63 20 |.c'./* x|lftab.c |
|000061a0| 2d 20 78 6c 69 73 70 20 | 66 75 6e 63 74 69 6f 6e |- xlisp |function|
|000061b0| 20 74 61 62 6c 65 20 2a | 2f 0a 0a 23 69 6e 63 6c | table *|/..#incl|
|000061c0| 75 64 65 20 22 78 6c 69 | 73 70 2e 68 22 0a 0a 2f |ude "xli|sp.h"../|
|000061d0| 2a 20 65 78 74 65 72 6e | 61 6c 20 66 75 6e 63 74 |* extern|al funct|
|000061e0| 69 6f 6e 73 20 2a 2f 0a | 65 78 74 65 72 6e 20 4e |ions */.|extern N|
|000061f0| 4f 44 45 0a 20 20 20 20 | 2a 78 65 76 61 6c 28 29 |ODE. |*xeval()|
|00006200| 2c 2a 78 61 70 70 6c 79 | 28 29 2c 2a 78 66 75 6e |,*xapply|(),*xfun|
|00006210| 63 61 6c 6c 28 29 2c 2a | 78 71 75 6f 74 65 28 29 |call(),*|xquote()|
|00006220| 2c 2a 78 62 71 75 6f 74 | 65 28 29 2c 0a 20 20 20 |,*xbquot|e(),. |
|00006230| 20 2a 78 73 65 74 28 29 | 2c 2a 78 73 65 74 71 28 | *xset()|,*xsetq(|
|00006240| 29 2c 2a 78 73 65 74 66 | 28 29 2c 2a 78 64 65 66 |),*xsetf|(),*xdef|
|00006250| 75 6e 28 29 2c 2a 78 64 | 65 66 6d 61 63 72 6f 28 |un(),*xd|efmacro(|
|00006260| 29 2c 0a 20 20 20 20 2a | 78 67 65 6e 73 79 6d 28 |),. *|xgensym(|
|00006270| 29 2c 2a 78 6d 61 6b 65 | 73 79 6d 62 6f 6c 28 29 |),*xmake|symbol()|
|00006280| 2c 2a 78 69 6e 74 65 72 | 6e 28 29 2c 0a 20 20 20 |,*xinter|n(),. |
|00006290| 20 2a 78 73 79 6d 6e 61 | 6d 65 28 29 2c 2a 78 73 | *xsymna|me(),*xs|
|000062a0| 79 6d 76 61 6c 75 65 28 | 29 2c 2a 78 73 79 6d 70 |ymvalue(|),*xsymp|
|000062b0| 6c 69 73 74 28 29 2c 2a | 78 67 65 74 28 29 2c 2a |list(),*|xget(),*|
|000062c0| 78 72 65 6d 70 72 6f 70 | 28 29 2c 0a 20 20 20 20 |xremprop|(),. |
|000062d0| 2a 78 63 61 72 28 29 2c | 2a 78 63 61 61 72 28 29 |*xcar(),|*xcaar()|
|000062e0| 2c 2a 78 63 61 64 72 28 | 29 2c 2a 78 63 64 72 28 |,*xcadr(|),*xcdr(|
|000062f0| 29 2c 2a 78 63 64 61 72 | 28 29 2c 2a 78 63 64 64 |),*xcdar|(),*xcdd|
|00006300| 72 28 29 2c 0a 20 20 20 | 20 2a 78 63 6f 6e 73 28 |r(),. | *xcons(|
|00006310| 29 2c 2a 78 6c 69 73 74 | 28 29 2c 2a 78 61 70 70 |),*xlist|(),*xapp|
|00006320| 65 6e 64 28 29 2c 2a 78 | 72 65 76 65 72 73 65 28 |end(),*x|reverse(|
|00006330| 29 2c 2a 78 6c 61 73 74 | 28 29 2c 2a 78 6e 74 68 |),*xlast|(),*xnth|
|00006340| 28 29 2c 2a 78 6e 74 68 | 63 64 72 28 29 2c 0a 20 |(),*xnth|cdr(),. |
|00006350| 20 20 20 2a 78 6d 65 6d | 62 65 72 28 29 2c 2a 78 | *xmem|ber(),*x|
|00006360| 61 73 73 6f 63 28 29 2c | 2a 78 73 75 62 73 74 28 |assoc(),|*xsubst(|
|00006370| 29 2c 2a 78 73 75 62 6c | 69 73 28 29 2c 2a 78 72 |),*xsubl|is(),*xr|
|00006380| 65 6d 6f 76 65 28 29 2c | 2a 78 6c 65 6e 67 74 68 |emove(),|*xlength|
|00006390| 28 29 2c 0a 20 20 20 20 | 2a 78 6d 61 70 63 28 29 |(),. |*xmapc()|
|000063a0| 2c 2a 78 6d 61 70 63 61 | 72 28 29 2c 2a 78 6d 61 |,*xmapca|r(),*xma|
|000063b0| 70 6c 28 29 2c 2a 78 6d | 61 70 6c 69 73 74 28 29 |pl(),*xm|aplist()|
|000063c0| 2c 0a 20 20 20 20 2a 78 | 72 70 6c 63 61 28 29 2c |,. *x|rplca(),|
|000063d0| 2a 78 72 70 6c 63 64 28 | 29 2c 2a 78 6e 63 6f 6e |*xrplcd(|),*xncon|
|000063e0| 63 28 29 2c 2a 78 64 65 | 6c 65 74 65 28 29 2c 0a |c(),*xde|lete(),.|
|000063f0| 20 20 20 20 2a 78 61 74 | 6f 6d 28 29 2c 2a 78 73 | *xat|om(),*xs|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.