home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume30 / rc / part07 < prev    next >
SHell self-extracting ARchive  |  1992-05-30  |  4.6 KB

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: part07

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert SHell self-extracting ARchive (archive/shar) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file ASCII text default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/329 Shell Archive Format default
100% detectItEasy Format: plain text[LF] default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 4e 65 77 73 67 72 6f 75 | 70 73 3a 20 63 6f 6d 70 |Newsgrou|ps: comp|
|00000010| 2e 73 6f 75 72 63 65 73 | 2e 6d 69 73 63 0a 46 72 |.sources|.misc.Fr|
|00000020| 6f 6d 3a 20 62 79 72 6f | 6e 40 61 72 63 68 6f 6e |om: byro|n@archon|
|00000030| 65 2e 74 61 6d 75 2e 65 | 64 75 20 28 42 79 72 6f |e.tamu.e|du (Byro|
|00000040| 6e 20 52 61 6b 69 74 7a | 69 73 29 0a 53 75 62 6a |n Rakitz|is).Subj|
|00000050| 65 63 74 3a 20 20 76 33 | 30 69 30 33 30 3a 20 20 |ect: v3|0i030: |
|00000060| 72 63 20 2d 20 41 20 50 | 6c 61 6e 20 39 20 73 68 |rc - A P|lan 9 sh|
|00000070| 65 6c 6c 20 72 65 69 6d | 70 6c 65 6d 65 6e 74 61 |ell reim|plementa|
|00000080| 74 69 6f 6e 2c 20 76 31 | 2e 34 2c 20 50 61 72 74 |tion, v1|.4, Part|
|00000090| 30 37 2f 30 37 0a 4d 65 | 73 73 61 67 65 2d 49 44 |07/07.Me|ssage-ID|
|000000a0| 3a 20 3c 31 39 39 32 4d | 61 79 33 30 2e 30 33 31 |: <1992M|ay30.031|
|000000b0| 37 34 35 2e 35 36 38 34 | 40 73 70 61 72 6b 79 2e |745.5684|@sparky.|
|000000c0| 69 6d 64 2e 73 74 65 72 | 6c 69 6e 67 2e 63 6f 6d |imd.ster|ling.com|
|000000d0| 3e 0a 58 2d 4d 64 34 2d | 53 69 67 6e 61 74 75 72 |>.X-Md4-|Signatur|
|000000e0| 65 3a 20 38 37 63 32 37 | 66 63 66 66 37 37 33 34 |e: 87c27|fcff7734|
|000000f0| 30 38 34 65 62 63 35 61 | 31 65 39 35 39 32 33 61 |084ebc5a|1e95923a|
|00000100| 34 61 61 0a 44 61 74 65 | 3a 20 53 61 74 2c 20 33 |4aa.Date|: Sat, 3|
|00000110| 30 20 4d 61 79 20 31 39 | 39 32 20 30 33 3a 31 37 |0 May 19|92 03:17|
|00000120| 3a 34 35 20 47 4d 54 0a | 41 70 70 72 6f 76 65 64 |:45 GMT.|Approved|
|00000130| 3a 20 6b 65 6e 74 40 73 | 70 61 72 6b 79 2e 69 6d |: kent@s|parky.im|
|00000140| 64 2e 73 74 65 72 6c 69 | 6e 67 2e 63 6f 6d 0a 0a |d.sterli|ng.com..|
|00000150| 53 75 62 6d 69 74 74 65 | 64 2d 62 79 3a 20 62 79 |Submitte|d-by: by|
|00000160| 72 6f 6e 40 61 72 63 68 | 6f 6e 65 2e 74 61 6d 75 |ron@arch|one.tamu|
|00000170| 2e 65 64 75 20 28 42 79 | 72 6f 6e 20 52 61 6b 69 |.edu (By|ron Raki|
|00000180| 74 7a 69 73 29 0a 50 6f | 73 74 69 6e 67 2d 6e 75 |tzis).Po|sting-nu|
|00000190| 6d 62 65 72 3a 20 56 6f | 6c 75 6d 65 20 33 30 2c |mber: Vo|lume 30,|
|000001a0| 20 49 73 73 75 65 20 33 | 30 0a 41 72 63 68 69 76 | Issue 3|0.Archiv|
|000001b0| 65 2d 6e 61 6d 65 3a 20 | 72 63 2f 70 61 72 74 30 |e-name: |rc/part0|
|000001c0| 37 0a 45 6e 76 69 72 6f | 6e 6d 65 6e 74 3a 20 55 |7.Enviro|nment: U|
|000001d0| 4e 49 58 0a 53 75 70 65 | 72 73 65 64 65 73 3a 20 |NIX.Supe|rsedes: |
|000001e0| 72 63 3a 20 56 6f 6c 75 | 6d 65 20 32 33 2c 20 49 |rc: Volu|me 23, I|
|000001f0| 73 73 75 65 20 36 31 2d | 36 36 0a 0a 23 21 20 2f |ssue 61-|66..#! /|
|00000200| 62 69 6e 2f 73 68 0a 23 | 20 54 68 69 73 20 69 73 |bin/sh.#| This is|
|00000210| 20 61 20 73 68 65 6c 6c | 20 61 72 63 68 69 76 65 | a shell| archive|
|00000220| 2e 20 20 52 65 6d 6f 76 | 65 20 61 6e 79 74 68 69 |. Remov|e anythi|
|00000230| 6e 67 20 62 65 66 6f 72 | 65 20 74 68 69 73 20 6c |ng befor|e this l|
|00000240| 69 6e 65 2c 20 74 68 65 | 6e 20 66 65 65 64 20 69 |ine, the|n feed i|
|00000250| 74 0a 23 20 69 6e 74 6f | 20 61 20 73 68 65 6c 6c |t.# into| a shell|
|00000260| 20 76 69 61 20 22 73 68 | 20 66 69 6c 65 22 20 6f | via "sh| file" o|
|00000270| 72 20 73 69 6d 69 6c 61 | 72 2e 20 20 54 6f 20 6f |r simila|r. To o|
|00000280| 76 65 72 77 72 69 74 65 | 20 65 78 69 73 74 69 6e |verwrite| existin|
|00000290| 67 20 66 69 6c 65 73 2c | 0a 23 20 74 79 70 65 20 |g files,|.# type |
|000002a0| 22 73 68 20 66 69 6c 65 | 20 2d 63 22 2e 0a 23 20 |"sh file| -c"..# |
|000002b0| 54 68 65 20 74 6f 6f 6c | 20 74 68 61 74 20 67 65 |The tool| that ge|
|000002c0| 6e 65 72 61 74 65 64 20 | 74 68 69 73 20 61 70 70 |nerated |this app|
|000002d0| 65 61 72 65 64 20 69 6e | 20 74 68 65 20 63 6f 6d |eared in| the com|
|000002e0| 70 2e 73 6f 75 72 63 65 | 73 2e 75 6e 69 78 20 6e |p.source|s.unix n|
|000002f0| 65 77 73 67 72 6f 75 70 | 3b 0a 23 20 73 65 6e 64 |ewsgroup|;.# send|
|00000300| 20 6d 61 69 6c 20 74 6f | 20 63 6f 6d 70 2d 73 6f | mail to| comp-so|
|00000310| 75 72 63 65 73 2d 75 6e | 69 78 40 75 75 6e 65 74 |urces-un|ix@uunet|
|00000320| 2e 75 75 2e 6e 65 74 20 | 69 66 20 79 6f 75 20 77 |.uu.net |if you w|
|00000330| 61 6e 74 20 74 68 61 74 | 20 74 6f 6f 6c 2e 0a 23 |ant that| tool..#|
|00000340| 20 43 6f 6e 74 65 6e 74 | 73 3a 20 20 61 64 64 6f | Content|s: addo|
|00000350| 6e 2e 68 20 63 70 70 20 | 68 69 73 74 6f 72 79 2f |n.h cpp |history/|
|00000360| 4d 61 6b 65 66 69 6c 65 | 0a 23 20 57 72 61 70 70 |Makefile|.# Wrapp|
|00000370| 65 64 20 62 79 20 6b 65 | 6e 74 40 73 70 61 72 6b |ed by ke|nt@spark|
|00000380| 79 20 6f 6e 20 46 72 69 | 20 4d 61 79 20 32 39 20 |y on Fri| May 29 |
|00000390| 32 30 3a 35 35 3a 32 35 | 20 31 39 39 32 0a 50 41 |20:55:25| 1992.PA|
|000003a0| 54 48 3d 2f 62 69 6e 3a | 2f 75 73 72 2f 62 69 6e |TH=/bin:|/usr/bin|
|000003b0| 3a 2f 75 73 72 2f 75 63 | 62 20 3b 20 65 78 70 6f |:/usr/uc|b ; expo|
|000003c0| 72 74 20 50 41 54 48 0a | 65 63 68 6f 20 49 66 20 |rt PATH.|echo If |
|000003d0| 74 68 69 73 20 61 72 63 | 68 69 76 65 20 69 73 20 |this arc|hive is |
|000003e0| 63 6f 6d 70 6c 65 74 65 | 2c 20 79 6f 75 20 77 69 |complete|, you wi|
|000003f0| 6c 6c 20 73 65 65 20 74 | 68 65 20 66 6f 6c 6c 6f |ll see t|he follo|
|00000400| 77 69 6e 67 20 6d 65 73 | 73 61 67 65 3a 0a 65 63 |wing mes|sage:.ec|
|00000410| 68 6f 20 27 20 20 20 20 | 20 20 20 20 20 20 22 73 |ho ' | "s|
|00000420| 68 61 72 3a 20 45 6e 64 | 20 6f 66 20 61 72 63 68 |har: End| of arch|
|00000430| 69 76 65 20 37 20 28 6f | 66 20 37 29 2e 22 27 0a |ive 7 (o|f 7)."'.|
|00000440| 69 66 20 74 65 73 74 20 | 2d 66 20 27 61 64 64 6f |if test |-f 'addo|
|00000450| 6e 2e 68 27 20 2d 61 20 | 22 24 7b 31 7d 22 20 21 |n.h' -a |"${1}" !|
|00000460| 3d 20 22 2d 63 22 20 3b | 20 74 68 65 6e 20 0a 20 |= "-c" ;| then . |
|00000470| 20 65 63 68 6f 20 73 68 | 61 72 3a 20 57 69 6c 6c | echo sh|ar: Will|
|00000480| 20 6e 6f 74 20 63 6c 6f | 62 62 65 72 20 65 78 69 | not clo|bber exi|
|00000490| 73 74 69 6e 67 20 66 69 | 6c 65 20 5c 22 27 61 64 |sting fi|le \"'ad|
|000004a0| 64 6f 6e 2e 68 27 5c 22 | 0a 65 6c 73 65 0a 20 20 |don.h'\"|.else. |
|000004b0| 65 63 68 6f 20 73 68 61 | 72 3a 20 45 78 74 72 61 |echo sha|r: Extra|
|000004c0| 63 74 69 6e 67 20 5c 22 | 27 61 64 64 6f 6e 2e 68 |cting \"|'addon.h|
|000004d0| 27 5c 22 20 5c 28 38 34 | 37 20 63 68 61 72 61 63 |'\" \(84|7 charac|
|000004e0| 74 65 72 73 5c 29 0a 20 | 20 73 65 64 20 22 73 2f |ters\). | sed "s/|
|000004f0| 5e 58 2f 2f 22 20 3e 27 | 61 64 64 6f 6e 2e 68 27 |^X//" >'|addon.h'|
|00000500| 20 3c 3c 27 45 4e 44 5f | 4f 46 5f 46 49 4c 45 27 | <<'END_|OF_FILE'|
|00000510| 0a 58 2f 2a 0a 58 20 20 | 20 54 68 69 73 20 66 69 |.X/*.X | This fi|
|00000520| 6c 65 20 69 73 20 74 68 | 65 20 69 6e 74 65 72 66 |le is th|e interf|
|00000530| 61 63 65 20 74 6f 20 74 | 68 65 20 72 65 73 74 20 |ace to t|he rest |
|00000540| 6f 66 20 72 63 20 66 6f | 72 20 61 6e 79 20 6c 6f |of rc fo|r any lo|
|00000550| 63 61 6c 6c 79 0a 58 20 | 20 20 64 65 66 69 6e 65 |cally.X | define|
|00000560| 64 20 61 64 64 6f 6e 20 | 62 75 69 6c 74 69 6e 73 |d addon |builtins|
|00000570| 2e 20 20 42 79 20 64 65 | 66 61 75 6c 74 20 74 68 |. By de|fault th|
|00000580| 65 72 65 20 61 72 65 20 | 6e 6f 6e 65 2e 0a 58 20 |ere are |none..X |
|00000590| 20 20 54 68 65 20 69 6e | 74 65 72 66 61 63 65 20 | The in|terface |
|000005a0| 63 6f 6e 73 69 73 74 73 | 20 6f 66 20 74 68 65 20 |consists| of the |
|000005b0| 66 6f 6c 6c 6f 77 69 6e | 67 20 6d 61 63 72 6f 2e |followin|g macro.|
|000005c0| 0a 58 20 20 0a 58 20 20 | 20 41 44 44 4f 4e 53 09 |.X .X | ADDONS.|
|000005d0| 41 20 63 6f 6d 6d 61 2d | 73 65 70 61 72 61 74 65 |A comma-|separate|
|000005e0| 64 20 6c 69 73 74 20 6f | 66 20 70 61 69 72 73 20 |d list o|f pairs |
|000005f0| 6f 66 20 66 75 6e 63 74 | 69 6f 6e 20 70 6f 69 6e |of funct|ion poin|
|00000600| 74 65 72 73 0a 58 09 09 | 61 6e 64 20 73 74 72 69 |ters.X..|and stri|
|00000610| 6e 67 20 6c 69 74 65 72 | 61 6c 73 2e 0a 58 20 20 |ng liter|als..X |
|00000620| 0a 58 20 20 20 54 68 65 | 20 61 64 64 6f 6e 20 66 |.X The| addon f|
|00000630| 75 6e 63 74 69 6f 6e 73 | 20 6d 75 73 74 20 61 6c |unctions| must al|
|00000640| 73 6f 20 68 61 76 65 20 | 70 72 6f 70 65 72 20 70 |so have |proper p|
|00000650| 72 6f 74 6f 74 79 70 65 | 73 20 69 6e 20 74 68 69 |rototype|s in thi|
|00000660| 73 20 66 69 6c 65 2e 0a | 58 20 20 20 54 68 65 20 |s file..|X The |
|00000670| 62 75 69 6c 74 69 6e 73 | 20 61 6c 6c 20 68 61 76 |builtins| all hav|
|00000680| 65 20 74 68 65 20 66 6f | 72 6d 3a 0a 58 20 20 0a |e the fo|rm:.X .|
|00000690| 58 09 76 6f 69 64 20 62 | 5f 4e 41 4d 45 28 63 68 |X.void b|_NAME(ch|
|000006a0| 61 72 20 2a 2a 61 76 29 | 3b 0a 58 20 20 0a 58 20 |ar **av)|;.X .X |
|000006b0| 20 20 42 75 69 6c 74 69 | 6e 73 20 72 65 70 6f 72 | Builti|ns repor|
|000006c0| 74 20 74 68 65 69 72 20 | 65 78 69 74 20 73 74 61 |t their |exit sta|
|000006d0| 74 75 73 20 75 73 69 6e | 67 20 73 65 74 28 54 52 |tus usin|g set(TR|
|000006e0| 55 45 29 20 6f 72 20 73 | 65 74 28 46 41 4c 53 45 |UE) or s|et(FALSE|
|000006f0| 29 2e 0a 58 20 20 0a 58 | 20 20 20 45 78 61 6d 70 |)..X .X| Examp|
|00000700| 6c 65 3a 0a 58 20 20 0a | 58 09 23 64 65 66 69 6e |le:.X .|X.#defin|
|00000710| 65 20 41 44 44 4f 4e 53 | 09 7b 20 62 5f 74 65 73 |e ADDONS|.{ b_tes|
|00000720| 74 2c 20 22 74 65 73 74 | 22 20 7d 2c 0a 58 09 65 |t, "test|" },.X.e|
|00000730| 78 74 65 72 6e 20 76 6f | 69 64 20 62 5f 74 65 73 |xtern vo|id b_tes|
|00000740| 74 28 63 68 61 72 20 2a | 2a 61 76 29 3b 0a 58 2a |t(char *|*av);.X*|
|00000750| 2f 0a 58 0a 58 23 64 65 | 66 69 6e 65 20 41 44 44 |/.X.X#de|fine ADD|
|00000760| 4f 4e 53 09 09 2f 2a 20 | 6e 6f 20 61 64 64 6f 6e |ONS../* |no addon|
|00000770| 73 20 62 79 20 64 65 66 | 61 75 6c 74 20 2a 2f 0a |s by def|ault */.|
|00000780| 58 0a 58 23 69 66 64 65 | 66 09 44 57 53 0a 58 0a |X.X#ifde|f.DWS.X.|
|00000790| 58 2f 2a 0a 58 20 20 20 | 54 68 69 73 20 69 73 20 |X/*.X |This is |
|000007a0| 77 68 61 74 20 44 61 76 | 69 44 20 53 61 6e 64 65 |what Dav|iD Sande|
|000007b0| 72 73 6f 6e 20 28 64 77 | 73 40 63 73 2e 77 69 73 |rson (dw|s@cs.wis|
|000007c0| 63 2e 65 64 75 29 20 75 | 73 65 73 2e 0a 58 2a 2f |c.edu) u|ses..X*/|
|000007d0| 0a 58 0a 58 23 75 6e 64 | 65 66 09 41 44 44 4f 4e |.X.X#und|ef.ADDON|
|000007e0| 53 0a 58 23 64 65 66 69 | 6e 65 20 41 44 44 4f 4e |S.X#defi|ne ADDON|
|000007f0| 53 09 7b 20 62 5f 61 63 | 63 65 73 73 2c 09 22 61 |S.{ b_ac|cess,."a|
|00000800| 63 63 65 73 73 22 20 7d | 2c 5c 0a 58 09 09 7b 20 |ccess" }|,\.X..{ |
|00000810| 62 5f 74 65 73 74 2c 20 | 09 22 74 65 73 74 22 20 |b_test, |."test" |
|00000820| 7d 2c 5c 0a 58 09 09 7b | 20 62 5f 74 65 73 74 2c |},\.X..{| b_test,|
|00000830| 09 22 5b 22 20 7d 2c 0a | 58 0a 58 65 78 74 65 72 |."[" },.|X.Xexter|
|00000840| 6e 20 76 6f 69 64 20 62 | 5f 61 63 63 65 73 73 28 |n void b|_access(|
|00000850| 63 68 61 72 20 2a 2a 61 | 76 29 3b 0a 58 65 78 74 |char **a|v);.Xext|
|00000860| 65 72 6e 20 76 6f 69 64 | 20 62 5f 74 65 73 74 28 |ern void| b_test(|
|00000870| 63 68 61 72 20 2a 2a 61 | 76 29 3b 0a 58 0a 58 23 |char **a|v);.X.X#|
|00000880| 65 6e 64 69 66 0a 45 4e | 44 5f 4f 46 5f 46 49 4c |endif.EN|D_OF_FIL|
|00000890| 45 0a 20 20 69 66 20 74 | 65 73 74 20 38 34 37 20 |E. if t|est 847 |
|000008a0| 2d 6e 65 20 60 77 63 20 | 2d 63 20 3c 27 61 64 64 |-ne `wc |-c <'add|
|000008b0| 6f 6e 2e 68 27 60 3b 20 | 74 68 65 6e 0a 20 20 20 |on.h'`; |then. |
|000008c0| 20 65 63 68 6f 20 73 68 | 61 72 3a 20 5c 22 27 61 | echo sh|ar: \"'a|
|000008d0| 64 64 6f 6e 2e 68 27 5c | 22 20 75 6e 70 61 63 6b |ddon.h'\|" unpack|
|000008e0| 65 64 20 77 69 74 68 20 | 77 72 6f 6e 67 20 73 69 |ed with |wrong si|
|000008f0| 7a 65 21 0a 20 20 66 69 | 0a 20 20 23 20 65 6e 64 |ze!. fi|. # end|
|00000900| 20 6f 66 20 27 61 64 64 | 6f 6e 2e 68 27 0a 66 69 | of 'add|on.h'.fi|
|00000910| 0a 69 66 20 74 65 73 74 | 20 2d 66 20 27 63 70 70 |.if test| -f 'cpp|
|00000920| 27 20 2d 61 20 22 24 7b | 31 7d 22 20 21 3d 20 22 |' -a "${|1}" != "|
|00000930| 2d 63 22 20 3b 20 74 68 | 65 6e 20 0a 20 20 65 63 |-c" ; th|en . ec|
|00000940| 68 6f 20 73 68 61 72 3a | 20 57 69 6c 6c 20 6e 6f |ho shar:| Will no|
|00000950| 74 20 63 6c 6f 62 62 65 | 72 20 65 78 69 73 74 69 |t clobbe|r existi|
|00000960| 6e 67 20 66 69 6c 65 20 | 5c 22 27 63 70 70 27 5c |ng file |\"'cpp'\|
|00000970| 22 0a 65 6c 73 65 0a 20 | 20 65 63 68 6f 20 73 68 |".else. | echo sh|
|00000980| 61 72 3a 20 45 78 74 72 | 61 63 74 69 6e 67 20 5c |ar: Extr|acting \|
|00000990| 22 27 63 70 70 27 5c 22 | 20 5c 28 31 30 33 35 20 |"'cpp'\"| \(1035 |
|000009a0| 63 68 61 72 61 63 74 65 | 72 73 5c 29 0a 20 20 73 |characte|rs\). s|
|000009b0| 65 64 20 22 73 2f 5e 58 | 2f 2f 22 20 3e 27 63 70 |ed "s/^X|//" >'cp|
|000009c0| 70 27 20 3c 3c 27 45 4e | 44 5f 4f 46 5f 46 49 4c |p' <<'EN|D_OF_FIL|
|000009d0| 45 27 0a 58 23 21 2f 62 | 69 6e 2f 73 68 0a 58 0a |E'.X#!/b|in/sh.X.|
|000009e0| 58 23 20 40 28 23 29 20 | 63 70 70 2e 73 68 20 31 |X# @(#) |cpp.sh 1|
|000009f0| 2e 33 20 39 32 2f 30 31 | 2f 31 35 20 32 31 3a 35 |.3 92/01|/15 21:5|
|00000a00| 33 3a 32 32 0a 58 0a 58 | 23 20 55 6e 70 72 6f 74 |3:22.X.X|# Unprot|
|00000a10| 6f 74 79 70 65 69 6e 67 | 20 70 72 65 70 72 6f 63 |otypeing| preproc|
|00000a20| 65 73 73 6f 72 20 66 6f | 72 20 70 72 65 2d 41 4e |essor fo|r pre-AN|
|00000a30| 53 49 20 43 20 63 6f 6d | 70 69 6c 65 72 73 2e 20 |SI C com|pilers. |
|00000a40| 20 4f 6e 20 73 6f 6d 65 | 20 73 79 73 74 65 6d 73 | On some| systems|
|00000a50| 2c 0a 58 23 20 74 68 69 | 73 20 73 63 72 69 70 74 |,.X# thi|s script|
|00000a60| 20 63 61 6e 20 62 65 20 | 61 73 20 73 69 6d 70 6c | can be |as simpl|
|00000a70| 65 20 61 73 3a 0a 58 23 | 0a 58 23 09 2f 6c 69 62 |e as:.X#|.X#./lib|
|00000a80| 2f 63 70 70 20 22 24 40 | 22 20 7c 20 75 6e 70 72 |/cpp "$@|" | unpr|
|00000a90| 6f 74 6f 0a 58 23 0a 58 | 23 20 48 6f 77 65 76 65 |oto.X#.X|# Howeve|
|00000aa0| 72 2c 20 73 6f 6d 65 20 | 63 63 28 31 29 20 64 72 |r, some |cc(1) dr|
|00000ab0| 69 76 65 72 73 20 73 70 | 65 63 69 66 79 20 6f 75 |ivers sp|ecify ou|
|00000ac0| 74 70 75 74 20 66 69 6c | 65 20 6e 61 6d 65 73 20 |tput fil|e names |
|00000ad0| 6f 6e 20 74 68 65 0a 58 | 23 20 70 72 65 70 72 6f |on the.X|# prepro|
|00000ae0| 63 65 73 73 6f 72 20 63 | 6f 6d 6d 61 6e 64 20 6c |cessor c|ommand l|
|00000af0| 69 6e 65 2c 20 73 6f 20 | 74 68 69 73 20 73 68 65 |ine, so |this she|
|00000b00| 6c 6c 20 73 63 72 69 70 | 74 20 6d 75 73 74 20 62 |ll scrip|t must b|
|00000b10| 65 20 70 72 65 70 61 72 | 65 64 20 74 6f 0a 58 23 |e prepar|ed to.X#|
|00000b20| 20 69 6e 74 65 72 63 65 | 70 74 20 74 68 65 6d 2e | interce|pt them.|
|00000b30| 20 20 44 65 70 65 6e 64 | 69 6e 67 20 6f 6e 20 74 | Depend|ing on t|
|00000b40| 68 65 20 64 72 69 76 65 | 72 20 70 72 6f 67 72 61 |he drive|r progra|
|00000b50| 6d 2c 20 74 68 65 20 63 | 70 70 20 6f 70 74 69 6f |m, the c|pp optio|
|00000b60| 6e 73 20 6d 61 79 0a 58 | 23 20 65 76 65 6e 20 67 |ns may.X|# even g|
|00000b70| 6f 20 62 65 66 6f 72 65 | 20 6f 72 20 61 66 74 65 |o before| or afte|
|00000b80| 72 20 74 68 65 20 66 69 | 6c 65 20 6e 61 6d 65 20 |r the fi|le name |
|00000b90| 61 72 67 75 6d 65 6e 74 | 28 73 29 2e 20 54 68 65 |argument|(s). The|
|00000ba0| 20 73 63 72 69 70 74 20 | 62 65 6c 6f 77 0a 58 23 | script |below.X#|
|00000bb0| 20 74 72 69 65 73 20 74 | 6f 20 74 61 63 6b 6c 65 | tries t|o tackle|
|00000bc0| 20 61 6c 6c 20 74 68 65 | 73 65 20 63 61 73 65 73 | all the|se cases|
|00000bd0| 2e 0a 58 23 0a 58 23 20 | 59 6f 75 20 6d 61 79 20 |..X#.X# |You may |
|00000be0| 77 61 6e 74 20 74 6f 20 | 61 64 64 20 2d 49 70 61 |want to |add -Ipa|
|00000bf0| 74 68 5f 74 6f 5f 73 74 | 64 61 72 67 2e 68 5f 66 |th_to_st|darg.h_f|
|00000c00| 69 6c 65 2c 20 2d 44 76 | 6f 69 64 3d 2c 20 2d 44 |ile, -Dv|oid=, -D|
|00000c10| 76 6f 6c 61 74 69 6c 65 | 3d 2c 20 0a 58 23 20 61 |volatile|=, .X# a|
|00000c20| 6e 64 20 65 76 65 6e 20 | 2d 44 5f 5f 53 54 44 43 |nd even |-D__STDC|
|00000c30| 5f 5f 2e 0a 58 0a 58 23 | 23 20 28 54 68 69 73 20 |__..X.X#|# (This |
|00000c40| 69 73 20 77 68 61 74 20 | 49 20 75 73 65 64 20 77 |is what |I used w|
|00000c50| 68 69 6c 65 20 74 65 73 | 74 69 6e 67 20 77 69 74 |hile tes|ting wit|
|00000c60| 68 20 74 68 65 20 53 75 | 6e 4f 53 20 43 20 63 6f |h the Su|nOS C co|
|00000c70| 6d 70 69 6c 65 72 2e 0a | 58 23 23 20 41 6c 73 6f |mpiler..|X## Also|
|00000c80| 2c 20 49 20 61 64 64 65 | 64 20 22 2d 51 70 61 74 |, I adde|d "-Qpat|
|00000c90| 68 20 2e 22 20 74 6f 20 | 43 46 4c 41 47 53 20 73 |h ." to |CFLAGS s|
|00000ca0| 6f 20 74 68 61 74 20 63 | 70 70 20 77 6f 75 6c 64 |o that c|pp would|
|00000cb0| 20 62 65 0a 58 23 23 20 | 72 75 6e 20 6f 75 74 20 | be.X## |run out |
|00000cc0| 6f 66 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 64 |of the c|urrent d|
|00000cd0| 69 72 65 63 74 6f 72 79 | 2e 20 2d 2d 2d 20 42 79 |irectory|. --- By|
|00000ce0| 72 6f 6e 29 0a 58 63 70 | 70 5f 61 72 67 73 3d 22 |ron).Xcp|p_args="|
|00000cf0| 2d 49 2f 75 2f 62 79 72 | 6f 6e 2f 6c 69 62 2f 73 |-I/u/byr|on/lib/s|
|00000d00| 75 6e 34 20 2d 44 63 6f | 6e 73 74 3d 20 2d 44 76 |un4 -Dco|nst= -Dv|
|00000d10| 6f 6c 61 74 69 6c 65 3d | 22 0a 58 0a 58 77 68 69 |olatile=|".X.Xwhi|
|00000d20| 6c 65 20 3a 0a 58 64 6f | 0a 58 09 63 61 73 65 20 |le :.Xdo|.X.case |
|00000d30| 24 31 20 69 6e 0a 58 09 | 22 22 29 09 62 72 65 61 |$1 in.X.|"").brea|
|00000d40| 6b 3b 3b 0a 58 09 2d 2a | 29 09 63 70 70 5f 61 72 |k;;.X.-*|).cpp_ar|
|00000d50| 67 73 3d 22 24 63 70 70 | 5f 61 72 67 73 20 24 31 |gs="$cpp|_args $1|
|00000d60| 22 3b 3b 0a 58 09 20 2a | 29 09 63 70 70 5f 61 72 |";;.X. *|).cpp_ar|
|00000d70| 67 73 3d 22 24 63 70 70 | 5f 61 72 67 73 20 24 31 |gs="$cpp|_args $1|
|00000d80| 22 0a 58 09 09 63 61 73 | 65 20 24 32 20 69 6e 0a |".X..cas|e $2 in.|
|00000d90| 58 09 09 22 22 7c 2d 2a | 29 09 3b 3b 0a 58 09 09 |X..""|-*|).;;.X..|
|00000da0| 20 20 20 20 2a 29 09 65 | 78 65 63 20 31 3e 20 24 | *).e|xec 1> $|
|00000db0| 32 20 7c 7c 20 65 78 69 | 74 20 31 3b 20 73 68 69 |2 || exi|t 1; shi|
|00000dc0| 66 74 3b 3b 0a 58 09 09 | 65 73 61 63 3b 3b 0a 58 |ft;;.X..|esac;;.X|
|00000dd0| 09 65 73 61 63 0a 58 09 | 73 68 69 66 74 0a 58 64 |.esac.X.|shift.Xd|
|00000de0| 6f 6e 65 0a 58 0a 58 2f | 6c 69 62 2f 63 70 70 20 |one.X.X/|lib/cpp |
|00000df0| 24 63 70 70 5f 61 72 67 | 73 20 7c 20 75 6e 70 72 |$cpp_arg|s | unpr|
|00000e00| 6f 74 6f 0a 45 4e 44 5f | 4f 46 5f 46 49 4c 45 0a |oto.END_|OF_FILE.|
|00000e10| 20 20 69 66 20 74 65 73 | 74 20 31 30 33 35 20 2d | if tes|t 1035 -|
|00000e20| 6e 65 20 60 77 63 20 2d | 63 20 3c 27 63 70 70 27 |ne `wc -|c <'cpp'|
|00000e30| 60 3b 20 74 68 65 6e 0a | 20 20 20 20 65 63 68 6f |`; then.| echo|
|00000e40| 20 73 68 61 72 3a 20 5c | 22 27 63 70 70 27 5c 22 | shar: \|"'cpp'\"|
|00000e50| 20 75 6e 70 61 63 6b 65 | 64 20 77 69 74 68 20 77 | unpacke|d with w|
|00000e60| 72 6f 6e 67 20 73 69 7a | 65 21 0a 20 20 66 69 0a |rong siz|e!. fi.|
|00000e70| 20 20 23 20 65 6e 64 20 | 6f 66 20 27 63 70 70 27 | # end |of 'cpp'|
|00000e80| 0a 66 69 0a 69 66 20 74 | 65 73 74 20 2d 66 20 27 |.fi.if t|est -f '|
|00000e90| 68 69 73 74 6f 72 79 2f | 4d 61 6b 65 66 69 6c 65 |history/|Makefile|
|00000ea0| 27 20 2d 61 20 22 24 7b | 31 7d 22 20 21 3d 20 22 |' -a "${|1}" != "|
|00000eb0| 2d 63 22 20 3b 20 74 68 | 65 6e 20 0a 20 20 65 63 |-c" ; th|en . ec|
|00000ec0| 68 6f 20 73 68 61 72 3a | 20 57 69 6c 6c 20 6e 6f |ho shar:| Will no|
|00000ed0| 74 20 63 6c 6f 62 62 65 | 72 20 65 78 69 73 74 69 |t clobbe|r existi|
|00000ee0| 6e 67 20 66 69 6c 65 20 | 5c 22 27 68 69 73 74 6f |ng file |\"'histo|
|00000ef0| 72 79 2f 4d 61 6b 65 66 | 69 6c 65 27 5c 22 0a 65 |ry/Makef|ile'\".e|
|00000f00| 6c 73 65 0a 20 20 65 63 | 68 6f 20 73 68 61 72 3a |lse. ec|ho shar:|
|00000f10| 20 45 78 74 72 61 63 74 | 69 6e 67 20 5c 22 27 68 | Extract|ing \"'h|
|00000f20| 69 73 74 6f 72 79 2f 4d | 61 6b 65 66 69 6c 65 27 |istory/M|akefile'|
|00000f30| 5c 22 20 5c 28 31 39 37 | 20 63 68 61 72 61 63 74 |\" \(197| charact|
|00000f40| 65 72 73 5c 29 0a 20 20 | 73 65 64 20 22 73 2f 5e |ers\). |sed "s/^|
|00000f50| 58 2f 2f 22 20 3e 27 68 | 69 73 74 6f 72 79 2f 4d |X//" >'h|istory/M|
|00000f60| 61 6b 65 66 69 6c 65 27 | 20 3c 3c 27 45 4e 44 5f |akefile'| <<'END_|
|00000f70| 4f 46 5f 46 49 4c 45 27 | 0a 58 43 43 3d 67 63 63 |OF_FILE'|.XCC=gcc|
|00000f80| 20 2d 67 20 2d 4f 0a 58 | 0a 58 68 69 73 74 6f 72 | -g -O.X|.Xhistor|
|00000f90| 79 3a 20 68 69 73 74 6f | 72 79 2e 63 0a 58 09 24 |y: histo|ry.c.X.$|
|00000fa0| 28 43 43 29 20 2d 6f 20 | 68 69 73 74 6f 72 79 20 |(CC) -o |history |
|00000fb0| 68 69 73 74 6f 72 79 2e | 63 0a 58 09 40 65 63 68 |history.|c.X.@ech|
|00000fc0| 6f 20 27 4e 6f 77 20 69 | 6e 73 74 61 6c 6c 20 22 |o 'Now i|nstall "|
|00000fd0| 68 69 73 74 6f 72 79 22 | 20 61 73 20 2d 2c 20 2d |history"| as -, -|
|00000fe0| 2d 2c 20 2d 70 20 61 6e | 64 20 2d 2d 70 20 69 6e |-, -p an|d --p in|
|00000ff0| 20 79 6f 75 72 20 62 69 | 6e 20 64 69 72 65 63 74 | your bi|n direct|
|00001000| 6f 72 79 27 0a 58 09 40 | 65 63 68 6f 20 27 28 66 |ory'.X.@|echo '(f|
|00001010| 6f 72 20 65 78 61 6d 70 | 6c 65 2c 20 62 79 20 6d |or examp|le, by m|
|00001020| 61 6b 69 6e 67 20 74 68 | 65 6d 20 6c 69 6e 6b 73 |aking th|em links|
|00001030| 20 74 6f 20 74 68 65 20 | 73 61 6d 65 20 66 69 6c | to the |same fil|
|00001040| 65 29 27 0a 45 4e 44 5f | 4f 46 5f 46 49 4c 45 0a |e)'.END_|OF_FILE.|
|00001050| 20 20 69 66 20 74 65 73 | 74 20 31 39 37 20 2d 6e | if tes|t 197 -n|
|00001060| 65 20 60 77 63 20 2d 63 | 20 3c 27 68 69 73 74 6f |e `wc -c| <'histo|
|00001070| 72 79 2f 4d 61 6b 65 66 | 69 6c 65 27 60 3b 20 74 |ry/Makef|ile'`; t|
|00001080| 68 65 6e 0a 20 20 20 20 | 65 63 68 6f 20 73 68 61 |hen. |echo sha|
|00001090| 72 3a 20 5c 22 27 68 69 | 73 74 6f 72 79 2f 4d 61 |r: \"'hi|story/Ma|
|000010a0| 6b 65 66 69 6c 65 27 5c | 22 20 75 6e 70 61 63 6b |kefile'\|" unpack|
|000010b0| 65 64 20 77 69 74 68 20 | 77 72 6f 6e 67 20 73 69 |ed with |wrong si|
|000010c0| 7a 65 21 0a 20 20 66 69 | 0a 20 20 23 20 65 6e 64 |ze!. fi|. # end|
|000010d0| 20 6f 66 20 27 68 69 73 | 74 6f 72 79 2f 4d 61 6b | of 'his|tory/Mak|
|000010e0| 65 66 69 6c 65 27 0a 66 | 69 0a 65 63 68 6f 20 73 |efile'.f|i.echo s|
|000010f0| 68 61 72 3a 20 45 6e 64 | 20 6f 66 20 61 72 63 68 |har: End| of arch|
|00001100| 69 76 65 20 37 20 5c 28 | 6f 66 20 37 5c 29 2e 0a |ive 7 \(|of 7\)..|
|00001110| 63 70 20 2f 64 65 76 2f | 6e 75 6c 6c 20 61 72 6b |cp /dev/|null ark|
|00001120| 37 69 73 64 6f 6e 65 0a | 4d 49 53 53 49 4e 47 3d |7isdone.|MISSING=|
|00001130| 22 22 0a 66 6f 72 20 49 | 20 69 6e 20 31 20 32 20 |"".for I| in 1 2 |
|00001140| 33 20 34 20 35 20 36 20 | 37 20 3b 20 64 6f 0a 20 |3 4 5 6 |7 ; do. |
|00001150| 20 20 20 69 66 20 74 65 | 73 74 20 21 20 2d 66 20 | if te|st ! -f |
|00001160| 61 72 6b 24 7b 49 7d 69 | 73 64 6f 6e 65 20 3b 20 |ark${I}i|sdone ; |
|00001170| 74 68 65 6e 0a 09 4d 49 | 53 53 49 4e 47 3d 22 24 |then..MI|SSING="$|
|00001180| 7b 4d 49 53 53 49 4e 47 | 7d 20 24 7b 49 7d 22 0a |{MISSING|} ${I}".|
|00001190| 20 20 20 20 66 69 0a 64 | 6f 6e 65 0a 69 66 20 74 | fi.d|one.if t|
|000011a0| 65 73 74 20 22 24 7b 4d | 49 53 53 49 4e 47 7d 22 |est "${M|ISSING}"|
|000011b0| 20 3d 20 22 22 20 3b 20 | 74 68 65 6e 0a 20 20 20 | = "" ; |then. |
|000011c0| 20 65 63 68 6f 20 59 6f | 75 20 68 61 76 65 20 75 | echo Yo|u have u|
|000011d0| 6e 70 61 63 6b 65 64 20 | 61 6c 6c 20 37 20 61 72 |npacked |all 7 ar|
|000011e0| 63 68 69 76 65 73 2e 0a | 20 20 20 20 72 6d 20 2d |chives..| rm -|
|000011f0| 66 20 61 72 6b 5b 31 2d | 39 5d 69 73 64 6f 6e 65 |f ark[1-|9]isdone|
|00001200| 0a 65 6c 73 65 0a 20 20 | 20 20 65 63 68 6f 20 59 |.else. | echo Y|
|00001210| 6f 75 20 73 74 69 6c 6c | 20 6d 75 73 74 20 75 6e |ou still| must un|
|00001220| 70 61 63 6b 20 74 68 65 | 20 66 6f 6c 6c 6f 77 69 |pack the| followi|
|00001230| 6e 67 20 61 72 63 68 69 | 76 65 73 3a 0a 20 20 20 |ng archi|ves:. |
|00001240| 20 65 63 68 6f 20 22 20 | 20 20 20 20 20 20 20 22 | echo " | "|
|00001250| 20 24 7b 4d 49 53 53 49 | 4e 47 7d 0a 66 69 0a 65 | ${MISSI|NG}.fi.e|
|00001260| 78 69 74 20 30 0a 65 78 | 69 74 20 30 20 23 20 4a |xit 0.ex|it 0 # J|
|00001270| 75 73 74 20 69 6e 20 63 | 61 73 65 2e 2e 2e 0a |ust in c|ase.... |
+--------+-------------------------+-------------------------+--------+--------+