home *** CD-ROM | disk | FTP | other *** search
view JSON data
|
view as text
|
open on a Mac
|
open on a PC
This file was processed as: SHell self-extracting ARchive
(archive/shar).
You can browse this item here: part01
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, 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)
| |
100%
| xdgMime
| message/rfc822
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 53 75 62 6a 65 63 74 3a | 20 20 76 31 31 69 30 37 |Subject:| v11i07|
|00000010| 38 3a 20 20 43 20 63 72 | 6f 73 73 2d 72 65 66 65 |8: C cr|oss-refe|
|00000020| 72 65 6e 63 65 20 64 61 | 74 61 62 61 73 65 20 73 |rence da|tabase s|
|00000030| 79 73 74 65 6d 2c 20 50 | 61 72 74 30 31 2f 30 33 |ystem, P|art01/03|
|00000040| 0a 4e 65 77 73 67 72 6f | 75 70 73 3a 20 63 6f 6d |.Newsgro|ups: com|
|00000050| 70 2e 73 6f 75 72 63 65 | 73 2e 75 6e 69 78 0a 53 |p.source|s.unix.S|
|00000060| 65 6e 64 65 72 3a 20 73 | 6f 75 72 63 65 73 0a 41 |ender: s|ources.A|
|00000070| 70 70 72 6f 76 65 64 3a | 20 72 73 40 75 75 6e 65 |pproved:| rs@uune|
|00000080| 74 2e 55 55 2e 4e 45 54 | 0a 0a 53 75 62 6d 69 74 |t.UU.NET|..Submit|
|00000090| 74 65 64 2d 62 79 3a 20 | 73 75 6e 21 73 75 6e 65 |ted-by: |sun!sune|
|000000a0| 61 73 74 21 6b 75 6d 71 | 75 61 74 21 67 6d 63 67 |ast!kumq|uat!gmcg|
|000000b0| 61 72 79 20 28 47 72 65 | 67 20 4d 63 67 61 72 79 |ary (Gre|g Mcgary|
|000000c0| 20 2d 20 53 75 6e 20 45 | 43 44 20 53 6f 66 74 77 | - Sun E|CD Softw|
|000000d0| 61 72 65 29 0a 50 6f 73 | 74 69 6e 67 2d 6e 75 6d |are).Pos|ting-num|
|000000e0| 62 65 72 3a 20 56 6f 6c | 75 6d 65 20 31 31 2c 20 |ber: Vol|ume 11, |
|000000f0| 49 73 73 75 65 20 37 38 | 0a 41 72 63 68 69 76 65 |Issue 78|.Archive|
|00000100| 2d 6e 61 6d 65 3a 20 69 | 64 2f 50 61 72 74 30 31 |-name: i|d/Part01|
|00000110| 0a 0a 54 68 69 73 20 69 | 73 20 61 20 70 72 6f 67 |..This i|s a prog|
|00000120| 72 61 6d 20 69 64 65 6e | 74 69 66 69 65 72 20 64 |ram iden|tifier d|
|00000130| 61 74 61 62 61 73 65 20 | 70 61 63 6b 61 67 65 2e |atabase |package.|
|00000140| 20 20 54 68 65 73 65 20 | 74 6f 6f 6c 73 20 70 72 | These |tools pr|
|00000150| 6f 76 69 64 65 20 61 0a | 6c 6f 67 69 63 61 6c 20 |ovide a.|logical |
|00000160| 65 78 74 65 6e 73 69 6f | 6e 20 74 6f 20 63 74 61 |extensio|n to cta|
|00000170| 67 73 2e 20 28 77 68 69 | 63 68 20 69 73 20 6c 69 |gs. (whi|ch is li|
|00000180| 6d 69 74 65 64 20 69 6e | 20 74 68 61 74 20 69 74 |mited in| that it|
|00000190| 20 6f 6e 6c 79 20 73 74 | 6f 72 65 73 20 74 68 65 | only st|ores the|
|000001a0| 0a 6c 6f 63 61 74 69 6f | 6e 20 6f 66 20 66 75 6e |.locatio|n of fun|
|000001b0| 63 74 69 6f 6e 20 61 6e | 64 20 74 79 70 65 20 2a |ction an|d type *|
|000001c0| 64 65 66 69 6e 69 74 69 | 6f 6e 73 2a 29 2e 20 20 |definiti|ons*). |
|000001d0| 54 68 65 20 49 44 20 66 | 61 63 69 6c 69 74 79 20 |The ID f|acility |
|000001e0| 73 74 6f 72 65 73 20 74 | 68 65 0a 6c 6f 63 61 74 |stores t|he.locat|
|000001f0| 69 6f 6e 73 20 66 6f 72 | 20 61 6c 6c 20 75 73 65 |ions for| all use|
|00000200| 73 20 6f 66 20 69 64 65 | 6e 74 69 66 69 65 72 73 |s of ide|ntifiers|
|00000210| 2c 20 70 72 65 2d 70 72 | 6f 63 65 73 73 6f 72 20 |, pre-pr|ocessor |
|00000220| 6e 61 6d 65 73 2c 20 61 | 6e 64 20 6e 75 6d 62 65 |names, a|nd numbe|
|00000230| 72 73 0a 28 69 6e 20 64 | 65 63 69 6d 61 6c 2c 20 |rs.(in d|ecimal, |
|00000240| 6f 63 74 61 6c 20 6f 72 | 20 68 65 78 29 2e 20 20 |octal or| hex). |
|00000250| 54 68 65 20 69 64 2d 64 | 61 74 61 62 61 73 65 20 |The id-d|atabase |
|00000260| 69 73 20 6d 6f 73 74 20 | 75 73 65 66 75 6c 20 66 |is most |useful f|
|00000270| 6f 72 0a 6d 61 69 6e 74 | 61 69 6e 69 6e 67 20 6c |or.maint|aining l|
|00000280| 61 72 67 65 20 70 72 6f | 67 72 61 6d 73 20 74 68 |arge pro|grams th|
|00000290| 61 74 20 63 6f 6e 73 69 | 73 74 20 6f 66 20 6d 61 |at consi|st of ma|
|000002a0| 6e 79 20 73 6f 75 72 63 | 65 20 66 69 6c 65 73 2e |ny sourc|e files.|
|000002b0| 20 20 54 68 65 0a 64 61 | 74 61 62 61 73 65 20 69 | The.da|tabase i|
|000002c0| 73 20 73 69 6d 70 6c 79 | 20 61 20 74 77 6f 20 64 |s simply| a two d|
|000002d0| 69 6d 65 6e 73 69 6f 6e | 61 6c 20 62 6f 6f 6c 65 |imension|al boole|
|000002e0| 61 6e 20 61 72 72 61 79 | 20 69 6e 64 65 78 65 64 |an array| indexed|
|000002f0| 20 62 79 0a 69 64 65 6e | 74 69 66 69 65 72 2d 6e | by.iden|tifier-n|
|00000300| 61 6d 65 20 61 6e 64 20 | 73 6f 75 72 63 65 2d 66 |ame and |source-f|
|00000310| 69 6c 65 2d 6e 61 6d 65 | 2e 20 20 46 6f 72 20 61 |ile-name|. For a|
|00000320| 20 67 69 76 65 6e 20 69 | 64 65 6e 74 69 66 69 65 | given i|dentifie|
|00000330| 72 20 61 6e 64 0a 73 6f | 75 72 63 65 2d 66 69 6c |r and.so|urce-fil|
|00000340| 65 2c 20 69 66 20 74 68 | 65 20 69 64 65 6e 74 69 |e, if th|e identi|
|00000350| 66 69 65 72 20 6f 63 63 | 75 72 73 20 69 6e 20 74 |fier occ|urs in t|
|00000360| 68 65 20 66 69 6c 65 2c | 20 74 68 65 20 62 6f 6f |he file,| the boo|
|00000370| 6c 65 61 6e 20 76 61 6c | 75 65 20 69 73 0a 54 52 |lean val|ue is.TR|
|00000380| 55 45 2e 20 20 54 68 65 | 20 64 61 74 61 62 61 73 |UE. The| databas|
|00000390| 65 20 6d 61 79 20 62 65 | 20 71 75 65 72 69 65 64 |e may be| queried|
|000003a0| 20 65 69 74 68 65 72 20 | 62 79 20 69 64 65 6e 74 | either |by ident|
|000003b0| 69 66 69 65 72 2d 6e 61 | 6d 65 20 6f 72 0a 66 69 |ifier-na|me or.fi|
|000003c0| 6c 65 2d 6e 61 6d 65 2e | 0a 0a 0a 23 21 20 2f 62 |le-name.|...#! /b|
|000003d0| 69 6e 2f 73 68 0a 23 20 | 54 68 69 73 20 69 73 20 |in/sh.# |This is |
|000003e0| 61 20 73 68 65 6c 6c 20 | 61 72 63 68 69 76 65 2c |a shell |archive,|
|000003f0| 20 6d 65 61 6e 69 6e 67 | 3a 0a 23 20 31 2e 20 52 | meaning|:.# 1. R|
|00000400| 65 6d 6f 76 65 20 65 76 | 65 72 79 74 68 69 6e 67 |emove ev|erything|
|00000410| 20 61 62 6f 76 65 20 74 | 68 65 20 23 21 20 2f 62 | above t|he #! /b|
|00000420| 69 6e 2f 73 68 20 6c 69 | 6e 65 2e 0a 23 20 32 2e |in/sh li|ne..# 2.|
|00000430| 20 53 61 76 65 20 74 68 | 65 20 72 65 73 75 6c 74 | Save th|e result|
|00000440| 69 6e 67 20 74 65 78 74 | 20 69 6e 20 61 20 66 69 |ing text| in a fi|
|00000450| 6c 65 2e 0a 23 20 33 2e | 20 45 78 65 63 75 74 65 |le..# 3.| Execute|
|00000460| 20 74 68 65 20 66 69 6c | 65 20 77 69 74 68 20 2f | the fil|e with /|
|00000470| 62 69 6e 2f 73 68 20 28 | 6e 6f 74 20 63 73 68 29 |bin/sh (|not csh)|
|00000480| 20 74 6f 20 63 72 65 61 | 74 65 20 74 68 65 20 66 | to crea|te the f|
|00000490| 69 6c 65 73 3a 0a 23 09 | 54 55 54 4f 52 49 41 4c |iles:.#.|TUTORIAL|
|000004a0| 0a 23 09 54 4f 44 4f 0a | 23 09 6d 61 6b 65 66 69 |.#.TODO.|#.makefi|
|000004b0| 6c 65 0a 23 09 62 69 74 | 6f 70 73 2e 68 0a 23 09 |le.#.bit|ops.h.#.|
|000004c0| 62 6f 6f 6c 2e 68 0a 23 | 09 65 78 74 65 72 6e 2e |bool.h.#|.extern.|
|000004d0| 68 0a 23 09 69 64 2e 68 | 0a 23 09 70 61 74 63 68 |h.#.id.h|.#.patch|
|000004e0| 6c 65 76 65 6c 2e 68 0a | 23 09 72 61 64 69 78 2e |level.h.|#.radix.|
|000004f0| 68 0a 23 09 73 74 72 69 | 6e 67 2e 68 0a 23 09 6c |h.#.stri|ng.h.#.l|
|00000500| 69 64 2e 31 0a 23 09 6d | 6b 69 64 2e 31 0a 65 78 |id.1.#.m|kid.1.ex|
|00000510| 70 6f 72 74 20 50 41 54 | 48 3b 20 50 41 54 48 3d |port PAT|H; PATH=|
|00000520| 2f 62 69 6e 3a 24 50 41 | 54 48 0a 65 63 68 6f 20 |/bin:$PA|TH.echo |
|00000530| 73 68 61 72 3a 20 65 78 | 74 72 61 63 74 69 6e 67 |shar: ex|tracting|
|00000540| 20 22 27 54 55 54 4f 52 | 49 41 4c 27 22 20 27 28 | "'TUTOR|IAL'" '(|
|00000550| 31 36 30 33 37 20 63 68 | 61 72 61 63 74 65 72 73 |16037 ch|aracters|
|00000560| 29 27 0a 73 65 64 20 27 | 73 2f 5e 58 2f 2f 27 20 |)'.sed '|s/^X//' |
|00000570| 3c 3c 20 5c 53 48 41 52 | 5f 45 4f 46 20 3e 20 27 |<< \SHAR|_EOF > '|
|00000580| 54 55 54 4f 52 49 41 4c | 27 0a 58 0a 58 54 68 69 |TUTORIAL|'.X.XThi|
|00000590| 73 20 69 73 20 61 20 70 | 72 6f 67 72 61 6d 20 69 |s is a p|rogram i|
|000005a0| 64 65 6e 74 69 66 69 65 | 72 20 64 61 74 61 62 61 |dentifie|r databa|
|000005b0| 73 65 20 70 61 63 6b 61 | 67 65 2e 20 20 54 68 65 |se packa|ge. The|
|000005c0| 73 65 20 74 6f 6f 6c 73 | 20 70 72 6f 76 69 64 65 |se tools| provide|
|000005d0| 20 61 0a 58 6c 6f 67 69 | 63 61 6c 20 65 78 74 65 | a.Xlogi|cal exte|
|000005e0| 6e 73 69 6f 6e 20 74 6f | 20 63 74 61 67 73 2e 20 |nsion to| ctags. |
|000005f0| 28 77 68 69 63 68 20 69 | 73 20 6c 69 6d 69 74 65 |(which i|s limite|
|00000600| 64 20 69 6e 20 74 68 61 | 74 20 69 74 20 6f 6e 6c |d in tha|t it onl|
|00000610| 79 20 73 74 6f 72 65 73 | 20 74 68 65 0a 58 6c 6f |y stores| the.Xlo|
|00000620| 63 61 74 69 6f 6e 20 6f | 66 20 66 75 6e 63 74 69 |cation o|f functi|
|00000630| 6f 6e 20 61 6e 64 20 74 | 79 70 65 20 2a 64 65 66 |on and t|ype *def|
|00000640| 69 6e 69 74 69 6f 6e 73 | 2a 61 29 20 20 54 68 65 |initions|*a) The|
|00000650| 20 49 44 20 66 61 63 69 | 6c 69 74 79 0a 58 73 74 | ID faci|lity.Xst|
|00000660| 6f 72 65 73 20 74 68 65 | 20 6c 6f 63 61 74 69 6f |ores the| locatio|
|00000670| 6e 73 20 66 6f 72 20 61 | 6c 6c 20 75 73 65 73 20 |ns for a|ll uses |
|00000680| 6f 66 20 69 64 65 6e 74 | 69 66 69 65 72 73 2c 20 |of ident|ifiers, |
|00000690| 70 72 65 2d 70 72 6f 63 | 65 73 73 6f 72 0a 58 6e |pre-proc|essor.Xn|
|000006a0| 61 6d 65 73 2c 20 61 6e | 64 20 6e 75 6d 62 65 72 |ames, an|d number|
|000006b0| 73 2e 20 28 69 6e 20 64 | 65 63 69 6d 61 6c 2c 20 |s. (in d|ecimal, |
|000006c0| 6f 63 74 61 6c 20 6f 72 | 20 68 65 78 29 0a 58 0a |octal or| hex).X.|
|000006d0| 58 57 68 65 6e 20 66 69 | 78 69 6e 67 20 6f 72 20 |XWhen fi|xing or |
|000006e0| 65 6e 68 61 6e 63 69 6e | 67 20 61 20 6c 61 72 67 |enhancin|g a larg|
|000006f0| 65 20 70 72 6f 67 72 61 | 6d 20 28 70 61 72 74 69 |e progra|m (parti|
|00000700| 63 75 6c 61 72 6c 79 20 | 6f 6e 65 20 74 68 61 74 |cularly |one that|
|00000710| 20 69 73 0a 58 75 6e 66 | 61 6d 69 6c 69 61 72 29 | is.Xunf|amiliar)|
|00000720| 20 69 74 20 69 73 20 6f | 66 74 65 6e 20 6e 65 63 | it is o|ften nec|
|00000730| 65 73 73 61 72 79 20 74 | 6f 20 61 75 64 69 74 20 |essary t|o audit |
|00000740| 74 68 65 20 75 73 65 20 | 6f 66 20 67 6c 6f 62 61 |the use |of globa|
|00000750| 6c 0a 58 64 61 74 61 2d | 73 74 72 75 63 74 75 72 |l.Xdata-|structur|
|00000760| 65 73 20 69 6e 20 6f 72 | 64 65 72 20 74 6f 20 76 |es in or|der to v|
|00000770| 65 72 69 66 79 20 74 68 | 61 74 20 74 68 65 20 70 |erify th|at the p|
|00000780| 72 6f 70 6f 73 65 64 20 | 6d 6f 64 69 66 69 63 61 |roposed |modifica|
|00000790| 74 69 6f 6e 20 77 69 6c | 6c 0a 58 6e 6f 74 20 74 |tion wil|l.Xnot t|
|000007a0| 72 69 67 67 65 72 20 61 | 6e 79 20 68 69 64 64 65 |rigger a|ny hidde|
|000007b0| 6e 20 60 67 6f 74 63 68 | 61 73 27 2e 20 20 4f 66 |n `gotch|as'. Of|
|000007c0| 74 65 6e 20 74 68 69 73 | 20 65 6e 74 61 69 6c 73 |ten this| entails|
|000007d0| 20 67 72 65 70 70 69 6e | 67 20 74 68 72 6f 75 67 | greppin|g throug|
|000007e0| 68 0a 58 6d 61 6e 79 20 | 74 68 6f 75 73 61 6e 64 |h.Xmany |thousand|
|000007f0| 73 20 6f 66 20 6c 69 6e | 65 73 20 6f 66 20 73 6f |s of lin|es of so|
|00000800| 75 72 63 65 20 63 6f 64 | 65 20 73 70 72 65 61 64 |urce cod|e spread|
|00000810| 20 6f 76 65 72 20 64 6f | 7a 65 6e 73 20 61 6e 64 | over do|zens and|
|00000820| 20 73 6f 6d 65 74 69 6d | 65 73 0a 58 68 75 6e 64 | sometim|es.Xhund|
|00000830| 72 65 64 73 20 6f 66 20 | 73 6f 75 72 63 65 20 66 |reds of |source f|
|00000840| 69 6c 65 73 20 69 6e 20 | 6d 75 6c 74 69 70 6c 65 |iles in |multiple|
|00000850| 20 73 75 62 2d 64 69 72 | 65 63 74 6f 72 69 65 73 | sub-dir|ectories|
|00000860| 2e 20 20 54 68 69 73 20 | 70 72 6f 63 65 73 73 0a |. This |process.|
|00000870| 58 70 6c 61 63 65 73 20 | 61 20 73 69 67 6e 69 66 |Xplaces |a signif|
|00000880| 69 63 61 6e 74 20 6c 6f | 61 64 20 6f 6e 20 63 6f |icant lo|ad on co|
|00000890| 6d 70 75 74 69 6e 67 20 | 72 65 73 6f 75 72 63 65 |mputing |resource|
|000008a0| 73 2c 20 61 6e 64 20 74 | 61 6b 65 73 20 61 20 6c |s, and t|akes a l|
|000008b0| 6f 6e 67 0a 58 74 69 6d | 65 2e 20 20 54 68 65 72 |ong.Xtim|e. Ther|
|000008c0| 65 20 69 73 20 65 76 65 | 6e 20 74 68 65 20 64 61 |e is eve|n the da|
|000008d0| 6e 67 65 72 20 74 68 61 | 74 20 61 20 70 72 6f 67 |nger tha|t a prog|
|000008e0| 72 61 6d 6d 65 72 20 77 | 69 6c 6c 20 61 76 6f 69 |rammer w|ill avoi|
|000008f0| 64 20 64 6f 69 6e 67 20 | 61 0a 58 63 6f 6d 70 6c |d doing |a.Xcompl|
|00000900| 65 74 65 20 61 75 64 69 | 74 20 64 75 65 20 74 6f |ete audi|t due to|
|00000910| 20 74 68 65 20 70 65 72 | 63 65 69 76 65 64 20 63 | the per|ceived c|
|00000920| 6f 73 74 2d 2d 68 65 20 | 6f 72 20 73 68 65 20 77 |ost--he |or she w|
|00000930| 69 6c 6c 20 72 65 6c 79 | 20 6f 6e 20 6d 65 6d 6f |ill rely| on memo|
|00000940| 72 79 0a 58 61 6e 64 20 | 68 6f 70 65 20 74 68 61 |ry.Xand |hope tha|
|00000950| 74 20 74 68 65 72 65 20 | 61 72 65 20 6e 6f 20 62 |t there |are no b|
|00000960| 6f 6f 62 79 20 74 72 61 | 70 73 2e 0a 58 0a 58 54 |ooby tra|ps..X.XT|
|00000970| 68 65 20 69 64 2d 64 61 | 74 61 62 61 73 65 20 69 |he id-da|tabase i|
|00000980| 73 20 6d 6f 73 74 20 75 | 73 65 66 75 6c 20 66 6f |s most u|seful fo|
|00000990| 72 20 6d 61 69 6e 74 61 | 69 6e 69 6e 67 20 6c 61 |r mainta|ining la|
|000009a0| 72 67 65 20 70 72 6f 67 | 72 61 6d 73 20 74 68 61 |rge prog|rams tha|
|000009b0| 74 0a 58 63 6f 6e 73 69 | 73 74 20 6f 66 20 6d 61 |t.Xconsi|st of ma|
|000009c0| 6e 79 20 73 6f 75 72 63 | 65 20 66 69 6c 65 73 2e |ny sourc|e files.|
|000009d0| 20 20 54 68 65 20 64 61 | 74 61 62 61 73 65 20 69 | The da|tabase i|
|000009e0| 73 20 73 69 6d 70 6c 79 | 20 61 20 74 77 6f 20 64 |s simply| a two d|
|000009f0| 69 6d 65 6e 73 69 6f 6e | 61 6c 0a 58 62 6f 6f 6c |imension|al.Xbool|
|00000a00| 65 61 6e 20 61 72 72 61 | 79 20 69 6e 64 65 78 65 |ean arra|y indexe|
|00000a10| 64 20 62 79 20 69 64 65 | 6e 74 69 66 69 65 72 2d |d by ide|ntifier-|
|00000a20| 6e 61 6d 65 20 61 6e 64 | 20 73 6f 75 72 63 65 2d |name and| source-|
|00000a30| 66 69 6c 65 2d 6e 61 6d | 65 2e 20 20 46 6f 72 20 |file-nam|e. For |
|00000a40| 61 0a 58 67 69 76 65 6e | 20 69 64 65 6e 74 69 66 |a.Xgiven| identif|
|00000a50| 69 65 72 20 61 6e 64 20 | 73 6f 75 72 63 65 2d 66 |ier and |source-f|
|00000a60| 69 6c 65 2c 20 69 66 20 | 74 68 65 20 69 64 65 6e |ile, if |the iden|
|00000a70| 74 69 66 69 65 72 20 6f | 63 63 75 72 73 20 69 6e |tifier o|ccurs in|
|00000a80| 20 74 68 65 20 66 69 6c | 65 2c 0a 58 74 68 65 20 | the fil|e,.Xthe |
|00000a90| 62 6f 6f 6c 65 61 6e 20 | 76 61 6c 75 65 20 69 73 |boolean |value is|
|00000aa0| 20 54 52 55 45 2e 20 20 | 54 68 65 20 64 61 74 61 | TRUE. |The data|
|00000ab0| 62 61 73 65 20 6d 61 79 | 20 62 65 20 71 75 65 72 |base may| be quer|
|00000ac0| 69 65 64 20 65 69 74 68 | 65 72 20 62 79 0a 58 69 |ied eith|er by.Xi|
|00000ad0| 64 65 6e 74 69 66 69 65 | 72 2d 6e 61 6d 65 20 6f |dentifie|r-name o|
|00000ae0| 72 20 66 69 6c 65 2d 6e | 61 6d 65 2e 0a 58 0a 58 |r file-n|ame..X.X|
|00000af0| 54 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 74 79 |The foll|owing ty|
|00000b00| 70 65 73 20 6f 66 20 71 | 75 65 72 69 65 73 20 73 |pes of q|ueries s|
|00000b10| 75 70 70 6f 72 74 65 64 | 3a 0a 58 0a 58 2a 20 6e |upported|:.X.X* n|
|00000b20| 61 6d 65 20 6c 6f 6f 6b | 75 70 0a 58 09 6c 69 73 |ame look|up.X.lis|
|00000b30| 74 20 61 6c 6c 20 74 68 | 65 20 66 69 6c 65 73 20 |t all th|e files |
|00000b40| 77 68 65 72 65 20 61 6e | 20 69 64 65 6e 74 69 66 |where an| identif|
|00000b50| 69 65 72 20 6f 63 63 75 | 72 73 2e 20 20 54 68 65 |ier occu|rs. The|
|00000b60| 20 6e 61 6d 65 0a 58 09 | 6d 61 79 20 62 65 20 61 | name.X.|may be a|
|00000b70| 20 72 65 67 75 6c 61 72 | 20 65 78 70 72 65 73 73 | regular| express|
|00000b80| 69 6f 6e 2e 0a 58 0a 58 | 2a 20 6e 61 6d 65 20 61 |ion..X.X|* name a|
|00000b90| 70 72 6f 70 6f 73 0a 58 | 09 6c 69 73 74 20 61 6c |propos.X|.list al|
|00000ba0| 6c 20 74 68 65 20 66 69 | 6c 65 73 20 66 6f 72 20 |l the fi|les for |
|00000bb0| 61 6c 6c 20 69 64 65 6e | 74 69 66 69 65 72 73 20 |all iden|tifiers |
|00000bc0| 74 68 61 74 20 68 61 76 | 65 20 74 68 65 20 73 75 |that hav|e the su|
|00000bd0| 62 2d 73 74 72 69 6e 67 | 0a 58 09 6e 61 6d 65 20 |b-string|.X.name |
|00000be0| 69 6e 20 74 68 65 6d 2e | 20 20 4d 61 74 63 68 65 |in them.| Matche|
|00000bf0| 73 20 61 72 65 20 64 6f | 6e 65 20 69 6e 20 61 20 |s are do|ne in a |
|00000c00| 63 61 73 65 2d 69 6e 73 | 65 6e 73 69 74 69 76 65 |case-ins|ensitive|
|00000c10| 20 6d 61 6d 6d 65 72 2e | 0a 58 0a 58 2a 20 6e 61 | mammer.|.X.X* na|
|00000c20| 6d 65 20 60 67 72 65 70 | 27 0a 58 09 73 65 61 72 |me `grep|'.X.sear|
|00000c30| 63 68 20 66 6f 72 20 61 | 6e 20 69 64 65 6e 74 69 |ch for a|n identi|
|00000c40| 66 69 65 72 20 69 6e 20 | 61 6c 6c 20 74 68 65 20 |fier in |all the |
|00000c50| 66 69 6c 65 73 20 77 68 | 65 72 65 20 69 74 20 6f |files wh|ere it o|
|00000c60| 63 63 75 72 73 2e 0a 58 | 09 54 68 69 73 20 69 73 |ccurs..X|.This is|
|00000c70| 20 61 6e 20 6f 70 74 69 | 6d 69 7a 65 64 20 60 67 | an opti|mized `g|
|00000c80| 72 65 70 27 20 6f 76 65 | 72 20 61 6c 6c 20 74 68 |rep' ove|r all th|
|00000c90| 65 20 73 6f 75 72 63 65 | 73 2d 2d 77 65 20 6f 6e |e source|s--we on|
|00000ca0| 6c 79 0a 58 09 73 65 61 | 72 63 68 20 6f 6e 20 66 |ly.X.sea|rch on f|
|00000cb0| 69 6c 65 73 20 74 68 61 | 74 20 63 6f 6e 74 61 69 |iles tha|t contai|
|00000cc0| 6e 20 74 68 65 20 69 64 | 65 6e 74 69 66 69 65 72 |n the id|entifier|
|00000cd0| 2e 0a 58 0a 58 2a 20 6e | 61 6d 65 20 65 64 69 74 |..X.X* n|ame edit|
|00000ce0| 0a 58 09 69 6e 76 6f 6b | 65 20 61 6e 20 65 64 69 |.X.invok|e an edi|
|00000cf0| 74 6f 72 20 6f 6e 20 74 | 68 65 20 66 69 6c 65 73 |tor on t|he files|
|00000d00| 20 77 68 65 72 65 20 61 | 6e 20 69 64 65 6e 74 69 | where a|n identi|
|00000d10| 66 69 65 72 20 6f 63 63 | 75 72 73 2c 0a 58 09 61 |fier occ|urs,.X.a|
|00000d20| 6e 64 20 75 73 65 20 74 | 68 65 20 69 64 65 6e 74 |nd use t|he ident|
|00000d30| 69 66 69 65 72 20 61 73 | 20 61 6e 20 69 6e 69 74 |ifier as| an init|
|00000d40| 69 61 6c 20 73 65 61 72 | 63 68 20 73 74 72 69 6e |ial sear|ch strin|
|00000d50| 67 2e 0a 58 0a 58 2a 20 | 66 69 6c 65 20 6c 6f 6f |g..X.X* |file loo|
|00000d60| 6b 75 70 0a 58 09 6c 69 | 73 74 20 61 6c 6c 20 69 |kup.X.li|st all i|
|00000d70| 64 65 6e 74 69 66 69 65 | 72 73 20 74 68 61 74 20 |dentifie|rs that |
|00000d80| 6f 63 63 75 72 20 69 6e | 20 61 20 66 69 6c 65 2c |occur in| a file,|
|00000d90| 20 6f 72 20 6c 69 73 74 | 0a 58 09 74 68 65 20 69 | or list|.X.the i|
|00000da0| 64 65 6e 74 69 66 69 65 | 72 73 20 74 68 61 74 20 |dentifie|rs that |
|00000db0| 61 72 65 20 63 6f 6d 6d | 6f 6e 20 62 65 74 77 65 |are comm|on betwe|
|00000dc0| 65 6e 20 74 77 6f 20 66 | 69 6c 65 73 2e 0a 58 0a |en two f|iles..X.|
|00000dd0| 58 2a 20 6e 6f 6e 2d 75 | 6e 69 71 75 65 20 6e 61 |X* non-u|nique na|
|00000de0| 6d 65 73 0a 58 09 6c 69 | 73 74 20 74 68 65 20 6e |mes.X.li|st the n|
|00000df0| 61 6d 65 73 20 6f 66 20 | 61 6c 6c 20 69 6e 64 65 |ames of |all inde|
|00000e00| 6e 74 69 66 69 65 72 73 | 20 77 68 6f 73 65 20 6e |ntifiers| whose n|
|00000e10| 61 6d 65 73 20 61 72 65 | 20 6e 6f 6e 2d 75 6e 69 |ames are| non-uni|
|00000e20| 71 75 65 0a 58 09 77 69 | 74 68 69 6e 20 73 6f 6d |que.X.wi|thin som|
|00000e30| 65 20 6e 75 6d 62 65 72 | 20 6f 66 20 63 68 61 72 |e number| of char|
|00000e40| 61 63 74 65 72 73 2e 20 | 20 54 68 69 73 20 69 73 |acters. | This is|
|00000e50| 20 75 73 65 66 75 6c 20 | 77 68 65 6e 20 70 6f 72 | useful |when por|
|00000e60| 74 69 6e 67 0a 58 09 61 | 20 70 72 6f 67 72 61 6d |ting.X.a| program|
|00000e70| 20 66 72 6f 6d 20 61 20 | 60 66 6c 65 78 6e 61 6d | from a |`flexnam|
|00000e80| 65 73 27 20 73 79 73 74 | 65 6d 20 74 6f 20 6f 6e |es' syst|em to on|
|00000e90| 65 20 6d 6f 72 65 20 6c | 69 6d 69 74 65 64 20 6e |e more l|imited n|
|00000ea0| 61 6d 65 73 2e 0a 58 0a | 58 2a 20 73 6f 6c 6f 0a |ames..X.|X* solo.|
|00000eb0| 58 09 6c 69 73 74 20 61 | 6c 6c 20 69 64 65 6e 74 |X.list a|ll ident|
|00000ec0| 69 66 69 65 72 73 20 74 | 68 61 74 20 6f 63 63 75 |ifiers t|hat occu|
|00000ed0| 72 20 65 78 61 63 74 6c | 79 20 6f 6e 63 65 20 69 |r exactl|y once i|
|00000ee0| 6e 20 61 20 73 6f 66 74 | 77 61 72 65 0a 58 09 73 |n a soft|ware.X.s|
|00000ef0| 79 73 74 65 6d 2e 20 20 | 54 68 69 73 20 6d 61 79 |ystem. |This may|
|00000f00| 20 62 65 20 75 73 65 66 | 75 6c 20 66 6f 72 20 6c | be usef|ul for l|
|00000f10| 6f 63 61 74 69 6e 67 20 | 69 64 65 6e 74 69 66 69 |ocating |identifi|
|00000f20| 65 72 73 20 74 68 61 74 | 20 61 72 65 0a 58 09 64 |ers that| are.X.d|
|00000f30| 65 63 6c 61 72 65 64 20 | 62 75 74 20 6e 65 76 65 |eclared |but neve|
|00000f40| 72 20 75 73 65 64 2c 20 | 6f 72 20 6c 69 62 72 61 |r used, |or libra|
|00000f50| 72 79 20 66 75 6e 63 74 | 69 6f 6e 73 20 74 68 61 |ry funct|ions tha|
|00000f60| 74 20 61 72 65 20 75 73 | 65 64 0a 58 09 62 75 74 |t are us|ed.X.but|
|00000f70| 20 6e 65 76 65 72 20 64 | 65 63 6c 61 72 65 64 2e | never d|eclared.|
|00000f80| 0a 58 09 0a 58 0a 58 54 | 68 65 20 66 69 72 73 74 |.X..X.XT|he first|
|00000f90| 20 66 6f 75 72 20 71 75 | 65 72 69 65 73 20 61 72 | four qu|eries ar|
|00000fa0| 65 20 68 61 6e 64 6c 65 | 64 20 62 79 20 6f 6e 65 |e handle|d by one|
|00000fb0| 20 70 72 6f 67 72 61 6d | 2e 20 20 54 68 65 20 74 | program|. The t|
|00000fc0| 79 70 65 20 6f 66 20 71 | 75 65 72 79 0a 58 69 73 |ype of q|uery.Xis|
|00000fd0| 20 64 65 74 65 72 6d 69 | 6e 65 64 20 62 79 20 74 | determi|ned by t|
|00000fe0| 68 65 20 6e 61 6d 65 20 | 74 68 65 20 70 72 6f 67 |he name |the prog|
|00000ff0| 72 61 6d 20 77 61 73 20 | 69 6e 76 6f 6b 65 64 20 |ram was |invoked |
|00001000| 77 69 74 68 2e 20 20 54 | 68 65 20 66 6f 75 72 20 |with. T|he four |
|00001010| 6c 69 6e 6b 73 0a 58 61 | 72 65 20 6c 69 64 28 31 |links.Xa|re lid(1|
|00001020| 29 20 66 6f 72 20 60 6c | 6f 6f 6b 75 70 20 69 64 |) for `l|ookup id|
|00001030| 27 2c 20 61 69 64 28 31 | 29 20 66 6f 72 20 60 61 |', aid(1|) for `a|
|00001040| 70 72 6f 70 6f 73 20 69 | 64 27 2c 20 67 69 64 28 |propos i|d', gid(|
|00001050| 31 29 20 66 6f 72 20 60 | 67 72 65 70 0a 58 69 64 |1) for `|grep.Xid|
|00001060| 27 20 61 6e 64 20 65 69 | 64 28 31 29 20 66 6f 72 |' and ei|d(1) for|
|00001070| 20 60 65 64 69 74 20 69 | 64 27 2e 20 20 4f 6e 65 | `edit i|d'. One|
|00001080| 20 6f 72 20 6d 6f 72 65 | 20 69 64 65 6e 74 69 66 | or more| identif|
|00001090| 69 65 72 73 20 6d 61 79 | 20 62 65 20 70 61 73 73 |iers may| be pass|
|000010a0| 65 64 20 6f 6e 0a 58 74 | 68 65 20 63 6f 6d 6d 61 |ed on.Xt|he comma|
|000010b0| 6e 64 20 6c 69 6e 65 2e | 20 20 54 68 65 20 69 64 |nd line.| The id|
|000010c0| 65 6e 74 69 66 69 65 72 | 73 20 6d 61 79 20 62 65 |entifier|s may be|
|000010d0| 20 6c 69 74 65 72 61 6c | 20 73 74 72 69 6e 67 73 | literal| strings|
|000010e0| 20 6f 72 20 72 65 67 75 | 6c 61 72 0a 58 65 78 70 | or regu|lar.Xexp|
|000010f0| 72 65 73 73 69 6f 6e 73 | 2e 20 20 48 65 72 65 20 |ressions|. Here |
|00001100| 61 72 65 20 73 6f 6d 65 | 20 65 78 61 6d 70 6c 65 |are some| example|
|00001110| 73 3a 0a 58 0a 58 24 20 | 6c 69 64 20 46 49 4c 45 |s:.X.X$ |lid FILE|
|00001120| 0a 58 46 49 4c 45 20 20 | 20 20 20 20 20 20 20 20 |.XFILE | |
|00001130| 20 65 78 74 65 72 6e 2e | 68 20 7b 66 69 64 2c 67 | extern.|h {fid,g|
|00001140| 65 74 73 30 2c 67 65 74 | 73 46 46 2c 69 64 78 2c |ets0,get|sFF,idx,|
|00001150| 69 6e 69 74 2c 6c 69 64 | 2c 6d 6b 69 64 2c 6f 70 |init,lid|,mkid,op|
|00001160| 65 6e 73 72 63 2c 73 63 | 61 6e 2d 61 73 6d 2c 73 |ensrc,sc|an-asm,s|
|00001170| 63 61 6e 2d 63 7d 2e 63 | 0a 58 0a 58 24 20 6c 69 |can-c}.c|.X.X$ li|
|00001180| 64 20 46 49 4c 45 24 0a | 58 41 46 5f 46 49 4c 45 |d FILE$.|XAF_FILE|
|00001190| 20 20 20 20 20 20 20 20 | 6d 6b 69 64 2e 63 0a 58 | |mkid.c.X|
|000011a0| 41 46 5f 49 44 46 49 4c | 45 20 20 20 20 20 20 6d |AF_IDFIL|E m|
|000011b0| 6b 69 64 2e 63 0a 58 46 | 49 4c 45 20 20 20 20 20 |kid.c.XF|ILE |
|000011c0| 20 20 20 20 20 20 65 78 | 74 65 72 6e 2e 68 20 7b | ex|tern.h {|
|000011d0| 66 69 64 2c 67 65 74 73 | 30 2c 67 65 74 73 46 46 |fid,gets|0,getsFF|
|000011e0| 2c 69 64 78 2c 69 6e 69 | 74 2c 6c 69 64 2c 6d 6b |,idx,ini|t,lid,mk|
|000011f0| 69 64 2c 6f 70 65 6e 73 | 72 63 2c 73 63 61 6e 2d |id,opens|rc,scan-|
|00001200| 61 73 6d 2c 73 63 61 6e | 2d 63 7d 2e 63 0a 58 49 |asm,scan|-c}.c.XI|
|00001210| 44 46 49 4c 45 20 20 20 | 20 20 20 20 20 20 69 64 |DFILE | id|
|00001220| 2e 68 20 7b 66 69 64 2c | 6c 69 64 2c 6d 6b 69 64 |.h {fid,|lid,mkid|
|00001230| 7d 2e 63 0a 58 49 64 46 | 49 4c 45 20 20 20 20 20 |}.c.XIdF|ILE |
|00001240| 20 20 20 20 7b 66 69 64 | 2c 6c 69 64 7d 2e 63 0a | {fid|,lid}.c.|
|00001250| 58 61 72 67 46 49 4c 45 | 20 20 20 20 20 20 20 20 |XargFILE| |
|00001260| 6d 6b 69 64 2e 63 0a 58 | 67 69 64 46 49 4c 45 20 |mkid.c.X|gidFILE |
|00001270| 20 20 20 20 20 20 20 6c | 69 64 2e 63 0a 58 69 64 | l|id.c.Xid|
|00001280| 46 49 4c 45 20 20 20 20 | 20 20 20 20 20 7b 69 6e |FILE | {in|
|00001290| 69 74 2c 6d 6b 69 64 7d | 2e 63 0a 58 69 6e 46 49 |it,mkid}|.c.XinFI|
|000012a0| 4c 45 20 20 20 20 20 20 | 20 20 20 7b 67 65 74 73 |LE | {gets|
|000012b0| 30 2c 67 65 74 73 46 46 | 2c 73 63 61 6e 2d 61 73 |0,getsFF|,scan-as|
|000012c0| 6d 2c 73 63 61 6e 2d 63 | 7d 2e 63 0a 58 6f 70 65 |m,scan-c|}.c.Xope|
|000012d0| 6e 53 72 63 46 49 4c 45 | 20 20 20 20 65 78 74 65 |nSrcFILE| exte|
|000012e0| 72 6e 2e 68 20 7b 69 64 | 78 2c 6d 6b 69 64 2c 6f |rn.h {id|x,mkid,o|
|000012f0| 70 65 6e 73 72 63 7d 2e | 63 0a 58 73 72 63 46 49 |pensrc}.|c.XsrcFI|
|00001300| 4c 45 20 20 20 20 20 20 | 20 20 7b 69 64 78 2c 6d |LE | {idx,m|
|00001310| 6b 69 64 2c 6f 70 65 6e | 73 72 63 7d 2e 63 0a 58 |kid,open|src}.c.X|
|00001320| 0a 58 24 20 6c 69 64 20 | 5e 67 65 74 0a 58 67 65 |.X$ lid |^get.Xge|
|00001330| 74 20 20 20 20 20 20 20 | 20 20 20 20 20 6f 70 65 |t | ope|
|00001340| 6e 73 72 63 2e 63 0a 58 | 67 65 74 41 64 61 49 64 |nsrc.c.X|getAdaId|
|00001350| 20 20 20 20 20 20 20 67 | 65 74 73 63 61 6e 2e 63 | g|etscan.c|
|00001360| 0a 58 67 65 74 41 73 6d | 49 64 20 20 20 20 20 20 |.XgetAsm|Id |
|00001370| 20 65 78 74 65 72 6e 2e | 68 20 7b 67 65 74 73 63 | extern.|h {getsc|
|00001380| 61 6e 2c 73 63 61 6e 2d | 61 73 6d 7d 2e 63 0a 58 |an,scan-|asm}.c.X|
|00001390| 67 65 74 43 49 64 20 20 | 20 20 20 20 20 20 20 65 |getCId | e|
|000013a0| 78 74 65 72 6e 2e 68 20 | 7b 67 65 74 73 63 61 6e |xtern.h |{getscan|
|000013b0| 2c 73 63 61 6e 2d 63 7d | 2e 63 0a 58 67 65 74 44 |,scan-c}|.c.XgetD|
|000013c0| 69 72 54 6f 4e 61 6d 65 | 20 20 20 65 78 74 65 72 |irToName| exter|
|000013d0| 6e 2e 68 20 7b 66 69 64 | 2c 6c 69 64 2c 70 61 74 |n.h {fid|,lid,pat|
|000013e0| 68 73 7d 2e 63 0a 58 67 | 65 74 49 64 20 20 20 20 |hs}.c.Xg|etId |
|000013f0| 20 20 20 20 20 20 7b 69 | 64 78 2c 6d 6b 69 64 7d | {i|dx,mkid}|
|00001400| 2e 63 0a 58 67 65 74 4c | 61 6e 67 75 61 67 65 20 |.c.XgetL|anguage |
|00001410| 20 20 20 65 78 74 65 72 | 6e 2e 68 20 7b 67 65 74 | exter|n.h {get|
|00001420| 73 63 61 6e 2c 69 64 78 | 2c 6d 6b 69 64 7d 2e 63 |scan,idx|,mkid}.c|
|00001430| 0a 58 67 65 74 4c 69 73 | 70 49 64 20 20 20 20 20 |.XgetLis|pId |
|00001440| 20 67 65 74 73 63 61 6e | 2e 63 0a 58 67 65 74 50 | getscan|.c.XgetP|
|00001450| 61 73 63 61 6c 49 64 20 | 20 20 20 67 65 74 73 63 |ascalId | getsc|
|00001460| 61 6e 2e 63 0a 58 67 65 | 74 52 6f 66 66 49 64 20 |an.c.Xge|tRoffId |
|00001470| 20 20 20 20 20 67 65 74 | 73 63 61 6e 2e 63 0a 58 | get|scan.c.X|
|00001480| 67 65 74 53 43 43 53 20 | 20 20 20 20 20 20 20 65 |getSCCS | e|
|00001490| 78 74 65 72 6e 2e 68 20 | 6f 70 65 6e 73 72 63 2e |xtern.h |opensrc.|
|000014a0| 63 0a 58 67 65 74 53 63 | 61 6e 6e 65 72 20 20 20 |c.XgetSc|anner |
|000014b0| 20 20 65 78 74 65 72 6e | 2e 68 20 7b 67 65 74 73 | extern|.h {gets|
|000014c0| 63 61 6e 2c 69 64 78 2c | 6d 6b 69 64 7d 2e 63 0a |can,idx,|mkid}.c.|
|000014d0| 58 67 65 74 54 65 58 49 | 64 20 20 20 20 20 20 20 |XgetTeXI|d |
|000014e0| 67 65 74 73 63 61 6e 2e | 63 0a 58 67 65 74 54 65 |getscan.|c.XgetTe|
|000014f0| 78 74 49 64 20 20 20 20 | 20 20 67 65 74 73 63 61 |xtId | getsca|
|00001500| 6e 2e 63 0a 58 67 65 74 | 63 20 20 20 20 20 20 20 |n.c.Xget|c |
|00001510| 20 20 20 20 7b 67 65 74 | 73 30 2c 67 65 74 73 46 | {get|s0,getsF|
|00001520| 46 2c 6c 69 64 2c 73 63 | 61 6e 2d 61 73 6d 2c 73 |F,lid,sc|an-asm,s|
|00001530| 63 61 6e 2d 63 7d 2e 63 | 0a 58 67 65 74 63 68 61 |can-c}.c|.Xgetcha|
|00001540| 72 20 20 20 20 20 20 20 | 20 6c 69 64 2e 63 0a 58 |r | lid.c.X|
|00001550| 67 65 74 65 6e 76 20 20 | 20 20 20 20 20 20 20 65 |getenv | e|
|00001560| 78 74 65 72 6e 2e 68 20 | 6c 69 64 2e 63 0a 58 67 |xtern.h |lid.c.Xg|
|00001570| 65 74 73 20 20 20 20 20 | 20 20 20 20 20 20 6c 69 |ets | li|
|00001580| 64 2e 63 0a 58 67 65 74 | 73 46 46 20 20 20 20 20 |d.c.Xget|sFF |
|00001590| 20 20 20 20 65 78 74 65 | 72 6e 2e 68 20 7b 62 69 | exte|rn.h {bi|
|000015a0| 74 73 76 65 63 2c 66 69 | 64 2c 67 65 74 73 46 46 |tsvec,fi|d,getsFF|
|000015b0| 2c 6c 69 64 2c 6d 6b 69 | 64 7d 2e 63 0a 58 0a 58 |,lid,mki|d}.c.X.X|
|000015c0| 41 73 20 79 6f 75 20 63 | 61 6e 20 73 65 65 2c 20 |As you c|an see, |
|000015d0| 77 68 65 6e 20 61 20 72 | 65 67 75 6c 61 72 20 65 |when a r|egular e|
|000015e0| 78 70 72 65 73 73 69 6f | 6e 20 69 73 20 75 73 65 |xpressio|n is use|
|000015f0| 64 2c 20 69 74 20 69 73 | 20 70 6f 73 73 69 62 6c |d, it is| possibl|
|00001600| 65 20 74 6f 0a 58 67 65 | 74 20 6d 6f 72 65 20 74 |e to.Xge|t more t|
|00001610| 68 61 6e 20 6f 6e 65 20 | 6c 69 6e 65 20 6f 66 20 |han one |line of |
|00001620| 6f 75 74 70 75 74 2e 20 | 20 49 66 20 79 6f 75 20 |output. | If you |
|00001630| 77 69 73 68 20 6d 75 6c | 74 69 70 6c 65 20 6c 69 |wish mul|tiple li|
|00001640| 6e 65 73 20 74 6f 20 62 | 65 0a 58 6d 65 72 67 65 |nes to b|e.Xmerge|
|00001650| 64 20 69 6e 74 6f 20 6f | 6e 65 2c 20 73 75 70 70 |d into o|ne, supp|
|00001660| 6c 79 20 74 68 65 20 60 | 2d 6d 27 20 6f 70 74 69 |ly the `|-m' opti|
|00001670| 6f 6e 3a 0a 58 0a 58 24 | 20 6c 69 64 20 2d 6d 20 |on:.X.X$| lid -m |
|00001680| 5e 67 65 74 0a 58 5e 67 | 65 74 20 20 20 20 20 20 |^get.X^g|et |
|00001690| 20 20 20 20 20 65 78 74 | 65 72 6e 2e 68 20 7b 62 | ext|ern.h {b|
|000016a0| 69 74 73 76 65 63 2c 66 | 69 64 2c 67 65 74 73 30 |itsvec,f|id,gets0|
|000016b0| 2c 67 65 74 73 46 46 2c | 67 65 74 73 63 61 6e 2c |,getsFF,|getscan,|
|000016c0| 69 64 78 2c 6c 69 64 2c | 6d 6b 69 64 2c 6f 70 65 |idx,lid,|mkid,ope|
|000016d0| 6e 73 72 63 2c 70 61 74 | 68 73 2c 73 63 61 6e 2d |nsrc,pat|hs,scan-|
|000016e0| 61 73 6d 2c 73 63 61 6e | 2d 63 7d 2e 63 0a 58 0a |asm,scan|-c}.c.X.|
|000016f0| 58 54 68 65 20 71 75 65 | 72 79 20 70 72 6f 67 72 |XThe que|ry progr|
|00001700| 61 6d 20 73 65 61 72 63 | 68 65 73 20 66 6f 72 20 |am searc|hes for |
|00001710| 6e 75 6d 62 65 72 73 20 | 6e 75 6d 65 72 69 63 61 |numbers |numerica|
|00001720| 6c 6c 79 20 72 61 74 68 | 65 72 20 74 68 61 6e 0a |lly rath|er than.|
|00001730| 58 74 65 78 74 75 61 6c | 6c 79 2e 20 20 54 68 65 |Xtextual|ly. The|
|00001740| 72 65 66 6f 72 65 20 79 | 6f 75 20 6d 61 79 20 73 |refore y|ou may s|
|00001750| 65 61 72 63 68 20 66 6f | 72 20 6d 75 6c 74 69 70 |earch fo|r multip|
|00001760| 6c 65 20 72 65 70 72 65 | 73 65 6e 74 61 74 69 6f |le repre|sentatio|
|00001770| 6e 73 20 6f 66 20 61 0a | 58 6e 75 6d 62 65 72 2e |ns of a.|Xnumber.|
|00001780| 20 20 49 74 20 69 73 20 | 62 65 73 74 20 74 6f 20 | It is |best to |
|00001790| 69 6c 6c 75 73 74 72 61 | 74 65 20 74 68 69 73 20 |illustra|te this |
|000017a0| 77 69 74 68 20 65 78 61 | 6d 70 6c 65 73 3a 0a 58 |with exa|mples:.X|
|000017b0| 0a 58 24 20 6c 69 64 20 | 2d 61 20 30 78 31 30 0a |.X$ lid |-a 0x10.|
|000017c0| 58 30 32 30 20 20 20 20 | 20 20 20 20 20 20 20 20 |X020 | |
|000017d0| 6e 75 6d 74 73 74 2e 63 | 0a 58 30 78 30 30 30 31 |numtst.c|.X0x0001|
|000017e0| 30 20 20 20 20 20 20 20 | 20 6e 75 6d 74 73 74 2e |0 | numtst.|
|000017f0| 63 0a 58 30 78 30 30 31 | 30 20 20 20 20 20 20 20 |c.X0x001|0 |
|00001800| 20 20 73 63 61 6e 2d 63 | 2e 63 0a 58 30 78 31 30 | scan-c|.c.X0x10|
|00001810| 20 20 20 20 20 20 20 20 | 20 20 20 7b 69 64 2c 72 | | {id,r|
|00001820| 61 64 69 78 7d 2e 68 20 | 7b 73 63 61 6e 2d 61 73 |adix}.h |{scan-as|
|00001830| 6d 2c 73 74 6f 69 7d 2e | 63 0a 58 31 36 20 20 20 |m,stoi}.|c.X16 |
|00001840| 20 20 20 20 20 20 20 20 | 20 20 6e 75 6d 74 73 74 | | numtst|
|00001850| 2e 63 0a 58 0a 58 54 68 | 65 20 60 2d 61 27 20 61 |.c.X.XTh|e `-a' a|
|00001860| 72 67 75 6d 65 6e 74 20 | 74 65 6c 6c 73 20 6c 69 |rgument |tells li|
|00001870| 64 28 31 29 20 74 6f 20 | 6c 6f 6f 6b 20 66 6f 72 |d(1) to |look for|
|00001880| 20 30 78 31 30 20 69 6e | 20 61 6c 6c 20 72 61 64 | 0x10 in| all rad|
|00001890| 69 78 65 73 2e 20 20 28 | 46 6f 72 0a 58 6e 75 6d |ixes. (|For.Xnum|
|000018a0| 62 65 72 73 20 30 20 74 | 68 72 6f 75 67 68 20 37 |bers 0 t|hrough 7|
|000018b0| 2c 20 6c 69 64 28 31 29 | 20 6c 6f 6f 6b 73 20 66 |, lid(1)| looks f|
|000018c0| 6f 72 20 61 6c 6c 20 72 | 61 64 69 78 65 73 20 62 |or all r|adixes b|
|000018d0| 79 20 64 65 66 61 75 6c | 74 2e 20 20 46 6f 72 20 |y defaul|t. For |
|000018e0| 6e 75 6d 62 65 72 73 0a | 58 67 72 65 61 74 65 72 |numbers.|Xgreater|
|000018f0| 20 74 68 61 6e 20 37 2c | 20 6c 69 64 28 31 29 20 | than 7,| lid(1) |
|00001900| 6f 6e 6c 79 20 6c 6f 6f | 6b 73 20 66 6f 72 20 74 |only loo|ks for t|
|00001910| 68 65 20 72 61 64 69 78 | 20 74 68 61 74 20 74 68 |he radix| that th|
|00001920| 65 20 61 72 67 75 6d 65 | 6e 74 20 69 73 0a 58 73 |e argume|nt is.Xs|
|00001930| 75 70 70 6c 69 65 64 20 | 69 6e 2e 29 20 49 74 20 |upplied |in.) It |
|00001940| 69 73 20 61 6c 73 6f 20 | 70 6f 73 73 69 62 6c 65 |is also |possible|
|00001950| 20 74 6f 20 72 65 73 74 | 72 69 63 74 20 74 68 65 | to rest|rict the|
|00001960| 20 73 65 61 72 63 68 20 | 74 6f 20 73 65 6c 65 63 | search |to selec|
|00001970| 74 65 64 0a 58 72 61 64 | 69 78 65 73 20 62 79 20 |ted.Xrad|ixes by |
|00001980| 73 75 70 70 6c 79 69 6e | 67 20 61 6e 20 61 72 67 |supplyin|g an arg|
|00001990| 75 6d 65 6e 74 20 63 6f | 6e 73 69 73 74 69 6e 67 |ument co|nsisting|
|000019a0| 20 6f 66 20 6f 6e 65 20 | 6f 72 20 6d 6f 72 65 20 | of one |or more |
|000019b0| 6f 66 20 74 68 65 0a 58 | 6b 65 79 2d 6c 65 74 74 |of the.X|key-lett|
|000019c0| 65 72 73 20 60 6f 27 2c | 20 60 64 27 2c 20 61 6e |ers `o',| `d', an|
|000019d0| 64 20 60 78 27 20 66 6f | 72 20 6f 63 74 61 6c 20 |d `x' fo|r octal |
|000019e0| 64 65 63 69 6d 61 6c 20 | 61 6e 64 20 68 65 78 61 |decimal |and hexa|
|000019f0| 64 65 63 69 6d 61 6c 0a | 58 72 65 73 70 65 63 74 |decimal.|Xrespect|
|00001a00| 69 76 65 6c 79 3a 0a 58 | 0a 58 24 20 6c 69 64 20 |ively:.X|.X$ lid |
|00001a10| 2d 6f 20 30 78 31 30 0a | 58 30 32 30 20 20 20 20 |-o 0x10.|X020 |
|00001a20| 20 20 20 20 20 20 20 20 | 6e 75 6d 74 73 74 2e 63 | |numtst.c|
|00001a30| 0a 58 0a 58 24 20 6c 69 | 64 20 2d 78 20 31 36 0a |.X.X$ li|d -x 16.|
|00001a40| 58 30 78 30 30 30 31 30 | 20 20 20 20 20 20 20 20 |X0x00010| |
|00001a50| 6e 75 6d 74 73 74 2e 63 | 0a 58 30 78 30 30 31 30 |numtst.c|.X0x0010|
|00001a60| 20 20 20 20 20 20 20 20 | 20 73 63 61 6e 2d 63 2e | | scan-c.|
|00001a70| 63 0a 58 30 78 31 30 20 | 20 20 20 20 20 20 20 20 |c.X0x10 | |
|00001a80| 20 20 7b 69 64 2c 72 61 | 64 69 78 7d 2e 68 20 20 | {id,ra|dix}.h |
|00001a90| 7b 73 63 61 6e 2d 61 73 | 6d 2c 73 74 6f 69 7d 2e |{scan-as|m,stoi}.|
|00001aa0| 63 0a 58 0a 58 24 20 6c | 69 64 20 2d 64 20 30 32 |c.X.X$ l|id -d 02|
|00001ab0| 30 0a 58 31 36 20 20 20 | 20 20 20 20 20 20 20 20 |0.X16 | |
|00001ac0| 20 20 6e 75 6d 74 73 74 | 2e 63 0a 58 0a 58 0a 58 | numtst|.c.X.X.X|
|00001ad0| 54 68 65 20 67 72 65 70 | 20 69 6e 74 65 72 66 61 |The grep| interfa|
|00001ae0| 63 65 20 62 65 68 61 76 | 65 73 20 73 6f 6d 65 77 |ce behav|es somew|
|00001af0| 68 61 74 20 6c 69 6b 65 | 20 74 68 65 20 66 6f 6c |hat like| the fol|
|00001b00| 6c 6f 77 69 6e 67 20 63 | 6f 6d 6d 61 6e 64 3a 0a |lowing c|ommand:.|
|00001b10| 58 0a 58 24 20 67 72 65 | 70 20 2d 77 20 2d 6e 20 |X.X$ gre|p -w -n |
|00001b20| 60 6c 69 64 20 54 52 55 | 45 60 0a 58 0a 58 48 65 |`lid TRU|E`.X.XHe|
|00001b30| 72 65 73 20 73 6f 6d 65 | 20 73 61 6d 70 6c 65 20 |res some| sample |
|00001b40| 6f 75 74 70 75 74 20 66 | 6f 72 20 74 68 65 20 65 |output f|or the e|
|00001b50| 71 75 69 76 61 6c 65 6e | 74 20 67 69 64 20 63 6f |quivalen|t gid co|
|00001b60| 6d 6d 61 6e 64 3a 0a 58 | 0a 58 24 20 67 69 64 20 |mmand:.X|.X$ gid |
|00001b70| 54 52 55 45 0a 58 62 6f | 6f 6c 2e 68 3a 35 3a 20 |TRUE.Xbo|ol.h:5: |
|00001b80| 23 64 65 66 69 6e 65 09 | 54 52 55 45 09 28 30 3d |#define.|TRUE.(0=|
|00001b90| 3d 30 29 0a 58 6c 69 64 | 2e 63 3a 31 30 32 3a 20 |=0).Xlid|.c:102: |
|00001ba0| 09 09 63 61 73 65 20 27 | 6d 27 3a 20 66 6f 72 63 |..case '|m': forc|
|00001bb0| 65 4d 65 72 67 65 20 3d | 20 54 52 55 45 3b 20 62 |eMerge =| TRUE; b|
|00001bc0| 72 65 61 6b 3b 0a 58 6c | 69 64 2e 63 3a 31 37 30 |reak;.Xl|id.c:170|
|00001bd0| 3a 20 09 09 09 4d 65 72 | 67 69 6e 67 20 3d 20 54 |: ...Mer|ging = T|
|00001be0| 52 55 45 3b 0a 58 6c 69 | 64 2e 63 3a 32 30 34 3a |RUE;.Xli|d.c:204:|
|00001bf0| 20 09 09 09 63 72 75 6e | 63 68 69 6e 67 20 3d 20 | ...crun|ching = |
|00001c00| 54 52 55 45 3b 0a 58 6c | 69 64 2e 63 3a 35 35 33 |TRUE;.Xl|id.c:553|
|00001c10| 3a 20 09 09 09 68 69 74 | 44 69 67 69 74 73 20 3d |: ...hit|Digits =|
|00001c20| 20 54 52 55 45 3b 0a 58 | 6c 69 64 2e 63 3a 37 38 | TRUE;.X|lid.c:78|
|00001c30| 37 3a 20 09 09 09 72 65 | 74 75 72 6e 20 54 52 55 |7: ...re|turn TRU|
|00001c40| 45 3b 0a 58 6d 6b 69 64 | 2e 63 3a 31 31 37 3a 20 |E;.Xmkid|.c:117: |
|00001c50| 09 09 09 56 65 72 62 6f | 73 65 20 3d 20 54 52 55 |...Verbo|se = TRU|
|00001c60| 45 3b 0a 58 6d 6b 69 64 | 2e 63 3a 31 39 31 3a 20 |E;.Xmkid|.c:191: |
|00001c70| 09 09 09 09 09 6b 65 65 | 70 4c 61 6e 67 20 3d 20 |.....kee|pLang = |
|00001c80| 54 52 55 45 3b 0a 58 73 | 63 61 6e 2d 61 73 6d 2e |TRUE;.Xs|can-asm.|
|00001c90| 63 3a 37 39 3a 20 73 74 | 61 74 69 63 20 62 6f 6f |c:79: st|atic boo|
|00001ca0| 6c 20 65 61 74 55 6e 64 | 65 72 20 3d 20 54 52 55 |l eatUnd|er = TRU|
|00001cb0| 45 3b 0a 58 73 63 61 6e | 2d 61 73 6d 2e 63 3a 38 |E;.Xscan|-asm.c:8|
|00001cc0| 30 3a 20 73 74 61 74 69 | 63 20 62 6f 6f 6c 20 70 |0: stati|c bool p|
|00001cd0| 72 65 50 72 6f 63 65 73 | 73 20 3d 20 54 52 55 45 |reProces|s = TRUE|
|00001ce0| 3b 0a 58 73 63 61 6e 2d | 61 73 6d 2e 63 3a 39 36 |;.Xscan-|asm.c:96|
|00001cf0| 3a 20 09 73 74 61 74 69 | 63 20 62 6f 6f 6c 09 6e |: .stati|c bool.n|
|00001d00| 65 77 4c 69 6e 65 20 3d | 20 54 52 55 45 3b 0a 58 |ewLine =| TRUE;.X|
|00001d10| 73 63 61 6e 2d 61 73 6d | 2e 63 3a 31 33 30 3a 20 |scan-asm|.c:130: |
|00001d20| 09 09 6e 65 77 4c 69 6e | 65 20 3d 20 54 52 55 45 |..newLin|e = TRUE|
|00001d30| 3b 0a 58 73 63 61 6e 2d | 61 73 6d 2e 63 3a 31 34 |;.Xscan-|asm.c:14|
|00001d40| 31 3a 20 09 09 6e 65 77 | 4c 69 6e 65 20 3d 20 54 |1: ..new|Line = T|
|00001d50| 52 55 45 3b 0a 58 73 63 | 61 6e 2d 61 73 6d 2e 63 |RUE;.Xsc|an-asm.c|
|00001d60| 3a 31 34 35 3a 20 09 09 | 6e 65 77 4c 69 6e 65 20 |:145: ..|newLine |
|00001d70| 3d 20 54 52 55 45 3b 0a | 58 73 63 61 6e 2d 61 73 |= TRUE;.|Xscan-as|
|00001d80| 6d 2e 63 3a 31 35 30 3a | 20 09 09 6e 65 77 4c 69 |m.c:150:| ..newLi|
|00001d90| 6e 65 20 3d 20 54 52 55 | 45 3b 0a 58 73 63 61 6e |ne = TRU|E;.Xscan|
|00001da0| 2d 61 73 6d 2e 63 3a 31 | 36 35 3a 20 09 09 09 09 |-asm.c:1|65: ....|
|00001db0| 6e 65 77 4c 69 6e 65 20 | 3d 20 54 52 55 45 3b 0a |newLine |= TRUE;.|
|00001dc0| 58 73 63 61 6e 2d 63 2e | 63 3a 38 38 3a 20 73 74 |Xscan-c.|c:88: st|
|00001dd0| 61 74 69 63 20 62 6f 6f | 6c 20 65 61 74 55 6e 64 |atic boo|l eatUnd|
|00001de0| 65 72 20 3d 20 54 52 55 | 45 3b 0a 58 73 63 61 6e |er = TRU|E;.Xscan|
|00001df0| 2d 63 2e 63 3a 31 30 31 | 3a 20 09 73 74 61 74 69 |-c.c:101|: .stati|
|00001e00| 63 20 62 6f 6f 6c 09 6e | 65 77 4c 69 6e 65 20 3d |c bool.n|ewLine =|
|00001e10| 20 54 52 55 45 3b 0a 58 | 73 63 61 6e 2d 63 2e 63 | TRUE;.X|scan-c.c|
|00001e20| 3a 31 33 38 3a 20 09 09 | 6e 65 77 4c 69 6e 65 20 |:138: ..|newLine |
|00001e30| 3d 20 54 52 55 45 3b 0a | 58 73 63 61 6e 2d 63 2e |= TRUE;.|Xscan-c.|
|00001e40| 63 3a 31 39 39 3a 20 09 | 09 09 09 6e 65 77 4c 69 |c:199: .|...newLi|
|00001e50| 6e 65 20 3d 20 54 52 55 | 45 3b 0a 58 73 63 61 6e |ne = TRU|E;.Xscan|
|00001e60| 2d 63 2e 63 3a 32 30 35 | 3a 20 09 09 6e 65 77 4c |-c.c:205|: ..newL|
|00001e70| 69 6e 65 20 3d 20 54 52 | 55 45 3b 0a 58 73 63 61 |ine = TR|UE;.Xsca|
|00001e80| 6e 2d 63 2e 63 3a 32 31 | 30 3a 20 09 09 09 6e 65 |n-c.c:21|0: ...ne|
|00001e90| 77 4c 69 6e 65 20 3d 20 | 54 52 55 45 3b 0a 58 77 |wLine = |TRUE;.Xw|
|00001ea0| 6d 61 74 63 68 2e 63 3a | 33 37 3a 20 09 09 09 72 |match.c:|37: ...r|
|00001eb0| 65 74 75 72 6e 20 54 52 | 55 45 3b 0a 58 0a 58 4e |eturn TR|UE;.X.XN|
|00001ec0| 6f 74 69 63 65 20 74 68 | 61 74 20 65 61 63 68 20 |otice th|at each |
|00001ed0| 6c 69 6e 65 20 69 73 20 | 72 65 70 6f 72 74 65 64 |line is |reported|
|00001ee0| 20 69 6e 20 74 68 65 20 | 73 61 6d 65 20 66 6f 72 | in the |same for|
|00001ef0| 6d 61 74 20 61 73 20 61 | 0a 58 43 2d 70 72 65 70 |mat as a|.XC-prep|
|00001f00| 72 6f 63 65 73 73 6f 72 | 20 65 72 72 6f 72 20 6d |rocessor| error m|
|00001f10| 65 73 73 61 67 65 2e 20 | 20 54 68 69 73 20 66 65 |essage. | This fe|
|00001f20| 61 74 75 72 65 20 61 6c | 6c 6f 77 73 20 67 69 64 |ature al|lows gid|
|00001f30| 28 31 29 20 6c 69 6e 65 | 73 20 74 6f 20 62 65 0a |(1) line|s to be.|
|00001f40| 58 64 69 67 65 73 74 65 | 64 20 62 79 20 61 6e 79 |Xdigeste|d by any|
|00001f50| 20 70 72 6f 67 72 61 6d | 20 74 68 61 74 20 70 61 | program| that pa|
|00001f60| 72 73 65 73 20 65 72 72 | 6f 72 20 6d 65 73 73 61 |rses err|or messa|
|00001f70| 67 65 73 2c 20 73 75 63 | 68 20 61 73 20 65 72 72 |ges, suc|h as err|
|00001f80| 6f 72 28 31 29 0a 58 61 | 6e 64 20 67 6e 75 2d 65 |or(1).Xa|nd gnu-e|
|00001f90| 6d 61 63 73 2e 0a 58 0a | 58 49 66 20 79 6f 75 20 |macs..X.|XIf you |
|00001fa0| 77 61 6e 74 20 74 6f 20 | 65 64 69 74 20 61 6c 6c |want to |edit all|
|00001fb0| 20 66 69 6c 65 73 20 74 | 68 61 74 20 68 61 76 65 | files t|hat have|
|00001fc0| 20 61 6e 20 69 64 65 6e | 74 69 66 69 65 72 2c 20 | an iden|tifier, |
|00001fd0| 79 6f 75 20 6d 61 79 0a | 58 63 6f 6e 76 65 6e 69 |you may.|Xconveni|
|00001fe0| 65 6e 74 6c 79 20 64 6f | 20 73 6f 20 77 69 74 68 |ently do| so with|
|00001ff0| 20 65 69 64 28 31 29 3a | 0a 58 0a 58 24 20 65 69 | eid(1):|.X.X$ ei|
|00002000| 64 20 54 52 55 45 0a 58 | 54 52 55 45 20 20 20 20 |d TRUE.X|TRUE |
|00002010| 20 20 20 20 20 20 20 62 | 6f 6f 6c 2e 68 20 7b 6c | b|ool.h {l|
|00002020| 69 64 2c 6d 6b 69 64 2c | 73 63 61 6e 2d 61 73 6d |id,mkid,|scan-asm|
|00002030| 2c 73 63 61 6e 2d 63 2c | 77 6d 61 74 63 68 7d 2e |,scan-c,|wmatch}.|
|00002040| 63 0a 58 45 64 69 74 3f | 20 5b 79 31 2d 39 5e 53 |c.XEdit?| [y1-9^S|
|00002050| 2f 6e 71 5d 20 0a 58 0a | 58 42 65 66 6f 72 65 20 |/nq] .X.|XBefore |
|00002060| 74 68 65 20 65 64 69 74 | 6f 72 20 69 73 20 69 6e |the edit|or is in|
|00002070| 76 6f 6b 65 64 2c 20 79 | 6f 75 20 61 72 65 20 67 |voked, y|ou are g|
|00002080| 69 76 65 6e 20 74 68 65 | 20 6c 69 64 28 31 29 20 |iven the| lid(1) |
|00002090| 6f 75 74 70 75 74 20 74 | 6f 20 72 65 76 69 65 77 |output t|o review|
|000020a0| 0a 58 61 6e 64 20 63 6f | 6d 66 69 72 6d 2e 20 20 |.Xand co|mfirm. |
|000020b0| 49 66 20 79 6f 75 20 77 | 61 6e 74 20 74 6f 20 65 |If you w|ant to e|
|000020c0| 64 69 74 20 61 6c 6c 20 | 66 69 6c 65 73 20 6c 69 |dit all |files li|
|000020d0| 73 74 65 64 2c 20 72 65 | 73 70 6f 6e 64 20 77 69 |sted, re|spond wi|
|000020e0| 74 68 20 61 0a 58 6e 65 | 77 6c 69 6e 65 20 6f 72 |th a.Xne|wline or|
|000020f0| 20 77 69 74 68 20 60 79 | 27 2e 20 20 49 66 20 79 | with `y|'. If y|
|00002100| 6f 75 20 77 61 6e 74 20 | 74 6f 20 73 6b 69 70 20 |ou want |to skip |
|00002110| 73 6f 6d 65 20 6e 75 6d | 62 65 72 20 6f 66 20 66 |some num|ber of f|
|00002120| 69 6c 65 73 20 69 6e 74 | 6f 20 74 68 65 0a 58 61 |iles int|o the.Xa|
|00002130| 72 67 75 6d 65 6e 74 20 | 6c 69 73 74 2c 20 72 65 |rgument |list, re|
|00002140| 73 70 6f 6e 64 20 77 69 | 74 68 20 61 20 73 69 6e |spond wi|th a sin|
|00002150| 67 6c 65 20 64 69 67 69 | 74 20 60 31 27 20 74 68 |gle digi|t `1' th|
|00002160| 72 6f 75 67 68 20 60 39 | 27 20 74 6f 20 73 6b 69 |rough `9|' to ski|
|00002170| 70 20 74 68 61 74 0a 58 | 6d 61 6e 79 20 66 69 6c |p that.X|many fil|
|00002180| 65 73 2c 20 6f 72 20 64 | 6f 20 61 20 73 74 72 69 |es, or d|o a stri|
|00002190| 6e 67 2d 73 65 61 72 63 | 68 20 74 6f 20 74 68 65 |ng-searc|h to the|
|000021a0| 20 66 69 72 73 74 20 66 | 69 6c 65 20 79 6f 75 20 | first f|ile you |
|000021b0| 77 61 6e 74 20 77 69 74 | 68 0a 58 60 5e 53 3c 73 |want wit|h.X`^S<s|
|000021c0| 74 72 69 6e 67 3e 27 20 | 6f 72 20 60 2f 3c 73 74 |tring>' |or `/<st|
|000021d0| 72 69 6e 67 3e 27 2e 20 | 20 49 66 20 79 6f 75 20 |ring>'. | If you |
|000021e0| 64 6f 6e 27 74 20 77 61 | 6e 74 20 74 6f 20 65 64 |don't wa|nt to ed|
|000021f0| 69 74 20 61 6e 79 74 68 | 69 6e 67 2c 20 74 79 70 |it anyth|ing, typ|
|00002200| 65 0a 58 60 6e 27 20 74 | 6f 20 67 6f 20 6f 6e 20 |e.X`n' t|o go on |
|00002210| 74 6f 20 74 68 65 20 6e | 65 78 74 20 61 72 67 75 |to the n|ext argu|
|00002220| 6d 65 6e 74 20 79 6f 75 | 20 67 61 76 65 20 74 6f |ment you| gave to|
|00002230| 20 65 69 64 28 31 29 20 | 6f 72 20 74 79 70 65 20 | eid(1) |or type |
|00002240| 60 71 27 20 74 6f 0a 58 | 71 75 69 74 20 61 6c 74 |`q' to.X|quit alt|
|00002250| 6f 67 65 74 68 65 72 2e | 0a 58 0a 58 54 68 65 20 |ogether.|.X.XThe |
|00002260| 62 65 68 61 76 69 6f 72 | 20 6f 66 20 74 68 65 20 |behavior| of the |
|00002270| 65 64 69 74 69 6e 67 20 | 69 6e 74 65 72 66 61 63 |editing |interfac|
|00002280| 65 20 69 73 20 63 6f 6e | 74 72 6f 6c 6c 65 64 20 |e is con|trolled |
|00002290| 62 79 20 74 68 72 65 65 | 0a 58 65 6e 76 69 72 6f |by three|.Xenviro|
|000022a0| 6e 6d 65 6e 74 20 76 61 | 72 69 61 62 6c 65 73 20 |nment va|riables |
|000022b0| 63 61 6c 6c 65 64 20 45 | 49 44 41 52 47 2c 20 45 |called E|IDARG, E|
|000022c0| 49 44 4c 44 45 4c 2c 20 | 61 6e 64 20 45 49 44 52 |IDLDEL, |and EIDR|
|000022d0| 44 45 4c 2e 20 20 54 68 | 65 20 62 65 73 74 0a 58 |DEL. Th|e best.X|
|000022e0| 77 61 79 20 74 6f 20 69 | 6c 6c 75 73 74 72 61 74 |way to i|llustrat|
|000022f0| 65 20 74 68 65 69 72 20 | 75 73 65 20 62 79 20 61 |e their |use by a|
|00002300| 6e 20 65 78 61 6d 70 6c | 65 2e 20 20 48 65 72 65 |n exampl|e. Here|
|00002310| 20 69 73 20 68 6f 77 20 | 74 6f 20 64 65 66 69 6e | is how |to defin|
|00002320| 65 20 74 68 65 6d 0a 58 | 66 6f 72 20 76 69 28 31 |e them.X|for vi(1|
|00002330| 29 20 28 75 73 69 6e 67 | 20 2f 62 69 6e 2f 73 68 |) (using| /bin/sh|
|00002340| 20 73 79 6e 74 61 78 29 | 0a 58 0a 58 45 49 44 41 | syntax)|.X.XEIDA|
|00002350| 52 47 3d 27 2b 2f 25 73 | 2f 27 09 23 20 70 72 69 |RG='+/%s|/'.# pri|
|00002360| 6e 74 66 28 33 29 20 73 | 74 72 69 6e 67 20 66 6f |ntf(3) s|tring fo|
|00002370| 72 20 69 6e 69 74 69 61 | 6c 20 73 65 61 72 63 68 |r initia|l search|
|00002380| 2d 73 74 72 69 6e 67 20 | 61 72 67 75 6d 65 6e 74 |-string |argument|
|00002390| 0a 58 45 49 44 4c 44 45 | 4c 3d 27 5c 3c 27 09 23 |.XEIDLDE|L='\<'.#|
|000023a0| 20 6c 65 66 74 20 77 6f | 72 64 2d 64 65 6c 69 6d | left wo|rd-delim|
|000023b0| 69 74 65 72 0a 58 45 49 | 44 52 44 45 4c 3d 27 5c |iter.XEI|DRDEL='\|
|000023c0| 3e 27 09 23 20 72 69 67 | 68 74 20 77 6f 72 64 2d |>'.# rig|ht word-|
|000023d0| 64 65 6c 69 6d 69 74 65 | 72 0a 58 0a 58 60 45 49 |delimite|r.X.X`EI|
|000023e0| 44 5b 4c 52 5d 44 45 4c | 27 20 61 72 65 20 70 6f |D[LR]DEL|' are po|
|000023f0| 73 69 74 69 6f 6e 65 64 | 20 61 72 6f 75 6e 64 20 |sitioned| around |
|00002400| 74 68 65 20 69 64 65 6e | 74 69 66 69 65 72 20 61 |the iden|tifier a|
|00002410| 73 20 6c 65 66 74 20 61 | 6e 64 20 72 69 67 68 74 |s left a|nd right|
|00002420| 0a 58 77 6f 72 64 2d 64 | 65 6c 69 6d 69 74 65 72 |.Xword-d|elimiter|
|00002430| 73 20 69 66 20 79 6f 75 | 72 20 65 64 69 74 6f 72 |s if you|r editor|
|00002440| 20 73 75 70 70 6f 72 74 | 73 20 74 68 61 74 20 6e | support|s that n|
|00002450| 6f 74 69 6f 6e 2e 20 20 | 54 68 65 6e 20 74 68 65 |otion. |Then the|
|00002460| 20 77 68 6f 6c 65 0a 58 | 6e 61 6d 65 2d 73 74 72 | whole.X|name-str|
|00002470| 69 6e 67 20 69 73 20 73 | 70 72 69 6e 74 66 28 33 |ing is s|printf(3|
|00002480| 29 27 65 64 20 69 6e 74 | 6f 20 60 45 49 44 41 52 |)'ed int|o `EIDAR|
|00002490| 47 27 20 74 6f 20 63 6f | 6e 73 74 72 75 63 74 20 |G' to co|nstruct |
|000024a0| 74 68 65 20 69 6e 69 74 | 69 61 6c 0a 58 73 65 61 |the init|ial.Xsea|
|000024b0| 72 63 68 2d 73 74 72 69 | 6e 67 20 61 72 67 75 6d |rch-stri|ng argum|
|000024c0| 65 6e 74 20 74 6f 20 74 | 68 65 20 65 64 69 74 6f |ent to t|he edito|
|000024d0| 72 2e 20 20 49 66 20 79 | 6f 75 72 20 65 64 69 74 |r. If y|our edit|
|000024e0| 6f 72 20 63 61 6e 27 74 | 20 64 69 67 65 73 74 20 |or can't| digest |
|000024f0| 73 75 63 68 0a 58 61 6e | 20 61 72 67 75 6d 65 6e |such.Xan| argumen|
|00002500| 74 2c 20 73 69 6d 70 6c | 79 20 6c 65 61 76 65 20 |t, simpl|y leave |
|00002510| 74 68 65 73 65 20 76 61 | 72 69 61 62 6c 65 73 20 |these va|riables |
|00002520| 75 6e 64 65 66 69 6e 65 | 64 20 69 6e 20 74 68 65 |undefine|d in the|
|00002530| 0a 58 65 6e 76 69 72 6f | 6e 6d 65 6e 74 2e 0a 58 |.Xenviro|nment..X|
|00002540| 0a 58 53 6f 6d 65 20 65 | 6d 61 63 73 20 75 73 65 |.XSome e|macs use|
|00002550| 72 73 20 61 72 65 20 61 | 70 70 61 6c 6c 65 64 20 |rs are a|ppalled |
|00002560| 61 74 20 74 68 65 20 6e | 6f 74 69 6f 6e 20 6f 66 |at the n|otion of|
|00002570| 20 73 74 61 72 74 69 6e | 67 20 75 70 20 61 20 66 | startin|g up a f|
|00002580| 72 65 73 68 20 65 64 69 | 74 6f 72 0a 58 73 69 6d |resh edi|tor.Xsim|
|00002590| 70 6c 79 20 74 6f 20 66 | 6f 6c 6c 6f 77 20 61 6e |ply to f|ollow an|
|000025a0| 20 69 64 65 6e 74 69 66 | 69 65 72 2e 20 20 46 6f | identif|ier. Fo|
|000025b0| 72 20 74 68 6f 73 65 20 | 77 68 6f 20 61 72 65 20 |r those |who are |
|000025c0| 66 6f 72 74 75 6e 61 74 | 65 20 65 6e 6f 75 67 68 |fortunat|e enough|
|000025d0| 20 74 6f 20 68 61 76 65 | 0a 58 61 20 70 72 6f 67 | to have|.Xa prog|
|000025e0| 72 61 6d 6d 61 62 6c 65 | 20 65 6d 61 63 73 20 73 |rammable| emacs s|
|000025f0| 75 63 68 20 61 73 20 67 | 6e 75 2d 65 6d 61 63 73 |uch as g|nu-emacs|
|00002600| 2c 20 69 74 20 69 73 20 | 66 61 69 72 6c 79 20 73 |, it is |fairly s|
|00002610| 69 6d 70 6c 65 20 74 6f | 20 64 65 76 69 73 65 0a |imple to| devise.|
|00002620| 58 61 20 63 6f 6d 6d 61 | 6e 64 20 74 68 61 74 20 |Xa comma|nd that |
|00002630| 69 6e 76 6f 6b 65 73 20 | 67 69 64 28 31 29 20 61 |invokes |gid(1) a|
|00002640| 6e 64 20 64 69 67 65 73 | 74 73 20 69 74 73 20 6f |nd diges|ts its o|
|00002650| 75 74 70 75 74 20 61 73 | 20 74 68 6f 75 67 68 20 |utput as| though |
|00002660| 69 74 20 77 65 72 65 0a | 58 2f 6c 69 62 2f 63 70 |it were.|X/lib/cp|
|00002670| 70 20 65 72 72 6f 72 20 | 73 74 72 69 6e 67 73 20 |p error |strings |
|00002680| 74 6f 20 62 65 20 65 78 | 61 6d 69 6e 65 64 2e 20 |to be ex|amined. |
|00002690| 20 28 53 6f 72 72 79 2c | 20 6e 6f 20 73 75 63 68 | (Sorry,| no such|
|000026a0| 20 63 6f 64 65 20 69 73 | 20 70 72 6f 76 69 64 65 | code is| provide|
|000026b0| 64 0a 58 61 74 20 74 68 | 69 73 20 70 6f 73 74 69 |d.Xat th|is posti|
|000026c0| 6e 67 2e 2e 2e 29 0a 58 | 0a 58 41 6e 6f 74 68 65 |ng...).X|.XAnothe|
|000026d0| 72 20 74 79 70 65 20 6f | 66 20 71 75 65 72 79 20 |r type o|f query |
|000026e0| 69 73 20 74 6f 20 66 69 | 6e 64 20 61 6c 6c 20 69 |is to fi|nd all i|
|000026f0| 64 65 6e 74 69 66 69 65 | 72 73 20 74 68 61 74 20 |dentifie|rs that |
|00002700| 61 72 65 20 6e 6f 6e 2d | 75 6e 69 71 75 65 0a 58 |are non-|unique.X|
|00002710| 77 69 74 68 69 6e 20 73 | 6f 6d 65 20 6e 75 6d 62 |within s|ome numb|
|00002720| 65 72 20 6f 66 20 63 68 | 61 72 61 63 74 65 72 73 |er of ch|aracters|
|00002730| 2e 20 20 54 68 69 73 20 | 69 73 20 75 73 65 66 75 |. This |is usefu|
|00002740| 6c 20 66 6f 72 20 66 69 | 6e 64 69 6e 67 20 70 6f |l for fi|nding po|
|00002750| 74 65 6e 74 69 61 6c 0a | 58 70 6f 72 74 61 62 69 |tential.|Xportabi|
|00002760| 6c 69 74 79 20 70 72 6f | 62 6c 65 6d 73 20 77 68 |lity pro|blems wh|
|00002770| 65 6e 20 6d 6f 76 69 6e | 67 20 74 6f 20 61 20 73 |en movin|g to a s|
|00002780| 79 73 74 65 6d 20 77 68 | 6f 73 65 20 63 6f 6d 70 |ystem wh|ose comp|
|00002790| 69 6c 65 72 20 6f 72 20 | 6c 69 6e 6b 65 72 0a 58 |iler or |linker.X|
|000027a0| 6c 69 6d 69 74 73 20 74 | 68 65 20 6e 75 6d 62 65 |limits t|he numbe|
|000027b0| 72 20 6f 66 20 73 69 67 | 6e 69 66 69 63 61 6e 74 |r of sig|nificant|
|000027c0| 20 63 68 61 72 61 63 74 | 65 72 73 20 69 6e 20 61 | charact|ers in a|
|000027d0| 20 6e 61 6d 65 2e 20 20 | 54 68 65 20 60 2d 75 3c | name. |The `-u<|
|000027e0| 6e 3e 27 0a 58 61 72 67 | 75 6d 65 6e 74 20 64 6f |n>'.Xarg|ument do|
|000027f0| 65 73 20 74 68 65 20 74 | 72 69 63 6b 2e 20 20 48 |es the t|rick. H|
|00002800| 65 72 65 27 73 20 61 20 | 6c 69 73 74 20 6f 66 20 |ere's a |list of |
|00002810| 69 64 65 6e 74 69 66 69 | 65 72 73 20 74 68 61 74 |identifi|ers that|
|00002820| 20 6d 61 79 20 79 69 65 | 6c 64 0a 58 6d 75 6c 74 | may yie|ld.Xmult|
|00002830| 69 70 6c 79 2d 64 65 66 | 69 6e 65 64 20 65 72 72 |iply-def|ined err|
|00002840| 6f 72 73 20 69 6e 20 61 | 20 73 79 6d 62 6f 6c 20 |ors in a| symbol |
|00002850| 74 61 62 6c 65 20 74 68 | 61 74 20 6f 6e 6c 79 20 |table th|at only |
|00002860| 6b 6e 6f 77 73 20 61 62 | 6f 75 74 20 74 68 65 0a |knows ab|out the.|
|00002870| 58 66 69 72 73 74 20 37 | 20 63 68 61 72 61 63 74 |Xfirst 7| charact|
|00002880| 65 72 73 3a 0a 58 0a 58 | 24 20 6c 69 64 20 2d 75 |ers:.X.X|$ lid -u|
|00002890| 37 0a 58 53 43 41 4e 5f | 54 45 58 20 20 20 20 20 |7.XSCAN_|TEX |
|000028a0| 20 20 67 65 74 73 63 61 | 6e 2e 63 0a 58 53 43 41 | getsca|n.c.XSCA|
|000028b0| 4e 5f 54 45 58 54 20 20 | 20 20 20 20 67 65 74 73 |N_TEXT | gets|
|000028c0| 63 61 6e 2e 63 0a 58 69 | 64 68 5f 61 72 67 63 20 |can.c.Xi|dh_argc |
|000028d0| 20 20 20 20 20 20 69 64 | 2e 68 20 7b 69 6e 69 74 | id|.h {init|
|000028e0| 2c 6d 6b 69 64 7d 2e 63 | 0a 58 69 64 68 5f 61 72 |,mkid}.c|.Xidh_ar|
|000028f0| 67 6f 20 20 20 20 20 20 | 20 69 64 2e 68 20 7b 69 |go | id.h {i|
|00002900| 6e 69 74 2c 6d 6b 69 64 | 7d 2e 63 0a 58 69 64 68 |nit,mkid|}.c.Xidh|
|00002910| 5f 6e 61 6d 63 20 20 20 | 20 20 20 20 69 64 2e 68 |_namc | id.h|
|00002920| 20 7b 66 69 64 2c 6d 6b | 69 64 7d 2e 63 0a 58 69 | {fid,mk|id}.c.Xi|
|00002930| 64 68 5f 6e 61 6d 6f 20 | 20 20 20 20 20 20 69 64 |dh_namo | id|
|00002940| 2e 68 20 7b 66 69 64 2c | 69 6e 69 74 2c 6c 69 64 |.h {fid,|init,lid|
|00002950| 2c 6d 6b 69 64 7d 2e 63 | 0a 58 6f 6c 64 48 61 73 |,mkid}.c|.XoldHas|
|00002960| 68 53 69 7a 65 20 20 20 | 20 6d 6b 69 64 2e 63 0a |hSize | mkid.c.|
|00002970| 58 6f 6c 64 48 61 73 68 | 54 61 62 6c 65 20 20 20 |XoldHash|Table |
|00002980| 6d 6b 69 64 2e 63 0a 58 | 0a 58 42 65 74 74 65 72 |mkid.c.X|.XBetter|
|00002990| 20 79 65 74 2c 20 69 66 | 20 79 6f 75 20 77 61 6e | yet, if| you wan|
|000029a0| 74 20 74 6f 20 65 64 69 | 74 20 74 68 65 73 65 2c |t to edi|t these,|
|000029b0| 20 74 72 79 0a 58 0a 58 | 24 20 65 69 64 20 2d 75 | try.X.X|$ eid -u|
|000029c0| 37 0a 58 5e 53 43 41 4e | 5f 54 45 20 20 20 20 20 |7.X^SCAN|_TE |
|000029d0| 20 20 67 65 74 73 63 61 | 6e 2e 63 0a 58 45 64 69 | getsca|n.c.XEdi|
|000029e0| 74 3f 20 5b 79 31 2d 39 | 5e 53 2f 6e 71 5d 20 6e |t? [y1-9|^S/nq] n|
|000029f0| 0a 58 5e 69 64 68 5f 61 | 72 67 20 20 20 20 20 20 |.X^idh_a|rg |
|00002a00| 20 67 65 74 73 63 61 6e | 2e 63 20 69 64 2e 68 20 | getscan|.c id.h |
|00002a10| 7b 69 6e 69 74 2c 6d 6b | 69 64 7d 2e 63 0a 58 45 |{init,mk|id}.c.XE|
|00002a20| 64 69 74 3f 20 5b 79 31 | 2d 39 5e 53 2f 6e 71 5d |dit? [y1|-9^S/nq]|
|00002a30| 20 6e 0a 58 5e 69 64 68 | 5f 6e 61 6d 20 20 20 20 | n.X^idh|_nam |
|00002a40| 20 20 20 7b 66 69 64 2c | 67 65 74 73 63 61 6e 7d | {fid,|getscan}|
|00002a50| 2e 63 20 69 64 2e 68 20 | 7b 69 6e 69 74 2c 6c 69 |.c id.h |{init,li|
|00002a60| 64 2c 6d 6b 69 64 7d 2e | 63 0a 58 45 64 69 74 3f |d,mkid}.|c.XEdit?|
|00002a70| 20 5b 79 31 2d 39 5e 53 | 2f 6e 71 5d 20 6e 0a 58 | [y1-9^S|/nq] n.X|
|00002a80| 5e 6f 6c 64 48 61 73 68 | 20 20 20 20 20 20 20 7b |^oldHash| {|
|00002a90| 66 69 64 2c 67 65 74 73 | 63 61 6e 7d 2e 63 20 69 |fid,gets|can}.c i|
|00002aa0| 64 2e 68 20 7b 69 6e 69 | 74 2c 6c 69 64 2c 6d 6b |d.h {ini|t,lid,mk|
|00002ab0| 69 64 7d 2e 63 0a 58 45 | 64 69 74 3f 20 5b 79 31 |id}.c.XE|dit? [y1|
|00002ac0| 2d 39 5e 53 2f 6e 71 5d | 20 6e 0a 58 0a 58 0a 58 |-9^S/nq]| n.X.X.X|
|00002ad0| 41 6e 20 61 64 64 69 74 | 69 6f 6e 61 6c 20 66 65 |An addit|ional fe|
|00002ae0| 61 74 75 72 65 20 6f 66 | 20 6c 69 64 28 31 29 20 |ature of| lid(1) |
|00002af0| 69 73 20 74 68 61 74 20 | 70 61 74 68 6e 61 6d 65 |is that |pathname|
|00002b00| 73 20 61 72 65 20 61 75 | 74 6f 6d 61 74 69 63 61 |s are au|tomatica|
|00002b10| 6c 6c 79 0a 58 61 64 6a | 75 73 74 65 64 20 66 6f |lly.Xadj|usted fo|
|00002b20| 72 20 74 68 65 20 63 75 | 72 72 65 6e 74 20 77 6f |r the cu|rrent wo|
|00002b30| 72 6b 69 6e 67 20 64 69 | 72 65 63 74 6f 72 79 2e |rking di|rectory.|
|00002b40| 20 20 4c 61 72 67 65 20 | 70 72 6f 67 72 61 6d 73 | Large |programs|
|00002b50| 20 73 75 63 68 20 61 73 | 20 74 68 65 0a 58 55 4e | such as| the.XUN|
|00002b60| 49 58 20 6b 65 72 6e 65 | 6c 20 61 72 65 20 6f 66 |IX kerne|l are of|
|00002b70| 74 65 6e 20 70 61 72 74 | 69 74 69 6f 6e 65 64 20 |ten part|itioned |
|00002b80| 69 6e 74 6f 20 73 75 62 | 73 79 73 74 65 6d 73 20 |into sub|systems |
|00002b90| 77 68 6f 73 65 20 73 6f | 75 72 63 65 73 20 6c 69 |whose so|urces li|
|00002ba0| 76 65 20 69 6e 0a 58 64 | 69 66 66 65 72 65 6e 74 |ve in.Xd|ifferent|
|00002bb0| 20 64 69 72 65 63 74 6f | 72 69 65 73 2e 20 20 57 | directo|ries. W|
|00002bc0| 68 61 74 20 66 6f 6c 6c | 6f 77 73 20 61 72 65 20 |hat foll|ows are |
|00002bd0| 73 65 76 65 72 61 6c 20 | 65 78 61 6d 70 6c 65 73 |several |examples|
|00002be0| 20 6f 66 20 74 68 65 20 | 73 61 6d 65 0a 58 73 65 | of the |same.Xse|
|00002bf0| 61 72 63 68 20 63 6f 6e | 64 75 63 74 65 64 20 66 |arch con|ducted f|
|00002c00| 72 6f 6d 20 64 69 66 66 | 65 72 65 6e 74 20 70 6f |rom diff|erent po|
|00002c10| 69 6e 74 73 20 69 6e 20 | 74 68 65 20 55 4e 49 58 |ints in |the UNIX|
|00002c20| 20 6b 65 72 6e 65 6c 20 | 73 6f 75 72 63 65 0a 58 | kernel |source.X|
|00002c30| 68 69 65 72 61 72 63 68 | 79 3a 0a 58 0a 58 24 20 |hierarch|y:.X.X$ |
|00002c40| 63 64 20 2f 73 72 63 2f | 75 74 73 2f 6d 36 38 6b |cd /src/|uts/m68k|
|00002c50| 0a 58 24 20 6c 69 64 20 | 62 64 65 76 73 77 0a 58 |.X$ lid |bdevsw.X|
|00002c60| 62 64 65 76 73 77 20 20 | 20 20 20 20 20 20 20 73 |bdevsw | s|
|00002c70| 79 73 2f 63 6f 6e 66 2e | 68 20 20 63 66 2f 63 6f |ys/conf.|h cf/co|
|00002c80| 6e 66 2e 63 20 20 69 6f | 2f 62 69 6f 2e 63 20 20 |nf.c io|/bio.c |
|00002c90| 6f 73 2f 7b 66 69 6f 2c | 6d 61 69 6e 2c 70 72 66 |os/{fio,|main,prf|
|00002ca0| 2c 73 79 73 33 7d 2e 63 | 0a 58 0a 58 24 20 63 64 |,sys3}.c|.X.X$ cd|
|00002cb0| 20 69 6f 0a 58 24 20 6c | 69 64 20 62 64 65 76 73 | io.X$ l|id bdevs|
|00002cc0| 77 0a 58 62 64 65 76 73 | 77 20 20 20 20 20 20 20 |w.Xbdevs|w |
|00002cd0| 20 20 2e 2e 2f 73 79 73 | 2f 63 6f 6e 66 2e 68 20 | ../sys|/conf.h |
|00002ce0| 20 2e 2e 2f 63 66 2f 63 | 6f 6e 66 2e 63 20 20 62 | ../cf/c|onf.c b|
|00002cf0| 69 6f 2e 63 20 20 2e 2e | 2f 6f 73 2f 7b 66 69 6f |io.c ..|/os/{fio|
|00002d00| 2c 6d 61 69 6e 2c 70 72 | 66 2c 73 79 73 33 7d 2e |,main,pr|f,sys3}.|
|00002d10| 63 0a 58 0a 58 24 20 63 | 64 20 2e 2e 2f 6f 73 0a |c.X.X$ c|d ../os.|
|00002d20| 58 62 64 65 76 73 77 20 | 20 20 20 20 20 20 20 20 |Xbdevsw | |
|00002d30| 2e 2e 2f 73 79 73 2f 63 | 6f 6e 66 2e 68 20 20 2e |../sys/c|onf.h .|
|00002d40| 2e 2f 63 66 2f 63 6f 6e | 66 2e 63 20 20 2e 2e 2f |./cf/con|f.c ../|
|00002d50| 69 6f 2f 62 69 6f 2e 63 | 20 20 7b 66 69 6f 2c 6d |io/bio.c| {fio,m|
|00002d60| 61 69 6e 2c 70 72 66 2c | 73 79 73 33 7d 2e 63 0a |ain,prf,|sys3}.c.|
|00002d70| 58 0a 58 54 68 65 20 64 | 61 74 61 62 61 73 65 20 |X.XThe d|atabase |
|00002d80| 69 73 20 62 75 69 6c 74 | 20 77 69 74 68 20 6d 6b |is built| with mk|
|00002d90| 69 64 28 31 29 2e 20 20 | 54 68 65 20 75 73 65 72 |id(1). |The user|
|00002da0| 20 73 75 70 70 6c 69 65 | 73 20 70 61 74 68 6e 61 | supplie|s pathna|
|00002db0| 6d 65 73 0a 58 65 69 74 | 68 65 72 20 6f 6e 20 74 |mes.Xeit|her on t|
|00002dc0| 68 65 20 63 6f 6d 6d 61 | 6e 64 20 6c 69 6e 65 20 |he comma|nd line |
|00002dd0| 6f 72 20 6f 6e 20 73 74 | 64 69 6e 2e 20 20 48 65 |or on st|din. He|
|00002de0| 72 65 27 73 20 74 68 65 | 20 6f 75 74 70 75 74 20 |re's the| output |
|00002df0| 6f 66 20 74 68 65 0a 58 | 60 76 65 72 62 6f 73 65 |of the.X|`verbose|
|00002e00| 27 20 6f 70 74 69 6f 6e | 20 74 6f 20 6d 6b 69 64 |' option| to mkid|
|00002e10| 28 31 29 3a 0a 58 0a 58 | 24 20 6d 6b 69 64 20 2d |(1):.X.X|$ mkid -|
|00002e20| 76 20 2a 2e 68 20 2a 2e | 63 0a 58 63 3a 20 62 69 |v *.h *.|c.Xc: bi|
|00002e30| 74 6f 70 73 2e 68 0a 58 | 63 3a 20 62 6f 6f 6c 2e |tops.h.X|c: bool.|
|00002e40| 68 0a 58 63 3a 20 65 78 | 74 65 72 6e 2e 68 0a 58 |h.Xc: ex|tern.h.X|
|00002e50| 63 3a 20 69 64 2e 68 0a | 58 63 3a 20 70 61 74 63 |c: id.h.|Xc: patc|
|00002e60| 68 6c 65 76 65 6c 2e 68 | 0a 58 63 3a 20 72 61 64 |hlevel.h|.Xc: rad|
|00002e70| 69 78 2e 68 0a 58 63 3a | 20 73 74 72 69 6e 67 2e |ix.h.Xc:| string.|
|00002e80| 68 0a 58 63 3a 20 62 61 | 73 65 6e 61 6d 65 2e 63 |h.Xc: ba|sename.c|
|00002e90| 0a 58 63 3a 20 62 69 74 | 63 6f 75 6e 74 2e 63 0a |.Xc: bit|count.c.|
|00002ea0| 58 63 3a 20 62 69 74 6f | 70 73 2e 63 0a 58 63 3a |Xc: bito|ps.c.Xc:|
|00002eb0| 20 62 69 74 73 76 65 63 | 2e 63 0a 58 63 3a 20 62 | bitsvec|.c.Xc: b|
|00002ec0| 73 65 61 72 63 68 2e 63 | 0a 58 63 3a 20 62 7a 65 |search.c|.Xc: bze|
|00002ed0| 72 6f 2e 63 0a 58 63 3a | 20 64 6f 63 75 6d 65 6e |ro.c.Xc:| documen|
|00002ee0| 74 2e 63 0a 58 63 3a 20 | 66 69 64 2e 63 0a 58 63 |t.c.Xc: |fid.c.Xc|
|00002ef0| 3a 20 67 65 74 73 30 2e | 63 0a 58 63 3a 20 67 65 |: gets0.|c.Xc: ge|
|00002f00| 74 73 46 46 2e 63 0a 58 | 63 3a 20 67 65 74 73 63 |tsFF.c.X|c: getsc|
|00002f10| 61 6e 2e 63 0a 58 63 3a | 20 68 61 73 68 2e 63 0a |an.c.Xc:| hash.c.|
|00002f20| 58 63 3a 20 69 64 78 2e | 63 0a 58 63 3a 20 69 6e |Xc: idx.|c.Xc: in|
|00002f30| 69 74 2e 63 0a 58 63 3a | 20 6c 69 64 2e 63 0a 58 |it.c.Xc:| lid.c.X|
|00002f40| 63 3a 20 6d 6b 69 64 2e | 63 0a 58 63 3a 20 6e 75 |c: mkid.|c.Xc: nu|
|00002f50| 6d 74 73 74 2e 63 0a 58 | 63 3a 20 6f 70 65 6e 73 |mtst.c.X|c: opens|
|00002f60| 72 63 2e 63 0a 58 63 3a | 20 70 61 74 68 73 2e 63 |rc.c.Xc:| paths.c|
|00002f70| 0a 58 63 3a 20 73 63 61 | 6e 2d 61 73 6d 2e 63 0a |.Xc: sca|n-asm.c.|
|00002f80| 58 63 3a 20 73 63 61 6e | 2d 63 2e 63 0a 58 63 3a |Xc: scan|-c.c.Xc:|
|00002f90| 20 73 74 6f 69 2e 63 0a | 58 63 3a 20 74 74 79 2e | stoi.c.|Xc: tty.|
|00002fa0| 63 0a 58 63 3a 20 75 65 | 72 72 6f 72 2e 63 0a 58 |c.Xc: ue|rror.c.X|
|00002fb0| 63 3a 20 77 6d 61 74 63 | 68 2e 63 0a 58 43 6f 6d |c: wmatc|h.c.XCom|
|00002fc0| 70 72 65 73 73 69 6e 67 | 20 48 61 73 68 20 54 61 |pressing| Hash Ta|
|00002fd0| 62 6c 65 2e 2e 2e 0a 58 | 53 6f 72 74 69 6e 67 20 |ble....X|Sorting |
|00002fe0| 48 61 73 68 20 54 61 62 | 6c 65 2e 2e 2e 0a 58 57 |Hash Tab|le....XW|
|00002ff0| 72 69 74 69 6e 67 20 60 | 49 44 27 2e 2e 2e 0a 58 |riting `|ID'....X|
|00003000| 4e 61 6d 65 73 3a 20 35 | 39 33 2c 20 4e 75 6d 62 |Names: 5|93, Numb|
|00003010| 65 72 73 3a 20 36 34 2c | 20 53 74 72 69 6e 67 73 |ers: 64,| Strings|
|00003020| 3a 20 34 33 2c 20 53 6f | 6c 6f 3a 20 31 31 39 2c |: 43, So|lo: 119,|
|00003030| 20 54 6f 74 61 6c 3a 20 | 36 39 37 0a 58 4f 63 63 | Total: |697.XOcc|
|00003040| 75 72 72 61 6e 63 65 73 | 3a 20 31 31 2e 36 37 2c |urrances|: 11.67,|
|00003050| 20 4c 6f 61 64 3a 20 30 | 2e 31 37 2c 20 50 72 6f | Load: 0|.17, Pro|
|00003060| 62 65 73 3a 20 31 2e 30 | 37 0a 58 0a 58 4d 6b 69 |bes: 1.0|7.X.XMki|
|00003070| 64 28 31 29 20 65 63 68 | 6f 65 73 20 74 68 65 20 |d(1) ech|oes the |
|00003080| 6e 61 6d 65 20 6f 66 20 | 65 61 63 68 20 66 69 6c |name of |each fil|
|00003090| 65 20 61 73 20 69 74 20 | 69 73 20 73 63 61 6e 6e |e as it |is scann|
|000030a0| 65 64 2c 20 70 72 65 66 | 69 78 65 64 20 62 79 20 |ed, pref|ixed by |
|000030b0| 74 68 65 0a 58 6e 61 6d | 65 20 6f 66 20 74 68 65 |the.Xnam|e of the|
|000030c0| 20 6c 61 6e 67 75 61 67 | 65 20 69 74 20 74 68 69 | languag|e it thi|
|000030d0| 6e 6b 73 20 74 68 65 20 | 66 69 6c 65 20 69 73 20 |nks the |file is |
|000030e0| 77 72 69 74 74 65 6e 20 | 69 6e 2e 20 20 4d 6b 69 |written |in. Mki|
|000030f0| 64 28 31 29 20 72 65 70 | 6f 72 74 73 0a 58 68 6f |d(1) rep|orts.Xho|
|00003100| 77 20 6d 61 6e 79 20 75 | 6e 69 71 75 65 20 6e 61 |w many u|nique na|
|00003110| 6d 65 73 20 61 6e 64 20 | 6e 75 6d 62 65 72 73 20 |mes and |numbers |
|00003120| 77 65 72 65 20 66 6f 75 | 6e 64 2c 20 68 6f 77 20 |were fou|nd, how |
|00003130| 6d 61 6e 79 20 6e 61 6d | 65 73 20 6f 63 63 75 72 |many nam|es occur|
|00003140| 72 65 64 0a 58 6f 6e 6c | 79 20 6f 6e 63 65 2c 20 |red.Xonl|y once, |
|00003150| 61 6e 64 20 74 68 65 20 | 74 6f 74 61 6c 20 66 6f |and the |total fo|
|00003160| 72 20 6e 61 6d 65 73 20 | 61 6e 64 20 6e 75 6d 62 |r names |and numb|
|00003170| 65 72 73 2e 20 20 49 74 | 20 61 6c 73 6f 20 72 65 |ers. It| also re|
|00003180| 70 6f 72 74 73 20 74 68 | 65 0a 58 61 76 65 72 61 |ports th|e.Xavera|
|00003190| 67 65 20 6e 75 6d 62 65 | 72 20 6f 66 20 6f 63 63 |ge numbe|r of occ|
|000031a0| 75 72 72 61 6e 63 65 73 | 20 66 6f 72 20 61 6c 6c |urrances| for all|
|000031b0| 20 6e 61 6d 65 73 20 61 | 6e 64 20 6e 75 6d 62 65 | names a|nd numbe|
|000031c0| 72 73 2e 20 20 4e 65 78 | 74 2c 20 74 68 65 72 65 |rs. Nex|t, there|
|000031d0| 0a 58 61 72 65 20 73 6f | 6d 65 20 68 61 73 68 2d |.Xare so|me hash-|
|000031e0| 74 61 62 6c 65 20 73 74 | 61 74 69 73 74 69 63 73 |table st|atistics|
|000031f0| 20 6f 6e 20 74 68 65 20 | 6c 6f 61 64 2d 66 61 63 | on the |load-fac|
|00003200| 74 6f 72 20 61 6e 64 20 | 74 68 65 20 61 76 65 72 |tor and |the aver|
|00003210| 61 67 65 0a 58 6e 75 6d | 62 65 72 20 6f 66 20 6f |age.Xnum|ber of o|
|00003220| 70 65 6e 2d 61 64 64 72 | 65 73 73 65 64 20 70 72 |pen-addr|essed pr|
|00003230| 6f 62 65 73 2e 0a 58 0a | 58 4d 6b 69 64 28 31 29 |obes..X.|XMkid(1)|
|00003240| 20 63 61 6e 20 74 61 6b | 65 20 61 72 67 75 6d 65 | can tak|e argume|
|00003250| 6e 74 73 20 66 72 6f 6d | 20 74 68 65 20 63 6f 6d |nts from| the com|
|00003260| 6d 61 6e 64 20 6c 69 6e | 65 2c 20 66 72 6f 6d 20 |mand lin|e, from |
|00003270| 73 74 64 69 6e 2c 20 6f | 72 20 66 72 6f 6d 0a 58 |stdin, o|r from.X|
|00003280| 61 20 66 69 6c 65 2e 20 | 20 41 20 66 69 6c 65 20 |a file. | A file |
|00003290| 66 75 6c 6c 20 6f 66 20 | 66 69 6c 65 6e 61 6d 65 |full of |filename|
|000032a0| 73 20 6d 61 79 20 61 6c | 73 6f 20 63 6f 6e 74 61 |s may al|so conta|
|000032b0| 69 6e 20 6d 6b 69 64 20 | 6f 70 74 69 6f 6e 73 20 |in mkid |options |
|000032c0| 6f 66 20 74 68 65 20 66 | 6f 72 6d 0a 58 2d 3c 6f |of the f|orm.X-<o|
|000032d0| 70 74 69 6f 6e 3e 2e 20 | 20 46 69 6c 65 6e 61 6d |ption>. | Filenam|
|000032e0| 65 73 20 61 6e 64 20 6f | 70 74 69 6f 6e 73 20 61 |es and o|ptions a|
|000032f0| 70 70 65 61 72 20 69 6e | 20 74 68 65 20 66 69 6c |ppear in| the fil|
|00003300| 65 20 6f 6e 65 2d 70 65 | 72 2d 6c 69 6e 65 2e 20 |e one-pe|r-line. |
|00003310| 20 54 79 70 69 63 61 6c | 0a 58 75 73 61 67 65 20 | Typical|.Xusage |
|00003320| 66 6f 72 20 74 68 69 73 | 20 66 65 61 74 75 72 65 |for this| feature|
|00003330| 20 69 73 20 61 73 20 66 | 6f 6c 6c 6f 77 73 3a 0a | is as f|ollows:.|
|00003340| 58 0a 58 24 20 66 69 6e | 64 20 2e 20 2d 6e 61 6d |X.X$ fin|d . -nam|
|00003350| 65 20 27 2a 2e 5b 63 68 | 79 73 5d 27 20 2d 70 72 |e '*.[ch|ys]' -pr|
|00003360| 69 6e 74 20 3e 49 44 46 | 49 4c 45 53 0a 58 24 20 |int >IDF|ILES.X$ |
|00003370| 6d 6b 69 64 20 2d 61 49 | 44 46 49 4c 45 53 0a 58 |mkid -aI|DFILES.X|
|00003380| 0a 58 2d 2d 20 6f 72 20 | 2d 2d 0a 58 0a 58 24 20 |.X-- or |--.X.X$ |
|00003390| 66 69 6e 64 20 2e 20 2d | 6e 61 6d 65 20 27 2a 2e |find . -|name '*.|
|000033a0| 5b 63 68 79 73 5d 27 20 | 2d 70 72 69 6e 74 20 7c |[chys]' |-print ||
|000033b0| 6d 6b 69 64 20 2d 0a 58 | 0a 58 4d 6b 69 64 28 31 |mkid -.X|.XMkid(1|
|000033c0| 29 20 73 74 61 73 68 65 | 73 20 74 68 65 20 66 69 |) stashe|s the fi|
|000033d0| 6c 65 6e 61 6d 65 73 20 | 61 6e 64 20 72 65 6c 65 |lenames |and rele|
|000033e0| 76 61 6e 74 20 61 72 67 | 75 6d 65 6e 74 73 20 69 |vant arg|uments i|
|000033f0| 6e 20 74 68 65 20 64 61 | 74 61 62 61 73 65 0a 58 |n the da|tabase.X|
|00003400| 69 74 73 65 6c 66 2e 20 | 20 49 74 20 75 73 65 73 |itself. | It uses|
|00003410| 20 74 68 65 73 65 20 74 | 6f 20 73 75 70 70 6f 72 | these t|o suppor|
|00003420| 74 20 74 68 65 20 60 60 | 69 6e 63 72 65 6d 65 6e |t the ``|incremen|
|00003430| 74 61 6c 2d 75 70 64 61 | 74 65 27 20 6f 70 74 69 |tal-upda|te' opti|
|00003440| 6f 6e 2e 0a 58 49 66 20 | 69 6e 76 6f 6b 65 64 20 |on..XIf |invoked |
|00003450| 77 69 74 68 20 60 2d 75 | 27 2c 20 6d 6b 69 64 28 |with `-u|', mkid(|
|00003460| 31 29 20 63 68 65 63 6b | 73 20 74 68 65 20 6d 6f |1) check|s the mo|
|00003470| 64 69 66 69 63 61 74 69 | 6f 6e 20 74 69 6d 65 73 |dificati|on times|
|00003480| 20 6f 66 20 61 6c 6c 0a | 58 63 6f 6e 73 74 69 74 | of all.|Xconstit|
|00003490| 75 65 6e 74 20 66 69 6c | 65 73 2c 20 61 6e 64 20 |uent fil|es, and |
|000034a0| 6f 6e 6c 79 20 72 65 2d | 73 63 61 6e 73 20 74 68 |only re-|scans th|
|000034b0| 6f 73 65 20 74 68 61 74 | 20 61 72 65 20 6e 65 77 |ose that| are new|
|000034c0| 65 72 20 74 68 61 6e 20 | 74 68 65 0a 58 64 61 74 |er than |the.Xdat|
|000034d0| 61 62 61 73 65 20 69 74 | 73 65 6c 66 2e 20 20 49 |abase it|self. I|
|000034e0| 74 20 69 73 20 69 6e 76 | 6f 6b 65 64 20 6c 69 6b |t is inv|oked lik|
|000034f0| 65 20 73 6f 3a 0a 58 0a | 58 24 20 6d 6b 69 64 20 |e so:.X.|X$ mkid |
|00003500| 2d 75 0a 58 0a 58 49 6e | 20 73 75 6d 6d 61 74 69 |-u.X.XIn| summati|
|00003510| 6f 6e 2c 20 6d 6b 69 64 | 28 31 29 20 63 61 6e 20 |on, mkid|(1) can |
|00003520| 67 65 74 20 61 72 67 75 | 6d 65 6e 74 73 20 66 72 |get argu|ments fr|
|00003530| 6f 6d 20 6f 6e 65 20 6f | 66 20 66 6f 75 72 20 70 |om one o|f four p|
|00003540| 6c 61 63 65 73 3a 0a 58 | 31 29 20 74 68 65 20 63 |laces:.X|1) the c|
|00003550| 6f 6d 6d 61 6e 64 20 6c | 69 6e 65 2c 20 32 29 20 |ommand l|ine, 2) |
|00003560| 61 20 66 69 6c 65 2c 20 | 33 29 20 73 74 64 69 6e |a file, |3) stdin|
|00003570| 2c 20 34 29 20 74 68 65 | 20 64 61 74 61 62 61 73 |, 4) the| databas|
|00003580| 65 20 69 74 73 65 6c 66 | 2e 0a 58 0a 58 4d 6b 69 |e itself|..X.XMki|
|00003590| 64 28 31 29 20 61 63 63 | 65 70 74 73 20 61 20 6e |d(1) acc|epts a n|
|000035a0| 75 6d 62 65 72 20 6f 66 | 20 73 63 61 6e 6e 65 72 |umber of| scanner|
|000035b0| 2d 73 70 65 63 69 66 69 | 63 20 61 72 67 75 6d 65 |-specifi|c argume|
|000035c0| 6e 74 73 2e 20 20 47 65 | 6e 65 72 61 6c 6c 79 2c |nts. Ge|nerally,|
|000035d0| 0a 58 74 68 65 73 65 20 | 61 72 65 20 69 6e 74 72 |.Xthese |are intr|
|000035e0| 6f 64 75 63 65 64 20 77 | 69 74 68 20 60 2d 53 3c |oduced w|ith `-S<|
|000035f0| 6c 61 6e 67 3e 27 20 77 | 68 65 72 65 20 3c 6c 61 |lang>' w|here <la|
|00003600| 6e 67 3e 20 69 73 20 74 | 68 65 20 6e 61 6d 65 20 |ng> is t|he name |
|00003610| 6f 66 0a 58 61 20 6c 61 | 6e 67 75 61 67 65 2c 20 |of.Xa la|nguage, |
|00003620| 73 75 63 68 20 61 73 20 | 60 63 27 20 6f 72 20 60 |such as |`c' or `|
|00003630| 61 73 6d 27 2e 20 20 59 | 6f 75 20 63 61 6e 20 67 |asm'. Y|ou can g|
|00003640| 65 74 20 61 20 73 63 61 | 6e 6e 65 72 2d 73 70 65 |et a sca|nner-spe|
|00003650| 63 69 66 69 63 0a 58 75 | 73 61 67 65 2d 72 65 70 |cific.Xu|sage-rep|
|00003660| 6f 72 74 20 77 69 74 68 | 20 60 2d 53 3c 6c 61 6e |ort with| `-S<lan|
|00003670| 67 3e 3f 27 20 20 28 4f | 66 20 63 6f 75 72 73 65 |g>?' (O|f course|
|00003680| 2c 20 74 68 65 20 60 3f | 27 20 6d 75 73 74 20 62 |, the `?|' must b|
|00003690| 65 20 65 73 63 61 70 65 | 64 0a 58 74 6f 20 67 65 |e escape|d.Xto ge|
|000036a0| 74 20 69 74 20 70 61 73 | 74 20 74 68 65 20 73 68 |t it pas|t the sh|
|000036b0| 65 6c 6c 29 0a 58 0a 58 | 48 65 72 65 27 73 20 73 |ell).X.X|Here's s|
|000036c0| 63 61 6e 6e 65 72 2d 75 | 73 61 67 65 20 66 6f 72 |canner-u|sage for|
|000036d0| 20 74 68 65 20 61 73 73 | 65 6d 62 6c 79 20 6c 61 | the ass|embly la|
|000036e0| 6e 67 75 61 67 65 20 73 | 63 61 6e 6e 65 72 3a 0a |nguage s|canner:.|
|000036f0| 58 0a 58 24 20 6d 6b 69 | 64 20 2d 53 61 73 6d 5c |X.X$ mki|d -Sasm\|
|00003700| 3f 0a 58 54 68 65 20 41 | 73 73 65 6d 62 6c 65 72 |?.XThe A|ssembler|
|00003710| 20 73 63 61 6e 6e 65 72 | 20 61 72 67 75 6d 65 6e | scanner| argumen|
|00003720| 74 73 20 74 61 6b 65 20 | 74 68 65 20 66 6f 72 6d |ts take |the form|
|00003730| 20 2d 53 61 73 6d 3c 61 | 72 67 3e 2c 20 77 68 65 | -Sasm<a|rg>, whe|
|00003740| 72 65 0a 58 3c 61 72 67 | 3e 20 69 73 20 6f 6e 65 |re.X<arg|> is one|
|00003750| 20 6f 66 20 74 68 65 20 | 66 6f 6c 6c 6f 77 69 6e | of the |followin|
|00003760| 67 3a 20 28 3c 63 63 3e | 20 64 65 6e 6f 74 65 73 |g: (<cc>| denotes|
|00003770| 20 6f 6e 65 20 6f 72 20 | 6d 6f 72 65 20 63 68 61 | one or |more cha|
|00003780| 72 61 63 74 65 72 73 29 | 0a 58 20 20 2d 63 3c 63 |racters)|.X -c<c|
|00003790| 63 3e 20 2e 20 2e 20 2e | 20 2e 20 3c 63 63 3e 20 |c> . . .| . <cc> |
|000037a0| 69 6e 74 72 6f 64 75 63 | 65 28 73 29 20 61 20 63 |introduc|e(s) a c|
|000037b0| 6f 6d 6d 65 6e 74 20 75 | 6e 74 69 6c 20 65 6e 64 |omment u|ntil end|
|000037c0| 2d 6f 66 2d 6c 69 6e 65 | 2e 0a 58 20 20 28 2b 7c |-of-line|..X (+||
|000037d0| 2d 29 75 20 2e 20 2e 20 | 2e 20 2e 20 28 44 6f 7c |-)u . . |. . (Do||
|000037e0| 44 6f 6e 27 74 29 20 73 | 74 72 69 70 20 61 20 6c |Don't) s|trip a l|
|000037f0| 65 61 64 69 6e 67 20 60 | 5f 27 20 66 72 6f 6d 20 |eading `|_' from |
|00003800| 69 64 73 2e 0a 58 20 20 | 28 2b 7c 2d 29 61 3c 63 |ids..X |(+|-)a<c|
|00003810| 63 3e 20 2e 20 2e 20 41 | 6c 6c 6f 77 20 3c 63 63 |c> . . A|llow <cc|
|00003820| 3e 20 69 6e 20 69 64 73 | 2c 20 61 6e 64 20 28 6b |> in ids|, and (k|
|00003830| 65 65 70 7c 69 67 6e 6f | 72 65 29 20 74 68 6f 73 |eep|igno|re) thos|
|00003840| 65 20 69 64 73 2e 0a 58 | 20 20 28 2b 7c 2d 29 70 |e ids..X| (+|-)p|
|00003850| 20 2e 20 2e 20 2e 20 2e | 20 28 44 6f 7c 44 6f 6e | . . . .| (Do|Don|
|00003860| 27 74 29 20 68 61 6e 64 | 6c 65 20 43 2d 70 72 65 |'t) hand|le C-pre|
|00003870| 70 72 6f 63 65 73 73 6f | 72 20 64 69 72 65 63 74 |processo|r direct|
|00003880| 69 76 65 73 2e 0a 58 20 | 20 28 2b 7c 2d 29 43 20 |ives..X | (+|-)C |
|00003890| 2e 20 2e 20 2e 20 2e 20 | 28 44 6f 7c 44 6f 6e 27 |. . . . |(Do|Don'|
|000038a0| 74 29 20 68 61 6e 64 6c | 65 20 43 2d 73 74 79 6c |t) handl|e C-styl|
|000038b0| 65 20 63 6f 6d 6d 65 6e | 74 73 2e 20 28 2f 2a 20 |e commen|ts. (/* |
|000038c0| 2a 2f 29 0a 58 0a 58 60 | 2d 53 61 73 6d 2d 63 3c |*/).X.X`|-Sasm-c<|
|000038d0| 63 63 3e 27 20 74 65 6c | 6c 73 20 74 68 65 20 73 |cc>' tel|ls the s|
|000038e0| 63 61 6e 6e 65 72 20 77 | 68 61 74 20 63 68 61 72 |canner w|hat char|
|000038f0| 61 63 74 65 72 73 20 61 | 72 65 20 75 73 65 64 20 |acters a|re used |
|00003900| 74 6f 20 69 6e 74 72 6f | 64 75 63 65 20 63 6f 6d |to intro|duce com|
|00003910| 6d 65 6e 74 73 0a 58 74 | 68 61 74 20 65 78 74 65 |ments.Xt|hat exte|
|00003920| 6e 64 20 74 6f 20 65 6e | 64 2d 6f 66 2d 6c 69 6e |nd to en|d-of-lin|
|00003930| 65 2e 0a 58 0a 58 55 73 | 65 20 60 2d 53 61 73 6d |e..X.XUs|e `-Sasm|
|00003940| 2b 75 27 20 69 66 20 79 | 6f 75 72 20 43 20 63 6f |+u' if y|our C co|
|00003950| 6d 70 69 6c 65 72 20 70 | 72 65 70 65 6e 64 73 20 |mpiler p|repends |
|00003960| 6c 65 61 64 69 6e 67 20 | 75 6e 64 65 72 73 63 6f |leading |undersco|
|00003970| 72 65 73 20 74 6f 20 65 | 78 74 65 72 6e 61 6c 0a |res to e|xternal.|
|00003980| 58 6e 61 6d 65 73 2e 20 | 20 54 68 69 73 20 77 61 |Xnames. | This wa|
|00003990| 79 2c 20 6d 6b 69 64 28 | 31 29 20 77 69 6c 6c 20 |y, mkid(|1) will |
|000039a0| 73 74 72 69 70 20 6c 65 | 61 64 69 6e 67 20 75 6e |strip le|ading un|
|000039b0| 64 65 72 73 63 6f 72 65 | 73 2c 20 61 6e 64 20 74 |derscore|s, and t|
|000039c0| 68 65 20 6e 61 6d 65 0a | 58 60 66 6f 6f 27 20 69 |he name.|X`foo' i|
|000039d0| 6e 20 61 20 43 20 73 6f | 75 72 63 65 20 77 69 6c |n a C so|urce wil|
|000039e0| 6c 20 62 65 20 63 6f 72 | 72 65 63 74 6c 79 20 61 |l be cor|rectly a|
|000039f0| 73 73 6f 63 69 61 74 65 | 64 20 77 69 74 68 20 74 |ssociate|d with t|
|00003a00| 68 65 20 6e 61 6d 65 20 | 60 5f 66 6f 6f 27 0a 58 |he name |`_foo'.X|
|00003a10| 69 6e 20 61 6e 20 61 73 | 73 65 6d 62 6c 65 72 20 |in an as|sembler |
|00003a20| 73 6f 75 72 63 65 2e 20 | 20 49 66 20 79 6f 75 72 |source. | If your|
|00003a30| 20 63 6f 6d 70 69 6c 65 | 72 20 64 6f 65 73 6e 27 | compile|r doesn'|
|00003a40| 74 20 70 72 65 70 65 6e | 64 20 6c 65 61 64 69 6e |t prepen|d leadin|
|00003a50| 67 0a 58 75 6e 64 65 72 | 73 63 6f 72 65 73 2c 20 |g.Xunder|scores, |
|00003a60| 75 73 65 20 60 2d 53 61 | 73 6d 2d 75 27 2e 0a 58 |use `-Sa|sm-u'..X|
|00003a70| 0a 58 4d 61 6e 79 20 61 | 73 73 65 6d 62 6c 65 72 |.XMany a|ssembler|
|00003a80| 73 20 61 6c 6c 6f 77 20 | 73 70 65 63 69 61 6c 20 |s allow |special |
|00003a90| 63 68 61 72 61 63 74 65 | 72 73 20 74 6f 20 62 65 |characte|rs to be|
|00003aa0| 20 6d 69 78 65 64 20 77 | 69 74 68 0a 58 61 6c 70 | mixed w|ith.Xalp|
|00003ab0| 68 61 2d 6e 75 6d 65 72 | 69 63 73 20 69 6e 20 6c |ha-numer|ics in l|
|00003ac0| 61 62 65 6c 2c 20 63 6f | 6e 73 74 61 6e 74 20 61 |abel, co|nstant a|
|00003ad0| 6e 64 20 72 65 67 69 73 | 74 65 72 20 6e 61 6d 65 |nd regis|ter name|
|00003ae0| 73 2e 20 20 43 6f 6d 6d | 6f 6e 20 63 68 6f 69 63 |s. Comm|on choic|
|00003af0| 65 73 0a 58 61 72 65 20 | 60 2e 27 2c 20 60 25 27 |es.Xare |`.', `%'|
|00003b00| 2c 20 61 6e 64 20 60 24 | 27 2e 20 20 54 68 75 73 |, and `$|'. Thus|
|00003b10| 2c 20 61 20 6c 61 62 65 | 6c 20 73 75 63 68 20 61 |, a labe|l such a|
|00003b20| 73 20 60 4c 25 31 32 33 | 27 20 73 68 6f 75 6c 64 |s `L%123|' should|
|00003b30| 20 62 65 20 73 63 61 6e | 6e 65 64 0a 58 61 73 20 | be scan|ned.Xas |
|00003b40| 6f 6e 65 20 74 6f 6b 65 | 6e 2c 20 6e 6f 74 20 62 |one toke|n, not b|
|00003b50| 72 6f 6b 65 6e 20 75 70 | 20 69 6e 74 6f 20 74 68 |roken up| into th|
|00003b60| 65 20 6e 61 6d 65 20 60 | 4c 27 20 61 6e 64 20 74 |e name `|L' and t|
|00003b70| 68 65 20 6e 75 6d 62 65 | 72 20 31 32 33 2e 0a 58 |he numbe|r 123..X|
|00003b80| 60 2d 53 61 73 6d 2d 61 | 25 2e 27 20 74 65 6c 6c |`-Sasm-a|%.' tell|
|00003b90| 73 20 74 68 65 20 73 63 | 61 6e 6e 65 72 20 74 6f |s the sc|anner to|
|00003ba0| 20 61 6c 6c 6f 77 20 60 | 25 27 20 61 6e 64 20 60 | allow `|%' and `|
|00003bb0| 2e 27 20 69 6e 20 74 6f | 6b 65 6e 73 2c 20 62 75 |.' in to|kens, bu|
|00003bc0| 74 20 74 6f 20 74 68 72 | 6f 77 0a 58 61 77 61 79 |t to thr|ow.Xaway|
|00003bd0| 20 74 6f 6b 65 6e 73 20 | 63 6f 6e 74 61 69 6e 69 | tokens |containi|
|00003be0| 6e 67 20 60 25 27 20 6f | 72 20 60 2e 27 20 60 2d |ng `%' o|r `.' `-|
|00003bf0| 53 61 73 6d 2b 61 25 2e | 27 20 74 65 6c 6c 73 20 |Sasm+a%.|' tells |
|00003c00| 74 68 65 20 73 63 61 6e | 6e 65 72 20 74 6f 20 6b |the scan|ner to k|
|00003c10| 65 65 70 20 73 75 63 68 | 0a 58 74 6f 6b 65 6e 73 |eep such|.Xtokens|
|00003c20| 20 61 6e 64 20 70 75 74 | 20 74 68 65 6d 20 69 6e | and put| them in|
|00003c30| 74 6f 20 74 68 65 20 64 | 61 74 61 62 61 73 65 2e |to the d|atabase.|
|00003c40| 0a 58 0a 58 0a 58 60 2d | 53 61 73 6d 2b 70 27 20 |.X.X.X`-|Sasm+p' |
|00003c50| 74 65 6c 6c 73 20 74 68 | 65 20 73 63 61 6e 6e 65 |tells th|e scanne|
|00003c60| 72 20 74 6f 20 68 61 6e | 64 6c 65 20 60 23 69 6e |r to han|dle `#in|
|00003c70| 63 6c 75 64 65 27 20 61 | 6e 64 20 60 23 64 65 66 |clude' a|nd `#def|
|00003c80| 69 6e 65 27 20 6c 69 6e | 65 73 20 61 73 0a 58 69 |ine' lin|es as.Xi|
|00003c90| 6e 20 43 20 73 6f 75 72 | 63 65 2c 20 61 6e 64 20 |n C sour|ce, and |
|00003ca0| 60 2d 53 61 73 6d 2b 43 | 27 20 74 65 6c 6c 73 20 |`-Sasm+C|' tells |
|00003cb0| 69 74 20 74 6f 20 69 67 | 6e 6f 72 65 20 43 2d 73 |it to ig|nore C-s|
|00003cc0| 74 79 6c 65 20 63 6f 6d | 6d 65 6e 74 73 2e 0a 58 |tyle com|ments..X|
|00003cd0| 0a 58 48 65 72 65 27 73 | 20 74 68 65 20 73 63 61 |.XHere's| the sca|
|00003ce0| 6e 6e 65 72 2d 75 73 61 | 67 65 20 66 6f 72 20 43 |nner-usa|ge for C|
|00003cf0| 3a 0a 58 0a 58 24 20 6d | 6b 69 64 20 2d 53 63 5c |:.X.X$ m|kid -Sc\|
|00003d00| 3f 0a 58 54 68 65 20 43 | 20 73 63 61 6e 6e 65 72 |?.XThe C| scanner|
|00003d10| 20 61 72 67 75 6d 65 6e | 74 73 20 74 61 6b 65 20 | argumen|ts take |
|00003d20| 74 68 65 20 66 6f 72 6d | 20 2d 53 63 3c 61 72 67 |the form| -Sc<arg|
|00003d30| 3e 2c 20 77 68 65 72 65 | 20 3c 61 72 67 3e 0a 58 |>, where| <arg>.X|
|00003d40| 69 73 20 6f 6e 65 20 6f | 66 20 74 68 65 20 66 6f |is one o|f the fo|
|00003d50| 6c 6c 6f 77 69 6e 67 3a | 20 28 3c 63 63 3e 20 64 |llowing:| (<cc> d|
|00003d60| 65 6e 6f 74 65 73 20 6f | 6e 65 20 6f 72 20 6d 6f |enotes o|ne or mo|
|00003d70| 72 65 20 63 68 61 72 61 | 63 74 65 72 73 29 0a 58 |re chara|cters).X|
|00003d80| 20 20 28 2b 7c 2d 29 75 | 20 2e 20 2e 20 2e 20 2e | (+|-)u| . . . .|
|00003d90| 20 28 44 6f 7c 44 6f 6e | 27 74 29 20 73 74 72 69 | (Do|Don|'t) stri|
|00003da0| 70 20 61 20 6c 65 61 64 | 69 6e 67 20 60 5f 27 20 |p a lead|ing `_' |
|00003db0| 66 72 6f 6d 20 69 64 73 | 20 69 6e 20 73 74 72 69 |from ids| in stri|
|00003dc0| 6e 67 73 2e 0a 58 20 20 | 2d 73 3c 63 63 3e 20 2e |ngs..X |-s<cc> .|
|00003dd0| 20 2e 20 2e 20 2e 20 41 | 6c 6c 6f 77 20 3c 63 63 | . . . A|llow <cc|
|00003de0| 3e 20 69 6e 20 73 74 72 | 69 6e 67 20 69 64 73 2e |> in str|ing ids.|
|00003df0| 0a 58 0a 58 54 68 65 20 | 60 2b 75 27 20 61 72 67 |.X.XThe |`+u' arg|
|00003e00| 75 6d 65 6e 74 20 69 73 | 20 61 6b 69 6e 20 74 6f |ument is| akin to|
|00003e10| 20 74 68 65 20 61 72 67 | 75 6d 65 6e 74 20 66 6f | the arg|ument fo|
|00003e20| 72 20 74 68 65 20 61 73 | 73 65 6d 62 6c 79 2d 6c |r the as|sembly-l|
|00003e30| 61 6e 67 75 61 67 65 0a | 58 73 63 61 6e 6e 65 72 |anguage.|Xscanner|
|00003e40| 2e 20 20 4d 6b 69 64 28 | 31 29 20 6b 65 65 70 73 |. Mkid(|1) keeps|
|00003e50| 20 74 68 65 20 63 6f 6e | 74 65 6e 74 73 20 6f 66 | the con|tents of|
|00003e60| 20 71 75 6f 74 65 64 2d | 73 74 72 69 6e 67 73 20 | quoted-|strings |
|00003e70| 69 66 20 74 68 65 20 73 | 74 72 69 6e 67 0a 58 63 |if the s|tring.Xc|
|00003e80| 6f 6e 74 61 69 6e 73 20 | 61 20 73 69 6e 67 6c 65 |ontains |a single|
|00003e90| 20 76 61 6c 69 64 20 43 | 20 6e 61 6d 65 20 61 6e | valid C| name an|
|00003ea0| 64 20 6e 6f 74 68 69 6e | 67 20 65 6c 73 65 2e 20 |d nothin|g else. |
|00003eb0| 20 45 2e 67 2e 20 20 6d | 6b 69 64 28 31 29 20 77 | E.g. m|kid(1) w|
|00003ec0| 6f 75 6c 64 0a 58 6b 65 | 65 70 20 74 68 65 20 63 |ould.Xke|ep the c|
|00003ed0| 6f 6e 74 65 6e 74 73 20 | 6f 66 20 22 5f 70 72 6f |ontents |of "_pro|
|00003ee0| 63 22 2e 20 20 53 75 63 | 68 20 73 74 72 69 6e 67 |c". Suc|h string|
|00003ef0| 73 20 61 72 65 20 69 6e | 74 65 72 65 73 74 69 6e |s are in|terestin|
|00003f00| 67 20 62 65 63 61 75 73 | 65 0a 58 74 68 65 79 20 |g becaus|e.Xthey |
|00003f10| 6d 61 79 20 63 6f 6e 74 | 61 69 6e 20 73 79 6d 62 |may cont|ain symb|
|00003f20| 6f 6c 20 6e 61 6d 65 73 | 20 74 68 61 74 20 61 20 |ol names| that a |
|00003f30| 70 72 6f 67 72 61 6d 20 | 75 73 65 73 20 66 6f 72 |program |uses for|
|00003f40| 20 6e 6c 69 73 74 20 6c | 6f 6f 6b 75 70 73 2e 0a | nlist l|ookups..|
|00003f50| 58 53 6f 2c 20 69 66 20 | 79 6f 75 72 20 63 6f 6d |XSo, if |your com|
|00003f60| 70 69 6c 65 72 20 70 72 | 65 70 65 6e 64 73 20 75 |piler pr|epends u|
|00003f70| 6e 64 65 72 73 63 6f 72 | 65 73 20 74 6f 20 65 78 |nderscor|es to ex|
|00003f80| 74 65 72 6e 61 6c 20 73 | 79 6d 62 6f 6c 73 2c 20 |ternal s|ymbols, |
|00003f90| 75 73 65 0a 58 60 2d 53 | 63 2b 75 27 20 73 6f 20 |use.X`-S|c+u' so |
|00003fa0| 74 68 61 74 20 6d 6b 69 | 64 28 31 29 20 77 69 6c |that mki|d(1) wil|
|00003fb0| 6c 20 73 74 72 69 70 20 | 74 68 65 6d 20 62 61 63 |l strip |them bac|
|00003fc0| 6b 20 6f 66 66 2e 0a 58 | 0a 58 4d 6b 69 64 28 31 |k off..X|.XMkid(1|
|00003fd0| 29 20 6e 6f 72 6d 61 6c | 6c 79 20 74 68 72 6f 77 |) normal|ly throw|
|00003fe0| 73 20 61 77 61 79 20 74 | 68 65 20 63 6f 6e 74 65 |s away t|he conte|
|00003ff0| 6e 74 73 20 6f 66 20 71 | 75 6f 74 65 64 20 73 74 |nts of q|uoted st|
|00004000| 72 69 6e 67 73 20 74 68 | 61 74 20 68 61 76 65 0a |rings th|at have.|
|00004010| 58 61 6e 79 74 68 69 6e | 67 20 6f 74 68 65 72 20 |Xanythin|g other |
|00004020| 74 68 61 6e 20 61 20 73 | 69 6e 67 6c 65 20 6e 61 |than a s|ingle na|
|00004030| 6d 65 20 69 6e 20 74 68 | 65 6d 2e 20 20 59 6f 75 |me in th|em. You|
|00004040| 20 63 61 6e 20 74 65 6c | 6c 20 6d 6b 69 64 28 31 | can tel|l mkid(1|
|00004050| 29 20 74 6f 0a 58 61 63 | 63 65 70 74 20 61 64 64 |) to.Xac|cept add|
|00004060| 69 74 69 6f 6e 61 6c 20 | 63 68 61 72 61 63 74 65 |itional |characte|
|00004070| 72 73 20 69 6e 20 73 74 | 72 69 6e 67 73 20 77 69 |rs in st|rings wi|
|00004080| 74 68 20 60 2d 53 63 2d | 73 3c 63 63 3e 27 20 77 |th `-Sc-|s<cc>' w|
|00004090| 68 65 72 65 20 3c 63 63 | 3e 20 69 73 0a 58 6f 6e |here <cc|> is.Xon|
|000040a0| 65 20 6f 72 20 6d 6f 72 | 65 20 73 70 65 63 69 61 |e or mor|e specia|
|000040b0| 6c 20 63 68 61 72 61 63 | 74 65 72 73 2e 20 20 45 |l charac|ters. E|
|000040c0| 2e 67 2e 20 60 2d 53 63 | 2d 73 2f 2e 2d 3a 2c 27 |.g. `-Sc|-s/.-:,'|
|000040d0| 20 77 69 6c 6c 20 69 6e | 63 6c 75 64 65 20 6d 6f | will in|clude mo|
|000040e0| 73 74 20 6f 66 0a 58 74 | 68 65 20 73 74 72 69 6e |st of.Xt|he strin|
|000040f0| 67 73 20 63 6f 6e 74 61 | 69 6e 69 6e 67 20 70 61 |gs conta|ining pa|
|00004100| 74 68 6e 61 6d 65 73 20 | 74 68 61 74 20 79 6f 75 |thnames |that you|
|00004110| 20 61 72 65 20 6c 69 6b | 65 6c 79 20 74 6f 20 65 | are lik|ely to e|
|00004120| 6e 63 6f 75 6e 74 65 72 | 2e 0a 58 0a 58 41 6e 6f |ncounter|..X.XAno|
|00004130| 74 68 65 72 20 63 6c 61 | 73 73 20 6f 66 20 73 63 |ther cla|ss of sc|
|00004140| 61 6e 6e 65 72 20 61 72 | 67 75 6d 65 6e 74 20 61 |anner ar|gument a|
|00004150| 6c 6c 6f 77 73 20 79 6f | 75 20 74 6f 20 61 73 73 |llows yo|u to ass|
|00004160| 6f 63 69 61 74 65 20 61 | 20 73 75 66 66 69 78 0a |ociate a| suffix.|
|00004170| 58 77 69 74 68 20 61 20 | 6c 61 6e 67 75 61 67 65 |Xwith a |language|
|00004180| 2e 20 20 45 2e 67 2e 20 | 60 2d 53 2e 79 3d 63 27 |. E.g. |`-S.y=c'|
|00004190| 20 74 65 6c 6c 73 20 6d | 6b 69 64 28 31 29 20 74 | tells m|kid(1) t|
|000041a0| 6f 20 75 73 65 20 74 68 | 65 20 43 20 6c 61 6e 67 |o use th|e C lang|
|000041b0| 75 61 67 65 0a 58 73 63 | 61 6e 6e 65 72 20 6f 6e |uage.Xsc|anner on|
|000041c0| 20 61 6c 6c 20 66 69 6c | 65 73 20 65 6e 64 69 6e | all fil|es endin|
|000041d0| 67 20 77 69 74 68 20 2e | 79 2e 20 20 59 6f 75 20 |g with .|y. You |
|000041e0| 63 61 6e 20 61 73 6b 20 | 6d 6b 69 64 28 31 29 20 |can ask |mkid(1) |
|000041f0| 66 6f 72 20 74 68 65 0a | 58 61 76 61 69 6c 61 62 |for the.|Xavailab|
|00004200| 6c 65 20 73 63 61 6e 6e | 65 72 73 20 61 6e 64 20 |le scann|ers and |
|00004210| 61 73 73 6f 63 69 61 74 | 65 64 20 73 75 66 66 69 |associat|ed suffi|
|00004220| 78 65 73 20 6c 69 6b 65 | 20 73 6f 3a 0a 58 0a 58 |xes like| so:.X.X|
|00004230| 24 20 6d 6b 69 64 20 2d | 53 5c 3f 3d 5c 3f 0a 58 |$ mkid -|S\?=\?.X|
|00004240| 2e 63 3d 63 2c 20 2e 68 | 3d 63 2c 20 2e 79 3d 63 |.c=c, .h|=c, .y=c|
|00004250| 2c 20 2e 73 3d 61 73 6d | 2c 20 2e 70 3d 70 61 73 |, .s=asm|, .p=pas|
|00004260| 63 61 6c 2c 20 2e 70 61 | 73 3d 70 61 73 63 61 6c |cal, .pa|s=pascal|
|00004270| 0a 58 0a 58 50 6c 65 61 | 73 65 20 6e 6f 74 65 2c |.X.XPlea|se note,|
|00004280| 20 6d 6b 69 64 28 31 29 | 20 69 73 20 6c 79 69 6e | mkid(1)| is lyin|
|00004290| 67 20 74 6f 20 79 6f 75 | 20 61 62 6f 75 74 20 69 |g to you| about i|
|000042a0| 74 73 20 50 61 73 63 61 | 6c 20 70 72 6f 77 65 73 |ts Pasca|l prowes|
|000042b0| 73 21 0a 58 41 74 20 74 | 68 65 20 74 69 6d 65 20 |s!.XAt t|he time |
|000042c0| 6f 66 20 74 68 69 73 20 | 70 6f 73 74 69 6e 67 2c |of this |posting,|
|000042d0| 20 74 68 65 72 65 20 61 | 72 65 20 73 63 61 6e 6e | there a|re scann|
|000042e0| 65 72 73 20 66 6f 72 20 | 43 20 61 6e 64 20 61 73 |ers for |C and as|
|000042f0| 73 65 6d 62 6c 79 0a 58 | 6c 61 6e 67 75 61 67 65 |sembly.X|language|
|00004300| 20 73 6f 75 72 63 65 73 | 2e 20 20 54 68 65 72 65 | sources|. There|
|00004310| 20 61 72 65 20 61 6c 73 | 6f 20 73 74 75 62 73 20 | are als|o stubs |
|00004320| 66 6f 72 20 50 61 73 63 | 61 6c 2c 20 41 64 61 20 |for Pasc|al, Ada |
|00004330| 61 6e 64 20 4c 49 53 50 | 2e 20 20 54 68 65 0a 58 |and LISP|. The.X|
|00004340| 73 63 61 6e 6e 65 72 73 | 20 61 72 65 20 76 65 72 |scanners| are ver|
|00004350| 79 20 66 61 73 74 2e 20 | 20 54 68 65 20 61 73 73 |y fast. | The ass|
|00004360| 65 6d 62 6c 79 20 6c 61 | 6e 67 75 61 67 65 20 73 |embly la|nguage s|
|00004370| 63 61 6e 6e 65 72 20 6b | 6e 6f 77 73 20 68 6f 77 |canner k|nows how|
|00004380| 0a 58 74 6f 20 74 68 72 | 6f 77 20 61 77 61 79 20 |.Xto thr|ow away |
|00004390| 43 2d 73 74 79 6c 65 20 | 63 6f 6d 6d 65 6e 74 73 |C-style |comments|
|000043a0| 20 61 73 20 77 65 6c 6c | 20 61 73 20 74 68 65 20 | as well| as the |
|000043b0| 74 72 61 64 69 74 69 6f | 6e 61 6c 20 60 63 6f 6d |traditio|nal `com|
|000043c0| 6d 65 6e 74 2d 0a 58 63 | 68 61 72 61 63 74 65 72 |ment-.Xc|haracter|
|000043d0| 2d 75 6e 74 69 6c 2d 65 | 6e 64 2d 6f 66 2d 6c 69 |-until-e|nd-of-li|
|000043e0| 6e 65 27 20 73 74 79 6c | 65 2e 20 20 49 6e 20 6f |ne' styl|e. In o|
|000043f0| 72 64 65 72 20 74 6f 20 | 74 65 73 74 20 6e 65 77 |rder to |test new|
|00004400| 20 73 63 61 6e 6e 65 72 | 73 2c 0a 58 74 68 65 72 | scanner|s,.Xther|
|00004410| 65 20 69 73 20 61 20 73 | 63 61 6e 6e 65 72 20 64 |e is a s|canner d|
|00004420| 72 69 76 65 72 20 63 61 | 6c 6c 65 64 20 69 64 78 |river ca|lled idx|
|00004430| 28 31 29 2e 20 20 49 64 | 78 28 31 29 20 73 69 6d |(1). Id|x(1) sim|
|00004440| 70 6c 79 20 63 61 6c 6c | 73 20 74 68 65 0a 58 73 |ply call|s the.Xs|
|00004450| 63 61 6e 6e 65 72 20 74 | 6f 20 67 65 74 20 69 64 |canner t|o get id|
|00004460| 65 6e 74 69 66 69 65 72 | 73 20 6f 6e 65 2d 61 74 |entifier|s one-at|
|00004470| 2d 61 2d 74 69 6d 65 20 | 70 72 69 6e 74 73 20 74 |-a-time |prints t|
|00004480| 68 65 6d 20 6f 6e 20 73 | 74 64 6f 75 74 20 6f 6e |hem on s|tdout on|
|00004490| 65 2d 70 65 72 2d 6c 69 | 6e 65 2e 0a 58 0a 58 46 |e-per-li|ne..X.XF|
|000044a0| 6f 72 20 6d 6f 72 65 20 | 69 6e 66 6f 72 6d 61 74 |or more |informat|
|000044b0| 69 6f 6e 2c 20 72 65 61 | 64 20 74 68 65 20 6d 61 |ion, rea|d the ma|
|000044c0| 6e 75 61 6c 20 70 61 67 | 65 73 21 0a 58 0a 58 48 |nual pag|es!.X.XH|
|000044d0| 61 70 70 79 20 48 61 63 | 6b 69 6e 67 2c 0a 58 2d |appy Hac|king,.X-|
|000044e0| 2d 0a 58 2d 2d 20 47 72 | 65 67 20 4d 63 47 61 72 |-.X-- Gr|eg McGar|
|000044f0| 79 0a 58 2d 2d 20 50 2e | 4f 2e 20 42 6f 78 20 32 |y.X-- P.|O. Box 2|
|00004500| 38 36 0a 58 2d 2d 20 4c | 69 6e 63 6f 6c 6e 2c 20 |86.X-- L|incoln, |
|00004510| 4d 41 20 20 30 31 37 37 | 33 0a 58 2d 2d 0a 58 2d |MA 0177|3.X--.X-|
|00004520| 2d 20 39 2f 31 35 2f 38 | 37 0a 58 2d 2d 0a 58 2d |- 9/15/8|7.X--.X-|
|00004530| 2d 09 55 6e 74 69 6c 20 | 74 68 65 20 65 6e 64 20 |-.Until |the end |
|00004540| 6f 66 20 31 39 38 37 2c | 0a 58 2d 2d 09 43 6f 6e |of 1987,|.X--.Con|
|00004550| 73 75 6c 74 69 6e 67 20 | 74 6f 20 53 75 6e 27 73 |sulting |to Sun's|
|00004560| 20 45 61 73 74 20 43 6f | 61 73 74 20 44 69 76 69 | East Co|ast Divi|
|00004570| 73 69 6f 6e 3a 0a 58 2d | 2d 09 09 67 6d 63 67 61 |sion:.X-|-..gmcga|
|00004580| 72 79 40 65 63 64 2e 73 | 75 6e 2e 63 6f 6d 0a 58 |ry@ecd.s|un.com.X|
|00004590| 2d 2d 09 09 67 6d 63 67 | 61 72 79 40 73 75 6e 65 |--..gmcg|ary@sune|
|000045a0| 61 73 74 2e 75 75 2e 6e | 65 74 0a 58 2d 2d 0a 58 |ast.uu.n|et.X--.X|
|000045b0| 2d 2d 09 41 66 74 65 72 | 20 74 68 61 74 2c 20 70 |--.After| that, p|
|000045c0| 72 6f 62 61 62 6c 79 20 | 63 6f 6e 73 75 6c 74 69 |robably |consulti|
|000045d0| 6e 67 20 69 6e 20 45 75 | 72 6f 70 65 2e 2e 2e 0a |ng in Eu|rope....|
|000045e0| 53 48 41 52 5f 45 4f 46 | 0a 69 66 20 74 65 73 74 |SHAR_EOF|.if test|
|000045f0| 20 31 36 30 33 37 20 2d | 6e 65 20 22 60 77 63 20 | 16037 -|ne "`wc |
|00004600| 2d 63 20 3c 20 27 54 55 | 54 4f 52 49 41 4c 27 60 |-c < 'TU|TORIAL'`|
|00004610| 22 0a 74 68 65 6e 0a 09 | 65 63 68 6f 20 73 68 61 |".then..|echo sha|
|00004620| 72 3a 20 65 72 72 6f 72 | 20 74 72 61 6e 73 6d 69 |r: error| transmi|
|00004630| 74 74 69 6e 67 20 22 27 | 54 55 54 4f 52 49 41 4c |tting "'|TUTORIAL|
|00004640| 27 22 20 27 28 73 68 6f | 75 6c 64 20 68 61 76 65 |'" '(sho|uld have|
|00004650| 20 62 65 65 6e 20 31 36 | 30 33 37 20 63 68 61 72 | been 16|037 char|
|00004660| 61 63 74 65 72 73 29 27 | 0a 66 69 0a 65 63 68 6f |acters)'|.fi.echo|
|00004670| 20 73 68 61 72 3a 20 65 | 78 74 72 61 63 74 69 6e | shar: e|xtractin|
|00004680| 67 20 22 27 54 4f 44 4f | 27 22 20 27 28 35 34 36 |g "'TODO|'" '(546|
|00004690| 20 63 68 61 72 61 63 74 | 65 72 73 29 27 0a 73 65 | charact|ers)'.se|
|000046a0| 64 20 27 73 2f 5e 58 2f | 2f 27 20 3c 3c 20 5c 53 |d 's/^X/|/' << \S|
|000046b0| 48 41 52 5f 45 4f 46 20 | 3e 20 27 54 4f 44 4f 27 |HAR_EOF |> 'TODO'|
|000046c0| 0a 58 45 6e 68 61 6e 63 | 65 6d 65 6e 74 73 3a 0a |.XEnhanc|ements:.|
|000046d0| 58 7e 7e 7e 7e 7e 7e 7e | 7e 7e 7e 7e 7e 7e 0a 58 |X~~~~~~~|~~~~~~.X|
|000046e0| 6d 6b 69 64 3a 0a 58 09 | 68 61 6e 64 6c 65 20 61 |mkid:.X.|handle a|
|000046f0| 74 74 72 69 62 75 74 65 | 73 3a 20 49 44 4e 5f 4e |ttribute|s: IDN_N|
|00004700| 4f 49 53 45 0a 58 09 61 | 64 64 20 6d 61 6b 65 66 |OISE.X.a|dd makef|
|00004710| 69 6c 65 20 73 63 61 6e | 6e 65 72 0a 58 0a 58 67 |ile scan|ner.X.Xg|
|00004720| 65 74 69 64 2d 63 3a 0a | 58 09 61 64 64 20 73 74 |etid-c:.|X.add st|
|00004730| 75 66 66 20 74 6f 20 72 | 65 63 6f 67 6e 69 7a 65 |uff to r|ecognize|
|00004740| 20 66 6c 6f 61 74 20 26 | 20 64 6f 75 62 6c 65 20 | float &| double |
|00004750| 63 6f 6e 73 74 61 6e 74 | 73 20 70 72 6f 70 65 72 |constant|s proper|
|00004760| 6c 79 2e 0a 58 0a 58 5b | 6c 67 65 61 5d 69 64 3a |ly..X.X[|lgea]id:|
|00004770| 0a 58 09 72 65 63 75 72 | 73 69 76 65 6c 79 20 73 |.X.recur|sively s|
|00004780| 65 61 72 63 68 20 73 75 | 62 2d 64 69 72 73 20 66 |earch su|b-dirs f|
|00004790| 6f 72 20 49 44 20 64 61 | 74 61 62 61 73 65 73 20 |or ID da|tabases |
|000047a0| 61 6e 64 20 6f 70 74 69 | 6f 6e 61 6c 6c 79 0a 58 |and opti|onally.X|
|000047b0| 09 09 6d 65 72 67 65 20 | 65 76 65 72 79 74 68 69 |..merge |everythi|
|000047c0| 6e 67 20 69 6e 74 6f 20 | 6f 6e 65 20 42 49 47 20 |ng into |one BIG |
|000047d0| 6c 69 73 74 0a 58 6c 69 | 64 3a 0a 58 09 70 72 69 |list.Xli|d:.X.pri|
|000047e0| 6e 74 20 61 74 74 72 69 | 62 75 74 65 20 66 6c 61 |nt attri|bute fla|
|000047f0| 67 73 2c 20 61 64 64 20 | 63 6d 64 2d 6c 69 6e 65 |gs, add |cmd-line|
|00004800| 20 61 72 67 73 20 74 6f | 20 71 75 65 72 79 20 62 | args to| query b|
|00004810| 79 20 66 6c 61 67 73 0a | 58 09 62 72 65 61 6b 20 |y flags.|X.break |
|00004820| 6f 75 74 20 73 65 61 72 | 63 68 69 6e 67 20 6a 75 |out sear|ching ju|
|00004830| 6e 6b 20 69 6e 74 6f 20 | 6c 69 62 2d 66 75 6e 63 |nk into |lib-func|
|00004840| 73 20 74 68 61 74 20 61 | 72 65 20 75 73 65 66 75 |s that a|re usefu|
|00004850| 6c 20 74 6f 20 65 64 69 | 74 6f 72 73 0a 58 0a 58 |l to edi|tors.X.X|
|00004860| 4e 65 77 20 41 70 70 6c | 69 63 61 74 69 6f 6e 73 |New Appl|ications|
|00004870| 3a 0a 58 7e 7e 7e 7e 7e | 7e 7e 7e 7e 7e 7e 7e 7e |:.X~~~~~|~~~~~~~~|
|00004880| 7e 7e 7e 7e 0a 58 69 67 | 6e 69 64 3a 0a 58 09 66 |~~~~.Xig|nid:.X.f|
|00004890| 72 6f 62 20 74 68 65 20 | 49 44 4e 5f 4e 4f 49 53 |rob the |IDN_NOIS|
|000048a0| 45 20 61 74 74 72 69 62 | 75 74 65 20 6f 66 20 61 |E attrib|ute of a|
|000048b0| 6e 20 69 64 20 69 6e 20 | 61 6e 20 65 78 69 73 74 |n id in |an exist|
|000048c0| 69 6e 67 20 49 44 20 64 | 61 74 61 62 61 73 65 2e |ing ID d|atabase.|
|000048d0| 0a 58 09 09 74 61 6b 65 | 73 20 69 64 73 20 6f 6e |.X..take|s ids on|
|000048e0| 20 63 6f 6d 6d 61 6e 64 | 20 6c 69 6e 65 20 6f 72 | command| line or|
|000048f0| 20 73 74 64 69 6e 2e 0a | 53 48 41 52 5f 45 4f 46 | stdin..|SHAR_EOF|
|00004900| 0a 69 66 20 74 65 73 74 | 20 35 34 36 20 2d 6e 65 |.if test| 546 -ne|
|00004910| 20 22 60 77 63 20 2d 63 | 20 3c 20 27 54 4f 44 4f | "`wc -c| < 'TODO|
|00004920| 27 60 22 0a 74 68 65 6e | 0a 09 65 63 68 6f 20 73 |'`".then|..echo s|
|00004930| 68 61 72 3a 20 65 72 72 | 6f 72 20 74 72 61 6e 73 |har: err|or trans|
|00004940| 6d 69 74 74 69 6e 67 20 | 22 27 54 4f 44 4f 27 22 |mitting |"'TODO'"|
|00004950| 20 27 28 73 68 6f 75 6c | 64 20 68 61 76 65 20 62 | '(shoul|d have b|
|00004960| 65 65 6e 20 35 34 36 20 | 63 68 61 72 61 63 74 65 |een 546 |characte|
|00004970| 72 73 29 27 0a 66 69 0a | 65 63 68 6f 20 73 68 61 |rs)'.fi.|echo sha|
|00004980| 72 3a 20 65 78 74 72 61 | 63 74 69 6e 67 20 22 27 |r: extra|cting "'|
|00004990| 6d 61 6b 65 66 69 6c 65 | 27 22 20 27 28 33 35 31 |makefile|'" '(351|
|000049a0| 36 20 63 68 61 72 61 63 | 74 65 72 73 29 27 0a 73 |6 charac|ters)'.s|
|000049b0| 65 64 20 27 73 2f 5e 58 | 2f 2f 27 20 3c 3c 20 5c |ed 's/^X|//' << \|
|000049c0| 53 48 41 52 5f 45 4f 46 | 20 3e 20 27 6d 61 6b 65 |SHAR_EOF| > 'make|
|000049d0| 66 69 6c 65 27 0a 58 23 | 21 2f 62 69 6e 2f 6d 61 |file'.X#|!/bin/ma|
|000049e0| 6b 65 20 2d 66 0a 58 0a | 58 23 20 43 6f 70 79 72 |ke -f.X.|X# Copyr|
|000049f0| 69 67 68 74 20 28 63 29 | 20 31 39 38 36 2c 20 47 |ight (c)| 1986, G|
|00004a00| 72 65 67 20 4d 63 47 61 | 72 79 0a 58 23 20 40 28 |reg McGa|ry.X# @(|
|00004a10| 23 29 6d 61 6b 65 66 69 | 6c 65 09 31 2e 33 20 38 |#)makefi|le.1.3 8|
|00004a20| 36 2f 31 31 2f 30 36 0a | 58 0a 58 23 20 2d 2d 2d |6/11/06.|X.X# ---|
|00004a30| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004a40| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004a50| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004a60| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004a70| 2d 0a 58 23 20 53 79 73 | 74 65 6d 20 44 65 70 65 |-.X# Sys|tem Depe|
|00004a80| 6e 64 65 6e 74 20 43 6f | 6e 66 69 67 75 72 61 74 |ndent Co|nfigurat|
|00004a90| 69 6f 6e 3a 0a 58 23 20 | 20 20 43 68 6f 6f 73 65 |ion:.X# | Choose|
|00004aa0| 20 61 20 70 72 65 2d 70 | 61 63 6b 61 67 65 64 20 | a pre-p|ackaged |
|00004ab0| 73 65 74 20 6f 66 20 6f | 70 74 69 6f 6e 73 20 62 |set of o|ptions b|
|00004ac0| 65 6c 6f 77 2c 20 6f 72 | 20 72 6f 6c 6c 20 79 6f |elow, or| roll yo|
|00004ad0| 75 72 20 6f 77 6e 2e 0a | 58 23 20 20 20 54 68 65 |ur own..|X# The|
|00004ae0| 20 72 65 6c 65 76 61 6e | 74 20 6f 70 74 69 6f 6e | relevan|t option|
|00004af0| 73 20 61 72 65 20 61 73 | 20 66 6f 6c 6c 6f 77 73 |s are as| follows|
|00004b00| 3a 0a 58 23 0a 58 23 20 | 2a 20 49 66 20 79 6f 75 |:.X#.X# |* If you|
|00004b10| 20 68 61 76 65 20 74 68 | 65 20 60 50 57 27 20 6c | have th|e `PW' l|
|00004b20| 69 62 72 61 72 79 20 77 | 68 69 63 68 20 69 6e 63 |ibrary w|hich inc|
|00004b30| 6c 75 64 65 73 20 74 68 | 65 20 72 65 67 75 6c 61 |ludes th|e regula|
|00004b40| 72 2d 65 78 70 72 65 73 | 73 69 6f 6e 0a 58 23 20 |r-expres|sion.X# |
|00004b50| 20 20 66 75 6e 63 69 6f | 6e 73 20 72 65 67 63 6d | funcio|ns regcm|
|00004b60| 70 28 33 29 20 61 6e 64 | 20 72 65 67 65 78 28 33 |p(3) and| regex(3|
|00004b70| 29 2c 20 74 68 65 6e 20 | 75 73 65 20 60 2d 44 52 |), then |use `-DR|
|00004b80| 45 47 45 58 27 20 69 6e | 20 44 45 46 53 2c 20 61 |EGEX' in| DEFS, a|
|00004b90| 6e 64 0a 58 23 20 20 20 | 60 2d 6c 50 57 27 20 69 |nd.X# |`-lPW' i|
|00004ba0| 6e 20 4c 49 42 53 2e 20 | 20 49 66 20 79 6f 75 20 |n LIBS. | If you |
|00004bb0| 68 61 76 65 20 74 68 65 | 20 72 65 67 75 6c 61 72 |have the| regular|
|00004bc0| 2d 65 78 70 72 65 73 73 | 69 6f 6e 20 66 75 6e 63 |-express|ion func|
|00004bd0| 74 69 6f 6e 73 0a 58 23 | 20 20 20 72 65 5f 63 6f |tions.X#| re_co|
|00004be0| 6d 70 28 33 29 20 61 6e | 64 20 72 65 5f 65 78 65 |mp(3) an|d re_exe|
|00004bf0| 63 28 33 29 2c 20 75 73 | 65 20 60 2d 44 52 45 5f |c(3), us|e `-DRE_|
|00004c00| 45 58 45 43 27 20 69 6e | 20 44 45 46 53 2e 20 20 |EXEC' in| DEFS. |
|00004c10| 49 66 20 79 6f 75 20 64 | 6f 6e 27 74 0a 58 23 20 |If you d|on't.X# |
|00004c20| 20 20 68 61 76 65 20 61 | 6e 79 20 72 65 67 75 6c | have a|ny regul|
|00004c30| 61 72 2d 65 78 70 72 65 | 73 73 69 6f 6e 20 66 75 |ar-expre|ssion fu|
|00004c40| 6e 63 74 69 6f 6e 73 2c | 20 64 6f 6e 27 74 20 61 |nctions,| don't a|
|00004c50| 64 64 20 65 69 74 68 65 | 72 20 74 6f 20 44 45 46 |dd eithe|r to DEF|
|00004c60| 53 2e 0a 58 23 0a 58 23 | 20 2a 20 49 66 20 79 6f |S..X#.X#| * If yo|
|00004c70| 75 20 64 6f 20 6e 6f 74 | 20 68 61 76 65 20 74 68 |u do not| have th|
|00004c80| 65 20 34 2e 32 20 64 69 | 72 65 63 74 6f 72 79 20 |e 4.2 di|rectory |
|00004c90| 61 63 63 65 73 73 20 6c | 69 62 72 61 72 69 65 73 |access l|ibraries|
|00004ca0| 2c 20 61 64 64 20 60 2d | 6c 6e 64 69 72 27 0a 58 |, add `-|lndir'.X|
|00004cb0| 23 20 20 20 74 6f 20 4c | 49 42 53 2c 20 61 6e 64 |# to L|IBS, and|
|00004cc0| 20 64 65 66 69 6e 65 20 | 60 2d 44 4e 44 49 52 27 | define |`-DNDIR'|
|00004cd0| 20 69 6e 20 44 45 46 53 | 2e 20 0a 58 23 0a 58 23 | in DEFS|. .X#.X#|
|00004ce0| 20 2a 20 49 66 20 79 6f | 75 72 20 73 74 72 69 6e | * If yo|ur strin|
|00004cf0| 67 20 6c 69 62 72 61 72 | 69 65 73 20 68 61 76 65 |g librar|ies have|
|00004d00| 20 69 6e 64 65 78 28 33 | 29 20 61 6e 64 20 72 69 | index(3|) and ri|
|00004d10| 6e 64 65 78 28 33 29 20 | 69 6e 73 74 65 61 64 20 |ndex(3) |instead |
|00004d20| 6f 66 0a 58 23 20 20 20 | 73 74 72 63 68 72 28 33 |of.X# |strchr(3|
|00004d30| 29 20 61 6e 64 20 73 74 | 72 72 63 68 72 28 33 29 |) and st|rrchr(3)|
|00004d40| 2c 20 75 73 65 20 60 2d | 44 52 49 4e 44 45 58 27 |, use `-|DRINDEX'|
|00004d50| 20 69 6e 20 44 45 46 53 | 2e 0a 58 23 0a 58 23 20 | in DEFS|..X#.X# |
|00004d60| 2a 20 49 66 20 79 6f 75 | 72 20 63 6f 6d 70 69 6c |* If you|r compil|
|00004d70| 65 72 20 63 68 6f 6b 65 | 73 20 6f 6e 20 70 6f 69 |er choke|s on poi|
|00004d80| 6e 74 65 72 73 20 74 6f | 20 66 75 6e 63 74 69 6f |nters to| functio|
|00004d90| 6e 73 20 72 65 74 75 72 | 6e 69 6e 67 20 76 6f 69 |ns retur|ning voi|
|00004da0| 64 2c 0a 58 23 20 20 20 | 75 73 65 20 60 2d 44 76 |d,.X# |use `-Dv|
|00004db0| 6f 69 64 3d 69 6e 74 27 | 20 69 6e 20 44 45 46 53 |oid=int'| in DEFS|
|00004dc0| 2e 0a 58 23 0a 58 23 20 | 2a 20 49 66 20 79 6f 75 |..X#.X# |* If you|
|00004dd0| 20 68 61 76 65 20 73 65 | 74 6c 69 6e 65 62 75 66 | have se|tlinebuf|
|00004de0| 28 33 29 20 69 6e 20 79 | 6f 75 72 20 73 74 64 69 |(3) in y|our stdi|
|00004df0| 6f 20 74 6f 20 73 65 74 | 20 6c 69 6e 65 2d 62 75 |o to set| line-bu|
|00004e00| 66 66 65 72 69 6e 67 20 | 6f 6e 0a 58 23 20 20 20 |ffering |on.X# |
|00004e10| 61 20 73 74 72 65 61 6d | 2c 20 75 73 65 20 60 2d |a stream|, use `-|
|00004e20| 44 45 52 52 4c 49 4e 45 | 42 55 46 27 20 69 6e 20 |DERRLINE|BUF' in |
|00004e30| 44 45 46 53 2e 0a 58 23 | 0a 58 23 20 2a 20 49 66 |DEFS..X#|.X# * If|
|00004e40| 20 79 6f 75 20 68 61 76 | 65 20 61 20 53 79 73 74 | you hav|e a Syst|
|00004e50| 65 6d 2d 49 49 49 2f 56 | 20 74 65 72 6d 69 6e 61 |em-III/V| termina|
|00004e60| 6c 20 64 72 69 76 65 72 | 2c 20 64 65 66 69 6e 65 |l driver|, define|
|00004e70| 20 60 54 45 52 4d 49 4f | 27 20 69 6e 20 44 45 46 | `TERMIO|' in DEF|
|00004e80| 53 2e 0a 58 23 0a 58 23 | 20 2a 20 49 66 20 79 6f |S..X#.X#| * If yo|
|00004e90| 75 20 68 61 76 65 20 72 | 61 6e 6c 69 62 28 31 29 |u have r|anlib(1)|
|00004ea0| 2c 20 64 65 66 69 6e 65 | 20 60 52 41 4e 4c 49 42 |, define| `RANLIB|
|00004eb0| 27 20 61 73 20 73 75 63 | 68 2e 20 20 49 66 20 79 |' as suc|h. If y|
|00004ec0| 6f 75 20 64 6f 6e 27 74 | 20 68 61 76 65 0a 58 23 |ou don't| have.X#|
|00004ed0| 20 20 20 69 74 2c 20 73 | 65 74 20 60 52 41 4e 4c | it, s|et `RANL|
|00004ee0| 49 42 27 20 74 6f 20 73 | 6f 6d 65 74 68 69 6e 67 |IB' to s|omething|
|00004ef0| 20 68 61 72 6d 6c 65 73 | 73 20 6c 69 6b 65 20 60 | harmles|s like `|
|00004f00| 40 3a 27 2c 20 6f 72 20 | 60 65 63 68 6f 27 0a 58 |@:', or |`echo'.X|
|00004f10| 23 20 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |# ------|--------|
|00004f20| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004f30| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004f40| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004f50| 2d 2d 2d 2d 2d 2d 0a 58 | 0a 58 23 20 44 45 46 53 |------.X|.X# DEFS|
|00004f60| 09 3d 09 2d 44 52 45 47 | 45 58 20 2d 44 4e 44 49 |.=.-DREG|EX -DNDI|
|00004f70| 52 20 2d 44 54 45 52 4d | 49 4f 09 23 20 74 79 70 |R -DTERM|IO.# typ|
|00004f80| 69 63 61 6c 20 53 79 73 | 74 65 6d 2d 56 20 64 65 |ical Sys|tem-V de|
|00004f90| 66 73 0a 58 23 20 44 45 | 46 53 09 3d 09 2d 44 76 |fs.X# DE|FS.=.-Dv|
|00004fa0| 6f 69 64 3d 69 6e 74 20 | 2d 44 52 49 4e 44 45 58 |oid=int |-DRINDEX|
|00004fb0| 20 2d 44 52 45 5f 45 58 | 45 43 20 2d 44 4e 44 49 | -DRE_EX|EC -DNDI|
|00004fc0| 52 09 23 20 74 79 70 69 | 63 61 6c 20 56 37 20 64 |R.# typi|cal V7 d|
|00004fd0| 65 66 73 0a 58 44 45 46 | 53 09 3d 09 2d 44 76 6f |efs.XDEF|S.=.-Dvo|
|00004fe0| 69 64 3d 69 6e 74 20 2d | 44 52 49 4e 44 45 58 20 |id=int -|DRINDEX |
|00004ff0| 2d 44 52 45 5f 45 58 45 | 43 20 2d 44 45 52 52 4c |-DRE_EXE|C -DERRL|
|00005000| 49 4e 45 42 55 46 09 23 | 20 42 53 44 20 64 65 66 |INEBUF.#| BSD def|
|00005010| 73 0a 58 0a 58 23 20 4c | 49 42 53 09 3d 09 2d 6c |s.X.X# L|IBS.=.-l|
|00005020| 6e 64 69 72 20 2d 6c 50 | 57 09 23 20 74 79 70 69 |ndir -lP|W.# typi|
|00005030| 63 61 6c 20 53 79 73 74 | 65 6d 2d 56 20 6c 69 62 |cal Syst|em-V lib|
|00005040| 73 0a 58 23 20 4c 49 42 | 53 09 3d 09 2d 6c 6e 64 |s.X# LIB|S.=.-lnd|
|00005050| 69 72 09 23 20 74 79 70 | 69 63 61 6c 20 56 37 20 |ir.# typ|ical V7 |
|00005060| 6c 69 62 73 0a 58 4c 49 | 42 53 09 3d 09 23 20 74 |libs.XLI|BS.=.# t|
|00005070| 79 70 69 63 61 6c 20 42 | 53 44 20 6c 69 62 73 20 |ypical B|SD libs |
|00005080| 28 6e 6f 6e 65 29 0a 58 | 0a 58 23 52 41 4e 4c 49 |(none).X|.X#RANLI|
|00005090| 42 09 3d 09 40 3a 09 23 | 20 73 79 73 74 65 6d 20 |B.=.@:.#| system |
|000050a0| 64 6f 65 73 6e 27 74 20 | 68 61 76 65 20 72 61 6e |doesn't |have ran|
|000050b0| 6c 69 62 20 28 53 79 73 | 2d 56 29 0a 58 52 41 4e |lib (Sys|-V).XRAN|
|000050c0| 4c 49 42 09 3d 09 72 61 | 6e 6c 69 62 09 23 20 73 |LIB.=.ra|nlib.# s|
|000050d0| 79 73 74 65 6d 20 68 61 | 73 20 72 61 6e 6c 69 62 |ystem ha|s ranlib|
|000050e0| 20 28 74 79 70 69 63 61 | 6c 6c 79 20 56 37 20 26 | (typica|lly V7 &|
|000050f0| 20 42 53 44 29 0a 58 0a | 58 23 20 2d 2d 2d 2d 2d | BSD).X.|X# -----|
|00005100| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005110| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005120| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005130| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 0a |--------|-------.|
|00005140| 58 23 20 43 6f 6d 70 69 | 6c 61 74 69 6f 6e 20 2f |X# Compi|lation /|
|00005150| 20 4c 6f 61 64 69 6e 67 | 20 6f 70 74 69 6f 6e 73 | Loading| options|
|00005160| 3a 0a 58 23 20 20 20 43 | 68 6f 6f 73 65 20 6f 70 |:.X# C|hoose op|
|00005170| 74 69 6f 6e 73 20 74 6f | 20 67 65 6e 65 72 61 74 |tions to| generat|
|00005180| 65 20 61 20 73 79 73 74 | 65 6d 20 61 73 20 61 6e |e a syst|em as an|
|00005190| 20 69 6e 73 74 61 6c 6c | 65 64 20 70 72 6f 64 75 | install|ed produ|
|000051a0| 63 74 2c 0a 58 23 20 20 | 20 66 6f 72 20 64 65 62 |ct,.X# | for deb|
|000051b0| 75 67 67 69 6e 67 2c 20 | 6f 72 20 66 6f 72 20 70 |ugging, |or for p|
|000051c0| 65 72 66 6f 72 6d 61 6e | 63 65 20 70 72 6f 66 69 |erforman|ce profi|
|000051d0| 6c 69 6e 67 2e 0a 58 23 | 20 2d 2d 2d 2d 2d 2d 2d |ling..X#| -------|
|000051e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000051f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005200| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005210| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 0a 58 0a |--------|-----.X.|
|00005220| 58 23 20 43 43 46 4c 47 | 09 3d 09 2d 67 20 2d 44 |X# CCFLG|.=.-g -D|
|00005230| 44 45 42 55 47 20 09 23 | 20 64 65 62 75 67 67 69 |DEBUG .#| debuggi|
|00005240| 6e 67 0a 58 23 20 43 43 | 46 4c 47 09 3d 09 2d 70 |ng.X# CC|FLG.=.-p|
|00005250| 09 23 20 70 72 6f 66 69 | 6c 69 6e 67 0a 58 43 43 |.# profi|ling.XCC|
|00005260| 46 4c 47 09 3d 09 2d 4f | 09 23 20 70 72 6f 64 75 |FLG.=.-O|.# produ|
|00005270| 63 74 69 6f 6e 0a 58 0a | 58 23 20 4c 44 46 4c 47 |ction.X.|X# LDFLG|
|00005280| 09 3d 09 2d 67 09 23 20 | 64 65 62 75 67 67 69 6e |.=.-g.# |debuggin|
|00005290| 67 0a 58 23 20 4c 44 46 | 4c 47 09 3d 09 2d 70 09 |g.X# LDF|LG.=.-p.|
|000052a0| 23 20 70 72 6f 66 69 6c | 69 6e 67 0a 58 4c 44 46 |# profil|ing.XLDF|
|000052b0| 4c 47 09 3d 09 23 20 70 | 72 6f 64 75 63 74 69 6f |LG.=.# p|roductio|
|000052c0| 6e 0a 58 0a 58 23 20 2d | 2d 2d 2d 2d 2d 2d 2d 2d |n.X.X# -|--------|
|000052d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000052e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000052f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005300| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 0a 58 0a 58 53 |--------|---.X.XS|
|00005310| 48 45 4c 4c 20 3d 09 09 | 2f 62 69 6e 2f 73 68 0a |HELL =..|/bin/sh.|
|00005320| 58 54 41 52 47 45 54 53 | 20 3d 09 6c 69 62 69 64 |XTARGETS| =.libid|
|00005330| 2e 61 20 24 28 50 52 4f | 47 53 29 0a 58 50 52 4f |.a $(PRO|GS).XPRO|
|00005340| 47 53 20 3d 09 09 6d 6b | 69 64 20 6c 69 64 20 69 |GS =..mk|id lid i|
|00005350| 64 78 20 66 69 64 20 24 | 28 4c 49 44 4c 49 4e 4b |dx fid $|(LIDLINK|
|00005360| 53 29 0a 58 44 45 53 54 | 49 4e 41 54 49 4f 4e 5f |S).XDEST|INATION_|
|00005370| 44 49 52 20 3d 20 2f 75 | 73 72 2f 6c 6f 63 61 6c |DIR = /u|sr/local|
|00005380| 0a 58 0a 58 4c 49 44 4c | 49 4e 4b 53 20 3d 20 09 |.X.XLIDL|INKS = .|
|00005390| 67 69 64 20 61 69 64 20 | 65 69 64 0a 58 43 46 4c |gid aid |eid.XCFL|
|000053a0| 41 47 53 20 3d 09 24 28 | 43 43 46 4c 47 29 20 2d |AGS =.$(|CCFLG) -|
|000053b0| 49 2e 20 24 28 44 45 46 | 53 29 0a 58 4c 44 46 4c |I. $(DEF|S).XLDFL|
|000053c0| 41 47 53 20 3d 09 24 28 | 4c 44 46 4c 47 29 20 6c |AGS =.$(|LDFLG) l|
|000053d0| 69 62 69 64 2e 61 20 24 | 28 4c 49 42 53 29 0a 58 |ibid.a $|(LIBS).X|
|000053e0| 0a 58 4f 46 49 4c 45 53 | 20 3d 09 69 6e 69 74 2e |.XOFILES| =.init.|
|000053f0| 6f 20 67 65 74 73 63 61 | 6e 2e 6f 20 73 63 61 6e |o getsca|n.o scan|
|00005400| 2d 63 2e 6f 20 73 63 61 | 6e 2d 61 73 6d 2e 6f 20 |-c.o sca|n-asm.o |
|00005410| 62 73 65 61 72 63 68 2e | 6f 20 68 61 73 68 2e 6f |bsearch.|o hash.o|
|00005420| 20 5c 0a 58 09 09 62 69 | 74 6f 70 73 2e 6f 20 62 | \.X..bi|tops.o b|
|00005430| 61 73 65 6e 61 6d 65 2e | 6f 20 67 65 74 73 30 2e |asename.|o gets0.|
|00005440| 6f 20 67 65 74 73 46 46 | 2e 6f 20 70 61 74 68 73 |o getsFF|.o paths|
|00005450| 2e 6f 20 6f 70 65 6e 73 | 72 63 2e 6f 20 5c 0a 58 |.o opens|rc.o \.X|
|00005460| 09 09 73 74 6f 69 2e 6f | 20 75 65 72 72 6f 72 2e |..stoi.o| uerror.|
|00005470| 6f 20 64 6f 63 75 6d 65 | 6e 74 2e 6f 20 62 69 74 |o docume|nt.o bit|
|00005480| 63 6f 75 6e 74 2e 6f 20 | 77 6d 61 74 63 68 2e 6f |count.o |wmatch.o|
|00005490| 20 62 69 74 73 76 65 63 | 2e 6f 20 5c 0a 58 09 09 | bitsvec|.o \.X..|
|000054a0| 74 74 79 2e 6f 20 62 7a | 65 72 6f 2e 6f 0a 58 0a |tty.o bz|ero.o.X.|
|000054b0| 58 23 20 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |X# -----|--------|
|000054c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000054d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000054e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000054f0| 2d 2d 2d 2d 2d 2d 2d 0a | 58 0a 58 61 6c 6c 3a 09 |-------.|X.Xall:.|
|00005500| 09 24 28 54 41 52 47 45 | 54 53 29 0a 58 0a 58 6c |.$(TARGE|TS).X.Xl|
|00005510| 69 62 69 64 2e 61 3a 09 | 24 28 4f 46 49 4c 45 53 |ibid.a:.|$(OFILES|
|00005520| 29 0a 58 09 09 61 72 20 | 72 76 20 24 40 20 24 3f |).X..ar |rv $@ $?|
|00005530| 0a 58 09 09 24 28 52 41 | 4e 4c 49 42 29 20 24 40 |.X..$(RA|NLIB) $@|
|00005540| 0a 58 0a 58 6d 6b 69 64 | 3a 09 09 6d 6b 69 64 2e |.X.Xmkid|:..mkid.|
|00005550| 6f 20 6c 69 62 69 64 2e | 61 0a 58 09 09 24 28 43 |o libid.|a.X..$(C|
|00005560| 43 29 20 2d 6f 20 24 40 | 20 24 40 2e 6f 20 24 28 |C) -o $@| $@.o $(|
|00005570| 4c 44 46 4c 41 47 53 29 | 0a 58 0a 58 66 69 64 3a |LDFLAGS)|.X.Xfid:|
|00005580| 09 09 66 69 64 2e 6f 20 | 6c 69 62 69 64 2e 61 0a |..fid.o |libid.a.|
|00005590| 58 09 09 24 28 43 43 29 | 20 2d 6f 20 24 40 20 24 |X..$(CC)| -o $@ $|
|000055a0| 40 2e 6f 20 24 28 4c 44 | 46 4c 41 47 53 29 0a 58 |@.o $(LD|FLAGS).X|
|000055b0| 0a 58 6c 69 64 3a 09 09 | 6c 69 64 2e 6f 20 6c 69 |.Xlid:..|lid.o li|
|000055c0| 62 69 64 2e 61 0a 58 09 | 09 24 28 43 43 29 20 2d |bid.a.X.|.$(CC) -|
|000055d0| 6f 20 24 40 20 24 40 2e | 6f 20 24 28 4c 44 46 4c |o $@ $@.|o $(LDFL|
|000055e0| 41 47 53 29 0a 58 0a 58 | 69 64 78 3a 09 09 69 64 |AGS).X.X|idx:..id|
|000055f0| 78 2e 6f 20 6c 69 62 69 | 64 2e 61 0a 58 09 09 24 |x.o libi|d.a.X..$|
|00005600| 28 43 43 29 20 2d 6f 20 | 24 40 20 24 40 2e 6f 20 |(CC) -o |$@ $@.o |
|00005610| 24 28 4c 44 46 4c 41 47 | 53 29 0a 58 0a 58 24 28 |$(LDFLAG|S).X.X$(|
|00005620| 4c 49 44 4c 49 4e 4b 53 | 29 3a 20 6c 69 64 0a 58 |LIDLINKS|): lid.X|
|00005630| 09 09 2d 2f 62 69 6e 2f | 72 6d 20 2d 66 20 24 40 |..-/bin/|rm -f $@|
|00005640| 0a 58 09 09 6c 6e 20 6c | 69 64 20 24 40 0a 58 0a |.X..ln l|id $@.X.|
|00005650| 58 69 6e 73 74 61 6c 6c | 3a 09 24 28 50 52 4f 47 |Xinstall|:.$(PROG|
|00005660| 53 29 0a 58 09 09 6d 76 | 20 24 28 50 52 4f 47 53 |S).X..mv| $(PROGS|
|00005670| 29 20 24 28 44 45 53 54 | 49 4e 41 54 49 4f 4e 5f |) $(DEST|INATION_|
|00005680| 44 49 52 29 0a 58 0a 58 | 63 6c 65 61 6e 3a 0a 58 |DIR).X.X|clean:.X|
|00005690| 09 09 72 6d 20 2d 66 20 | 24 28 54 41 52 47 45 54 |..rm -f |$(TARGET|
|000056a0| 53 29 20 2a 2e 6f 0a 58 | 0a 58 69 64 2e 74 61 72 |S) *.o.X|.Xid.tar|
|000056b0| 3a 0a 58 09 09 63 64 20 | 2e 2e 3b 20 74 61 72 20 |:.X..cd |..; tar |
|000056c0| 63 76 62 66 20 32 30 20 | 69 64 2f 69 64 2e 74 61 |cvbf 20 |id/id.ta|
|000056d0| 72 20 69 64 2f 2a 2e 5b | 63 68 31 2d 38 5d 20 69 |r id/*.[|ch1-8] i|
|000056e0| 64 2f 6d 61 6b 65 66 69 | 6c 65 20 69 64 2f 54 4f |d/makefi|le id/TO|
|000056f0| 44 4f 20 69 64 2f 54 55 | 54 4f 52 49 41 4c 0a 58 |DO id/TU|TORIAL.X|
|00005700| 0a 58 69 64 2e 74 61 72 | 2e 5a 3a 09 69 64 2e 74 |.Xid.tar|.Z:.id.t|
|00005710| 61 72 0a 58 09 09 63 6f | 6d 70 72 65 73 73 20 2d |ar.X..co|mpress -|
|00005720| 62 20 31 34 20 3c 69 64 | 2e 74 61 72 20 3e 69 64 |b 14 <id|.tar >id|
|00005730| 2e 74 61 72 2e 5a 0a 58 | 0a 58 69 64 2e 73 68 61 |.tar.Z.X|.Xid.sha|
|00005740| 72 3a 09 69 64 2e 73 68 | 61 72 2d 31 20 69 64 2e |r:.id.sh|ar-1 id.|
|00005750| 73 68 61 72 2d 32 20 69 | 64 2e 73 68 61 72 2d 33 |shar-2 i|d.shar-3|
|00005760| 0a 58 0a 58 69 64 2e 73 | 68 61 72 2d 31 3a 0a 58 |.X.Xid.s|har-1:.X|
|00005770| 09 09 73 68 61 72 20 24 | 28 53 48 41 52 46 4c 41 |..shar $|(SHARFLA|
|00005780| 47 53 29 20 54 55 54 4f | 52 49 41 4c 20 54 4f 44 |GS) TUTO|RIAL TOD|
|00005790| 4f 20 6d 61 6b 65 66 69 | 6c 65 20 2a 2e 68 20 2a |O makefi|le *.h *|
|000057a0| 2e 5b 31 2d 38 5d 20 3e | 24 40 0a 58 0a 58 69 64 |.[1-8] >|$@.X.Xid|
|000057b0| 2e 73 68 61 72 2d 32 3a | 0a 58 09 09 73 68 61 72 |.shar-2:|.X..shar|
|000057c0| 20 24 28 53 48 41 52 46 | 4c 41 47 53 29 20 5b 61 | $(SHARF|LAGS) [a|
|000057d0| 2d 6c 5d 2a 2e 63 20 3e | 24 40 0a 58 0a 58 69 64 |-l]*.c >|$@.X.Xid|
|000057e0| 2e 73 68 61 72 2d 33 3a | 0a 58 09 09 73 68 61 72 |.shar-3:|.X..shar|
|000057f0| 20 24 28 53 48 41 52 46 | 4c 41 47 53 29 20 5b 6d | $(SHARF|LAGS) [m|
|00005800| 2d 7a 5d 2a 2e 63 20 3e | 24 40 0a 53 48 41 52 5f |-z]*.c >|$@.SHAR_|
|00005810| 45 4f 46 0a 69 66 20 74 | 65 73 74 20 33 35 31 36 |EOF.if t|est 3516|
|00005820| 20 2d 6e 65 20 22 60 77 | 63 20 2d 63 20 3c 20 27 | -ne "`w|c -c < '|
|00005830| 6d 61 6b 65 66 69 6c 65 | 27 60 22 0a 74 68 65 6e |makefile|'`".then|
|00005840| 0a 09 65 63 68 6f 20 73 | 68 61 72 3a 20 65 72 72 |..echo s|har: err|
|00005850| 6f 72 20 74 72 61 6e 73 | 6d 69 74 74 69 6e 67 20 |or trans|mitting |
|00005860| 22 27 6d 61 6b 65 66 69 | 6c 65 27 22 20 27 28 73 |"'makefi|le'" '(s|
|00005870| 68 6f 75 6c 64 20 68 61 | 76 65 20 62 65 65 6e 20 |hould ha|ve been |
|00005880| 33 35 31 36 20 63 68 61 | 72 61 63 74 65 72 73 29 |3516 cha|racters)|
|00005890| 27 0a 66 69 0a 65 63 68 | 6f 20 73 68 61 72 3a 20 |'.fi.ech|o shar: |
|000058a0| 65 78 74 72 61 63 74 69 | 6e 67 20 22 27 62 69 74 |extracti|ng "'bit|
|000058b0| 6f 70 73 2e 68 27 22 20 | 27 28 35 33 37 20 63 68 |ops.h'" |'(537 ch|
|000058c0| 61 72 61 63 74 65 72 73 | 29 27 0a 73 65 64 20 27 |aracters|)'.sed '|
|000058d0| 73 2f 5e 58 2f 2f 27 20 | 3c 3c 20 5c 53 48 41 52 |s/^X//' |<< \SHAR|
|000058e0| 5f 45 4f 46 20 3e 20 27 | 62 69 74 6f 70 73 2e 68 |_EOF > '|bitops.h|
|000058f0| 27 0a 58 2f 2a 20 43 6f | 70 79 72 69 67 68 74 20 |'.X/* Co|pyright |
|00005900| 28 63 29 20 31 39 38 36 | 2c 20 47 72 65 67 20 4d |(c) 1986|, Greg M|
|00005910| 63 47 61 72 79 20 2a 2f | 0a 58 2f 2a 20 40 28 23 |cGary */|.X/* @(#|
|00005920| 29 62 69 74 6f 70 73 2e | 68 09 31 2e 31 20 38 36 |)bitops.|h.1.1 86|
|00005930| 2f 31 30 2f 30 39 20 2a | 2f 0a 58 0a 58 23 64 65 |/10/09 *|/.X.X#de|
|00005940| 66 69 6e 65 09 42 49 54 | 54 53 54 28 62 61 2c 20 |fine.BIT|TST(ba, |
|00005950| 62 6e 29 09 28 28 62 61 | 29 5b 28 62 6e 29 20 3e |bn).((ba|)[(bn) >|
|00005960| 3e 20 33 5d 20 26 20 20 | 28 31 20 3c 3c 20 28 28 |> 3] & |(1 << ((|
|00005970| 62 6e 29 20 26 20 30 78 | 30 37 29 29 29 0a 58 23 |bn) & 0x|07))).X#|
|00005980| 64 65 66 69 6e 65 09 42 | 49 54 53 45 54 28 62 61 |define.B|ITSET(ba|
|00005990| 2c 20 62 6e 29 09 28 28 | 62 61 29 5b 28 62 6e 29 |, bn).((|ba)[(bn)|
|000059a0| 20 3e 3e 20 33 5d 20 7c | 3d 20 28 31 20 3c 3c 20 | >> 3] ||= (1 << |
|000059b0| 28 28 62 6e 29 20 26 20 | 30 78 30 37 29 29 29 0a |((bn) & |0x07))).|
|000059c0| 58 23 64 65 66 69 6e 65 | 09 42 49 54 43 4c 52 28 |X#define|.BITCLR(|
|000059d0| 62 61 2c 20 62 6e 29 09 | 28 28 62 61 29 5b 28 62 |ba, bn).|((ba)[(b|
|000059e0| 6e 29 20 3e 3e 20 33 5d | 20 26 3d 7e 28 31 20 3c |n) >> 3]| &=~(1 <|
|000059f0| 3c 20 28 28 62 6e 29 20 | 26 20 30 78 30 37 29 29 |< ((bn) |& 0x07))|
|00005a00| 29 0a 58 23 64 65 66 69 | 6e 65 09 42 49 54 41 4e |).X#defi|ne.BITAN|
|00005a10| 44 28 62 61 2c 20 62 6e | 29 09 28 28 62 61 29 5b |D(ba, bn|).((ba)[|
|00005a20| 28 62 6e 29 20 3e 3e 20 | 33 5d 20 26 3d 20 28 31 |(bn) >> |3] &= (1|
|00005a30| 20 3c 3c 20 28 28 62 6e | 29 20 26 20 30 78 30 37 | << ((bn|) & 0x07|
|00005a40| 29 29 29 0a 58 23 64 65 | 66 69 6e 65 09 42 49 54 |))).X#de|fine.BIT|
|00005a50| 58 4f 52 28 62 61 2c 20 | 62 6e 29 09 28 28 62 61 |XOR(ba, |bn).((ba|
|00005a60| 29 5b 28 62 6e 29 20 3e | 3e 20 33 5d 20 5e 3d 20 |)[(bn) >|> 3] ^= |
|00005a70| 28 31 20 3c 3c 20 28 28 | 62 6e 29 20 26 20 30 78 |(1 << ((|bn) & 0x|
|00005a80| 30 37 29 29 29 0a 58 0a | 58 65 78 74 65 72 6e 20 |07))).X.|Xextern |
|00005a90| 63 68 61 72 20 2a 62 69 | 74 73 61 6e 64 28 29 3b |char *bi|tsand();|
|00005aa0| 0a 58 65 78 74 65 72 6e | 20 63 68 61 72 20 2a 62 |.Xextern| char *b|
|00005ab0| 69 74 73 63 6c 72 28 29 | 3b 0a 58 65 78 74 65 72 |itsclr()|;.Xexter|
|00005ac0| 6e 20 63 68 61 72 20 2a | 62 69 74 73 73 65 74 28 |n char *|bitsset(|
|00005ad0| 29 3b 0a 58 65 78 74 65 | 72 6e 20 63 68 61 72 20 |);.Xexte|rn char |
|00005ae0| 2a 62 69 74 73 78 6f 72 | 28 29 3b 0a 58 65 78 74 |*bitsxor|();.Xext|
|00005af0| 65 72 6e 20 69 6e 74 20 | 62 69 74 73 61 6e 79 28 |ern int |bitsany(|
|00005b00| 29 3b 0a 58 65 78 74 65 | 72 6e 20 69 6e 74 20 62 |);.Xexte|rn int b|
|00005b10| 69 74 73 74 73 74 28 29 | 3b 0a 53 48 41 52 5f 45 |itstst()|;.SHAR_E|
|00005b20| 4f 46 0a 69 66 20 74 65 | 73 74 20 35 33 37 20 2d |OF.if te|st 537 -|
|00005b30| 6e 65 20 22 60 77 63 20 | 2d 63 20 3c 20 27 62 69 |ne "`wc |-c < 'bi|
|00005b40| 74 6f 70 73 2e 68 27 60 | 22 0a 74 68 65 6e 0a 09 |tops.h'`|".then..|
|00005b50| 65 63 68 6f 20 73 68 61 | 72 3a 20 65 72 72 6f 72 |echo sha|r: error|
|00005b60| 20 74 72 61 6e 73 6d 69 | 74 74 69 6e 67 20 22 27 | transmi|tting "'|
|00005b70| 62 69 74 6f 70 73 2e 68 | 27 22 20 27 28 73 68 6f |bitops.h|'" '(sho|
|00005b80| 75 6c 64 20 68 61 76 65 | 20 62 65 65 6e 20 35 33 |uld have| been 53|
|00005b90| 37 20 63 68 61 72 61 63 | 74 65 72 73 29 27 0a 66 |7 charac|ters)'.f|
|00005ba0| 69 0a 65 63 68 6f 20 73 | 68 61 72 3a 20 65 78 74 |i.echo s|har: ext|
|00005bb0| 72 61 63 74 69 6e 67 20 | 22 27 62 6f 6f 6c 2e 68 |racting |"'bool.h|
|00005bc0| 27 22 20 27 28 31 32 38 | 20 63 68 61 72 61 63 74 |'" '(128| charact|
|00005bd0| 65 72 73 29 27 0a 73 65 | 64 20 27 73 2f 5e 58 2f |ers)'.se|d 's/^X/|
|00005be0| 2f 27 20 3c 3c 20 5c 53 | 48 41 52 5f 45 4f 46 20 |/' << \S|HAR_EOF |
|00005bf0| 3e 20 27 62 6f 6f 6c 2e | 68 27 0a 58 2f 2a 20 43 |> 'bool.|h'.X/* C|
|00005c00| 6f 70 79 72 69 67 68 74 | 20 28 63 29 20 31 39 38 |opyright| (c) 198|
|00005c10| 36 2c 20 47 72 65 67 20 | 4d 63 47 61 72 79 20 2a |6, Greg |McGary *|
|00005c20| 2f 0a 58 2f 2a 20 40 28 | 23 29 62 6f 6f 6c 2e 68 |/.X/* @(|#)bool.h|
|00005c30| 09 31 2e 31 20 38 36 2f | 31 30 2f 30 39 20 2a 2f |.1.1 86/|10/09 */|
|00005c40| 0a 58 0a 58 74 79 70 65 | 64 65 66 09 69 6e 74 09 |.X.Xtype|def.int.|
|00005c50| 62 6f 6f 6c 3b 0a 58 23 | 64 65 66 69 6e 65 09 54 |bool;.X#|define.T|
|00005c60| 52 55 45 09 28 30 3d 3d | 30 29 0a 58 23 64 65 66 |RUE.(0==|0).X#def|
|00005c70| 69 6e 65 09 46 41 4c 53 | 45 09 28 30 21 3d 30 29 |ine.FALS|E.(0!=0)|
|00005c80| 0a 53 48 41 52 5f 45 4f | 46 0a 69 66 20 74 65 73 |.SHAR_EO|F.if tes|
|00005c90| 74 20 31 32 38 20 2d 6e | 65 20 22 60 77 63 20 2d |t 128 -n|e "`wc -|
|00005ca0| 63 20 3c 20 27 62 6f 6f | 6c 2e 68 27 60 22 0a 74 |c < 'boo|l.h'`".t|
|00005cb0| 68 65 6e 0a 09 65 63 68 | 6f 20 73 68 61 72 3a 20 |hen..ech|o shar: |
|00005cc0| 65 72 72 6f 72 20 74 72 | 61 6e 73 6d 69 74 74 69 |error tr|ansmitti|
|00005cd0| 6e 67 20 22 27 62 6f 6f | 6c 2e 68 27 22 20 27 28 |ng "'boo|l.h'" '(|
|00005ce0| 73 68 6f 75 6c 64 20 68 | 61 76 65 20 62 65 65 6e |should h|ave been|
|00005cf0| 20 31 32 38 20 63 68 61 | 72 61 63 74 65 72 73 29 | 128 cha|racters)|
|00005d00| 27 0a 66 69 0a 65 63 68 | 6f 20 73 68 61 72 3a 20 |'.fi.ech|o shar: |
|00005d10| 65 78 74 72 61 63 74 69 | 6e 67 20 22 27 65 78 74 |extracti|ng "'ext|
|00005d20| 65 72 6e 2e 68 27 22 20 | 27 28 31 32 36 30 20 63 |ern.h'" |'(1260 c|
|00005d30| 68 61 72 61 63 74 65 72 | 73 29 27 0a 73 65 64 20 |haracter|s)'.sed |
|00005d40| 27 73 2f 5e 58 2f 2f 27 | 20 3c 3c 20 5c 53 48 41 |'s/^X//'| << \SHA|
|00005d50| 52 5f 45 4f 46 20 3e 20 | 27 65 78 74 65 72 6e 2e |R_EOF > |'extern.|
|00005d60| 68 27 0a 58 2f 2a 20 43 | 6f 70 79 72 69 67 68 74 |h'.X/* C|opyright|
|00005d70| 20 28 63 29 20 31 39 38 | 36 2c 20 47 72 65 67 20 | (c) 198|6, Greg |
|00005d80| 4d 63 47 61 72 79 20 2a | 2f 0a 58 2f 2a 20 40 28 |McGary *|/.X/* @(|
|00005d90| 23 29 65 78 74 65 72 6e | 2e 68 09 31 2e 31 20 38 |#)extern|.h.1.1 8|
|00005da0| 36 2f 31 30 2f 30 39 20 | 2a 2f 0a 58 0a 58 2f 2a |6/10/09 |*/.X.X/*|
|00005db0| 20 6d 69 73 63 65 6c 6c | 61 6e 65 6f 75 73 20 65 | miscell|aneous e|
|00005dc0| 78 74 65 72 6e 61 6c 20 | 64 65 63 6c 61 72 61 74 |xternal |declarat|
|00005dd0| 69 6f 6e 73 20 2a 2f 0a | 58 0a 58 65 78 74 65 72 |ions */.|X.Xexter|
|00005de0| 6e 20 46 49 4c 45 20 2a | 69 6e 69 74 49 44 28 29 |n FILE *|initID()|
|00005df0| 3b 0a 58 65 78 74 65 72 | 6e 20 46 49 4c 45 20 2a |;.Xexter|n FILE *|
|00005e00| 6f 70 65 6e 53 72 63 46 | 49 4c 45 28 29 3b 0a 58 |openSrcF|ILE();.X|
|00005e10| 65 78 74 65 72 6e 20 63 | 68 61 72 20 2a 28 2a 67 |extern c|har *(*g|
|00005e20| 65 74 53 63 61 6e 6e 65 | 72 28 29 29 28 29 3b 0a |etScanne|r())();.|
|00005e30| 58 65 78 74 65 72 6e 20 | 63 68 61 72 20 2a 62 61 |Xextern |char *ba|
|00005e40| 73 65 6e 61 6d 65 28 29 | 3b 0a 58 65 78 74 65 72 |sename()|;.Xexter|
|00005e50| 6e 20 63 68 61 72 20 2a | 62 73 65 61 72 63 68 28 |n char *|bsearch(|
|00005e60| 29 3b 0a 58 65 78 74 65 | 72 6e 20 63 68 61 72 20 |);.Xexte|rn char |
|00005e70| 2a 63 61 6c 6c 6f 63 28 | 29 3b 0a 58 65 78 74 65 |*calloc(|);.Xexte|
|00005e80| 72 6e 20 63 68 61 72 20 | 2a 63 6f 52 43 53 28 29 |rn char |*coRCS()|
|00005e90| 3b 0a 58 65 78 74 65 72 | 6e 20 63 68 61 72 20 2a |;.Xexter|n char *|
|00005ea0| 64 69 72 6e 61 6d 65 28 | 29 3b 0a 58 65 78 74 65 |dirname(|);.Xexte|
|00005eb0| 72 6e 20 63 68 61 72 20 | 2a 67 65 74 41 73 6d 49 |rn char |*getAsmI|
|00005ec0| 64 28 29 3b 0a 58 65 78 | 74 65 72 6e 20 63 68 61 |d();.Xex|tern cha|
|00005ed0| 72 20 2a 67 65 74 43 49 | 64 28 29 3b 0a 58 65 78 |r *getCI|d();.Xex|
|00005ee0| 74 65 72 6e 20 63 68 61 | 72 20 2a 67 65 74 44 69 |tern cha|r *getDi|
|00005ef0| 72 54 6f 4e 61 6d 65 28 | 29 3b 0a 58 65 78 74 65 |rToName(|);.Xexte|
|00005f00| 72 6e 20 63 68 61 72 20 | 2a 67 65 74 4c 61 6e 67 |rn char |*getLang|
|00005f10| 75 61 67 65 28 29 3b 0a | 58 65 78 74 65 72 6e 20 |uage();.|Xextern |
|00005f20| 63 68 61 72 20 2a 67 65 | 74 53 43 43 53 28 29 3b |char *ge|tSCCS();|
|00005f30| 0a 58 65 78 74 65 72 6e | 20 63 68 61 72 20 2a 67 |.Xextern| char *g|
|00005f40| 65 74 65 6e 76 28 29 3b | 0a 58 65 78 74 65 72 6e |etenv();|.Xextern|
|00005f50| 20 63 68 61 72 20 2a 68 | 61 73 68 53 65 61 72 63 | char *h|ashSearc|
|00005f60| 68 28 29 3b 0a 58 65 78 | 74 65 72 6e 20 63 68 61 |h();.Xex|tern cha|
|00005f70| 72 20 2a 69 6e 74 54 6f | 53 74 72 28 29 3b 0a 58 |r *intTo|Str();.X|
|00005f80| 65 78 74 65 72 6e 20 63 | 68 61 72 20 2a 6d 61 6c |extern c|har *mal|
|00005f90| 6c 6f 63 28 29 3b 0a 58 | 65 78 74 65 72 6e 20 63 |loc();.X|extern c|
|00005fa0| 68 61 72 20 2a 72 65 67 | 63 6d 70 28 29 3b 0a 58 |har *reg|cmp();.X|
|00005fb0| 65 78 74 65 72 6e 20 63 | 68 61 72 20 2a 72 65 67 |extern c|har *reg|
|00005fc0| 65 78 28 29 3b 0a 58 65 | 78 74 65 72 6e 20 63 68 |ex();.Xe|xtern ch|
|00005fd0| 61 72 20 2a 72 6f 6f 74 | 4e 61 6d 65 28 29 3b 0a |ar *root|Name();.|
|00005fe0| 58 65 78 74 65 72 6e 20 | 63 68 61 72 20 2a 73 6b |Xextern |char *sk|
|00005ff0| 69 70 4a 75 6e 6b 28 29 | 3b 0a 58 65 78 74 65 72 |ipJunk()|;.Xexter|
|00006000| 6e 20 63 68 61 72 20 2a | 73 70 61 6e 50 61 74 68 |n char *|spanPath|
|00006010| 28 29 3b 0a 58 65 78 74 | 65 72 6e 20 63 68 61 72 |();.Xext|ern char|
|00006020| 20 2a 73 75 66 66 4e 61 | 6d 65 28 29 3b 0a 58 65 | *suffNa|me();.Xe|
|00006030| 78 74 65 72 6e 20 63 68 | 61 72 20 2a 75 65 72 72 |xtern ch|ar *uerr|
|00006040| 6f 72 28 29 3b 0a 58 65 | 78 74 65 72 6e 20 69 6e |or();.Xe|xtern in|
|00006050| 74 20 62 69 74 43 6f 75 | 6e 74 28 29 3b 0a 58 65 |t bitCou|nt();.Xe|
|00006060| 78 74 65 72 6e 20 69 6e | 74 20 62 69 74 73 43 6f |xtern in|t bitsCo|
|00006070| 75 6e 74 28 29 3b 0a 58 | 65 78 74 65 72 6e 20 69 |unt();.X|extern i|
|00006080| 6e 74 20 62 69 74 73 54 | 6f 56 65 63 28 29 3b 0a |nt bitsT|oVec();.|
|00006090| 58 65 78 74 65 72 6e 20 | 69 6e 74 20 63 61 6e 43 |Xextern |int canC|
|000060a0| 72 75 6e 63 68 28 29 3b | 0a 58 65 78 74 65 72 6e |runch();|.Xextern|
|000060b0| 20 69 6e 74 20 64 74 6f | 69 28 29 3b 0a 58 65 78 | int dto|i();.Xex|
|000060c0| 74 65 72 6e 20 69 6e 74 | 20 66 67 65 74 73 30 28 |tern int| fgets0(|
|000060d0| 29 3b 0a 58 65 78 74 65 | 72 6e 20 69 6e 74 20 67 |);.Xexte|rn int g|
|000060e0| 65 74 73 46 46 28 29 3b | 0a 58 65 78 74 65 72 6e |etsFF();|.Xextern|
|000060f0| 20 69 6e 74 20 68 31 73 | 74 72 28 29 3b 0a 58 65 | int h1s|tr();.Xe|
|00006100| 78 74 65 72 6e 20 69 6e | 74 20 68 32 73 74 72 28 |xtern in|t h2str(|
|00006110| 29 3b 0a 58 65 78 74 65 | 72 6e 20 69 6e 74 20 73 |);.Xexte|rn int s|
|00006120| 74 72 54 6f 49 6e 74 28 | 29 3b 0a 58 65 78 74 65 |trToInt(|);.Xexte|
|00006130| 72 6e 20 69 6e 74 20 6f | 74 6f 69 28 29 3b 0a 58 |rn int o|toi();.X|
|00006140| 65 78 74 65 72 6e 20 69 | 6e 74 20 72 61 64 69 78 |extern i|nt radix|
|00006150| 28 29 3b 0a 58 65 78 74 | 65 72 6e 20 69 6e 74 20 |();.Xext|ern int |
|00006160| 73 74 6f 69 28 29 3b 0a | 58 65 78 74 65 72 6e 20 |stoi();.|Xextern |
|00006170| 69 6e 74 20 76 65 63 54 | 6f 42 69 74 73 28 29 3b |int vecT|oBits();|
|00006180| 0a 58 65 78 74 65 72 6e | 20 69 6e 74 20 77 6f 72 |.Xextern| int wor|
|00006190| 64 4d 61 74 63 68 28 29 | 3b 0a 58 65 78 74 65 72 |dMatch()|;.Xexter|
|000061a0| 6e 20 69 6e 74 20 78 74 | 6f 69 28 29 3b 0a 58 65 |n int xt|oi();.Xe|
|000061b0| 78 74 65 72 6e 20 76 6f | 69 64 20 62 7a 65 72 6f |xtern vo|id bzero|
|000061c0| 28 29 3b 0a 58 65 78 74 | 65 72 6e 20 76 6f 69 64 |();.Xext|ern void|
|000061d0| 20 64 6f 63 75 6d 65 6e | 74 28 29 3b 0a 58 65 78 | documen|t();.Xex|
|000061e0| 74 65 72 6e 20 76 6f 69 | 64 20 66 69 6c 65 72 72 |tern voi|d filerr|
|000061f0| 28 29 3b 0a 58 65 78 74 | 65 72 6e 20 76 6f 69 64 |();.Xext|ern void|
|00006200| 20 73 65 74 41 73 6d 41 | 72 67 73 28 29 3b 0a 58 | setAsmA|rgs();.X|
|00006210| 65 78 74 65 72 6e 20 76 | 6f 69 64 20 73 65 74 43 |extern v|oid setC|
|00006220| 41 72 67 73 28 29 3b 0a | 58 65 78 74 65 72 6e 20 |Args();.|Xextern |
|00006230| 76 6f 69 64 20 73 65 74 | 53 63 61 6e 41 72 67 73 |void set|ScanArgs|
|00006240| 28 29 3b 0a 58 65 78 74 | 65 72 6e 20 76 6f 69 64 |();.Xext|ern void|
|00006250| 20 73 6b 69 70 46 46 28 | 29 3b 0a 58 0a 58 65 78 | skipFF(|);.X.Xex|
|00006260| 74 65 72 6e 20 63 68 61 | 72 20 2a 4d 79 4e 61 6d |tern cha|r *MyNam|
|00006270| 65 3b 0a 58 65 78 74 65 | 72 6e 20 69 6e 74 20 65 |e;.Xexte|rn int e|
|00006280| 72 72 6e 6f 3b 0a 53 48 | 41 52 5f 45 4f 46 0a 69 |rrno;.SH|AR_EOF.i|
|00006290| 66 20 74 65 73 74 20 31 | 32 36 30 20 2d 6e 65 20 |f test 1|260 -ne |
|000062a0| 22 60 77 63 20 2d 63 20 | 3c 20 27 65 78 74 65 72 |"`wc -c |< 'exter|
|000062b0| 6e 2e 68 27 60 22 0a 74 | 68 65 6e 0a 09 65 63 68 |n.h'`".t|hen..ech|
|000062c0| 6f 20 73 68 61 72 3a 20 | 65 72 72 6f 72 20 74 72 |o shar: |error tr|
|000062d0| 61 6e 73 6d 69 74 74 69 | 6e 67 20 22 27 65 78 74 |ansmitti|ng "'ext|
|000062e0| 65 72 6e 2e 68 27 22 20 | 27 28 73 68 6f 75 6c 64 |ern.h'" |'(should|
|000062f0| 20 68 61 76 65 20 62 65 | 65 6e 20 31 32 36 30 20 | have be|en 1260 |
|00006300| 63 68 61 72 61 63 74 65 | 72 73 29 27 0a 66 69 0a |characte|rs)'.fi.|
|00006310| 65 63 68 6f 20 73 68 61 | 72 3a 20 65 78 74 72 61 |echo sha|r: extra|
|00006320| 63 74 69 6e 67 20 22 27 | 69 64 2e 68 27 22 20 27 |cting "'|id.h'" '|
|00006330| 28 31 37 31 36 20 63 68 | 61 72 61 63 74 65 72 73 |(1716 ch|aracters|
|00006340| 29 27 0a 73 65 64 20 27 | 73 2f 5e 58 2f 2f 27 20 |)'.sed '|s/^X//' |
|00006350| 3c 3c 20 5c 53 48 41 52 | 5f 45 4f 46 20 3e 20 27 |<< \SHAR|_EOF > '|
|00006360| 69 64 2e 68 27 0a 58 2f | 2a 20 43 6f 70 79 72 69 |id.h'.X/|* Copyri|
|00006370| 67 68 74 20 28 63 29 20 | 31 39 38 36 2c 20 47 72 |ght (c) |1986, Gr|
|00006380| 65 67 20 4d 63 47 61 72 | 79 20 2a 2f 0a 58 2f 2a |eg McGar|y */.X/*|
|00006390| 20 40 28 23 29 69 64 2e | 68 09 31 2e 31 20 38 36 | @(#)id.|h.1.1 86|
|000063a0| 2f 31 30 2f 30 39 20 2a | 2f 0a 58 0a 58 23 64 65 |/10/09 *|/.X.X#de|
|000063b0| 66 69 6e 65 09 49 44 46 | 49 4c 45 09 22 49 44 22 |fine.IDF|ILE."ID"|
|000063c0| 0a 58 0a 58 73 74 72 75 | 63 74 20 69 64 68 65 61 |.X.Xstru|ct idhea|
|000063d0| 64 20 7b 0a 58 09 63 68 | 61 72 09 69 64 68 5f 6d |d {.X.ch|ar.idh_m|
|000063e0| 61 67 69 63 5b 32 5d 3b | 09 2f 2a 20 6d 61 67 69 |agic[2];|./* magi|
|000063f0| 63 20 6e 75 6d 62 65 72 | 20 2a 2f 0a 58 23 64 65 |c number| */.X#de|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.