home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: Tape Archive
(archive/tar).
You can browse this item here: genman.tar
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Tape Archive (archive/tar)
| magic
| Supported |
100%
| file
| tar archive
| default
| |
99%
| file
| tar archive (V7), file genman/, mode 755 , uid 52750 , gid 13 , size 0 , seconds 4644135227
| default
| |
98%
| file
| data
| default
| |
100%
| TrID
| Sybase iAnywhere database files
| default (weak)
| |
100%
| lsar
| Tar
| default
| |
100%
| gt2
| TAR Archiv gefunden (Auflistung ist deaktiviert)
| default
| |
100%
| disktype
| Pre-POSIX tar archive
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 67 65 6e 6d 61 6e 2f 00 | 00 00 00 00 00 00 00 00 |genman/.|........|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000060| 00 00 00 00 20 20 20 37 | 35 35 20 00 20 35 32 37 |.... 7|55 . 527|
|00000070| 35 30 20 00 20 20 20 20 | 31 33 20 00 20 20 20 20 |50 . |13 . |
|00000080| 20 20 20 20 20 20 30 20 | 20 34 36 34 34 31 33 35 | 0 | 4644135|
|00000090| 32 32 37 20 20 20 35 33 | 34 33 00 20 00 00 00 00 |227 53|43. ....|
|000000a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000100| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000120| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000200| 67 65 6e 6d 61 6e 2f 53 | 68 61 72 46 69 6c 65 2e |genman/S|harFile.|
|00000210| 48 65 61 64 65 72 73 00 | 00 00 00 00 00 00 00 00 |Headers.|........|
|00000220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000260| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 35 32 37 |.... 6|44 . 527|
|00000270| 35 30 20 00 20 20 20 20 | 31 33 20 00 20 20 20 20 |50 . |13 . |
|00000280| 20 20 20 31 37 33 35 20 | 20 34 36 34 34 31 33 35 | 1735 | 4644135|
|00000290| 32 32 37 20 20 31 30 34 | 33 30 00 20 00 00 00 00 |227 104|30. ....|
|000002a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000300| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000320| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000400| 3d 3d 3d 20 67 65 6e 6d | 61 6e 2e 73 68 61 72 20 |=== genm|an.shar |
|00000410| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000420| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 0a 46 72 6f 6d 20 73 |========|=.From s|
|00000430| 70 61 72 6b 79 66 73 21 | 61 64 73 2e 63 6f 6d 21 |parkyfs!|ads.com!|
|00000440| 64 65 63 77 72 6c 21 75 | 63 62 76 61 78 21 75 63 |decwrl!u|cbvax!uc|
|00000450| 73 64 21 75 73 63 21 63 | 73 2e 75 74 65 78 61 73 |sd!usc!c|s.utexas|
|00000460| 2e 65 64 75 21 75 75 6e | 65 74 21 61 6c 6c 62 65 |.edu!uun|et!allbe|
|00000470| 72 79 20 54 75 65 20 4a | 75 6c 20 20 33 20 30 38 |ry Tue J|ul 3 08|
|00000480| 3a 32 34 3a 33 35 20 50 | 44 54 20 31 39 39 30 0a |:24:35 P|DT 1990.|
|00000490| 0a 50 6f 73 74 69 6e 67 | 2d 6e 75 6d 62 65 72 3a |.Posting|-number:|
|000004a0| 20 56 6f 6c 75 6d 65 20 | 31 33 2c 20 49 73 73 75 | Volume |13, Issu|
|000004b0| 65 20 37 38 0a 53 75 62 | 6d 69 74 74 65 64 2d 62 |e 78.Sub|mitted-b|
|000004c0| 79 3a 20 62 62 79 40 65 | 70 6f 63 68 73 79 73 2e |y: bby@e|pochsys.|
|000004d0| 55 55 43 50 20 28 42 6f | 62 20 4d 61 73 74 6f 72 |UUCP (Bo|b Mastor|
|000004e0| 73 29 0a 41 72 63 68 69 | 76 65 2d 6e 61 6d 65 3a |s).Archi|ve-name:|
|000004f0| 20 67 65 6e 6d 61 6e 2d | 32 2e 30 2f 70 61 72 74 | genman-|2.0/part|
|00000500| 30 31 0a 0a 54 68 65 20 | 70 75 72 70 6f 73 65 20 |01..The |purpose |
|00000510| 6f 66 20 74 68 65 20 67 | 65 6e 6d 61 6e 2e 61 77 |of the g|enman.aw|
|00000520| 6b 20 70 72 6f 67 72 61 | 6d 20 69 73 20 74 6f 20 |k progra|m is to |
|00000530| 67 65 6e 65 72 61 74 65 | 20 6d 61 6e 20 70 61 67 |generate| man pag|
|00000540| 65 20 73 74 79 6c 65 0a | 64 6f 63 75 6d 65 6e 74 |e style.|document|
|00000550| 61 74 69 6f 6e 20 61 62 | 6f 75 74 20 61 20 43 2b |ation ab|out a C+|
|00000560| 2b 20 63 6c 61 73 73 20 | 66 72 6f 6d 20 69 74 73 |+ class |from its|
|00000570| 20 69 6e 63 6c 75 64 65 | 20 66 69 6c 65 2e 0a 0a | include| file...|
|00000580| 46 65 61 74 75 72 65 73 | 20 69 6e 63 6c 75 64 65 |Features| include|
|00000590| 3a 0a 09 61 29 20 4f 75 | 74 70 75 74 73 20 65 69 |:..a) Ou|tputs ei|
|000005a0| 74 68 65 72 20 74 72 6f | 66 66 20 2d 6d 61 6e 20 |ther tro|ff -man |
|000005b0| 69 6e 70 75 74 20 64 61 | 74 61 20 6f 72 20 70 6c |input da|ta or pl|
|000005c0| 61 69 6e 20 68 75 6d 61 | 6e 20 72 65 61 64 61 62 |ain huma|n readab|
|000005d0| 6c 65 20 74 65 78 74 2e | 0a 09 62 29 20 54 68 65 |le text.|..b) The|
|000005e0| 20 6f 75 74 70 75 74 20 | 69 73 20 69 6e 20 61 20 | output |is in a |
|000005f0| 63 6f 6e 73 69 73 74 65 | 6e 74 20 66 6f 72 6d 61 |consiste|nt forma|
|00000600| 74 20 77 68 69 63 68 20 | 69 73 20 69 6e 64 65 70 |t which |is indep|
|00000610| 65 6e 64 65 6e 74 20 6f | 66 0a 09 20 20 20 74 68 |endent o|f.. th|
|00000620| 65 20 66 6f 72 6d 61 74 | 20 75 73 65 64 20 69 6e |e format| used in|
|00000630| 20 74 68 65 20 69 6e 63 | 6c 75 64 65 20 66 69 6c | the inc|lude fil|
|00000640| 65 2e 0a 09 63 29 20 52 | 65 71 75 69 72 65 73 20 |e...c) R|equires |
|00000650| 6d 69 6e 69 6d 61 6c 20 | 6d 6f 64 69 66 69 63 61 |minimal |modifica|
|00000660| 74 69 6f 6e 73 20 74 6f | 20 69 6e 63 6c 75 64 65 |tions to| include|
|00000670| 20 66 69 6c 65 73 2e 0a | 09 64 29 20 41 64 64 69 | files..|.d) Addi|
|00000680| 6e 67 20 73 75 70 70 6f | 72 74 20 66 6f 72 20 6f |ng suppo|rt for o|
|00000690| 74 68 65 72 20 74 79 70 | 65 73 20 6f 66 20 6f 75 |ther typ|es of ou|
|000006a0| 74 70 75 74 20 73 75 63 | 68 20 61 73 20 6c 61 74 |tput suc|h as lat|
|000006b0| 65 78 0a 09 20 20 20 6f | 72 20 48 50 20 4c 61 73 |ex.. o|r HP Las|
|000006c0| 65 72 4a 65 74 20 49 49 | 20 73 68 6f 75 6c 64 20 |erJet II| should |
|000006d0| 62 65 20 73 69 6d 70 6c | 65 2e 0a 09 65 29 20 50 |be simpl|e...e) P|
|000006e0| 75 62 6c 69 63 20 64 6f | 6d 61 69 6e 2e 0a 2d 2d |ublic do|main..--|
|000006f0| 2d 0a 42 6f 62 20 4d 61 | 73 74 6f 72 73 0a 45 70 |-.Bob Ma|stors.Ep|
|00000700| 6f 63 68 20 53 79 73 74 | 65 6d 73 2c 20 57 65 73 |och Syst|ems, Wes|
|00000710| 74 62 6f 72 6f 20 4d 41 | 20 28 35 30 38 29 20 38 |tboro MA| (508) 8|
|00000720| 33 36 2d 34 37 31 31 20 | 78 33 31 37 20 28 76 6f |36-4711 |x317 (vo|
|00000730| 69 63 65 29 0a 20 20 20 | 20 20 20 20 20 20 20 20 |ice). | |
|00000740| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000750| 28 35 30 38 29 20 38 33 | 36 2d 34 38 38 34 20 28 |(508) 83|6-4884 (|
|00000760| 66 61 78 29 0a 7b 75 75 | 6e 65 74 21 65 70 6f 63 |fax).{uu|net!epoc|
|00000770| 68 73 79 73 2c 20 68 61 | 72 76 61 72 64 21 63 66 |hsys, ha|rvard!cf|
|00000780| 69 73 75 6e 21 70 61 6c | 6c 61 64 69 75 6d 7d 21 |isun!pal|ladium}!|
|00000790| 6d 61 73 74 6f 72 73 0a | 0a 2d 2d 2d 2d 2d 2d 2d |mastors.|.-------|
|000007a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000007b0| 2d 2d 2d 2d 2d 2d 2d 63 | 75 74 20 68 65 72 65 2d |-------c|ut here-|
|000007c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000007d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 0a 00 00 00 |--------|----....|
|000007e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000800| 67 65 6e 6d 61 6e 2f 52 | 45 41 44 4d 45 00 00 00 |genman/R|EADME...|
|00000810| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000820| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000830| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000840| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000850| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000860| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 35 32 37 |.... 6|44 . 527|
|00000870| 35 30 20 00 20 20 20 20 | 31 33 20 00 20 20 20 20 |50 . |13 . |
|00000880| 20 20 31 35 37 37 31 20 | 20 34 36 34 34 31 33 35 | 15771 | 4644135|
|00000890| 32 32 35 20 20 20 36 33 | 34 31 00 20 00 00 00 00 |225 63|41. ....|
|000008a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000900| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000910| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000920| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000930| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000940| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000950| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000960| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000980| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000990| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a00| 09 09 47 65 6e 6d 61 6e | 20 56 65 72 73 69 6f 6e |..Genman| Version|
|00000a10| 20 32 2e 30 0a 0a 54 68 | 65 20 70 75 72 70 6f 73 | 2.0..Th|e purpos|
|00000a20| 65 20 6f 66 20 74 68 65 | 20 67 65 6e 6d 61 6e 2e |e of the| genman.|
|00000a30| 61 77 6b 20 70 72 6f 67 | 72 61 6d 20 69 73 20 74 |awk prog|ram is t|
|00000a40| 6f 20 67 65 6e 65 72 61 | 74 65 20 6d 61 6e 20 70 |o genera|te man p|
|00000a50| 61 67 65 20 73 74 79 6c | 65 0a 64 6f 63 75 6d 65 |age styl|e.docume|
|00000a60| 6e 74 61 74 69 6f 6e 20 | 61 62 6f 75 74 20 61 20 |ntation |about a |
|00000a70| 43 2b 2b 20 63 6c 61 73 | 73 20 66 72 6f 6d 20 69 |C++ clas|s from i|
|00000a80| 74 73 20 69 6e 63 6c 75 | 64 65 20 66 69 6c 65 2e |ts inclu|de file.|
|00000a90| 0a 0a 46 65 61 74 75 72 | 65 73 20 69 6e 63 6c 75 |..Featur|es inclu|
|00000aa0| 64 65 3a 0a 09 61 29 20 | 4f 75 74 70 75 74 73 20 |de:..a) |Outputs |
|00000ab0| 65 69 74 68 65 72 20 74 | 72 6f 66 66 20 2d 6d 61 |either t|roff -ma|
|00000ac0| 6e 20 69 6e 70 75 74 20 | 64 61 74 61 20 6f 72 20 |n input |data or |
|00000ad0| 70 6c 61 69 6e 20 68 75 | 6d 61 6e 20 72 65 61 64 |plain hu|man read|
|00000ae0| 61 62 6c 65 20 74 65 78 | 74 2e 0a 09 62 29 20 54 |able tex|t...b) T|
|00000af0| 68 65 20 6f 75 74 70 75 | 74 20 69 73 20 69 6e 20 |he outpu|t is in |
|00000b00| 61 20 63 6f 6e 73 69 73 | 74 65 6e 74 20 66 6f 72 |a consis|tent for|
|00000b10| 6d 61 74 20 77 68 69 63 | 68 20 69 73 20 69 6e 64 |mat whic|h is ind|
|00000b20| 65 70 65 6e 64 65 6e 74 | 20 6f 66 0a 09 20 20 20 |ependent| of.. |
|00000b30| 74 68 65 20 66 6f 72 6d | 61 74 20 75 73 65 64 20 |the form|at used |
|00000b40| 69 6e 20 74 68 65 20 69 | 6e 63 6c 75 64 65 20 66 |in the i|nclude f|
|00000b50| 69 6c 65 2e 0a 09 63 29 | 20 52 65 71 75 69 72 65 |ile...c)| Require|
|00000b60| 73 20 6d 69 6e 69 6d 61 | 6c 20 6d 6f 64 69 66 69 |s minima|l modifi|
|00000b70| 63 61 74 69 6f 6e 73 20 | 74 6f 20 69 6e 63 6c 75 |cations |to inclu|
|00000b80| 64 65 20 66 69 6c 65 73 | 2e 0a 09 64 29 20 41 64 |de files|...d) Ad|
|00000b90| 64 69 6e 67 20 73 75 70 | 70 6f 72 74 20 66 6f 72 |ding sup|port for|
|00000ba0| 20 6f 74 68 65 72 20 74 | 79 70 65 73 20 6f 66 20 | other t|ypes of |
|00000bb0| 6f 75 74 70 75 74 20 73 | 75 63 68 20 61 73 20 6c |output s|uch as l|
|00000bc0| 61 74 65 78 0a 09 20 20 | 20 6f 72 20 48 50 20 4c |atex.. | or HP L|
|00000bd0| 61 73 65 72 4a 65 74 20 | 49 49 20 73 68 6f 75 6c |aserJet |II shoul|
|00000be0| 64 20 62 65 20 73 69 6d | 70 6c 65 2e 0a 09 65 29 |d be sim|ple...e)|
|00000bf0| 20 50 75 62 6c 69 63 20 | 64 6f 6d 61 69 6e 2e 0a | Public |domain..|
|00000c00| 0a 54 68 65 20 64 69 73 | 74 72 69 62 75 74 69 6f |.The dis|tributio|
|00000c10| 6e 20 69 6e 63 6c 75 64 | 65 73 20 74 68 65 20 66 |n includ|es the f|
|00000c20| 6f 6c 6c 6f 77 69 6e 67 | 20 66 69 6c 65 73 3a 0a |ollowing| files:.|
|00000c30| 09 52 45 41 44 4d 45 20 | 20 20 20 20 20 20 20 20 |.README | |
|00000c40| 54 68 69 73 20 66 69 6c | 65 2e 0a 09 67 65 6e 6d |This fil|e...genm|
|00000c50| 61 6e 2e 61 77 6b 20 20 | 20 20 20 54 68 65 20 61 |an.awk | The a|
|00000c60| 77 6b 20 70 72 6f 67 72 | 61 6d 20 74 68 61 74 20 |wk progr|am that |
|00000c70| 67 65 6e 65 72 61 74 65 | 73 20 74 68 65 20 64 6f |generate|s the do|
|00000c80| 63 75 6d 65 6e 74 2e 0a | 09 67 65 6e 6d 61 6e 20 |cument..|.genman |
|00000c90| 20 20 20 20 20 20 20 20 | 41 20 73 68 65 6c 6c 20 | |A shell |
|00000ca0| 73 63 72 69 70 74 20 74 | 6f 20 6d 61 6b 65 20 69 |script t|o make i|
|00000cb0| 74 20 65 61 73 69 65 72 | 20 74 6f 20 75 73 65 20 |t easier| to use |
|00000cc0| 61 77 6b 2e 0a 09 67 65 | 6e 6d 61 6e 2e 74 70 6c |awk...ge|nman.tpl|
|00000cd0| 20 20 20 20 20 41 20 74 | 65 6d 70 6c 61 74 65 20 | A t|emplate |
|00000ce0| 74 6f 20 75 73 65 20 74 | 6f 20 63 72 65 61 74 65 |to use t|o create|
|00000cf0| 20 69 6e 63 6c 75 64 65 | 20 66 69 6c 65 73 2e 0a | include| files..|
|00000d00| 09 73 74 72 6c 6f 63 2e | 68 20 20 20 20 20 20 20 |.strloc.|h |
|00000d10| 41 6e 20 65 78 61 6d 70 | 6c 65 20 69 6e 63 6c 75 |An examp|le inclu|
|00000d20| 64 65 20 66 69 6c 65 2e | 0a 09 73 74 72 6c 6f 63 |de file.|..strloc|
|00000d30| 2e 63 78 78 20 20 20 20 | 20 41 6e 20 65 78 61 6d |.cxx | An exam|
|00000d40| 70 6c 65 20 73 6f 75 72 | 63 65 20 66 69 6c 65 2e |ple sour|ce file.|
|00000d50| 0a 09 73 74 72 6c 6f 63 | 2e 6d 61 6e 20 20 20 20 |..strloc|.man |
|00000d60| 20 54 68 65 20 6f 75 74 | 70 75 74 20 6f 66 20 74 | The out|put of t|
|00000d70| 68 65 20 63 6f 6d 6d 61 | 6e 64 20 22 67 65 6e 6d |he comma|nd "genm|
|00000d80| 61 6e 20 73 74 72 6c 6f | 63 2e 68 22 0a 09 67 6d |an strlo|c.h"..gm|
|00000d90| 74 69 6d 65 2e 63 20 20 | 20 20 20 20 20 41 20 70 |time.c | A p|
|00000da0| 72 6f 67 72 61 6d 20 74 | 68 61 74 20 70 72 69 6e |rogram t|hat prin|
|00000db0| 74 73 20 74 68 65 20 6d | 6f 64 69 66 79 20 74 69 |ts the m|odify ti|
|00000dc0| 6d 65 20 6f 66 20 61 20 | 66 69 6c 65 2e 0a 0a 0a |me of a |file....|
|00000dd0| 45 78 61 6d 70 6c 65 20 | 75 73 61 67 65 3a 0a 09 |Example |usage:..|
|00000de0| 67 65 6e 6d 61 6e 20 73 | 74 72 6c 6f 63 2e 68 20 |genman s|trloc.h |
|00000df0| 3e 20 73 74 72 6c 6f 63 | 2e 6d 61 6e 0a 09 09 6f |> strloc|.man...o|
|00000e00| 72 0a 09 61 77 6b 20 2d | 66 20 67 65 6e 6d 61 6e |r..awk -|f genman|
|00000e10| 2e 61 77 6b 20 73 74 72 | 6c 6f 63 2e 68 20 3e 20 |.awk str|loc.h > |
|00000e20| 73 74 72 6c 6f 63 2e 6d | 61 6e 0a 0a 47 65 6e 6d |strloc.m|an..Genm|
|00000e30| 61 6e 2e 61 77 6b 20 73 | 63 61 6e 73 20 74 68 65 |an.awk s|cans the|
|00000e40| 20 73 70 65 63 69 66 69 | 65 64 20 69 6e 63 6c 75 | specifi|ed inclu|
|00000e50| 64 65 20 66 69 6c 65 20 | 66 6f 72 20 76 61 72 69 |de file |for vari|
|00000e60| 6f 75 73 20 6b 65 79 77 | 6f 72 64 73 20 61 6e 64 |ous keyw|ords and|
|00000e70| 0a 63 6f 6c 6c 65 63 74 | 73 20 61 6c 6c 20 6f 66 |.collect|s all of|
|00000e80| 20 74 68 65 20 69 6e 66 | 6f 72 6d 61 74 69 6f 6e | the inf|ormation|
|00000e90| 20 61 73 73 6f 63 69 61 | 74 65 64 20 77 69 74 68 | associa|ted with|
|00000ea0| 20 74 68 65 6d 2e 20 20 | 49 74 20 74 68 65 6e 20 | them. |It then |
|00000eb0| 6f 75 74 70 75 74 73 0a | 74 68 65 20 64 61 74 61 |outputs.|the data|
|00000ec0| 20 69 6e 20 61 6e 20 6f | 72 64 65 72 20 69 74 20 | in an o|rder it |
|00000ed0| 74 68 69 6e 6b 73 20 69 | 73 20 72 65 61 73 6f 6e |thinks i|s reason|
|00000ee0| 61 62 6c 65 2e 20 20 54 | 68 65 6e 20 69 66 20 61 |able. T|hen if a|
|00000ef0| 6e 79 20 73 6f 75 72 63 | 65 0a 66 69 6c 65 73 20 |ny sourc|e.files |
|00000f00| 77 68 65 72 65 20 73 70 | 65 63 69 66 69 65 64 20 |where sp|ecified |
|00000f10| 77 69 74 68 20 74 68 65 | 20 22 2f 2f 20 2e 46 49 |with the| "// .FI|
|00000f20| 4c 45 22 20 6b 65 79 77 | 6f 72 64 20 69 74 20 73 |LE" keyw|ord it s|
|00000f30| 63 61 6e 73 20 74 68 65 | 6d 20 66 6f 72 0a 64 65 |cans the|m for.de|
|00000f40| 73 63 72 69 70 74 69 6f | 6e 73 20 6f 66 20 66 75 |scriptio|ns of fu|
|00000f50| 6e 63 74 69 6f 6e 73 20 | 61 6e 64 20 6f 75 74 70 |nctions |and outp|
|00000f60| 75 74 73 20 74 68 65 20 | 64 65 73 63 72 69 70 74 |uts the |descript|
|00000f70| 69 6f 6e 73 2e 0a 0a 47 | 65 6e 6d 61 6e 2e 61 77 |ions...G|enman.aw|
|00000f80| 6b 20 73 63 61 6e 73 20 | 66 6f 72 20 74 68 65 20 |k scans |for the |
|00000f90| 66 6f 6c 6c 6f 77 69 6e | 67 20 22 67 65 6e 6d 61 |followin|g "genma|
|00000fa0| 6e 22 20 6b 65 79 77 6f | 72 64 73 20 69 6e 20 74 |n" keywo|rds in t|
|00000fb0| 68 65 20 73 70 65 63 69 | 66 69 65 64 0a 69 6e 63 |he speci|fied.inc|
|00000fc0| 6c 75 64 65 20 66 69 6c | 65 2e 20 20 45 61 63 68 |lude fil|e. Each|
|00000fd0| 20 6f 66 20 74 68 65 73 | 65 20 6b 65 79 77 6f 72 | of thes|e keywor|
|00000fe0| 64 73 20 6d 75 73 74 20 | 73 74 61 72 74 20 69 6e |ds must |start in|
|00000ff0| 20 74 68 65 20 66 69 72 | 73 74 20 63 6f 6c 75 6d | the fir|st colum|
|00001000| 6e 2e 0a 09 2f 2f 20 2e | 4e 41 4d 45 0a 09 2f 2f |n...// .|NAME..//|
|00001010| 20 2e 4c 49 42 52 41 52 | 59 0a 09 2f 2f 20 2e 48 | .LIBRAR|Y..// .H|
|00001020| 45 41 44 45 52 0a 09 2f | 2f 20 2e 49 4e 43 4c 55 |EADER../|/ .INCLU|
|00001030| 44 45 0a 09 2f 2f 20 2e | 46 49 4c 45 0a 09 2f 2f |DE..// .|FILE..//|
|00001040| 20 2e 53 45 43 54 49 4f | 4e 0a 0a 47 65 6e 6d 61 | .SECTIO|N..Genma|
|00001050| 6e 2e 61 77 6b 20 73 63 | 61 6e 73 20 66 6f 72 20 |n.awk sc|ans for |
|00001060| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 22 43 |the foll|owing "C|
|00001070| 2b 2b 22 20 6b 65 79 77 | 6f 72 64 73 20 69 6e 20 |++" keyw|ords in |
|00001080| 74 68 65 20 73 70 65 63 | 69 66 69 65 64 0a 69 6e |the spec|ified.in|
|00001090| 63 6c 75 64 65 20 66 69 | 6c 65 2e 20 20 45 61 63 |clude fi|le. Eac|
|000010a0| 68 20 6f 66 20 74 68 65 | 73 65 20 6b 65 79 77 6f |h of the|se keywo|
|000010b0| 72 64 73 20 6d 75 73 74 | 20 73 74 61 72 74 20 69 |rds must| start i|
|000010c0| 6e 20 74 68 65 20 66 69 | 72 73 74 20 63 6f 6c 75 |n the fi|rst colu|
|000010d0| 6d 6e 2e 0a 09 23 64 65 | 66 69 6e 65 0a 09 23 69 |mn...#de|fine..#i|
|000010e0| 6e 63 6c 75 64 65 0a 09 | 63 6f 6e 73 74 0a 09 74 |nclude..|const..t|
|000010f0| 79 70 65 64 65 66 0a 09 | 65 6e 75 6d 0a 09 73 74 |ypedef..|enum..st|
|00001100| 72 75 63 74 0a 09 63 6c | 61 73 73 0a 09 65 78 74 |ruct..cl|ass..ext|
|00001110| 65 72 6e 0a 47 65 6e 6d | 61 6e 2e 61 77 6b 20 64 |ern.Genm|an.awk d|
|00001120| 69 73 63 61 72 64 73 20 | 61 6c 6c 20 69 6e 70 75 |iscards |all inpu|
|00001130| 74 20 6e 6f 74 20 61 73 | 73 6f 63 69 61 74 65 64 |t not as|sociated|
|00001140| 20 77 69 74 68 20 6f 6e | 65 20 6f 66 20 74 68 65 | with on|e of the|
|00001150| 20 61 62 6f 76 65 0a 6b | 65 79 77 6f 72 64 73 2e | above.k|eywords.|
|00001160| 0a 0a 2f 2f 20 2e 4e 41 | 4d 45 0a 09 54 68 69 73 |..// .NA|ME..This|
|00001170| 20 6b 65 79 77 6f 72 64 | 20 69 73 20 75 73 65 64 | keyword| is used|
|00001180| 20 74 6f 20 73 70 65 63 | 69 66 79 20 74 68 65 20 | to spec|ify the |
|00001190| 73 65 6e 74 65 6e 63 65 | 20 74 68 61 74 20 61 70 |sentence| that ap|
|000011a0| 70 65 61 72 73 0a 09 69 | 6e 20 74 68 65 20 4e 41 |pears..i|n the NA|
|000011b0| 4d 45 20 73 65 63 74 69 | 6f 6e 20 6f 66 20 74 68 |ME secti|on of th|
|000011c0| 65 20 6d 61 6e 20 70 61 | 67 65 2e 20 20 54 68 65 |e man pa|ge. The|
|000011d0| 20 66 69 72 73 74 20 77 | 6f 72 64 20 6f 66 20 74 | first w|ord of t|
|000011e0| 68 65 0a 09 73 65 6e 74 | 65 6e 63 65 20 61 6c 73 |he..sent|ence als|
|000011f0| 6f 20 61 70 70 65 61 72 | 73 20 69 6e 20 74 68 65 |o appear|s in the|
|00001200| 20 75 70 70 65 72 20 63 | 6f 72 6e 65 72 73 20 6f | upper c|orners o|
|00001210| 66 20 74 68 65 20 6d 61 | 6e 20 70 61 67 65 2e 0a |f the ma|n page..|
|00001220| 09 45 78 61 6d 70 6c 65 | 3a 0a 09 09 2f 2f 20 2e |.Example|:...// .|
|00001230| 4e 41 4d 45 20 66 6f 6f | 20 2d 20 61 20 63 6c 61 |NAME foo| - a cla|
|00001240| 73 73 20 74 6f 20 6d 61 | 6e 61 67 65 20 66 6f 6f |ss to ma|nage foo|
|00001250| 20 6f 62 6a 65 63 74 73 | 0a 0a 09 49 66 20 74 68 | objects|...If th|
|00001260| 69 73 20 6b 65 79 77 6f | 72 64 20 64 6f 65 73 20 |is keywo|rd does |
|00001270| 6e 6f 74 20 61 70 70 65 | 61 72 20 69 6e 20 74 68 |not appe|ar in th|
|00001280| 65 20 69 6e 63 6c 75 64 | 65 20 66 69 6c 65 20 74 |e includ|e file t|
|00001290| 68 65 6e 0a 09 6f 6e 65 | 20 69 73 20 6d 61 64 65 |hen..one| is made|
|000012a0| 20 75 70 20 66 72 6f 6d | 20 74 68 65 20 69 6e 63 | up from| the inc|
|000012b0| 6c 75 64 65 20 66 69 6c | 65 6e 61 6d 65 20 61 6e |lude fil|ename an|
|000012c0| 64 20 73 6f 6d 65 20 71 | 75 65 73 74 69 6f 6e 20 |d some q|uestion |
|000012d0| 6d 61 72 6b 73 2e 0a 0a | 2f 2f 20 2e 4c 49 42 52 |marks...|// .LIBR|
|000012e0| 41 52 59 0a 09 54 68 69 | 73 20 6b 65 79 77 6f 72 |ARY..Thi|s keywor|
|000012f0| 64 20 69 73 20 75 73 65 | 64 20 74 6f 20 73 70 65 |d is use|d to spe|
|00001300| 63 69 66 79 20 74 68 65 | 20 77 6f 72 64 20 74 68 |cify the| word th|
|00001310| 61 74 20 61 70 70 65 61 | 72 73 20 69 6e 20 74 68 |at appea|rs in th|
|00001320| 65 0a 09 75 70 70 65 72 | 20 63 6f 72 6e 65 72 73 |e..upper| corners|
|00001330| 20 6f 66 20 74 68 65 20 | 6d 61 6e 20 70 61 67 65 | of the |man page|
|00001340| 20 62 65 74 77 65 65 6e | 20 74 68 65 20 70 61 72 | between| the par|
|00001350| 65 6e 73 2e 20 20 49 6e | 20 61 20 72 65 61 6c 0a |ens. In| a real.|
|00001360| 09 6d 61 6e 20 70 61 67 | 65 20 74 68 69 73 20 69 |.man pag|e this i|
|00001370| 73 20 74 68 65 20 73 65 | 63 74 69 6f 6e 20 69 6e |s the se|ction in|
|00001380| 64 69 63 61 74 6f 72 20 | 73 75 63 68 20 61 73 20 |dicator |such as |
|00001390| 33 20 6f 72 20 33 73 2e | 20 20 49 0a 09 75 73 65 |3 or 3s.| I..use|
|000013a0| 20 69 74 20 61 73 20 61 | 20 6c 69 62 72 61 72 79 | it as a| library|
|000013b0| 20 69 6e 64 69 63 61 74 | 6f 72 2e 0a 09 45 78 61 | indicat|or...Exa|
|000013c0| 6d 70 6c 65 3a 0a 09 09 | 2f 2f 20 2e 4c 49 42 52 |mple:...|// .LIBR|
|000013d0| 41 52 59 20 62 61 73 65 | 0a 0a 09 49 66 20 74 68 |ARY base|...If th|
|000013e0| 69 73 20 6b 65 79 77 6f | 72 64 20 64 6f 65 73 20 |is keywo|rd does |
|000013f0| 6e 6f 74 20 61 70 70 65 | 61 72 20 69 6e 20 74 68 |not appe|ar in th|
|00001400| 65 20 69 6e 63 6c 75 64 | 65 20 66 69 6c 65 20 74 |e includ|e file t|
|00001410| 68 65 6e 0a 09 74 68 65 | 20 77 6f 72 64 20 22 63 |hen..the| word "c|
|00001420| 2b 2b 22 20 69 73 20 75 | 73 65 64 2e 0a 0a 2f 2f |++" is u|sed...//|
|00001430| 20 2e 48 45 41 44 45 52 | 0a 09 54 68 69 73 20 6b | .HEADER|..This k|
|00001440| 65 79 77 6f 72 64 20 69 | 73 20 75 73 65 64 20 74 |eyword i|s used t|
|00001450| 6f 20 73 70 65 63 69 66 | 79 20 74 68 65 20 73 65 |o specif|y the se|
|00001460| 6e 74 65 6e 63 65 20 74 | 68 61 74 20 61 70 70 65 |ntence t|hat appe|
|00001470| 61 72 73 0a 09 6f 6e 20 | 74 68 65 20 74 6f 70 20 |ars..on |the top |
|00001480| 6c 69 6e 65 20 6f 66 20 | 74 68 65 20 6d 61 6e 20 |line of |the man |
|00001490| 70 61 67 65 2c 20 63 65 | 6e 74 65 72 65 64 2e 20 |page, ce|ntered. |
|000014a0| 20 49 6e 20 61 20 72 65 | 61 6c 20 6d 61 6e 0a 09 | In a re|al man..|
|000014b0| 70 61 67 65 20 74 68 69 | 73 20 69 73 20 61 20 64 |page thi|s is a d|
|000014c0| 65 73 63 72 69 70 74 69 | 6f 6e 20 6f 66 20 74 68 |escripti|on of th|
|000014d0| 65 20 74 79 70 65 20 6f | 66 20 66 75 6e 63 74 69 |e type o|f functi|
|000014e0| 6f 6e 73 20 70 72 6f 76 | 69 64 65 64 2e 0a 09 45 |ons prov|ided...E|
|000014f0| 78 61 6d 70 6c 65 3a 0a | 09 09 2f 2f 20 2e 48 45 |xample:.|..// .HE|
|00001500| 41 44 45 52 20 63 2b 2b | 20 6c 69 62 72 61 72 79 |ADER c++| library|
|00001510| 20 66 75 6e 63 74 69 6f | 6e 73 0a 0a 09 49 66 20 | functio|ns...If |
|00001520| 74 68 69 73 20 6b 65 79 | 77 6f 72 64 20 64 6f 65 |this key|word doe|
|00001530| 73 20 6e 6f 74 20 61 70 | 70 65 61 72 20 69 6e 20 |s not ap|pear in |
|00001540| 74 68 65 20 69 6e 63 6c | 75 64 65 20 66 69 6c 65 |the incl|ude file|
|00001550| 20 74 68 65 6e 0a 09 74 | 68 65 20 77 6f 72 64 20 | then..t|he word |
|00001560| 22 43 2b 2b 22 20 69 73 | 20 75 73 65 64 2e 0a 0a |"C++" is| used...|
|00001570| 2f 2f 20 2e 49 4e 43 4c | 55 44 45 0a 09 54 68 65 |// .INCL|UDE..The|
|00001580| 20 66 69 72 73 74 20 6c | 69 6e 65 20 6f 66 20 74 | first l|ine of t|
|00001590| 68 65 20 53 59 4e 4f 50 | 53 49 53 20 73 65 63 74 |he SYNOP|SIS sect|
|000015a0| 69 6f 6e 20 69 73 20 61 | 6c 77 61 79 73 0a 09 09 |ion is a|lways...|
|000015b0| 23 69 6e 63 6c 75 64 65 | 20 3c 66 69 6c 65 6e 61 |#include| <filena|
|000015c0| 6d 65 3e 0a 09 77 68 65 | 72 65 20 66 69 6c 65 6e |me>..whe|re filen|
|000015d0| 61 6d 65 20 69 73 20 74 | 68 65 20 6e 61 6d 65 20 |ame is t|he name |
|000015e0| 6f 66 20 74 68 65 20 69 | 6e 63 6c 75 64 65 20 66 |of the i|nclude f|
|000015f0| 69 6c 65 20 73 70 65 63 | 69 66 69 65 64 20 74 6f |ile spec|ified to|
|00001600| 0a 09 67 65 6e 6d 61 6e | 2e 20 20 54 68 69 73 20 |..genman|. This |
|00001610| 63 61 6e 20 62 65 20 6f | 76 65 72 72 69 64 64 65 |can be o|verridde|
|00001620| 6e 20 75 73 69 6e 67 20 | 74 68 65 20 2f 2f 20 2e |n using |the // .|
|00001630| 49 4e 43 4c 55 44 45 0a | 09 6b 65 79 77 6f 72 64 |INCLUDE.|.keyword|
|00001640| 2e 0a 09 45 78 61 6d 70 | 6c 65 3a 0a 09 09 2f 2f |...Examp|le:...//|
|00001650| 20 2e 49 4e 43 4c 55 44 | 45 20 62 61 73 65 2f 66 | .INCLUD|E base/f|
|00001660| 6f 6f 2e 68 0a 0a 2f 2f | 20 2e 46 49 4c 45 0a 09 |oo.h..//| .FILE..|
|00001670| 54 68 69 73 20 6b 65 79 | 77 6f 72 64 20 69 73 20 |This key|word is |
|00001680| 75 73 65 64 20 74 6f 20 | 73 70 65 63 69 66 79 20 |used to |specify |
|00001690| 74 68 65 20 6e 61 6d 65 | 73 20 6f 66 20 74 68 65 |the name|s of the|
|000016a0| 20 73 6f 75 72 63 65 0a | 09 66 69 6c 65 73 20 66 | source.|.files f|
|000016b0| 6f 72 20 74 68 65 20 63 | 6c 61 73 73 20 64 65 73 |or the c|lass des|
|000016c0| 63 72 69 62 65 64 20 69 | 6e 20 74 68 65 20 69 6e |cribed i|n the in|
|000016d0| 63 6c 75 64 65 20 66 69 | 6c 65 2e 0a 09 41 66 74 |clude fi|le...Aft|
|000016e0| 65 72 20 70 72 6f 63 65 | 73 73 69 6e 67 20 74 68 |er proce|ssing th|
|000016f0| 65 20 69 6e 63 6c 75 64 | 65 20 66 69 6c 65 20 73 |e includ|e file s|
|00001700| 70 65 63 69 66 69 65 64 | 20 74 6f 20 67 65 6e 6d |pecified| to genm|
|00001710| 61 6e 2c 0a 09 61 6c 6c | 20 66 69 6c 65 73 20 73 |an,..all| files s|
|00001720| 70 65 63 69 66 69 65 64 | 20 77 69 74 68 20 74 68 |pecified| with th|
|00001730| 65 20 2f 2f 20 2e 46 49 | 4c 45 20 6b 65 79 77 6f |e // .FI|LE keywo|
|00001740| 72 64 20 61 72 65 20 73 | 63 61 6e 6e 65 64 2e 0a |rd are s|canned..|
|00001750| 09 57 68 65 6e 20 69 74 | 20 66 69 6e 64 73 20 74 |.When it| finds t|
|00001760| 68 65 20 6c 69 6e 65 3a | 0a 09 09 2f 2f 20 44 65 |he line:|...// De|
|00001770| 73 63 72 69 70 74 69 6f | 6e 3a 0a 09 69 6e 20 61 |scriptio|n:..in a|
|00001780| 20 73 6f 75 72 63 65 20 | 66 69 6c 65 20 69 74 20 | source |file it |
|00001790| 73 74 61 72 74 73 20 73 | 61 76 69 6e 67 20 74 68 |starts s|aving th|
|000017a0| 65 20 6c 69 6e 65 73 20 | 74 68 61 74 20 66 6f 6c |e lines |that fol|
|000017b0| 6c 6f 77 20 75 70 20 74 | 6f 0a 09 74 68 65 20 66 |low up t|o..the f|
|000017c0| 69 72 73 74 20 6c 69 6e | 65 20 74 68 61 74 20 63 |irst lin|e that c|
|000017d0| 6f 6e 74 61 69 6e 73 20 | 61 6e 20 6f 70 65 6e 20 |ontains |an open |
|000017e0| 63 75 72 6c 65 79 20 62 | 72 61 63 65 2e 20 20 4c |curley b|race. L|
|000017f0| 69 6e 65 73 20 74 68 61 | 74 0a 09 62 65 67 69 6e |ines tha|t..begin|
|00001800| 20 77 69 74 68 20 2f 2f | 20 61 72 65 20 63 6f 6e | with //| are con|
|00001810| 73 69 64 65 72 65 64 20 | 70 61 72 74 20 6f 66 20 |sidered |part of |
|00001820| 74 68 65 20 64 65 73 63 | 72 69 70 74 69 6f 6e 20 |the desc|ription |
|00001830| 6f 66 20 74 68 65 0a 09 | 66 75 6e 63 74 69 6f 6e |of the..|function|
|00001840| 2e 20 20 4e 6f 6e 2d 62 | 6c 61 6e 6b 20 6c 69 6e |. Non-b|lank lin|
|00001850| 65 73 20 74 68 61 74 20 | 64 6f 20 6e 6f 74 20 62 |es that |do not b|
|00001860| 65 67 69 6e 20 77 69 74 | 68 20 2f 2f 20 61 72 65 |egin wit|h // are|
|00001870| 0a 09 63 6f 6e 73 69 64 | 65 72 65 64 20 74 6f 20 |..consid|ered to |
|00001880| 62 65 20 70 61 72 74 20 | 6f 66 20 74 68 65 20 66 |be part |of the f|
|00001890| 75 6e 63 74 69 6f 6e 20 | 64 65 66 69 6e 69 74 69 |unction |definiti|
|000018a0| 6f 6e 2e 20 20 41 6c 73 | 6f 0a 09 63 6f 6d 6d 65 |on. Als|o..comme|
|000018b0| 6e 74 65 64 20 6c 69 6e | 65 73 20 74 68 61 74 20 |nted lin|es that |
|000018c0| 65 6e 64 20 69 6e 20 61 | 20 63 6f 6c 6f 6e 20 61 |end in a| colon a|
|000018d0| 72 65 20 64 69 73 63 61 | 72 64 65 64 2e 0a 09 54 |re disca|rded...T|
|000018e0| 68 65 20 66 75 6e 63 74 | 69 6f 6e 20 64 65 73 63 |he funct|ion desc|
|000018f0| 72 69 70 74 69 6f 6e 73 | 20 66 6f 75 6e 64 20 61 |riptions| found a|
|00001900| 72 65 20 6f 75 74 70 75 | 74 74 65 64 20 69 6e 20 |re outpu|tted in |
|00001910| 74 68 65 20 53 55 4d 4d | 41 52 59 0a 09 73 65 63 |the SUMM|ARY..sec|
|00001920| 74 69 6f 6e 2e 0a 09 45 | 78 61 6d 70 6c 65 3a 0a |tion...E|xample:.|
|00001930| 09 09 2f 2f 20 2e 46 49 | 4c 45 20 73 74 72 6c 6f |..// .FI|LE strlo|
|00001940| 63 2e 63 78 78 0a 09 09 | 2f 2f 20 2e 46 49 4c 45 |c.cxx...|// .FILE|
|00001950| 20 73 74 72 6c 6f 63 2e | 68 0a 09 49 66 20 74 68 | strloc.|h..If th|
|00001960| 65 20 69 6e 63 6c 75 64 | 65 20 66 69 6c 65 20 63 |e includ|e file c|
|00001970| 6f 6e 74 61 69 6e 73 20 | 69 6e 6c 69 6e 65 20 66 |ontains |inline f|
|00001980| 75 6e 63 74 69 6f 6e 73 | 20 74 68 65 6e 20 69 74 |unctions| then it|
|00001990| 20 73 68 6f 75 6c 64 0a | 09 61 6c 73 6f 20 62 65 | should.|.also be|
|000019a0| 20 73 70 65 63 69 66 69 | 65 64 20 61 73 20 61 20 | specifi|ed as a |
|000019b0| 73 6f 75 72 63 65 20 66 | 69 6c 65 2e 20 20 44 6f |source f|ile. Do|
|000019c0| 20 6e 6f 74 20 64 65 63 | 6c 61 72 65 20 69 6e 6c | not dec|lare inl|
|000019d0| 69 6e 65 0a 09 66 75 6e | 63 74 69 6f 6e 73 20 77 |ine..fun|ctions w|
|000019e0| 69 74 68 20 74 68 65 20 | 63 6c 61 73 73 20 64 65 |ith the |class de|
|000019f0| 63 6c 61 72 61 74 69 6f | 6e 2e 20 20 42 72 65 61 |claratio|n. Brea|
|00001a00| 6b 20 74 68 65 6d 20 6f | 75 74 20 61 6e 64 20 75 |k them o|ut and u|
|00001a10| 73 65 0a 09 74 68 65 20 | 69 6e 6c 69 6e 65 20 6b |se..the |inline k|
|00001a20| 65 79 77 6f 72 64 2e 0a | 0a 2f 2f 20 2e 53 45 43 |eyword..|.// .SEC|
|00001a30| 54 49 4f 4e 0a 09 42 65 | 63 61 75 73 65 20 67 65 |TION..Be|cause ge|
|00001a40| 6e 6d 61 6e 2e 61 77 6b | 20 64 69 73 63 61 72 64 |nman.awk| discard|
|00001a50| 73 20 65 76 65 72 79 74 | 68 69 6e 67 20 69 6e 63 |s everyt|hing inc|
|00001a60| 6c 75 64 69 6e 67 20 74 | 65 78 74 20 6e 6f 74 0a |luding t|ext not.|
|00001a70| 09 61 73 73 6f 63 69 61 | 74 65 64 20 77 69 74 68 |.associa|ted with|
|00001a80| 20 6f 6e 65 20 6f 66 20 | 74 68 65 20 6b 65 79 77 | one of |the keyw|
|00001a90| 6f 72 64 73 2c 20 61 20 | 6b 65 79 77 6f 72 64 20 |ords, a |keyword |
|00001aa0| 69 73 20 6e 65 65 64 65 | 64 0a 09 74 6f 20 6f 75 |is neede|d..to ou|
|00001ab0| 74 70 75 74 20 70 61 72 | 61 67 72 61 70 68 73 20 |tput par|agraphs |
|00001ac0| 6f 66 20 74 65 78 74 2e | 20 20 55 73 65 20 74 68 |of text.| Use th|
|00001ad0| 65 20 2f 2f 20 2e 53 45 | 43 54 49 4f 4e 20 6b 65 |e // .SE|CTION ke|
|00001ae0| 79 77 6f 72 64 0a 09 74 | 6f 20 64 6f 20 74 68 69 |yword..t|o do thi|
|00001af0| 73 2e 20 20 41 6c 6c 20 | 6e 6f 6e 2d 62 6c 61 6e |s. All |non-blan|
|00001b00| 6b 20 6c 69 6e 65 73 20 | 74 68 61 74 20 62 65 67 |k lines |that beg|
|00001b10| 69 6e 20 77 69 74 68 20 | 2f 2f 20 69 6e 20 74 68 |in with |// in th|
|00001b20| 65 0a 09 66 69 72 73 74 | 20 63 6f 6c 75 6d 6e 20 |e..first| column |
|00001b30| 61 72 65 20 70 61 72 74 | 20 6f 66 20 74 68 65 20 |are part| of the |
|00001b40| 73 65 63 74 69 6f 6e 2e | 20 20 41 20 62 6c 61 6e |section.| A blan|
|00001b50| 6b 20 6c 69 6e 65 20 74 | 65 72 6d 69 6e 61 74 65 |k line t|erminate|
|00001b60| 73 0a 09 74 68 65 20 73 | 65 63 74 69 6f 6e 2e 20 |s..the s|ection. |
|00001b70| 20 49 6e 20 74 72 61 64 | 69 74 69 6f 6e 61 6c 20 | In trad|itional |
|00001b80| 6d 61 6e 20 70 61 67 65 | 73 20 74 68 65 72 65 20 |man page|s there |
|00001b90| 69 73 20 75 73 75 61 6c | 6c 79 20 61 74 0a 09 6c |is usual|ly at..l|
|00001ba0| 65 61 73 74 20 61 20 22 | 44 45 53 43 52 49 50 54 |east a "|DESCRIPT|
|00001bb0| 49 4f 4e 22 20 73 65 63 | 74 69 6f 6e 20 61 6e 64 |ION" sec|tion and|
|00001bc0| 20 76 65 72 79 20 6f 66 | 74 65 6e 20 6f 74 68 65 | very of|ten othe|
|00001bd0| 72 73 20 6c 69 6b 65 2c | 0a 09 22 43 41 56 45 41 |rs like,|.."CAVEA|
|00001be0| 54 53 22 2c 20 22 42 55 | 47 53 22 2c 20 61 6e 64 |TS", "BU|GS", and|
|00001bf0| 20 22 41 55 54 48 4f 52 | 53 22 2e 0a 09 45 78 61 | "AUTHOR|S"...Exa|
|00001c00| 6d 70 6c 65 3a 0a 09 09 | 2f 2f 20 2e 53 45 43 54 |mple:...|// .SECT|
|00001c10| 49 4f 4e 20 44 65 73 63 | 72 69 70 74 69 6f 6e 0a |ION Desc|ription.|
|00001c20| 09 09 2f 2f 20 54 68 65 | 20 66 6f 6f 20 63 6c 61 |..// The| foo cla|
|00001c30| 73 73 20 6d 61 6e 61 67 | 65 73 20 6c 69 73 74 73 |ss manag|es lists|
|00001c40| 20 6f 66 20 77 69 64 67 | 65 74 73 20 75 73 69 6e | of widg|ets usin|
|00001c50| 67 20 6e 65 75 72 61 6c | 0a 09 09 2f 2f 20 6e 65 |g neural|...// ne|
|00001c60| 74 77 6f 72 6b 73 2e 20 | 20 42 6c 61 68 20 62 6c |tworks. | Blah bl|
|00001c70| 61 68 20 62 6c 61 68 2e | 2e 2e 0a 0a 23 64 65 66 |ah blah.|....#def|
|00001c80| 69 6e 65 0a 09 41 6c 6c | 20 23 64 65 66 69 6e 65 |ine..All| #define|
|00001c90| 20 6d 61 63 72 6f 73 20 | 61 72 65 20 70 6c 61 63 | macros |are plac|
|00001ca0| 65 64 20 75 6e 64 65 72 | 20 74 68 65 20 73 65 63 |ed under| the sec|
|00001cb0| 74 69 6f 6e 20 68 65 61 | 64 69 6e 67 20 6f 66 0a |tion hea|ding of.|
|00001cc0| 09 22 44 45 46 49 4e 45 | 44 20 4d 41 43 52 4f 53 |."DEFINE|D MACROS|
|00001cd0| 22 2e 0a 23 69 6e 63 6c | 75 64 65 0a 09 41 6c 6c |"..#incl|ude..All|
|00001ce0| 20 23 69 6e 63 6c 75 64 | 65 20 66 69 6c 65 73 20 | #includ|e files |
|00001cf0| 61 72 65 20 70 6c 61 63 | 65 64 20 75 6e 64 65 72 |are plac|ed under|
|00001d00| 20 74 68 65 20 73 65 63 | 74 69 6f 6e 20 68 65 61 | the sec|tion hea|
|00001d10| 64 69 6e 67 20 6f 66 0a | 09 22 49 4e 43 4c 55 44 |ding of.|."INCLUD|
|00001d20| 45 44 20 46 49 4c 45 53 | 22 2e 0a 63 6f 6e 73 74 |ED FILES|"..const|
|00001d30| 0a 09 41 6c 6c 20 63 6f | 6e 73 74 20 76 61 72 69 |..All co|nst vari|
|00001d40| 61 62 6c 65 73 20 61 72 | 65 20 70 6c 61 63 65 64 |ables ar|e placed|
|00001d50| 20 75 6e 64 65 72 20 74 | 68 65 20 73 65 63 74 69 | under t|he secti|
|00001d60| 6f 6e 20 68 65 61 64 69 | 6e 67 20 6f 66 0a 09 22 |on headi|ng of.."|
|00001d70| 43 4f 4e 53 54 41 4e 54 | 53 22 2e 0a 74 79 70 65 |CONSTANT|S"..type|
|00001d80| 64 65 66 0a 09 41 6c 6c | 20 74 79 70 65 20 64 65 |def..All| type de|
|00001d90| 66 69 6e 69 74 69 6f 6e | 73 20 61 72 65 20 70 6c |finition|s are pl|
|00001da0| 61 63 65 64 20 75 6e 64 | 65 72 20 74 68 65 20 73 |aced und|er the s|
|00001db0| 65 63 74 69 6f 6e 20 68 | 65 61 64 69 6e 67 20 6f |ection h|eading o|
|00001dc0| 66 0a 09 22 54 59 50 45 | 20 44 45 46 49 4e 49 54 |f.."TYPE| DEFINIT|
|00001dd0| 49 4f 4e 53 22 2e 0a 65 | 6e 75 6d 0a 09 41 6c 6c |IONS"..e|num..All|
|00001de0| 20 65 6e 75 6d 20 64 65 | 66 69 6e 69 74 69 6f 6e | enum de|finition|
|00001df0| 73 20 61 72 65 20 70 6c | 61 63 65 64 20 75 6e 64 |s are pl|aced und|
|00001e00| 65 72 20 74 68 65 20 73 | 65 63 74 69 6f 6e 20 68 |er the s|ection h|
|00001e10| 65 61 64 69 6e 67 20 6f | 66 0a 09 22 45 4e 55 4d |eading o|f.."ENUM|
|00001e20| 45 52 41 54 49 4f 4e 53 | 22 2e 0a 73 74 72 75 63 |ERATIONS|"..struc|
|00001e30| 74 0a 09 41 6c 6c 20 73 | 74 72 75 63 74 75 72 65 |t..All s|tructure|
|00001e40| 20 64 65 63 6c 61 72 61 | 74 69 6f 6e 73 20 61 72 | declara|tions ar|
|00001e50| 65 20 70 6c 61 63 65 64 | 20 75 6e 64 65 72 20 74 |e placed| under t|
|00001e60| 68 65 20 73 65 63 74 69 | 6f 6e 20 68 65 61 64 69 |he secti|on headi|
|00001e70| 6e 67 20 6f 66 0a 09 22 | 53 54 52 55 43 54 55 52 |ng of.."|STRUCTUR|
|00001e80| 45 53 22 2e 0a 63 6c 61 | 73 73 0a 09 41 6c 6c 20 |ES"..cla|ss..All |
|00001e90| 63 6c 61 73 73 20 64 65 | 63 6c 61 72 61 74 69 6f |class de|claratio|
|00001ea0| 6e 73 20 61 72 65 20 70 | 6c 61 63 65 64 20 75 6e |ns are p|laced un|
|00001eb0| 64 65 72 20 74 68 65 20 | 73 65 63 74 69 6f 6e 20 |der the |section |
|00001ec0| 68 65 61 64 69 6e 67 20 | 6f 66 0a 09 22 53 59 4e |heading |of.."SYN|
|00001ed0| 4f 50 53 49 53 22 2e 0a | 65 78 74 65 72 6e 0a 09 |OPSIS"..|extern..|
|00001ee0| 41 6c 6c 20 65 78 74 65 | 72 6e 73 20 61 72 65 20 |All exte|rns are |
|00001ef0| 70 6c 61 63 65 64 20 75 | 6e 64 65 72 20 74 68 65 |placed u|nder the|
|00001f00| 20 73 65 63 74 69 6f 6e | 20 68 65 61 64 69 6e 67 | section| heading|
|00001f10| 20 6f 66 0a 09 22 53 59 | 4e 4f 50 53 49 53 22 20 | of.."SY|NOPSIS" |
|00001f20| 61 66 74 65 72 20 61 6e | 79 20 63 6c 61 73 73 65 |after an|y classe|
|00001f30| 73 2e 0a 0a 47 65 6e 6d | 61 6e 2e 61 77 6b 20 77 |s...Genm|an.awk w|
|00001f40| 6f 72 6b 73 20 77 69 74 | 68 20 67 61 77 6b 20 32 |orks wit|h gawk 2|
|00001f50| 2e 31 30 62 65 74 61 20 | 6f 6e 20 55 6e 69 78 20 |.10beta |on Unix |
|00001f60| 61 6e 64 20 6d 6b 73 20 | 61 77 6b 6c 2e 65 78 65 |and mks |awkl.exe|
|00001f70| 20 6f 6e 20 4d 53 2d 44 | 4f 53 2e 0a 0a 47 65 6e | on MS-D|OS...Gen|
|00001f80| 6d 61 6e 2e 61 77 6b 20 | 75 73 65 73 20 22 6c 73 |man.awk |uses "ls|
|00001f90| 20 2d 6c 22 20 62 79 20 | 64 65 66 61 75 6c 74 20 | -l" by |default |
|00001fa0| 74 6f 20 67 65 74 20 74 | 68 65 20 6d 6f 64 69 66 |to get t|he modif|
|00001fb0| 79 20 74 69 6d 65 20 6f | 66 20 74 68 65 20 66 69 |y time o|f the fi|
|00001fc0| 6c 65 2e 0a 54 68 65 20 | 70 72 6f 62 6c 65 6d 20 |le..The |problem |
|00001fd0| 77 69 74 68 20 6c 73 28 | 31 29 20 69 73 20 74 68 |with ls(|1) is th|
|00001fe0| 61 74 20 69 74 20 70 72 | 69 6e 74 73 20 6f 75 74 |at it pr|ints out|
|00001ff0| 20 74 68 65 20 74 69 6d | 65 20 6f 66 20 64 61 79 | the tim|e of day|
|00002000| 20 69 6e 73 74 65 61 64 | 0a 6f 66 20 74 68 65 20 | instead|.of the |
|00002010| 79 65 61 72 20 66 6f 72 | 20 72 65 63 65 6e 74 6c |year for| recentl|
|00002020| 79 20 6d 6f 64 69 66 69 | 65 64 20 66 69 6c 65 73 |y modifi|ed files|
|00002030| 2e 20 20 54 68 65 20 73 | 6f 75 72 63 65 20 63 6f |. The s|ource co|
|00002040| 64 65 20 67 6d 74 69 6d | 65 2e 63 20 69 73 0a 69 |de gmtim|e.c is.i|
|00002050| 6e 63 6c 75 64 65 64 20 | 77 68 69 63 68 20 77 68 |ncluded |which wh|
|00002060| 65 6e 20 63 6f 6d 70 69 | 6c 65 64 20 74 61 6b 65 |en compi|led take|
|00002070| 73 20 61 20 73 69 6e 67 | 6c 65 20 61 72 67 75 6d |s a sing|le argum|
|00002080| 65 6e 74 20 77 68 69 63 | 68 20 69 73 20 61 0a 66 |ent whic|h is a.f|
|00002090| 69 6c 65 6e 61 6d 65 20 | 61 6e 64 20 70 72 69 6e |ilename |and prin|
|000020a0| 74 73 20 74 6f 20 73 74 | 64 6f 75 74 20 74 68 65 |ts to st|dout the|
|000020b0| 20 6d 6f 64 69 66 79 20 | 74 69 6d 65 20 6f 66 20 | modify |time of |
|000020c0| 74 68 65 20 66 69 6c 65 | 20 69 6e 20 74 68 65 0a |the file| in the.|
|000020d0| 66 6f 72 6d 61 74 2c 20 | 22 6d 6d 6d 20 64 64 2c |format, |"mmm dd,|
|000020e0| 20 79 79 79 79 22 2e 20 | 20 55 73 65 20 74 68 65 | yyyy". | Use the|
|000020f0| 20 22 2d 73 22 20 6f 70 | 74 69 6f 6e 20 6f 66 20 | "-s" op|tion of |
|00002100| 74 68 65 20 67 65 6e 6d | 61 6e 20 73 68 65 6c 6c |the genm|an shell|
|00002110| 0a 73 63 72 69 70 74 20 | 74 6f 20 75 73 65 20 74 |.script |to use t|
|00002120| 68 69 73 20 70 72 6f 67 | 72 61 6d 20 69 6e 73 74 |his prog|ram inst|
|00002130| 65 61 64 20 6f 66 20 6c | 73 28 31 29 20 74 6f 20 |ead of l|s(1) to |
|00002140| 67 65 74 20 74 68 65 20 | 6d 6f 64 69 66 79 20 74 |get the |modify t|
|00002150| 69 6d 65 20 6f 66 0a 74 | 68 65 20 66 69 6c 65 2e |ime of.t|he file.|
|00002160| 0a 0a 47 65 6e 6d 61 6e | 2e 61 77 6b 20 67 65 6e |..Genman|.awk gen|
|00002170| 65 72 61 74 65 73 20 68 | 75 6d 61 6e 20 72 65 61 |erates h|uman rea|
|00002180| 64 61 62 6c 65 20 74 65 | 78 74 20 6f 75 74 70 75 |dable te|xt outpu|
|00002190| 74 20 62 79 20 64 65 66 | 61 75 6c 74 2e 20 20 55 |t by def|ault. U|
|000021a0| 73 65 0a 74 68 65 20 22 | 2d 74 22 20 6f 70 74 69 |se.the "|-t" opti|
|000021b0| 6f 6e 20 6f 66 20 74 68 | 65 20 67 65 6e 6d 61 6e |on of th|e genman|
|000021c0| 20 73 68 65 6c 6c 20 73 | 63 72 69 70 74 20 74 6f | shell s|cript to|
|000021d0| 20 67 65 6e 65 72 61 74 | 65 20 74 72 6f 66 66 20 | generat|e troff |
|000021e0| 66 6f 72 6d 61 74 2e 0a | 0a 54 68 65 20 67 65 6e |format..|.The gen|
|000021f0| 6d 61 6e 20 73 68 65 6c | 6c 20 73 63 72 69 70 74 |man shel|l script|
|00002200| 20 61 6c 73 6f 20 69 6e | 63 6c 75 64 65 73 20 61 | also in|cludes a|
|00002210| 20 22 2d 6f 22 20 73 77 | 69 74 63 68 20 74 6f 20 | "-o" sw|itch to |
|00002220| 73 70 65 63 69 66 79 20 | 74 68 65 0a 6f 75 74 70 |specify |the.outp|
|00002230| 75 74 20 66 69 6c 65 2e | 0a 0a 4b 4e 4f 57 4e 20 |ut file.|..KNOWN |
|00002240| 50 52 4f 42 4c 45 4d 53 | 0a 0a 09 49 66 20 74 61 |PROBLEMS|...If ta|
|00002250| 62 73 20 61 72 65 20 75 | 73 65 64 20 74 6f 20 6c |bs are u|sed to l|
|00002260| 69 6e 65 20 75 70 20 65 | 6e 64 20 6f 66 20 6c 69 |ine up e|nd of li|
|00002270| 6e 65 20 63 6f 6d 6d 65 | 6e 74 73 20 69 6e 20 74 |ne comme|nts in t|
|00002280| 68 65 0a 09 69 6e 63 6c | 75 64 65 20 66 69 6c 65 |he..incl|ude file|
|00002290| 20 74 68 65 6e 20 74 68 | 65 20 63 6f 6d 6d 65 6e | then th|e commen|
|000022a0| 74 73 20 77 69 6c 6c 20 | 70 72 6f 62 61 62 6c 79 |ts will |probably|
|000022b0| 20 6e 6f 74 20 62 65 20 | 70 65 72 66 65 63 74 6c | not be |perfectl|
|000022c0| 79 0a 09 61 6c 69 67 6e | 65 64 20 69 6e 20 74 68 |y..align|ed in th|
|000022d0| 65 20 6f 75 74 70 75 74 | 2e 20 20 54 68 69 73 20 |e output|. This |
|000022e0| 69 73 20 62 65 63 61 75 | 73 65 20 74 68 65 20 69 |is becau|se the i|
|000022f0| 6e 64 65 6e 74 61 74 69 | 6f 6e 20 69 73 0a 09 63 |ndentati|on is..c|
|00002300| 68 61 6e 67 65 64 20 69 | 6e 20 74 68 65 20 6f 75 |hanged i|n the ou|
|00002310| 74 70 75 74 2e 20 20 41 | 20 77 6f 72 6b 61 72 6f |tput. A| workaro|
|00002320| 75 6e 64 20 69 73 20 74 | 6f 20 75 73 65 20 73 70 |und is t|o use sp|
|00002330| 61 63 65 73 20 69 6e 73 | 74 65 61 64 0a 09 6f 66 |aces ins|tead..of|
|00002340| 20 74 61 62 73 2e 0a 0a | 46 55 54 55 52 45 20 57 | tabs...|FUTURE W|
|00002350| 4f 52 4b 0a 0a 09 57 72 | 69 74 65 20 61 6e 20 61 |ORK...Wr|ite an a|
|00002360| 77 6b 20 72 6f 75 74 69 | 6e 65 20 74 68 61 74 20 |wk routi|ne that |
|00002370| 63 6f 6e 76 65 72 74 73 | 20 61 20 6c 69 6e 65 20 |converts| a line |
|00002380| 77 69 74 68 20 74 61 62 | 73 20 69 6e 20 69 74 20 |with tab|s in it |
|00002390| 74 6f 0a 09 73 70 61 63 | 65 73 2e 20 20 54 68 69 |to..spac|es. Thi|
|000023a0| 73 20 63 61 6e 20 62 65 | 20 75 73 65 64 20 74 6f |s can be| used to|
|000023b0| 20 66 69 78 20 74 68 65 | 20 70 72 6f 62 6c 65 6d | fix the| problem|
|000023c0| 20 6d 65 6e 74 69 6f 6e | 65 64 20 61 62 6f 76 65 | mention|ed above|
|000023d0| 2e 0a 0a 09 4d 6f 76 65 | 20 74 68 65 20 64 65 76 |....Move| the dev|
|000023e0| 69 63 65 20 73 70 65 63 | 69 66 69 63 20 72 6f 75 |ice spec|ific rou|
|000023f0| 74 69 6e 65 73 20 69 6e | 74 6f 20 73 65 70 61 72 |tines in|to separ|
|00002400| 61 74 65 20 66 69 6c 65 | 73 20 61 6e 64 20 75 73 |ate file|s and us|
|00002410| 65 0a 09 6d 75 6c 74 69 | 70 6c 65 20 2d 66 20 6f |e..multi|ple -f o|
|00002420| 70 74 69 6f 6e 73 20 74 | 6f 20 67 65 74 20 74 68 |ptions t|o get th|
|00002430| 65 20 64 65 73 69 72 65 | 64 20 6f 75 74 70 75 74 |e desire|d output|
|00002440| 2e 0a 0a 09 57 72 69 74 | 65 20 61 20 64 65 76 69 |....Writ|e a devi|
|00002450| 63 65 20 64 72 69 76 65 | 72 20 74 68 61 74 20 67 |ce drive|r that g|
|00002460| 65 6e 65 72 61 74 65 73 | 20 6c 61 74 65 78 20 69 |enerates| latex i|
|00002470| 6e 70 75 74 2e 0a 0a 09 | 57 72 69 74 65 20 61 20 |nput....|Write a |
|00002480| 64 65 76 69 63 65 20 64 | 72 69 76 65 20 74 68 61 |device d|rive tha|
|00002490| 74 20 67 65 6e 65 72 61 | 74 65 73 20 48 50 20 4c |t genera|tes HP L|
|000024a0| 61 73 65 72 4a 65 74 20 | 49 49 20 69 6e 70 75 74 |aserJet |II input|
|000024b0| 2e 0a 0a 09 4e 65 65 64 | 20 61 20 73 65 74 20 6f |....Need| a set o|
|000024c0| 66 20 69 6e 63 6c 75 64 | 65 20 66 69 6c 65 73 20 |f includ|e files |
|000024d0| 74 68 61 74 20 74 65 73 | 74 20 61 6c 6c 20 6f 66 |that tes|t all of|
|000024e0| 20 74 68 65 20 66 65 61 | 74 75 72 65 73 2e 0a 0a | the fea|tures...|
|000024f0| 49 20 61 6d 20 69 6e 74 | 65 72 65 73 74 65 64 20 |I am int|erested |
|00002500| 69 6e 20 61 6e 79 20 62 | 75 67 20 66 69 78 65 73 |in any b|ug fixes|
|00002510| 20 6f 72 20 65 6e 68 61 | 6e 63 65 6d 65 6e 74 20 | or enha|ncement |
|00002520| 72 65 71 75 65 73 74 73 | 20 74 68 61 74 20 70 65 |requests| that pe|
|00002530| 6f 70 6c 65 0a 6d 69 67 | 68 74 20 68 61 76 65 20 |ople.mig|ht have |
|00002540| 66 6f 72 20 74 68 69 73 | 20 70 72 6f 67 72 61 6d |for this| program|
|00002550| 2e 0a 0a 42 6f 62 20 4d | 61 73 74 6f 72 73 0a 45 |...Bob M|astors.E|
|00002560| 70 6f 63 68 20 53 79 73 | 74 65 6d 73 2c 20 57 65 |poch Sys|tems, We|
|00002570| 73 74 62 6f 72 6f 20 4d | 41 20 28 35 30 38 29 20 |stboro M|A (508) |
|00002580| 38 33 36 2d 34 37 31 31 | 20 78 33 31 37 20 28 76 |836-4711| x317 (v|
|00002590| 6f 69 63 65 29 0a 20 20 | 20 20 20 20 20 20 20 20 |oice). | |
|000025a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000025b0| 20 28 35 30 38 29 20 38 | 33 36 2d 34 38 38 34 20 | (508) 8|36-4884 |
|000025c0| 28 66 61 78 29 0a 7b 75 | 75 6e 65 74 21 65 70 6f |(fax).{u|unet!epo|
|000025d0| 63 68 73 79 73 2c 20 68 | 61 72 76 61 72 64 21 63 |chsys, h|arvard!c|
|000025e0| 66 69 73 75 6e 21 70 61 | 6c 6c 61 64 69 75 6d 7d |fisun!pa|lladium}|
|000025f0| 21 6d 61 73 74 6f 72 73 | 0a 74 20 63 6f 6c 75 6d |!mastors|.t colum|
|00002600| 67 65 6e 6d 61 6e 2f 67 | 65 6e 6d 61 6e 00 00 00 |genman/g|enman...|
|00002610| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002620| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002630| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002640| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002650| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002660| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 35 32 37 |.... 6|44 . 527|
|00002670| 35 30 20 00 20 20 20 20 | 31 33 20 00 20 20 20 20 |50 . |13 . |
|00002680| 20 20 20 32 36 32 35 20 | 20 34 36 34 34 31 33 35 | 2625 | 4644135|
|00002690| 32 32 35 20 20 20 36 36 | 32 33 00 20 00 00 00 00 |225 66|23. ....|
|000026a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000026b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000026c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000026d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000026e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000026f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002700| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002710| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002720| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002730| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002740| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002750| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002760| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002770| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002780| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002790| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000027a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000027b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000027c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000027d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000027e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000027f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002800| 23 21 2f 62 69 6e 2f 73 | 68 0a 23 0a 23 20 54 68 |#!/bin/s|h.#.# Th|
|00002810| 69 73 20 73 68 65 6c 6c | 20 73 63 72 69 70 74 20 |is shell| script |
|00002820| 63 6f 6e 76 65 72 74 73 | 20 61 20 63 2b 2b 20 68 |converts| a c++ h|
|00002830| 65 61 64 65 72 20 66 69 | 6c 65 20 74 6f 20 61 20 |eader fi|le to a |
|00002840| 6d 61 6e 20 70 61 67 65 | 0a 23 20 75 73 69 6e 67 |man page|.# using|
|00002850| 20 74 68 65 20 67 65 6e | 6d 61 6e 2e 61 77 6b 20 | the gen|man.awk |
|00002860| 70 72 6f 67 72 61 6d 2e | 0a 23 0a 23 20 4f 70 74 |program.|.#.# Opt|
|00002870| 69 6f 6e 73 20 73 75 70 | 70 6f 72 74 65 64 20 61 |ions sup|ported a|
|00002880| 72 65 3a 0a 23 20 20 20 | 20 20 20 20 20 2d 74 20 |re:.# | -t |
|00002890| 20 20 20 20 20 20 20 20 | 20 20 20 70 72 6f 64 75 | | produ|
|000028a0| 63 65 73 20 74 72 6f 66 | 66 20 6f 75 74 70 75 74 |ces trof|f output|
|000028b0| 2c 20 64 65 66 61 75 6c | 74 20 69 73 20 61 73 63 |, defaul|t is asc|
|000028c0| 69 69 0a 23 20 20 20 20 | 20 20 20 20 2d 73 20 20 |ii.# | -s |
|000028d0| 20 20 20 20 20 20 20 20 | 20 20 75 73 65 73 20 74 | | uses t|
|000028e0| 68 65 20 70 72 6f 67 72 | 61 6d 20 67 6d 74 69 6d |he progr|am gmtim|
|000028f0| 65 20 69 6e 73 74 65 61 | 64 20 6f 66 20 6c 73 20 |e instea|d of ls |
|00002900| 2d 6c 0a 23 20 20 20 20 | 20 20 20 20 20 20 20 20 |-l.# | |
|00002910| 20 20 20 20 20 20 20 20 | 20 20 74 6f 20 67 65 74 | | to get|
|00002920| 20 74 68 65 20 6d 6f 64 | 69 66 79 20 74 69 6d 65 | the mod|ify time|
|00002930| 20 6f 66 20 74 68 65 20 | 66 69 6c 65 0a 23 20 20 | of the |file.# |
|00002940| 20 20 20 20 20 20 2d 6f | 20 66 69 6c 65 20 20 20 | -o| file |
|00002950| 20 20 20 20 6f 75 74 70 | 75 74 20 66 69 6c 65 20 | outp|ut file |
|00002960| 6e 61 6d 65 2c 20 64 65 | 66 61 75 6c 74 20 69 73 |name, de|fault is|
|00002970| 20 73 74 64 6f 75 74 0a | 23 0a 73 65 74 20 2d 65 | stdout.|#.set -e|
|00002980| 0a 0a 23 20 53 65 74 20 | 74 68 65 20 76 61 72 69 |..# Set |the vari|
|00002990| 61 62 6c 65 20 58 58 20 | 74 6f 20 62 65 20 74 68 |able XX |to be th|
|000029a0| 65 20 70 61 74 68 20 77 | 68 65 72 65 20 79 6f 75 |e path w|here you|
|000029b0| 20 68 61 76 65 20 70 6c | 61 63 65 64 20 74 68 65 | have pl|aced the|
|000029c0| 20 66 69 6c 65 0a 23 20 | 67 65 6e 6d 61 6e 2e 61 | file.# |genman.a|
|000029d0| 77 6b 20 61 6e 64 20 70 | 72 6f 67 72 61 6d 20 67 |wk and p|rogram g|
|000029e0| 6d 74 69 6d 65 2e 0a 23 | 58 58 3d 2f 75 73 72 2f |mtime..#|XX=/usr/|
|000029f0| 6c 6f 63 61 6c 2f 62 69 | 6e 0a 58 58 3d 2e 0a 0a |local/bi|n.XX=...|
|00002a00| 23 20 53 65 74 20 74 68 | 65 20 41 57 4b 20 76 61 |# Set th|e AWK va|
|00002a10| 72 69 61 62 6c 65 20 74 | 6f 20 74 68 65 20 6e 61 |riable t|o the na|
|00002a20| 6d 65 20 61 6e 64 2f 6f | 72 20 70 61 74 68 20 6f |me and/o|r path o|
|00002a30| 66 20 74 68 65 20 76 65 | 72 73 69 6f 6e 20 6f 66 |f the ve|rsion of|
|00002a40| 20 61 77 6b 0a 23 20 79 | 6f 75 20 75 73 65 2e 0a | awk.# y|ou use..|
|00002a50| 41 57 4b 3d 67 61 77 6b | 0a 0a 0a 23 20 47 65 74 |AWK=gawk|...# Get|
|00002a60| 20 74 68 65 20 6e 61 6d | 65 20 6f 66 20 74 68 65 | the nam|e of the|
|00002a70| 20 73 68 65 6c 6c 20 73 | 63 72 69 70 74 0a 70 72 | shell s|cript.pr|
|00002a80| 6f 67 3d 24 30 0a 0a 23 | 0a 23 20 50 72 6f 63 65 |og=$0..#|.# Proce|
|00002a90| 73 73 20 74 68 65 20 63 | 6f 6d 6d 61 6e 64 20 6c |ss the c|ommand l|
|00002aa0| 69 6e 65 20 73 77 69 74 | 63 68 65 73 0a 23 0a 6f |ine swit|ches.#.o|
|00002ab0| 70 74 5f 74 3d 22 22 0a | 6f 70 74 5f 73 3d 22 22 |pt_t="".|opt_s=""|
|00002ac0| 0a 6f 70 74 5f 6f 3d 22 | 22 0a 66 69 6c 65 3d 22 |.opt_o="|".file="|
|00002ad0| 22 0a 67 6d 74 69 6d 65 | 3d 24 58 58 2f 67 6d 74 |".gmtime|=$XX/gmt|
|00002ae0| 69 6d 65 0a 77 68 69 6c | 65 20 74 65 73 74 20 2d |ime.whil|e test -|
|00002af0| 6e 20 22 24 31 22 0a 64 | 6f 0a 09 63 61 73 65 20 |n "$1".d|o..case |
|00002b00| 24 31 20 69 6e 0a 09 2d | 74 29 0a 09 09 6f 70 74 |$1 in..-|t)...opt|
|00002b10| 5f 74 3d 22 64 65 76 69 | 63 65 3d 74 72 6f 66 66 |_t="devi|ce=troff|
|00002b20| 22 3b 3b 0a 09 2d 73 29 | 0a 09 09 6f 70 74 5f 73 |";;..-s)|...opt_s|
|00002b30| 3d 22 6d 74 69 6d 65 3d | 24 67 6d 74 69 6d 65 22 |="mtime=|$gmtime"|
|00002b40| 3b 3b 0a 09 2d 6f 29 0a | 09 09 6f 70 74 5f 6f 3d |;;..-o).|..opt_o=|
|00002b50| 24 32 0a 09 09 73 68 69 | 66 74 3b 3b 0a 09 2d 2a |$2...shi|ft;;..-*|
|00002b60| 29 0a 09 09 65 63 68 6f | 20 22 24 70 72 6f 67 3a |)...echo| "$prog:|
|00002b70| 20 62 61 64 20 6f 70 74 | 69 6f 6e 20 24 31 22 0a | bad opt|ion $1".|
|00002b80| 09 09 65 78 69 74 20 31 | 3b 3b 0a 09 2a 29 0a 09 |..exit 1|;;..*)..|
|00002b90| 09 66 69 6c 65 3d 24 31 | 3b 3b 0a 09 65 73 61 63 |.file=$1|;;..esac|
|00002ba0| 0a 09 73 68 69 66 74 0a | 64 6f 6e 65 0a 0a 23 20 |..shift.|done..# |
|00002bb0| 50 72 69 6e 74 20 6f 75 | 74 20 74 68 65 20 75 73 |Print ou|t the us|
|00002bc0| 61 67 65 20 6d 65 73 73 | 61 67 65 20 69 66 20 61 |age mess|age if a|
|00002bd0| 6e 20 69 6e 70 75 74 20 | 66 69 6c 65 20 77 61 73 |n input |file was|
|00002be0| 20 6e 6f 74 20 73 70 65 | 63 69 66 69 65 64 0a 69 | not spe|cified.i|
|00002bf0| 66 20 74 65 73 74 20 21 | 20 2d 6e 20 22 24 66 69 |f test !| -n "$fi|
|00002c00| 6c 65 22 0a 74 68 65 6e | 0a 09 65 63 68 6f 20 22 |le".then|..echo "|
|00002c10| 75 73 61 67 65 3a 20 24 | 70 72 6f 67 20 5b 2d 73 |usage: $|prog [-s|
|00002c20| 20 2d 74 20 2d 6f 20 66 | 69 6c 65 5d 20 66 69 6c | -t -o f|ile] fil|
|00002c30| 65 6e 61 6d 65 22 0a 09 | 65 78 69 74 20 31 3b 0a |ename"..|exit 1;.|
|00002c40| 66 69 0a 0a 23 20 53 65 | 65 20 69 66 20 74 68 65 |fi..# Se|e if the|
|00002c50| 79 20 77 61 6e 74 20 74 | 6f 20 6f 75 74 70 75 74 |y want t|o output|
|00002c60| 20 74 6f 20 61 20 70 61 | 72 74 69 63 75 6c 61 72 | to a pa|rticular|
|00002c70| 20 66 69 6c 65 0a 69 66 | 20 74 65 73 74 20 2d 6e | file.if| test -n|
|00002c80| 20 22 24 6f 70 74 5f 6f | 22 0a 74 68 65 6e 0a 09 | "$opt_o|".then..|
|00002c90| 23 20 6d 61 6b 65 20 73 | 75 72 65 20 74 68 65 20 |# make s|ure the |
|00002ca0| 69 6e 70 75 74 20 61 6e | 64 20 6f 75 74 70 75 74 |input an|d output|
|00002cb0| 20 66 69 6c 65 20 61 72 | 65 20 6e 6f 74 20 74 68 | file ar|e not th|
|00002cc0| 65 20 73 61 6d 65 0a 09 | 69 66 20 74 65 73 74 20 |e same..|if test |
|00002cd0| 24 6f 70 74 5f 6f 20 3d | 20 24 66 69 6c 65 0a 09 |$opt_o =| $file..|
|00002ce0| 74 68 65 6e 0a 09 09 65 | 63 68 6f 20 22 24 70 72 |then...e|cho "$pr|
|00002cf0| 6f 67 3a 20 69 6e 70 75 | 74 20 61 6e 64 20 6f 75 |og: inpu|t and ou|
|00002d00| 74 70 75 74 20 66 69 6c | 65 20 61 72 65 20 74 68 |tput fil|e are th|
|00002d10| 65 20 73 61 6d 65 2c 20 | 24 66 69 6c 65 22 0a 09 |e same, |$file"..|
|00002d20| 09 65 78 69 74 20 31 0a | 09 66 69 0a 09 24 41 57 |.exit 1.|.fi..$AW|
|00002d30| 4b 20 2d 66 20 24 58 58 | 2f 67 65 6e 6d 61 6e 2e |K -f $XX|/genman.|
|00002d40| 61 77 6b 20 24 6f 70 74 | 5f 74 20 24 6f 70 74 5f |awk $opt|_t $opt_|
|00002d50| 73 20 24 66 69 6c 65 20 | 3e 20 24 6f 70 74 5f 6f |s $file |> $opt_o|
|00002d60| 0a 65 6c 73 65 0a 09 24 | 41 57 4b 20 2d 66 20 24 |.else..$|AWK -f $|
|00002d70| 58 58 2f 67 65 6e 6d 61 | 6e 2e 61 77 6b 20 24 6f |XX/genma|n.awk $o|
|00002d80| 70 74 5f 74 20 24 6f 70 | 74 5f 73 20 24 66 69 6c |pt_t $op|t_s $fil|
|00002d90| 65 0a 66 69 0a 0a 20 20 | 20 20 20 20 20 20 20 20 |e.fi.. | |
|00002da0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002db0| 20 28 35 30 38 29 20 38 | 33 36 2d 34 38 38 34 20 | (508) 8|36-4884 |
|00002dc0| 28 66 61 78 29 0a 7b 75 | 75 6e 65 74 21 65 70 6f |(fax).{u|unet!epo|
|00002dd0| 63 68 73 79 73 2c 20 68 | 61 72 76 61 72 64 21 63 |chsys, h|arvard!c|
|00002de0| 66 69 73 75 6e 21 70 61 | 6c 6c 61 64 69 75 6d 7d |fisun!pa|lladium}|
|00002df0| 21 6d 61 73 74 6f 72 73 | 0a 74 20 63 6f 6c 75 6d |!mastors|.t colum|
|00002e00| 67 65 6e 6d 61 6e 2f 67 | 65 6e 6d 61 6e 2e 61 77 |genman/g|enman.aw|
|00002e10| 6b 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |k.......|........|
|00002e20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002e30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002e40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002e50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002e60| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 35 32 37 |.... 6|44 . 527|
|00002e70| 35 30 20 00 20 20 20 20 | 31 33 20 00 20 20 20 20 |50 . |13 . |
|00002e80| 20 20 33 35 35 33 33 20 | 20 34 36 34 34 31 33 35 | 35533 | 4644135|
|00002e90| 32 32 36 20 20 20 37 34 | 33 31 00 20 00 00 00 00 |226 74|31. ....|
|00002ea0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002eb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ec0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ed0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ef0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002fa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002fb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002fc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002fd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002fe0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ff0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003000| 23 0a 23 20 41 77 6b 20 | 70 72 6f 67 72 61 6d 20 |#.# Awk |program |
|00003010| 74 68 61 74 20 74 61 6b | 65 73 20 61 73 20 69 6e |that tak|es as in|
|00003020| 70 75 74 20 61 20 43 2b | 2b 20 68 65 61 64 65 72 |put a C+|+ header|
|00003030| 20 66 69 6c 65 20 61 6e | 64 20 6f 75 74 70 75 74 | file an|d output|
|00003040| 73 0a 23 20 61 20 55 4e | 49 58 20 73 74 79 6c 65 |s.# a UN|IX style|
|00003050| 20 6d 61 6e 20 70 61 67 | 65 2e 0a 23 0a 23 20 54 | man pag|e..#.# T|
|00003060| 68 65 20 63 6f 6e 74 65 | 6e 74 73 20 6f 66 20 74 |he conte|nts of t|
|00003070| 68 69 73 20 66 69 6c 65 | 20 61 72 65 20 70 75 62 |his file| are pub|
|00003080| 6c 69 63 20 64 6f 6d 61 | 69 6e 2e 0a 23 20 41 75 |lic doma|in..# Au|
|00003090| 74 68 6f 72 3a 20 42 6f | 62 20 4d 61 73 74 6f 72 |thor: Bo|b Mastor|
|000030a0| 73 0a 23 20 20 20 20 20 | 20 20 20 20 45 70 6f 63 |s.# | Epoc|
|000030b0| 68 20 53 79 73 74 65 6d | 73 2c 20 49 6e 63 2e 0a |h System|s, Inc..|
|000030c0| 23 20 20 20 20 20 20 20 | 20 20 36 2f 39 30 0a 23 |# | 6/90.#|
|000030d0| 09 20 20 56 65 72 73 69 | 6f 6e 20 32 0a 0a 42 45 |. Versi|on 2..BE|
|000030e0| 47 49 4e 20 7b 0a 20 20 | 20 20 6c 69 62 72 61 72 |GIN {. | librar|
|000030f0| 79 3d 20 22 55 4e 4b 4e | 4f 57 4e 22 0a 20 20 20 |y= "UNKN|OWN". |
|00003100| 20 73 6f 75 72 63 65 66 | 69 6c 65 63 6f 75 6e 74 | sourcef|ilecount|
|00003110| 3d 20 31 0a 20 20 20 20 | 64 65 66 69 6e 65 63 6f |= 1. |defineco|
|00003120| 75 6e 74 3d 20 31 0a 20 | 20 20 20 63 6f 6e 73 74 |unt= 1. | const|
|00003130| 63 6f 75 6e 74 3d 20 31 | 0a 20 20 20 20 69 6e 63 |count= 1|. inc|
|00003140| 6c 75 64 65 63 6f 75 6e | 74 3d 20 31 0a 20 20 20 |ludecoun|t= 1. |
|00003150| 20 74 79 70 65 64 65 66 | 63 6f 75 6e 74 3d 20 31 | typedef|count= 1|
|00003160| 0a 20 20 20 20 65 6e 75 | 6d 63 6f 75 6e 74 3d 20 |. enu|mcount= |
|00003170| 31 0a 20 20 20 20 73 74 | 72 75 63 74 63 6f 75 6e |1. st|ructcoun|
|00003180| 74 3d 20 31 0a 20 20 20 | 20 65 78 74 65 72 6e 63 |t= 1. | externc|
|00003190| 6f 75 6e 74 3d 20 30 0a | 20 20 20 20 63 6c 61 73 |ount= 0.| clas|
|000031a0| 73 63 6f 75 6e 74 3d 20 | 30 0a 20 20 20 20 64 6f |scount= |0. do|
|000031b0| 63 63 6f 75 6e 74 3d 20 | 30 0a 20 20 20 20 6c 70 |ccount= |0. lp|
|000031c0| 5f 69 6e 64 65 6e 74 3d | 20 22 20 20 20 20 22 0a |_indent=| " ".|
|000031d0| 20 20 20 20 62 6f 6c 64 | 3d 20 22 22 0a 0a 20 20 | bold|= "".. |
|000031e0| 20 20 73 6f 75 72 63 65 | 66 69 6c 65 5b 30 5d 3d | source|file[0]=|
|000031f0| 20 20 22 25 68 22 20 22 | 73 6f 75 72 63 65 20 66 | "%h" "|source f|
|00003200| 69 6c 65 73 22 0a 20 20 | 20 20 64 65 66 69 6e 65 |iles". | define|
|00003210| 5b 30 5d 3d 20 20 20 20 | 20 20 22 25 68 22 20 22 |[0]= | "%h" "|
|00003220| 64 65 66 69 6e 65 64 20 | 6d 61 63 72 6f 73 22 0a |defined |macros".|
|00003230| 20 20 20 20 63 6f 6e 73 | 74 5b 30 5d 3d 20 20 20 | cons|t[0]= |
|00003240| 20 20 20 20 22 25 68 22 | 20 22 63 6f 6e 73 74 61 | "%h"| "consta|
|00003250| 6e 74 73 22 0a 20 20 20 | 20 69 6e 63 6c 75 64 65 |nts". | include|
|00003260| 5b 30 5d 3d 20 20 20 20 | 20 22 25 68 22 20 22 69 |[0]= | "%h" "i|
|00003270| 6e 63 6c 75 64 65 64 20 | 66 69 6c 65 73 22 0a 20 |ncluded |files". |
|00003280| 20 20 20 74 79 70 65 64 | 65 66 5b 30 5d 3d 20 20 | typed|ef[0]= |
|00003290| 20 20 20 22 25 68 22 20 | 22 74 79 70 65 20 64 65 | "%h" |"type de|
|000032a0| 66 69 6e 69 74 69 6f 6e | 73 22 0a 20 20 20 20 65 |finition|s". e|
|000032b0| 6e 75 6d 5b 30 5d 3d 20 | 20 20 20 20 20 20 20 22 |num[0]= | "|
|000032c0| 25 68 22 20 22 65 6e 75 | 6d 65 72 61 74 69 6f 6e |%h" "enu|meration|
|000032d0| 73 22 0a 20 20 20 20 73 | 74 72 75 63 74 5b 30 5d |s". s|truct[0]|
|000032e0| 3d 20 20 20 20 20 20 22 | 25 68 22 20 22 73 74 72 |= "|%h" "str|
|000032f0| 75 63 74 75 72 65 73 22 | 0a 20 20 20 20 7d 0a 0a |uctures"|. }..|
|00003300| 2f 5e 23 64 65 66 69 6e | 65 2f 20 7b 0a 20 20 20 |/^#defin|e/ {. |
|00003310| 20 74 6d 70 3d 20 73 75 | 62 73 74 72 28 20 24 30 | tmp= su|bstr( $0|
|00003320| 2c 20 38 20 29 0a 20 20 | 20 20 74 6d 70 3d 20 73 |, 8 ). | tmp= s|
|00003330| 74 72 69 70 5f 77 68 69 | 74 65 28 20 74 6d 70 20 |trip_whi|te( tmp |
|00003340| 29 0a 20 20 20 20 67 73 | 75 62 28 20 22 5c 5c 5c |). gs|ub( "\\\|
|00003350| 5c 24 22 2c 20 22 22 2c | 20 74 6d 70 20 29 3b 0a |\$", "",| tmp );.|
|00003360| 20 20 20 20 64 65 66 69 | 6e 65 5b 20 64 65 66 69 | defi|ne[ defi|
|00003370| 6e 65 63 6f 75 6e 74 2b | 2b 20 5d 20 3d 20 74 6d |necount+|+ ] = tm|
|00003380| 70 0a 20 20 20 20 7d 0a | 0a 2f 5e 63 6f 6e 73 74 |p. }.|./^const|
|00003390| 2f 20 7b 0a 20 20 20 20 | 74 6d 70 3d 20 73 75 62 |/ {. |tmp= sub|
|000033a0| 73 74 72 28 20 24 30 2c | 20 36 20 29 0a 20 20 20 |str( $0,| 6 ). |
|000033b0| 20 74 6d 70 3d 20 73 74 | 72 69 70 5f 77 68 69 74 | tmp= st|rip_whit|
|000033c0| 65 28 20 74 6d 70 20 29 | 0a 20 20 20 20 67 73 75 |e( tmp )|. gsu|
|000033d0| 62 28 20 22 2f 2f 22 2c | 20 22 22 2c 20 74 6d 70 |b( "//",| "", tmp|
|000033e0| 20 29 3b 0a 20 20 20 20 | 63 6f 6e 73 74 5b 20 63 | );. |const[ c|
|000033f0| 6f 6e 73 74 63 6f 75 6e | 74 2b 2b 20 5d 20 3d 20 |onstcoun|t++ ] = |
|00003400| 74 6d 70 0a 20 20 20 20 | 7d 0a 0a 2f 5e 23 69 6e |tmp. |}../^#in|
|00003410| 63 6c 75 64 65 2f 20 7b | 0a 20 20 20 20 74 6d 70 |clude/ {|. tmp|
|00003420| 3d 20 73 75 62 73 74 72 | 28 20 24 30 2c 20 39 20 |= substr|( $0, 9 |
|00003430| 29 0a 20 20 20 20 74 6d | 70 3d 20 73 74 72 69 70 |). tm|p= strip|
|00003440| 5f 77 68 69 74 65 28 20 | 74 6d 70 20 29 0a 20 20 |_white( |tmp ). |
|00003450| 20 20 69 6e 63 6c 75 64 | 65 5b 20 69 6e 63 6c 75 | includ|e[ inclu|
|00003460| 64 65 63 6f 75 6e 74 2b | 2b 20 5d 20 3d 20 74 6d |decount+|+ ] = tm|
|00003470| 70 0a 20 20 20 20 7d 0a | 0a 2f 5e 65 78 74 65 72 |p. }.|./^exter|
|00003480| 6e 2f 20 7b 0a 20 20 20 | 20 74 6d 70 3d 20 73 75 |n/ {. | tmp= su|
|00003490| 62 73 74 72 28 20 24 30 | 2c 20 37 20 29 0a 20 20 |bstr( $0|, 7 ). |
|000034a0| 20 20 74 6d 70 3d 20 73 | 74 72 69 70 5f 77 68 69 | tmp= s|trip_whi|
|000034b0| 74 65 28 20 74 6d 70 20 | 29 0a 20 20 20 20 65 78 |te( tmp |). ex|
|000034c0| 74 65 72 6e 5b 20 65 78 | 74 65 72 6e 63 6f 75 6e |tern[ ex|terncoun|
|000034d0| 74 2b 2b 20 5d 20 3d 20 | 74 6d 70 0a 20 20 20 20 |t++ ] = |tmp. |
|000034e0| 7d 0a 0a 2f 5e 74 79 70 | 65 64 65 66 2f 20 7b 0a |}../^typ|edef/ {.|
|000034f0| 20 20 20 20 74 6d 70 3d | 20 73 75 62 73 74 72 28 | tmp=| substr(|
|00003500| 20 24 30 2c 20 38 20 29 | 0a 20 20 20 20 74 6d 70 | $0, 8 )|. tmp|
|00003510| 3d 20 73 74 72 69 70 5f | 77 68 69 74 65 28 20 74 |= strip_|white( t|
|00003520| 6d 70 20 29 0a 20 20 20 | 20 74 79 70 65 64 65 66 |mp ). | typedef|
|00003530| 5b 20 74 79 70 65 64 65 | 66 63 6f 75 6e 74 2b 2b |[ typede|fcount++|
|00003540| 20 5d 20 3d 20 74 6d 70 | 0a 20 20 20 20 7d 0a 0a | ] = tmp|. }..|
|00003550| 2f 5e 65 6e 75 6d 2f 20 | 7b 0a 20 20 20 20 74 6d |/^enum/ |{. tm|
|00003560| 70 3d 20 73 75 62 73 74 | 72 28 20 24 30 2c 20 35 |p= subst|r( $0, 5|
|00003570| 20 29 0a 20 20 20 20 67 | 73 75 62 28 20 22 7b 22 | ). g|sub( "{"|
|00003580| 2c 20 22 22 2c 20 74 6d | 70 20 29 3b 0a 20 20 20 |, "", tm|p );. |
|00003590| 20 74 6d 70 3d 20 73 74 | 72 69 70 5f 77 68 69 74 | tmp= st|rip_whit|
|000035a0| 65 28 20 74 6d 70 20 29 | 0a 20 20 20 20 65 6e 75 |e( tmp )|. enu|
|000035b0| 6d 5b 20 65 6e 75 6d 63 | 6f 75 6e 74 2b 2b 20 5d |m[ enumc|ount++ ]|
|000035c0| 20 3d 20 74 6d 70 0a 20 | 20 20 20 77 68 69 6c 65 | = tmp. | while|
|000035d0| 28 20 28 67 65 74 6c 69 | 6e 65 20 74 6d 70 29 20 |( (getli|ne tmp) |
|000035e0| 3e 20 30 20 29 0a 20 20 | 20 20 20 20 20 20 7b 0a |> 0 ). | {.|
|000035f0| 20 20 20 20 20 20 20 20 | 67 73 75 62 28 20 22 7b | |gsub( "{|
|00003600| 22 2c 20 22 22 2c 20 74 | 6d 70 20 29 3b 0a 20 20 |", "", t|mp );. |
|00003610| 20 20 20 20 20 20 67 73 | 75 62 28 20 22 2c 22 2c | gs|ub( ",",|
|00003620| 20 22 20 22 2c 20 74 6d | 70 20 29 3b 0a 20 20 20 | " ", tm|p );. |
|00003630| 20 20 20 20 20 67 73 75 | 62 28 20 22 2f 2f 22 2c | gsu|b( "//",|
|00003640| 20 22 22 2c 20 74 6d 70 | 20 29 3b 0a 20 20 20 20 | "", tmp| );. |
|00003650| 20 20 20 20 74 6d 70 3d | 20 73 74 72 69 70 5f 77 | tmp=| strip_w|
|00003660| 68 69 74 65 28 20 74 6d | 70 20 29 0a 20 20 20 20 |hite( tm|p ). |
|00003670| 20 20 20 20 69 66 28 20 | 74 6d 70 20 7e 20 22 7d | if( |tmp ~ "}|
|00003680| 20 2a 3b 22 20 29 0a 20 | 20 20 20 20 20 20 20 20 | *;" ). | |
|00003690| 20 20 20 62 72 65 61 6b | 3b 0a 09 69 66 28 20 6c | break|;..if( l|
|000036a0| 65 6e 67 74 68 28 74 6d | 70 29 20 3e 20 30 20 29 |ength(tm|p) > 0 )|
|000036b0| 0a 09 20 20 20 20 65 6e | 75 6d 5b 20 65 6e 75 6d |.. en|um[ enum|
|000036c0| 63 6f 75 6e 74 2b 2b 20 | 5d 20 3d 20 22 25 40 22 |count++ |] = "%@"|
|000036d0| 20 74 6d 70 0a 20 20 20 | 20 20 20 20 20 7d 0a 20 | tmp. | }. |
|000036e0| 20 20 20 7d 0a 0a 2f 5e | 73 74 72 75 63 74 2f 20 | }../^|struct/ |
|000036f0| 7b 0a 20 20 20 20 70 72 | 6f 63 65 73 73 5f 73 74 |{. pr|ocess_st|
|00003700| 72 75 63 74 28 20 24 30 | 20 29 0a 20 20 20 20 7d |ruct( $0| ). }|
|00003710| 0a 0a 2f 5e 63 6c 61 73 | 73 2f 20 7b 0a 20 20 20 |../^clas|s/ {. |
|00003720| 20 70 72 6f 63 65 73 73 | 5f 63 6c 61 73 73 28 20 | process|_class( |
|00003730| 24 30 20 29 0a 20 20 20 | 20 63 6c 61 73 73 63 6f |$0 ). | classco|
|00003740| 75 6e 74 2b 2b 0a 20 20 | 20 20 7d 0a 0a 2f 5e 5c |unt++. | }../^\|
|00003750| 2f 5c 2f 2f 20 7b 0a 20 | 20 20 20 74 6d 70 3d 20 |/\// {. | tmp= |
|00003760| 73 75 62 73 74 72 28 20 | 24 30 2c 20 34 20 29 0a |substr( |$0, 4 ).|
|00003770| 20 20 20 20 73 74 72 69 | 70 74 6d 70 3d 20 73 74 | stri|ptmp= st|
|00003780| 72 69 70 5f 77 68 69 74 | 65 28 20 74 6d 70 20 29 |rip_whit|e( tmp )|
|00003790| 0a 20 20 20 20 69 66 28 | 20 67 73 75 62 28 20 22 |. if(| gsub( "|
|000037a0| 5e 5c 2e 46 49 4c 45 22 | 2c 20 22 22 2c 20 73 74 |^\.FILE"|, "", st|
|000037b0| 72 69 70 74 6d 70 20 29 | 20 3d 3d 20 31 20 29 0a |riptmp )| == 1 ).|
|000037c0| 20 20 20 20 20 20 20 20 | 7b 0a 20 20 20 20 20 20 | |{. |
|000037d0| 20 20 73 74 72 69 70 74 | 6d 70 3d 20 73 74 72 69 | stript|mp= stri|
|000037e0| 70 5f 77 68 69 74 65 28 | 20 73 74 72 69 70 74 6d |p_white(| striptm|
|000037f0| 70 20 29 0a 20 20 20 20 | 20 20 20 20 73 6f 75 72 |p ). | sour|
|00003800| 63 65 66 69 6c 65 5b 20 | 73 6f 75 72 63 65 66 69 |cefile[ |sourcefi|
|00003810| 6c 65 63 6f 75 6e 74 2b | 2b 20 5d 20 3d 20 73 74 |lecount+|+ ] = st|
|00003820| 72 69 70 74 6d 70 0a 20 | 20 20 20 20 20 20 20 7d |riptmp. | }|
|00003830| 0a 20 20 20 20 65 6c 73 | 65 0a 20 20 20 20 69 66 |. els|e. if|
|00003840| 28 20 67 73 75 62 28 20 | 22 5e 5c 2e 4c 49 42 52 |( gsub( |"^\.LIBR|
|00003850| 41 52 59 22 2c 20 22 22 | 2c 20 73 74 72 69 70 74 |ARY", ""|, stript|
|00003860| 6d 70 20 29 20 3d 3d 20 | 31 20 29 0a 20 20 20 20 |mp ) == |1 ). |
|00003870| 20 20 20 20 7b 0a 20 20 | 20 20 20 20 20 20 73 74 | {. | st|
|00003880| 72 69 70 74 6d 70 3d 20 | 73 74 72 69 70 5f 77 68 |riptmp= |strip_wh|
|00003890| 69 74 65 28 20 73 74 72 | 69 70 74 6d 70 20 29 0a |ite( str|iptmp ).|
|000038a0| 20 20 20 20 20 20 20 20 | 6c 69 62 72 61 72 79 3d | |library=|
|000038b0| 20 74 6f 6c 6f 77 65 72 | 28 20 73 74 72 69 70 74 | tolower|( stript|
|000038c0| 6d 70 20 29 0a 20 20 20 | 20 20 20 20 20 7d 0a 20 |mp ). | }. |
|000038d0| 20 20 20 65 6c 73 65 0a | 20 20 20 20 69 66 28 20 | else.| if( |
|000038e0| 67 73 75 62 28 20 22 5e | 5c 2e 4e 41 4d 45 22 2c |gsub( "^|\.NAME",|
|000038f0| 20 22 22 2c 20 73 74 72 | 69 70 74 6d 70 20 29 20 | "", str|iptmp ) |
|00003900| 3d 3d 20 31 20 29 0a 20 | 20 20 20 20 20 20 20 7b |== 1 ). | {|
|00003910| 0a 20 20 20 20 20 20 20 | 20 6e 61 6d 65 68 65 61 |. | namehea|
|00003920| 64 3d 20 73 74 72 69 70 | 5f 77 68 69 74 65 28 20 |d= strip|_white( |
|00003930| 73 74 72 69 70 74 6d 70 | 20 29 0a 20 20 20 20 20 |striptmp| ). |
|00003940| 20 20 20 7d 0a 20 20 20 | 20 65 6c 73 65 0a 20 20 | }. | else. |
|00003950| 20 20 69 66 28 20 67 73 | 75 62 28 20 22 5e 5c 2e | if( gs|ub( "^\.|
|00003960| 48 45 41 44 45 52 22 2c | 20 22 22 2c 20 73 74 72 |HEADER",| "", str|
|00003970| 69 70 74 6d 70 20 29 20 | 3d 3d 20 31 20 29 0a 20 |iptmp ) |== 1 ). |
|00003980| 20 20 20 20 20 20 20 7b | 0a 20 20 20 20 20 20 20 | {|. |
|00003990| 20 73 74 72 69 70 74 6d | 70 3d 20 73 74 72 69 70 | striptm|p= strip|
|000039a0| 5f 77 68 69 74 65 28 20 | 73 74 72 69 70 74 6d 70 |_white( |striptmp|
|000039b0| 20 29 0a 09 68 65 61 64 | 65 72 3d 20 74 6f 75 70 | )..head|er= toup|
|000039c0| 70 65 72 28 20 73 74 72 | 69 70 74 6d 70 20 29 0a |per( str|iptmp ).|
|000039d0| 20 20 20 20 20 20 20 20 | 7d 0a 20 20 20 20 65 6c | |}. el|
|000039e0| 73 65 0a 20 20 20 20 69 | 66 28 20 67 73 75 62 28 |se. i|f( gsub(|
|000039f0| 20 22 5e 5c 2e 49 4e 43 | 4c 55 44 45 22 2c 20 22 | "^\.INC|LUDE", "|
|00003a00| 22 2c 20 73 74 72 69 70 | 74 6d 70 20 29 20 3d 3d |", strip|tmp ) ==|
|00003a10| 20 31 20 29 0a 20 20 20 | 20 20 20 20 20 7b 0a 20 | 1 ). | {. |
|00003a20| 20 20 20 20 20 20 20 69 | 6e 63 6c 75 64 65 66 69 | i|ncludefi|
|00003a30| 6c 65 3d 20 73 74 72 69 | 70 5f 77 68 69 74 65 28 |le= stri|p_white(|
|00003a40| 20 73 74 72 69 70 74 6d | 70 20 29 0a 20 20 20 20 | striptm|p ). |
|00003a50| 20 20 20 20 7d 0a 20 20 | 20 20 65 6c 73 65 0a 20 | }. | else. |
|00003a60| 20 20 20 69 66 28 20 67 | 73 75 62 28 20 22 5e 5c | if( g|sub( "^\|
|00003a70| 2e 53 45 43 54 49 4f 4e | 22 2c 20 22 22 2c 20 73 |.SECTION|", "", s|
|00003a80| 74 72 69 70 74 6d 70 20 | 29 20 3d 3d 20 31 20 29 |triptmp |) == 1 )|
|00003a90| 0a 20 20 20 20 20 20 20 | 20 7b 0a 09 69 66 28 20 |. | {..if( |
|00003aa0| 64 6f 63 63 6f 75 6e 74 | 20 3e 20 30 20 29 0a 20 |doccount| > 0 ). |
|00003ab0| 20 20 20 20 20 20 20 20 | 20 20 20 64 6f 63 5b 20 | | doc[ |
|00003ac0| 64 6f 63 63 6f 75 6e 74 | 2b 2b 20 5d 3d 20 22 2e |doccount|++ ]= ".|
|00003ad0| 53 4b 22 0a 20 20 20 20 | 20 20 20 20 73 74 72 69 |SK". | stri|
|00003ae0| 70 74 6d 70 3d 20 73 74 | 72 69 70 5f 77 68 69 74 |ptmp= st|rip_whit|
|00003af0| 65 28 20 73 74 72 69 70 | 74 6d 70 20 29 0a 20 20 |e( strip|tmp ). |
|00003b00| 20 20 20 20 20 20 73 74 | 72 69 70 74 6d 70 3d 20 | st|riptmp= |
|00003b10| 74 6f 75 70 70 65 72 28 | 20 73 74 72 69 70 74 6d |toupper(| striptm|
|00003b20| 70 20 29 0a 20 20 20 20 | 20 20 20 20 64 6f 63 5b |p ). | doc[|
|00003b30| 20 64 6f 63 63 6f 75 6e | 74 2b 2b 20 5d 3d 20 22 | doccoun|t++ ]= "|
|00003b40| 25 68 22 20 73 74 72 69 | 70 74 6d 70 0a 20 20 20 |%h" stri|ptmp. |
|00003b50| 20 20 20 20 20 64 6f 63 | 5f 66 6c 61 67 3d 20 22 | doc|_flag= "|
|00003b60| 74 72 75 65 22 0a 20 20 | 20 20 20 20 20 20 7d 0a |true". | }.|
|00003b70| 20 20 20 20 65 6c 73 65 | 20 69 66 28 20 64 6f 63 | else| if( doc|
|00003b80| 5f 66 6c 61 67 20 3d 3d | 20 22 74 72 75 65 22 20 |_flag ==| "true" |
|00003b90| 29 0a 20 20 20 20 20 20 | 20 20 7b 0a 20 20 20 20 |). | {. |
|00003ba0| 20 20 20 20 64 6f 63 5b | 20 64 6f 63 63 6f 75 6e | doc[| doccoun|
|00003bb0| 74 2b 2b 20 5d 3d 20 74 | 6d 70 0a 20 20 20 20 20 |t++ ]= t|mp. |
|00003bc0| 20 20 20 7d 0a 20 20 20 | 20 7d 0a 0a 4e 46 20 3d | }. | }..NF =|
|00003bd0| 3d 20 30 20 7b 0a 20 20 | 20 20 69 66 28 20 64 6f |= 0 {. | if( do|
|00003be0| 63 5f 66 6c 61 67 20 3d | 3d 20 22 74 72 75 65 22 |c_flag =|= "true"|
|00003bf0| 20 29 0a 09 7b 0a 20 20 | 20 20 20 20 20 20 64 6f | )..{. | do|
|00003c00| 63 5f 66 6c 61 67 3d 20 | 22 22 0a 09 7d 0a 20 20 |c_flag= |""..}. |
|00003c10| 20 20 7d 0a 0a 45 4e 44 | 20 7b 0a 20 20 20 20 23 | }..END| {. #|
|00003c20| 20 67 65 74 20 74 68 65 | 20 6d 6f 64 69 66 79 20 | get the| modify |
|00003c30| 64 61 74 65 20 6f 66 20 | 74 68 65 20 66 69 6c 65 |date of |the file|
|00003c40| 0a 20 20 20 20 69 66 28 | 20 6c 65 6e 67 74 68 28 |. if(| length(|
|00003c50| 6d 74 69 6d 65 29 20 3d | 3d 20 30 20 29 0a 09 7b |mtime) =|= 0 )..{|
|00003c60| 0a 09 22 6c 73 20 2d 6c | 20 22 20 46 49 4c 45 4e |.."ls -l| " FILEN|
|00003c70| 41 4d 45 20 7c 20 67 65 | 74 6c 69 6e 65 20 74 6d |AME | ge|tline tm|
|00003c80| 70 0a 09 64 61 74 65 3d | 20 73 75 62 73 74 72 28 |p..date=| substr(|
|00003c90| 20 74 6d 70 2c 20 33 33 | 2c 20 31 32 20 29 3b 0a | tmp, 33|, 12 );.|
|00003ca0| 09 7d 0a 20 20 20 20 65 | 6c 73 65 0a 09 7b 0a 09 |.}. e|lse..{..|
|00003cb0| 6d 74 69 6d 65 20 22 20 | 22 20 46 49 4c 45 4e 41 |mtime " |" FILENA|
|00003cc0| 4d 45 20 7c 20 67 65 74 | 6c 69 6e 65 20 64 61 74 |ME | get|line dat|
|00003cd0| 65 0a 09 7d 0a 0a 20 20 | 20 20 23 20 49 66 20 2e |e..}.. | # If .|
|00003ce0| 4e 41 4d 45 20 6e 6f 74 | 20 73 70 65 63 69 66 69 |NAME not| specifi|
|00003cf0| 65 64 2c 20 74 68 65 6e | 20 6d 61 6b 65 20 6f 6e |ed, then| make on|
|00003d00| 65 20 75 70 0a 20 20 20 | 20 69 66 28 20 6c 65 6e |e up. | if( len|
|00003d10| 67 74 68 28 20 6e 61 6d | 65 68 65 61 64 20 29 20 |gth( nam|ehead ) |
|00003d20| 3d 3d 20 30 20 29 0a 09 | 6e 61 6d 65 68 65 61 64 |== 0 )..|namehead|
|00003d30| 3d 20 20 46 49 4c 45 4e | 41 4d 45 20 22 20 2d 20 |= FILEN|AME " - |
|00003d40| 3f 3f 3f 22 0a 0a 20 20 | 20 20 23 20 4d 61 6b 65 |???".. | # Make|
|00003d50| 20 61 20 6e 61 6d 65 20 | 66 6f 72 20 74 68 65 20 | a name |for the |
|00003d60| 6d 61 6e 20 70 61 67 65 | 20 66 72 6f 6d 20 74 68 |man page| from th|
|00003d70| 65 20 66 69 72 73 74 20 | 77 6f 72 64 20 69 6e 20 |e first |word in |
|00003d80| 74 68 65 0a 20 20 20 20 | 23 20 4e 41 4d 45 20 73 |the. |# NAME s|
|00003d90| 65 63 74 69 6f 6e 2e 0a | 20 20 20 20 70 6f 73 3d |ection..| pos=|
|00003da0| 20 6d 61 74 63 68 28 20 | 6e 61 6d 65 68 65 61 64 | match( |namehead|
|00003db0| 2c 20 22 5b 20 2c 5d 22 | 20 29 3b 0a 20 20 20 20 |, "[ ,]"| );. |
|00003dc0| 69 66 28 20 70 6f 73 20 | 3d 3d 20 30 20 29 0a 09 |if( pos |== 0 )..|
|00003dd0| 74 69 74 6c 65 6e 61 6d | 65 3d 20 6e 61 6d 65 68 |titlenam|e= nameh|
|00003de0| 65 61 64 0a 20 20 20 20 | 65 6c 73 65 0a 09 74 69 |ead. |else..ti|
|00003df0| 74 6c 65 6e 61 6d 65 3d | 20 73 75 62 73 74 72 28 |tlename=| substr(|
|00003e00| 20 6e 61 6d 65 68 65 61 | 64 2c 20 31 2c 20 70 6f | namehea|d, 1, po|
|00003e10| 73 2d 31 20 29 0a 20 20 | 20 20 74 69 74 6c 65 6e |s-1 ). | titlen|
|00003e20| 61 6d 65 3d 20 74 6f 75 | 70 70 65 72 28 74 69 74 |ame= tou|pper(tit|
|00003e30| 6c 65 6e 61 6d 65 29 0a | 0a 20 20 20 20 23 20 49 |lename).|. # I|
|00003e40| 66 20 2e 48 45 41 44 45 | 52 20 6e 6f 74 20 73 70 |f .HEADE|R not sp|
|00003e50| 65 63 69 66 69 65 64 20 | 74 68 65 6e 20 75 73 65 |ecified |then use|
|00003e60| 20 43 2b 2b 0a 20 20 20 | 20 69 66 28 20 6c 65 6e | C++. | if( len|
|00003e70| 67 74 68 28 20 68 65 61 | 64 65 72 20 29 20 3d 3d |gth( hea|der ) ==|
|00003e80| 20 30 20 29 0a 20 20 20 | 20 20 20 20 20 68 65 61 | 0 ). | hea|
|00003e90| 64 65 72 3d 20 22 43 2b | 2b 22 0a 0a 20 20 20 20 |der= "C+|+".. |
|00003ea0| 23 20 49 66 20 2e 4c 49 | 42 52 41 52 59 20 6e 6f |# If .LI|BRARY no|
|00003eb0| 74 20 73 70 65 63 69 66 | 69 65 64 20 74 68 65 6e |t specif|ied then|
|00003ec0| 20 75 73 65 20 63 2b 2b | 0a 20 20 20 20 69 66 28 | use c++|. if(|
|00003ed0| 20 6c 65 6e 67 74 68 28 | 20 6c 69 62 72 61 72 79 | length(| library|
|00003ee0| 20 29 20 3d 3d 20 30 20 | 29 0a 20 20 20 20 20 20 | ) == 0 |). |
|00003ef0| 20 20 6c 69 62 72 61 72 | 79 3d 20 22 63 2b 2b 22 | librar|y= "c++"|
|00003f00| 0a 0a 20 20 20 20 23 20 | 53 74 61 72 74 20 74 68 |.. # |Start th|
|00003f10| 65 20 66 6f 72 6d 61 74 | 74 69 6e 67 20 61 6e 64 |e format|ting and|
|00003f20| 20 70 72 69 6e 74 20 74 | 68 65 20 74 69 74 6c 65 | print t|he title|
|00003f30| 20 61 6e 64 20 6e 61 6d | 65 0a 20 20 20 20 66 6f | and nam|e. fo|
|00003f40| 72 6d 61 74 5f 73 74 61 | 72 74 28 20 74 69 74 6c |rmat_sta|rt( titl|
|00003f50| 65 6e 61 6d 65 2c 20 6c | 69 62 72 61 72 79 2c 20 |ename, l|ibrary, |
|00003f60| 68 65 61 64 65 72 2c 20 | 64 61 74 65 2c 20 6e 61 |header, |date, na|
|00003f70| 6d 65 68 65 61 64 20 29 | 3b 0a 0a 20 20 20 20 23 |mehead )|;.. #|
|00003f80| 20 70 72 69 6e 74 20 74 | 68 65 20 73 79 6e 6f 70 | print t|he synop|
|00003f90| 73 69 73 20 68 65 61 64 | 65 72 0a 20 20 20 20 66 |sis head|er. f|
|00003fa0| 6f 72 6d 61 74 5f 6c 69 | 6e 65 28 20 22 25 68 22 |ormat_li|ne( "%h"|
|00003fb0| 20 22 53 59 4e 4f 50 53 | 49 53 22 20 29 0a 20 20 | "SYNOPS|IS" ). |
|00003fc0| 20 20 66 6f 72 6d 61 74 | 5f 6c 69 6e 65 28 20 22 | format|_line( "|
|00003fd0| 2e 42 4f 22 20 29 0a 20 | 20 20 20 66 6f 72 6d 61 |.BO" ). | forma|
|00003fe0| 74 5f 6c 69 6e 65 28 20 | 22 2e 4e 46 22 20 29 0a |t_line( |".NF" ).|
|00003ff0| 0a 20 20 20 20 69 66 28 | 20 6c 65 6e 67 74 68 28 |. if(| length(|
|00004000| 20 69 6e 63 6c 75 64 65 | 66 69 6c 65 20 29 20 3d | include|file ) =|
|00004010| 3d 20 30 20 29 0a 20 20 | 20 20 20 20 20 20 69 6e |= 0 ). | in|
|00004020| 63 6c 75 64 65 66 69 6c | 65 3d 20 74 6f 6c 6f 77 |cludefil|e= tolow|
|00004030| 65 72 28 46 49 4c 45 4e | 41 4d 45 29 3b 0a 20 20 |er(FILEN|AME);. |
|00004040| 20 20 66 6f 72 6d 61 74 | 5f 6c 69 6e 65 28 20 22 | format|_line( "|
|00004050| 23 69 6e 63 6c 75 64 65 | 20 3c 22 20 69 6e 63 6c |#include| <" incl|
|00004060| 75 64 65 66 69 6c 65 20 | 20 22 3e 22 20 29 0a 20 |udefile | ">" ). |
|00004070| 20 20 20 66 6f 72 6d 61 | 74 5f 6c 69 6e 65 28 20 | forma|t_line( |
|00004080| 22 2e 53 4b 22 20 29 0a | 0a 20 20 20 20 6f 75 74 |".SK" ).|. out|
|00004090| 70 75 74 5f 63 6c 61 73 | 73 28 29 0a 20 20 20 20 |put_clas|s(). |
|000040a0| 6f 75 74 70 75 74 5f 73 | 65 63 74 69 6f 6e 28 20 |output_s|ection( |
|000040b0| 65 78 74 65 72 6e 20 29 | 0a 0a 20 20 20 20 66 6f |extern )|.. fo|
|000040c0| 72 6d 61 74 5f 6c 69 6e | 65 28 20 22 2e 4e 42 22 |rmat_lin|e( ".NB"|
|000040d0| 20 29 0a 20 20 20 20 66 | 6f 72 6d 61 74 5f 6c 69 | ). f|ormat_li|
|000040e0| 6e 65 28 20 22 2e 46 49 | 22 20 29 0a 0a 20 20 20 |ne( ".FI|" ).. |
|000040f0| 20 6f 75 74 70 75 74 5f | 73 65 63 74 69 6f 6e 28 | output_|section(|
|00004100| 20 64 6f 63 20 29 0a 0a | 20 20 20 20 66 6f 72 6d | doc )..| form|
|00004110| 61 74 5f 6c 69 6e 65 28 | 20 22 2e 4e 46 22 20 29 |at_line(| ".NF" )|
|00004120| 0a 20 20 20 20 69 66 28 | 20 73 74 72 75 63 74 63 |. if(| structc|
|00004130| 6f 75 6e 74 20 3e 20 31 | 20 29 20 6f 75 74 70 75 |ount > 1| ) outpu|
|00004140| 74 5f 73 65 63 74 69 6f | 6e 28 20 73 74 72 75 63 |t_sectio|n( struc|
|00004150| 74 20 29 0a 20 20 20 20 | 69 66 28 20 65 6e 75 6d |t ). |if( enum|
|00004160| 63 6f 75 6e 74 20 3e 20 | 31 20 29 20 6f 75 74 70 |count > |1 ) outp|
|00004170| 75 74 5f 73 65 63 74 69 | 6f 6e 28 20 65 6e 75 6d |ut_secti|on( enum|
|00004180| 20 29 0a 20 20 20 20 69 | 66 28 20 74 79 70 65 64 | ). i|f( typed|
|00004190| 65 66 63 6f 75 6e 74 20 | 3e 20 31 20 29 20 6f 75 |efcount |> 1 ) ou|
|000041a0| 74 70 75 74 5f 73 65 63 | 74 69 6f 6e 28 20 74 79 |tput_sec|tion( ty|
|000041b0| 70 65 64 65 66 20 29 0a | 20 20 20 20 69 66 28 20 |pedef ).| if( |
|000041c0| 63 6f 6e 73 74 63 6f 75 | 6e 74 20 3e 20 31 20 29 |constcou|nt > 1 )|
|000041d0| 20 6f 75 74 70 75 74 5f | 73 65 63 74 69 6f 6e 28 | output_|section(|
|000041e0| 20 63 6f 6e 73 74 20 29 | 0a 20 20 20 20 69 66 28 | const )|. if(|
|000041f0| 20 64 65 66 69 6e 65 63 | 6f 75 6e 74 20 3e 20 31 | definec|ount > 1|
|00004200| 20 29 20 6f 75 74 70 75 | 74 5f 73 65 63 74 69 6f | ) outpu|t_sectio|
|00004210| 6e 28 20 64 65 66 69 6e | 65 20 29 0a 20 20 20 20 |n( defin|e ). |
|00004220| 69 66 28 20 69 6e 63 6c | 75 64 65 63 6f 75 6e 74 |if( incl|udecount|
|00004230| 20 3e 20 31 20 29 20 6f | 75 74 70 75 74 5f 73 65 | > 1 ) o|utput_se|
|00004240| 63 74 69 6f 6e 28 20 69 | 6e 63 6c 75 64 65 20 29 |ction( i|nclude )|
|00004250| 0a 20 20 20 20 69 66 28 | 20 73 6f 75 72 63 65 66 |. if(| sourcef|
|00004260| 69 6c 65 63 6f 75 6e 74 | 20 3e 20 31 20 29 20 6f |ilecount| > 1 ) o|
|00004270| 75 74 70 75 74 5f 73 65 | 63 74 69 6f 6e 28 20 73 |utput_se|ction( s|
|00004280| 6f 75 72 63 65 66 69 6c | 65 20 29 0a 0a 20 20 20 |ourcefil|e ).. |
|00004290| 20 6f 75 74 70 75 74 5f | 73 75 6d 6d 61 72 79 73 | output_|summarys|
|000042a0| 28 29 0a 0a 20 20 20 20 | 23 20 65 6e 64 20 74 68 |().. |# end th|
|000042b0| 65 20 66 6f 72 6d 61 74 | 74 69 6e 67 0a 20 20 20 |e format|ting. |
|000042c0| 20 66 6f 72 6d 61 74 5f | 65 6e 64 28 29 0a 20 20 | format_|end(). |
|000042d0| 20 20 7d 0a 0a 23 20 43 | 61 6c 6c 20 74 6f 20 70 | }..# C|all to p|
|000042e0| 72 6f 63 65 73 73 20 61 | 20 63 6c 61 73 73 2e 20 |rocess a| class. |
|000042f0| 20 50 61 73 73 20 74 68 | 65 20 6e 61 6d 65 20 6f | Pass th|e name o|
|00004300| 66 20 74 68 65 20 63 6c | 61 73 73 2e 0a 66 75 6e |f the cl|ass..fun|
|00004310| 63 74 69 6f 6e 20 70 72 | 6f 63 65 73 73 5f 63 6c |ction pr|ocess_cl|
|00004320| 61 73 73 28 20 6e 61 6d | 65 2c 20 20 20 20 69 6e |ass( nam|e, in|
|00004330| 70 75 74 73 74 72 2c 69 | 69 2c 62 65 72 73 20 29 |putstr,i|i,bers )|
|00004340| 0a 20 20 20 20 7b 0a 20 | 20 20 20 70 72 69 76 61 |. {. | priva|
|00004350| 74 65 63 6f 75 6e 74 3d | 20 31 0a 20 20 20 20 70 |tecount=| 1. p|
|00004360| 75 62 6c 69 63 63 6f 75 | 6e 74 3d 20 31 0a 20 20 |ubliccou|nt= 1. |
|00004370| 20 20 70 72 6f 74 65 63 | 74 65 64 63 6f 75 6e 74 | protec|tedcount|
|00004380| 3d 20 31 0a 20 20 20 20 | 69 6e 64 65 6e 74 5f 6c |= 1. |indent_l|
|00004390| 65 76 65 6c 3d 20 22 25 | 40 22 0a 0a 20 20 20 20 |evel= "%|@".. |
|000043a0| 23 20 57 65 20 64 6f 20 | 6e 6f 74 20 72 65 63 6f |# We do |not reco|
|000043b0| 72 64 20 74 68 65 20 63 | 75 72 6c 79 20 62 72 61 |rd the c|urly bra|
|000043c0| 63 65 73 20 73 75 72 72 | 6f 75 6e 64 69 6e 67 20 |ces surr|ounding |
|000043d0| 74 68 65 20 63 6c 61 73 | 73 0a 20 20 20 20 23 20 |the clas|s. # |
|000043e0| 62 75 74 20 77 65 20 72 | 65 63 6f 72 64 20 61 6c |but we r|ecord al|
|000043f0| 6c 20 6f 74 68 65 72 73 | 2e 0a 0a 20 20 20 20 23 |l others|... #|
|00004400| 20 49 66 20 61 6e 20 6f | 70 65 6e 20 63 75 72 6c | If an o|pen curl|
|00004410| 79 20 62 72 61 63 65 20 | 6f 6e 20 74 68 65 20 22 |y brace |on the "|
|00004420| 63 6c 61 73 73 22 20 6c | 69 6e 65 20 74 68 65 6e |class" l|ine then|
|00004430| 20 69 6e 63 72 69 6d 65 | 6e 74 20 74 68 65 0a 20 | incrime|nt the. |
|00004440| 20 20 20 23 20 69 6e 64 | 65 6e 74 20 6c 65 76 65 | # ind|ent leve|
|00004450| 6c 2e 0a 20 20 20 20 23 | 20 41 6c 73 6f 20 73 65 |l.. #| Also se|
|00004460| 65 20 69 66 20 6b 26 72 | 20 73 74 79 6c 65 20 63 |e if k&r| style c|
|00004470| 75 72 6c 79 20 62 72 61 | 63 65 20 61 6c 69 67 6e |urly bra|ce align|
|00004480| 6d 65 6e 74 2e 0a 20 20 | 20 20 69 66 28 20 6e 61 |ment.. | if( na|
|00004490| 6d 65 20 7e 20 22 2e 2a | 7b 2e 2a 22 20 29 0a 09 |me ~ ".*|{.*" )..|
|000044a0| 7b 0a 09 69 6e 64 65 6e | 74 5f 6c 65 76 65 6c 3d |{..inden|t_level=|
|000044b0| 20 22 25 40 22 0a 09 73 | 74 79 6c 65 3d 20 22 6b | "%@"..s|tyle= "k|
|000044c0| 26 72 22 0a 09 73 75 62 | 28 20 22 7b 22 2c 20 22 |&r"..sub|( "{", "|
|000044d0| 22 2c 20 6e 61 6d 65 20 | 29 3b 0a 09 7d 0a 20 20 |", name |);..}. |
|000044e0| 20 20 65 6c 73 65 0a 09 | 73 74 79 6c 65 3d 20 22 | else..|style= "|
|000044f0| 63 75 73 74 6f 6d 22 0a | 0a 20 20 20 20 23 20 72 |custom".|. # r|
|00004500| 65 63 6f 72 64 20 74 68 | 65 20 6e 61 6d 65 0a 20 |ecord th|e name. |
|00004510| 20 20 20 6e 61 6d 65 3d | 20 73 74 72 69 70 5f 77 | name=| strip_w|
|00004520| 68 69 74 65 28 20 6e 61 | 6d 65 20 29 0a 20 20 20 |hite( na|me ). |
|00004530| 20 63 6c 61 73 73 5b 20 | 63 6c 61 73 73 63 6f 75 | class[ |classcou|
|00004540| 6e 74 2c 20 22 68 65 61 | 64 22 2c 20 30 20 5d 3d |nt, "hea|d", 0 ]=|
|00004550| 20 6e 61 6d 65 0a 0a 20 | 20 20 20 23 20 67 65 74 | name.. | # get|
|00004560| 20 6c 69 6e 65 73 20 6f | 66 20 69 6e 70 75 74 20 | lines o|f input |
|00004570| 75 6e 74 69 6c 20 45 4f | 46 0a 20 20 20 20 69 69 |until EO|F. ii|
|00004580| 3d 20 22 70 72 69 76 61 | 74 65 22 0a 20 20 20 20 |= "priva|te". |
|00004590| 77 68 69 6c 65 28 20 28 | 67 65 74 6c 69 6e 65 20 |while( (|getline |
|000045a0| 69 6e 70 75 74 73 74 72 | 29 20 3e 20 30 20 29 0a |inputstr|) > 0 ).|
|000045b0| 20 20 20 20 20 20 20 20 | 7b 0a 20 20 20 20 20 20 | |{. |
|000045c0| 20 20 23 20 6a 75 73 74 | 20 67 65 74 20 74 68 65 | # just| get the|
|000045d0| 20 74 6f 6b 65 6e 28 73 | 29 2c 20 69 67 6e 6f 72 | token(s|), ignor|
|000045e0| 65 20 62 6c 61 6e 6b 20 | 6c 69 6e 65 73 0a 20 20 |e blank |lines. |
|000045f0| 20 20 20 20 20 20 69 6e | 70 75 74 73 74 72 3d 20 | in|putstr= |
|00004600| 73 74 72 69 70 5f 77 68 | 69 74 65 28 20 69 6e 70 |strip_wh|ite( inp|
|00004610| 75 74 73 74 72 20 29 0a | 09 69 66 28 20 6c 65 6e |utstr ).|.if( len|
|00004620| 67 74 68 28 69 6e 70 75 | 74 73 74 72 29 20 3d 3d |gth(inpu|tstr) ==|
|00004630| 20 30 20 29 0a 09 20 20 | 20 20 63 6f 6e 74 69 6e | 0 ).. | contin|
|00004640| 75 65 3b 0a 0a 20 20 20 | 20 20 20 20 20 23 20 73 |ue;.. | # s|
|00004650| 65 65 20 69 66 20 73 68 | 6f 75 6c 64 20 61 64 6a |ee if sh|ould adj|
|00004660| 75 73 74 20 74 68 65 20 | 69 6e 64 65 6e 74 20 6c |ust the |indent l|
|00004670| 65 76 65 6c 0a 09 69 66 | 28 20 73 74 79 6c 65 20 |evel..if|( style |
|00004680| 3d 3d 20 22 6b 26 72 22 | 20 29 0a 09 20 20 20 20 |== "k&r"| ).. |
|00004690| 7b 0a 09 20 20 20 20 69 | 66 28 20 69 6e 70 75 74 |{.. i|f( input|
|000046a0| 73 74 72 20 7e 20 22 7d | 2e 2a 22 20 29 0a 09 20 |str ~ "}|.*" ).. |
|000046b0| 20 20 20 20 20 20 20 7b | 0a 09 20 20 20 20 20 20 | {|.. |
|000046c0| 20 20 69 6e 64 65 6e 74 | 5f 6c 65 76 65 6c 3d 20 | indent|_level= |
|000046d0| 73 75 62 73 74 72 28 20 | 69 6e 64 65 6e 74 5f 6c |substr( |indent_l|
|000046e0| 65 76 65 6c 2c 20 33 20 | 29 0a 09 20 20 20 20 20 |evel, 3 |).. |
|000046f0| 20 20 20 69 66 28 20 6c | 65 6e 67 74 68 28 69 6e | if( l|ength(in|
|00004700| 64 65 6e 74 5f 6c 65 76 | 65 6c 29 20 3d 3d 20 32 |dent_lev|el) == 2|
|00004710| 20 29 0a 09 09 20 20 20 | 20 7b 0a 20 20 20 20 20 | )... | {. |
|00004720| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 62 | | b|
|00004730| 72 65 61 6b 3b 0a 09 09 | 20 20 20 20 7d 0a 09 20 |reak;...| }.. |
|00004740| 20 20 20 20 20 20 20 7d | 0a 09 20 20 20 20 7d 0a | }|.. }.|
|00004750| 09 65 6c 73 65 0a 09 20 | 20 20 20 7b 0a 09 20 20 |.else.. | {.. |
|00004760| 20 20 69 66 28 20 69 6e | 70 75 74 73 74 72 20 7e | if( in|putstr ~|
|00004770| 20 22 2e 2a 7b 2e 2a 22 | 20 29 0a 09 20 20 20 20 | ".*{.*"| ).. |
|00004780| 20 20 20 20 7b 0a 09 20 | 20 20 20 20 20 20 20 69 | {.. | i|
|00004790| 6e 64 65 6e 74 5f 6c 65 | 76 65 6c 3d 20 69 6e 64 |ndent_le|vel= ind|
|000047a0| 65 6e 74 5f 6c 65 76 65 | 6c 20 22 25 40 22 0a 0a |ent_leve|l "%@"..|
|000047b0| 09 09 69 66 28 20 6c 65 | 6e 67 74 68 28 69 6e 64 |..if( le|ngth(ind|
|000047c0| 65 6e 74 5f 6c 65 76 65 | 6c 29 20 3d 3d 20 34 20 |ent_leve|l) == 4 |
|000047d0| 29 0a 09 09 20 20 20 20 | 63 6f 6e 74 69 6e 75 65 |)... |continue|
|000047e0| 3b 0a 09 20 20 20 20 20 | 20 20 20 7d 0a 09 20 20 |;.. | }.. |
|000047f0| 20 20 65 6c 73 65 0a 09 | 20 20 20 20 69 66 28 20 | else..| if( |
|00004800| 69 6e 70 75 74 73 74 72 | 20 7e 20 22 7d 2e 2a 22 |inputstr| ~ "}.*"|
|00004810| 20 29 0a 09 20 20 20 20 | 20 20 20 20 7b 0a 09 20 | ).. | {.. |
|00004820| 20 20 20 20 20 20 20 69 | 66 28 20 6c 65 6e 67 74 | i|f( lengt|
|00004830| 68 28 69 6e 64 65 6e 74 | 5f 6c 65 76 65 6c 29 20 |h(indent|_level) |
|00004840| 3d 3d 20 34 20 29 0a 20 | 20 20 20 20 20 20 20 20 |== 4 ). | |
|00004850| 20 20 20 20 20 20 20 20 | 20 20 20 62 72 65 61 6b | | break|
|00004860| 3b 0a 09 09 7d 0a 09 20 | 20 20 20 7d 0a 0a 20 20 |;...}.. | }.. |
|00004870| 20 20 20 20 20 20 23 20 | 70 75 62 6c 69 63 20 6d | # |public m|
|00004880| 65 6d 62 65 72 73 20 66 | 6f 6c 6c 6f 77 0a 20 20 |embers f|ollow. |
|00004890| 20 20 20 20 20 20 69 66 | 28 20 69 6e 70 75 74 73 | if|( inputs|
|000048a0| 74 72 20 7e 20 22 70 75 | 62 6c 69 63 20 2a 3a 22 |tr ~ "pu|blic *:"|
|000048b0| 20 29 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 69 | ). | i|
|000048c0| 69 3d 20 22 70 75 62 6c | 69 63 22 0a 0a 20 20 20 |i= "publ|ic".. |
|000048d0| 20 20 20 20 20 23 20 70 | 72 69 76 61 74 65 20 6d | # p|rivate m|
|000048e0| 65 6d 62 65 72 73 20 66 | 6f 6c 6c 6f 77 0a 20 20 |embers f|ollow. |
|000048f0| 20 20 20 20 20 20 65 6c | 73 65 20 69 66 28 20 69 | el|se if( i|
|00004900| 6e 70 75 74 73 74 72 20 | 7e 20 22 70 72 69 76 61 |nputstr |~ "priva|
|00004910| 74 65 20 2a 3a 22 20 29 | 0a 20 20 20 20 20 20 20 |te *:" )|. |
|00004920| 20 20 20 20 20 69 69 3d | 20 22 70 72 69 76 61 74 | ii=| "privat|
|00004930| 65 22 0a 0a 20 20 20 20 | 20 20 20 20 23 20 70 72 |e".. | # pr|
|00004940| 6f 74 65 63 74 65 64 20 | 6d 65 6d 62 65 72 73 20 |otected |members |
|00004950| 66 6f 6c 6c 6f 77 0a 20 | 20 20 20 20 20 20 20 65 |follow. | e|
|00004960| 6c 73 65 20 69 66 28 20 | 69 6e 70 75 74 73 74 72 |lse if( |inputstr|
|00004970| 20 20 7e 20 22 70 72 6f | 74 65 63 74 65 64 20 2a | ~ "pro|tected *|
|00004980| 3a 22 20 29 0a 20 20 20 | 20 20 20 20 20 20 20 20 |:" ). | |
|00004990| 20 69 69 3d 20 22 70 72 | 6f 74 65 63 74 65 64 22 | ii= "pr|otected"|
|000049a0| 0a 0a 20 20 20 20 20 20 | 20 20 65 6c 73 65 0a 20 |.. | else. |
|000049b0| 20 20 20 20 20 20 20 20 | 20 20 20 7b 0a 20 20 20 | | {. |
|000049c0| 20 20 20 20 20 20 20 20 | 20 67 73 75 62 28 20 22 | | gsub( "|
|000049d0| 2f 2f 22 2c 20 22 20 20 | 22 2c 20 69 6e 70 75 74 |//", " |", input|
|000049e0| 73 74 72 20 29 0a 09 20 | 20 20 20 74 6d 70 3d 20 |str ).. | tmp= |
|000049f0| 69 6e 64 65 6e 74 5f 6c | 65 76 65 6c 20 69 6e 70 |indent_l|evel inp|
|00004a00| 75 74 73 74 72 0a 09 20 | 20 20 20 69 66 28 20 69 |utstr.. | if( i|
|00004a10| 69 20 3d 3d 20 22 70 72 | 69 76 61 74 65 22 20 29 |i == "pr|ivate" )|
|00004a20| 0a 09 09 63 6c 61 73 73 | 5b 20 63 6c 61 73 73 63 |...class|[ classc|
|00004a30| 6f 75 6e 74 2c 20 22 70 | 72 69 76 61 74 65 22 2c |ount, "p|rivate",|
|00004a40| 20 70 72 69 76 61 74 65 | 63 6f 75 6e 74 2b 2b 20 | private|count++ |
|00004a50| 5d 3d 20 74 6d 70 0a 09 | 20 20 20 20 65 6c 73 65 |]= tmp..| else|
|00004a60| 0a 09 20 20 20 20 69 66 | 28 20 69 69 20 3d 3d 20 |.. if|( ii == |
|00004a70| 22 70 75 62 6c 69 63 22 | 20 29 0a 09 09 63 6c 61 |"public"| )...cla|
|00004a80| 73 73 5b 20 63 6c 61 73 | 73 63 6f 75 6e 74 2c 20 |ss[ clas|scount, |
|00004a90| 22 70 75 62 6c 69 63 22 | 2c 20 70 75 62 6c 69 63 |"public"|, public|
|00004aa0| 63 6f 75 6e 74 2b 2b 20 | 5d 3d 20 74 6d 70 0a 09 |count++ |]= tmp..|
|00004ab0| 20 20 20 20 65 6c 73 65 | 0a 09 20 20 20 20 69 66 | else|.. if|
|00004ac0| 28 20 69 69 20 3d 3d 20 | 22 70 72 6f 74 65 63 74 |( ii == |"protect|
|00004ad0| 65 64 22 20 29 0a 09 09 | 63 6c 61 73 73 5b 20 63 |ed" )...|class[ c|
|00004ae0| 6c 61 73 73 63 6f 75 6e | 74 2c 20 22 70 72 6f 74 |lasscoun|t, "prot|
|00004af0| 65 63 74 65 64 22 2c 20 | 70 72 6f 74 65 63 74 65 |ected", |protecte|
|00004b00| 64 63 6f 75 6e 74 2b 2b | 20 5d 3d 20 74 6d 70 0a |dcount++| ]= tmp.|
|00004b10| 20 20 20 20 20 20 20 20 | 20 20 20 20 7d 0a 0a 20 | | }.. |
|00004b20| 20 20 20 20 20 20 20 23 | 20 73 65 65 20 69 66 20 | #| see if |
|00004b30| 73 68 6f 75 6c 64 20 61 | 64 6a 75 73 74 20 74 68 |should a|djust th|
|00004b40| 65 20 69 6e 64 65 6e 74 | 20 6c 65 76 65 6c 0a 09 |e indent| level..|
|00004b50| 69 66 28 20 73 74 79 6c | 65 20 3d 3d 20 22 6b 26 |if( styl|e == "k&|
|00004b60| 72 22 20 29 0a 09 20 20 | 20 20 7b 0a 09 20 20 20 |r" ).. | {.. |
|00004b70| 20 69 66 28 20 69 6e 70 | 75 74 73 74 72 20 7e 20 | if( inp|utstr ~ |
|00004b80| 22 2e 2a 7b 2e 2a 22 20 | 29 0a 09 20 20 20 20 20 |".*{.*" |).. |
|00004b90| 20 20 20 7b 0a 09 20 20 | 20 20 20 20 20 20 69 6e | {.. | in|
|00004ba0| 64 65 6e 74 5f 6c 65 76 | 65 6c 3d 20 69 6e 64 65 |dent_lev|el= inde|
|00004bb0| 6e 74 5f 6c 65 76 65 6c | 20 22 25 40 22 0a 09 20 |nt_level| "%@".. |
|00004bc0| 20 20 20 20 20 20 20 7d | 0a 09 20 20 20 20 7d 0a | }|.. }.|
|00004bd0| 09 65 6c 73 65 0a 09 20 | 20 20 20 7b 0a 09 20 20 |.else.. | {.. |
|00004be0| 20 20 69 66 28 20 69 6e | 70 75 74 73 74 72 20 7e | if( in|putstr ~|
|00004bf0| 20 22 7d 2e 2a 22 20 29 | 0a 09 20 20 20 20 20 20 | "}.*" )|.. |
|00004c00| 20 20 7b 0a 09 20 20 20 | 20 20 20 20 20 69 6e 64 | {.. | ind|
|00004c10| 65 6e 74 5f 6c 65 76 65 | 6c 3d 20 73 75 62 73 74 |ent_leve|l= subst|
|00004c20| 72 28 20 69 6e 64 65 6e | 74 5f 6c 65 76 65 6c 2c |r( inden|t_level,|
|00004c30| 20 33 20 29 0a 09 20 20 | 20 20 20 20 20 20 69 66 | 3 ).. | if|
|00004c40| 28 20 6c 65 6e 67 74 68 | 28 69 6e 64 65 6e 74 5f |( length|(indent_|
|00004c50| 6c 65 76 65 6c 29 20 3d | 3d 20 32 20 29 0a 20 20 |level) =|= 2 ). |
|00004c60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004c70| 20 20 62 72 65 61 6b 3b | 0a 09 20 20 20 20 20 20 | break;|.. |
|00004c80| 20 20 7d 0a 09 20 20 20 | 20 7d 0a 09 7d 0a 0a 20 | }.. | }..}.. |
|00004c90| 20 20 20 63 6c 61 73 73 | 5b 20 63 6c 61 73 73 63 | class|[ classc|
|00004ca0| 6f 75 6e 74 2c 20 22 70 | 75 62 6c 69 63 22 2c 20 |ount, "p|ublic", |
|00004cb0| 30 20 5d 3d 20 70 75 62 | 6c 69 63 63 6f 75 6e 74 |0 ]= pub|liccount|
|00004cc0| 0a 20 20 20 20 63 6c 61 | 73 73 5b 20 63 6c 61 73 |. cla|ss[ clas|
|00004cd0| 73 63 6f 75 6e 74 2c 20 | 22 70 72 6f 74 65 63 74 |scount, |"protect|
|00004ce0| 65 64 22 2c 20 30 20 5d | 3d 20 70 72 6f 74 65 63 |ed", 0 ]|= protec|
|00004cf0| 74 65 64 63 6f 75 6e 74 | 0a 20 20 20 20 63 6c 61 |tedcount|. cla|
|00004d00| 73 73 5b 20 63 6c 61 73 | 73 63 6f 75 6e 74 2c 20 |ss[ clas|scount, |
|00004d10| 22 70 72 69 76 61 74 65 | 22 2c 20 30 20 5d 3d 20 |"private|", 0 ]= |
|00004d20| 70 72 69 76 61 74 65 63 | 6f 75 6e 74 0a 20 20 20 |privatec|ount. |
|00004d30| 20 7d 0a 0a 23 20 70 72 | 6f 63 65 73 73 65 73 20 | }..# pr|ocesses |
|00004d40| 61 20 73 74 72 75 63 74 | 75 72 65 0a 66 75 6e 63 |a struct|ure.func|
|00004d50| 74 69 6f 6e 20 70 72 6f | 63 65 73 73 5f 73 74 72 |tion pro|cess_str|
|00004d60| 75 63 74 28 20 74 6d 70 | 2c 20 20 20 20 20 73 74 |uct( tmp|, st|
|00004d70| 79 6c 65 2c 69 6e 64 65 | 6e 74 5f 6c 65 76 65 6c |yle,inde|nt_level|
|00004d80| 20 29 0a 20 20 20 20 7b | 0a 20 20 20 20 69 6e 64 | ). {|. ind|
|00004d90| 65 6e 74 5f 6c 65 76 65 | 6c 3d 20 22 22 0a 0a 20 |ent_leve|l= "".. |
|00004da0| 20 20 20 69 66 28 20 74 | 6d 70 20 7e 20 22 2e 2a | if( t|mp ~ ".*|
|00004db0| 7b 2e 2a 22 20 29 0a 09 | 73 74 79 6c 65 3d 20 22 |{.*" )..|style= "|
|00004dc0| 6b 26 72 22 0a 20 20 20 | 20 65 6c 73 65 0a 09 73 |k&r". | else..s|
|00004dd0| 74 79 6c 65 3d 20 22 63 | 75 73 74 6f 6d 22 0a 0a |tyle= "c|ustom"..|
|00004de0| 20 20 20 20 64 6f 0a 20 | 20 20 20 20 20 20 20 7b | do. | {|
|00004df0| 0a 20 20 20 20 20 20 20 | 20 74 6d 70 3d 20 73 74 |. | tmp= st|
|00004e00| 72 69 70 5f 77 68 69 74 | 65 28 20 74 6d 70 20 29 |rip_whit|e( tmp )|
|00004e10| 0a 20 20 20 20 20 20 20 | 20 67 73 75 62 28 20 22 |. | gsub( "|
|00004e20| 2f 2f 22 2c 20 22 20 20 | 22 2c 20 74 6d 70 20 29 |//", " |", tmp )|
|00004e30| 3b 0a 0a 09 69 66 28 20 | 73 74 79 6c 65 20 3d 3d |;...if( |style ==|
|00004e40| 20 22 6b 26 72 22 20 29 | 0a 09 20 20 20 20 7b 0a | "k&r" )|.. {.|
|00004e50| 09 20 20 20 20 69 66 28 | 20 74 6d 70 20 7e 20 22 |. if(| tmp ~ "|
|00004e60| 7d 2e 2a 22 20 29 0a 09 | 20 20 20 20 20 20 20 20 |}.*" )..| |
|00004e70| 7b 0a 09 20 20 20 20 20 | 20 20 20 69 6e 64 65 6e |{.. | inden|
|00004e80| 74 5f 6c 65 76 65 6c 3d | 20 73 75 62 73 74 72 28 |t_level=| substr(|
|00004e90| 20 69 6e 64 65 6e 74 5f | 6c 65 76 65 6c 2c 20 33 | indent_|level, 3|
|00004ea0| 20 29 0a 09 20 20 20 20 | 20 20 20 20 69 66 28 20 | ).. | if( |
|00004eb0| 6c 65 6e 67 74 68 28 69 | 6e 64 65 6e 74 5f 6c 65 |length(i|ndent_le|
|00004ec0| 76 65 6c 29 20 3d 3d 20 | 30 20 29 0a 09 09 20 20 |vel) == |0 )... |
|00004ed0| 20 20 7b 0a 09 09 20 20 | 20 20 73 74 72 75 63 74 | {... | struct|
|00004ee0| 5b 20 73 74 72 75 63 74 | 63 6f 75 6e 74 2b 2b 20 |[ struct|count++ |
|00004ef0| 5d 20 3d 20 69 6e 64 65 | 6e 74 5f 6c 65 76 65 6c |] = inde|nt_level|
|00004f00| 20 74 6d 70 0a 20 20 20 | 20 20 20 20 20 20 20 20 | tmp. | |
|00004f10| 20 20 20 20 20 20 20 20 | 20 62 72 65 61 6b 3b 0a | | break;.|
|00004f20| 09 09 20 20 20 20 7d 0a | 09 20 20 20 20 20 20 20 |.. }.|. |
|00004f30| 20 7d 0a 09 20 20 20 20 | 73 74 72 75 63 74 5b 20 | }.. |struct[ |
|00004f40| 73 74 72 75 63 74 63 6f | 75 6e 74 2b 2b 20 5d 20 |structco|unt++ ] |
|00004f50| 3d 20 69 6e 64 65 6e 74 | 5f 6c 65 76 65 6c 20 74 |= indent|_level t|
|00004f60| 6d 70 0a 09 20 20 20 20 | 69 66 28 20 74 6d 70 20 |mp.. |if( tmp |
|00004f70| 7e 20 22 2e 2a 7b 2e 2a | 22 20 29 0a 09 20 20 20 |~ ".*{.*|" ).. |
|00004f80| 20 20 20 20 20 7b 0a 09 | 20 20 20 20 20 20 20 20 | {..| |
|00004f90| 69 6e 64 65 6e 74 5f 6c | 65 76 65 6c 3d 20 69 6e |indent_l|evel= in|
|00004fa0| 64 65 6e 74 5f 6c 65 76 | 65 6c 20 22 25 40 22 0a |dent_lev|el "%@".|
|00004fb0| 09 20 20 20 20 20 20 20 | 20 7d 0a 09 20 20 20 20 |. | }.. |
|00004fc0| 7d 0a 09 65 6c 73 65 0a | 09 20 20 20 20 7b 0a 09 |}..else.|. {..|
|00004fd0| 20 20 20 20 69 66 28 20 | 74 6d 70 20 7e 20 22 2e | if( |tmp ~ ".|
|00004fe0| 2a 7b 2e 2a 22 20 29 0a | 09 20 20 20 20 20 20 20 |*{.*" ).|. |
|00004ff0| 20 7b 0a 09 20 20 20 20 | 20 20 20 20 69 6e 64 65 | {.. | inde|
|00005000| 6e 74 5f 6c 65 76 65 6c | 3d 20 69 6e 64 65 6e 74 |nt_level|= indent|
|00005010| 5f 6c 65 76 65 6c 20 22 | 25 40 22 0a 09 20 20 20 |_level "|%@".. |
|00005020| 20 20 20 20 20 7d 0a 09 | 20 20 20 20 73 74 72 75 | }..| stru|
|00005030| 63 74 5b 20 73 74 72 75 | 63 74 63 6f 75 6e 74 2b |ct[ stru|ctcount+|
|00005040| 2b 20 5d 20 3d 20 69 6e | 64 65 6e 74 5f 6c 65 76 |+ ] = in|dent_lev|
|00005050| 65 6c 20 74 6d 70 0a 09 | 20 20 20 20 69 66 28 20 |el tmp..| if( |
|00005060| 74 6d 70 20 7e 20 22 7d | 2e 2a 22 20 29 0a 09 20 |tmp ~ "}|.*" ).. |
|00005070| 20 20 20 20 20 20 20 7b | 0a 09 20 20 20 20 20 20 | {|.. |
|00005080| 20 20 69 6e 64 65 6e 74 | 5f 6c 65 76 65 6c 3d 20 | indent|_level= |
|00005090| 73 75 62 73 74 72 28 20 | 69 6e 64 65 6e 74 5f 6c |substr( |indent_l|
|000050a0| 65 76 65 6c 2c 20 33 20 | 29 0a 09 20 20 20 20 20 |evel, 3 |).. |
|000050b0| 20 20 20 69 66 28 20 6c | 65 6e 67 74 68 28 69 6e | if( l|ength(in|
|000050c0| 64 65 6e 74 5f 6c 65 76 | 65 6c 29 20 3d 3d 20 30 |dent_lev|el) == 0|
|000050d0| 20 29 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | ). | |
|000050e0| 20 20 20 20 20 20 20 62 | 72 65 61 6b 3b 0a 09 20 | b|reak;.. |
|000050f0| 20 20 20 20 20 20 20 7d | 0a 09 20 20 20 20 7d 0a | }|.. }.|
|00005100| 0a 20 20 20 20 20 20 20 | 20 7d 77 68 69 6c 65 28 |. | }while(|
|00005110| 20 28 67 65 74 6c 69 6e | 65 20 74 6d 70 29 20 3e | (getlin|e tmp) >|
|00005120| 20 30 20 29 0a 20 20 20 | 20 7d 0a 0a 23 0a 23 20 | 0 ). | }..#.# |
|00005130| 4f 75 74 70 75 74 73 20 | 74 68 65 20 73 70 65 63 |Outputs |the spec|
|00005140| 69 66 69 65 64 20 61 72 | 72 61 79 2e 0a 23 0a 66 |ified ar|ray..#.f|
|00005150| 75 6e 63 74 69 6f 6e 20 | 6f 75 74 70 75 74 5f 73 |unction |output_s|
|00005160| 65 63 74 69 6f 6e 28 20 | 64 61 74 61 2c 20 20 20 |ection( |data, |
|00005170| 74 6d 70 2c 78 78 20 29 | 0a 20 20 20 20 7b 0a 20 |tmp,xx )|. {. |
|00005180| 20 20 20 23 20 54 72 61 | 76 65 72 73 65 20 74 68 | # Tra|verse th|
|00005190| 65 20 6c 69 73 74 20 6f | 66 20 6c 69 6e 65 73 2e |e list o|f lines.|
|000051a0| 0a 20 20 20 20 78 78 3d | 20 30 0a 20 20 20 20 77 |. xx=| 0. w|
|000051b0| 68 69 6c 65 28 20 78 78 | 20 69 6e 20 64 61 74 61 |hile( xx| in data|
|000051c0| 20 29 0a 09 7b 0a 09 66 | 6f 72 6d 61 74 5f 6c 69 | )..{..f|ormat_li|
|000051d0| 6e 65 28 20 64 61 74 61 | 5b 78 78 5d 20 29 0a 09 |ne( data|[xx] )..|
|000051e0| 78 78 2b 2b 0a 20 20 20 | 20 20 20 20 20 7d 0a 20 |xx++. | }. |
|000051f0| 20 20 20 69 66 28 20 78 | 78 20 21 3d 20 30 20 29 | if( x|x != 0 )|
|00005200| 0a 20 20 20 20 20 20 20 | 20 66 6f 72 6d 61 74 5f |. | format_|
|00005210| 6c 69 6e 65 28 20 22 2e | 53 4b 22 20 29 0a 20 20 |line( ".|SK" ). |
|00005220| 20 20 7d 0a 0a 23 20 53 | 70 65 63 69 61 6c 20 66 | }..# S|pecial f|
|00005230| 75 6e 74 69 6f 6e 20 66 | 6f 72 20 70 72 69 6e 74 |untion f|or print|
|00005240| 69 6e 67 20 6f 75 74 20 | 63 6c 61 73 73 65 73 20 |ing out |classes |
|00005250| 62 65 63 61 75 73 65 20 | 74 68 65 20 63 6c 61 73 |because |the clas|
|00005260| 73 0a 23 20 77 61 73 20 | 62 75 69 6c 74 20 61 73 |s.# was |built as|
|00005270| 20 61 20 6d 75 6c 74 69 | 2d 64 69 6d 65 6e 73 69 | a multi|-dimensi|
|00005280| 6f 6e 61 6c 20 61 72 72 | 61 79 2e 0a 66 75 6e 63 |onal arr|ay..func|
|00005290| 74 69 6f 6e 20 6f 75 74 | 70 75 74 5f 63 6c 61 73 |tion out|put_clas|
|000052a0| 73 28 20 20 20 78 78 2c | 68 64 2c 63 6e 61 6d 65 |s( xx,|hd,cname|
|000052b0| 29 0a 20 20 20 20 7b 0a | 20 20 20 20 23 20 66 6f |). {.| # fo|
|000052c0| 72 20 65 61 63 68 20 63 | 6c 61 73 73 0a 20 20 20 |r each c|lass. |
|000052d0| 20 66 6f 72 28 20 78 78 | 3d 20 30 3b 20 78 78 20 | for( xx|= 0; xx |
|000052e0| 3c 20 63 6c 61 73 73 63 | 6f 75 6e 74 3b 20 78 78 |< classc|ount; xx|
|000052f0| 2b 2b 20 29 0a 09 7b 0a | 09 23 20 6f 75 74 70 75 |++ )..{.|.# outpu|
|00005300| 74 20 74 68 65 20 6e 61 | 6d 65 20 6f 66 20 74 68 |t the na|me of th|
|00005310| 65 20 63 6c 61 73 73 0a | 09 66 6f 72 6d 61 74 5f |e class.|.format_|
|00005320| 6c 69 6e 65 28 20 63 6c | 61 73 73 5b 20 78 78 2c |line( cl|ass[ xx,|
|00005330| 20 22 68 65 61 64 22 2c | 20 30 20 5d 20 29 0a 09 | "head",| 0 ] )..|
|00005340| 66 6f 72 6d 61 74 5f 6c | 69 6e 65 28 20 22 2e 53 |format_l|ine( ".S|
|00005350| 4b 22 20 29 0a 0a 09 6f | 75 74 70 75 74 5f 70 61 |K" )...o|utput_pa|
|00005360| 72 74 5f 63 6c 61 73 73 | 28 20 22 25 40 22 20 22 |rt_class|( "%@" "|
|00005370| 50 75 62 6c 69 63 20 6d | 65 6d 62 65 72 73 22 2c |Public m|embers",|
|00005380| 20 22 70 75 62 6c 69 63 | 22 2c 20 78 78 20 29 3b | "public|", xx );|
|00005390| 0a 09 6f 75 74 70 75 74 | 5f 70 61 72 74 5f 63 6c |..output|_part_cl|
|000053a0| 61 73 73 28 20 22 25 40 | 22 20 22 50 72 6f 74 65 |ass( "%@|" "Prote|
|000053b0| 63 74 65 64 20 6d 65 6d | 62 65 72 73 22 2c 20 22 |cted mem|bers", "|
|000053c0| 70 72 6f 74 65 63 74 65 | 64 22 2c 20 78 78 20 29 |protecte|d", xx )|
|000053d0| 3b 0a 09 6f 75 74 70 75 | 74 5f 70 61 72 74 5f 63 |;..outpu|t_part_c|
|000053e0| 6c 61 73 73 28 20 22 25 | 40 22 20 22 50 72 69 76 |lass( "%|@" "Priv|
|000053f0| 61 74 65 20 6d 65 6d 62 | 65 72 73 22 2c 20 22 70 |ate memb|ers", "p|
|00005400| 72 69 76 61 74 65 22 2c | 20 78 78 20 29 3b 0a 09 |rivate",| xx );..|
|00005410| 7d 0a 20 20 20 20 7d 0a | 0a 23 20 50 72 69 6e 74 |}. }.|.# Print|
|00005420| 73 20 74 68 65 20 73 70 | 65 63 69 66 69 65 64 20 |s the sp|ecified |
|00005430| 70 6f 72 74 69 6f 6e 20 | 6f 66 20 74 68 65 20 63 |portion |of the c|
|00005440| 6c 61 73 73 2e 0a 66 75 | 6e 63 74 69 6f 6e 20 6f |lass..fu|nction o|
|00005450| 75 74 70 75 74 5f 70 61 | 72 74 5f 63 6c 61 73 73 |utput_pa|rt_class|
|00005460| 28 20 68 65 61 64 65 72 | 2c 20 69 64 6e 61 6d 65 |( header|, idname|
|00005470| 2c 20 69 64 6e 75 6d 2c | 20 20 20 20 20 79 79 2c |, idnum,| yy,|
|00005480| 61 6d 6f 75 6e 74 20 29 | 0a 20 20 20 20 7b 0a 20 |amount )|. {. |
|00005490| 20 20 20 23 20 67 65 74 | 20 74 68 65 20 6e 75 6d | # get| the num|
|000054a0| 62 65 72 20 6f 66 20 69 | 74 65 6d 73 0a 20 20 20 |ber of i|tems. |
|000054b0| 20 61 6d 6f 75 6e 74 3d | 20 63 6c 61 73 73 5b 20 | amount=| class[ |
|000054c0| 69 64 6e 75 6d 2c 20 69 | 64 6e 61 6d 65 2c 20 30 |idnum, i|dname, 0|
|000054d0| 20 5d 3b 0a 20 20 20 20 | 69 66 28 20 61 6d 6f 75 | ];. |if( amou|
|000054e0| 6e 74 20 3d 3d 20 31 20 | 29 0a 20 20 20 20 20 20 |nt == 1 |). |
|000054f0| 20 20 72 65 74 75 72 6e | 3b 0a 0a 20 20 20 20 23 | return|;.. #|
|00005500| 20 6f 75 74 70 75 74 20 | 74 68 65 20 68 65 61 64 | output |the head|
|00005510| 65 72 0a 20 20 20 20 66 | 6f 72 6d 61 74 5f 6c 69 |er. f|ormat_li|
|00005520| 6e 65 28 20 68 65 61 64 | 65 72 20 29 0a 0a 20 20 |ne( head|er ).. |
|00005530| 20 20 66 6f 72 28 20 79 | 79 3d 20 31 3b 20 79 79 | for( y|y= 1; yy|
|00005540| 20 3c 20 61 6d 6f 75 6e | 74 3b 20 79 79 2b 2b 20 | < amoun|t; yy++ |
|00005550| 29 0a 09 7b 0a 09 66 6f | 72 6d 61 74 5f 6c 69 6e |)..{..fo|rmat_lin|
|00005560| 65 28 20 63 6c 61 73 73 | 5b 20 69 64 6e 75 6d 2c |e( class|[ idnum,|
|00005570| 20 69 64 6e 61 6d 65 2c | 20 79 79 20 5d 20 29 3b | idname,| yy ] );|
|00005580| 0a 09 7d 0a 20 20 20 20 | 66 6f 72 6d 61 74 5f 6c |..}. |format_l|
|00005590| 69 6e 65 28 20 22 2e 53 | 4b 22 20 29 0a 20 20 20 |ine( ".S|K" ). |
|000055a0| 20 7d 0a 0a 23 20 43 61 | 6c 6c 20 74 6f 20 67 65 | }..# Ca|ll to ge|
|000055b0| 74 20 74 68 65 20 66 75 | 6e 63 74 69 6f 6e 20 73 |t the fu|nction s|
|000055c0| 75 6d 6d 61 72 79 73 20 | 66 72 6f 6d 20 74 68 65 |ummarys |from the|
|000055d0| 20 73 6f 75 72 63 65 20 | 66 69 6c 65 73 20 61 6e | source |files an|
|000055e0| 64 20 70 72 69 6e 74 20 | 74 68 65 6d 0a 66 75 6e |d print |them.fun|
|000055f0| 63 74 69 6f 6e 20 6f 75 | 74 70 75 74 5f 73 75 6d |ction ou|tput_sum|
|00005600| 6d 61 72 79 73 28 20 20 | 20 64 61 74 61 2c 74 69 |marys( | data,ti|
|00005610| 74 6c 65 2c 78 78 2c 64 | 61 74 61 63 6f 75 6e 74 |tle,xx,d|atacount|
|00005620| 2c 74 69 74 6c 65 63 6f | 75 6e 74 20 29 0a 20 20 |,titleco|unt ). |
|00005630| 20 20 7b 0a 20 20 20 20 | 23 20 6a 75 73 74 20 72 | {. |# just r|
|00005640| 65 74 75 72 6e 20 69 66 | 20 6e 6f 20 73 6f 75 72 |eturn if| no sour|
|00005650| 63 65 20 66 69 6c 65 73 | 20 6c 69 73 74 65 64 0a |ce files| listed.|
|00005660| 20 20 20 20 69 66 28 20 | 73 6f 75 72 63 65 66 69 | if( |sourcefi|
|00005670| 6c 65 63 6f 75 6e 74 20 | 3d 3d 20 31 20 29 0a 20 |lecount |== 1 ). |
|00005680| 20 20 20 20 20 20 20 72 | 65 74 75 72 6e 3b 0a 0a | r|eturn;..|
|00005690| 20 20 20 20 23 20 70 72 | 69 6e 74 20 74 68 65 20 | # pr|int the |
|000056a0| 68 65 61 64 65 72 0a 20 | 20 20 20 66 6f 72 6d 61 |header. | forma|
|000056b0| 74 5f 6c 69 6e 65 28 20 | 22 25 68 22 20 22 53 55 |t_line( |"%h" "SU|
|000056c0| 4d 4d 41 52 59 22 20 29 | 0a 0a 20 20 20 20 23 20 |MMARY" )|.. # |
|000056d0| 6e 75 6d 62 65 72 20 6f | 66 20 64 65 73 63 72 69 |number o|f descri|
|000056e0| 70 74 69 6f 6e 73 20 66 | 6f 75 6e 64 0a 20 20 20 |ptions f|ound. |
|000056f0| 20 64 65 73 63 72 69 70 | 74 69 6f 6e 63 6f 75 6e | descrip|tioncoun|
|00005700| 74 3d 20 30 3b 0a 0a 20 | 20 20 20 23 20 77 61 6c |t= 0;.. | # wal|
|00005710| 6b 20 74 68 65 20 6c 69 | 73 74 20 6f 66 20 73 6f |k the li|st of so|
|00005720| 75 72 63 65 20 66 69 6c | 65 73 0a 20 20 20 20 66 |urce fil|es. f|
|00005730| 6f 72 28 20 78 78 20 3d | 20 31 3b 20 78 78 20 3c |or( xx =| 1; xx <|
|00005740| 20 73 6f 75 72 63 65 66 | 69 6c 65 63 6f 75 6e 74 | sourcef|ilecount|
|00005750| 3b 20 78 78 2b 2b 20 29 | 0a 20 20 20 20 20 20 20 |; xx++ )|. |
|00005760| 20 7b 0a 20 20 20 20 20 | 20 20 20 23 20 6c 6f 6f | {. | # loo|
|00005770| 70 20 72 65 61 64 69 6e | 67 20 65 61 63 68 20 6c |p readin|g each l|
|00005780| 69 6e 65 20 6f 66 20 74 | 68 65 20 73 6f 75 72 63 |ine of t|he sourc|
|00005790| 65 20 66 69 6c 65 0a 09 | 77 68 69 6c 65 28 20 28 |e file..|while( (|
|000057a0| 67 65 74 6c 69 6e 65 20 | 69 6e 70 75 74 73 74 72 |getline |inputstr|
|000057b0| 20 3c 73 6f 75 72 63 65 | 66 69 6c 65 5b 78 78 5d | <source|file[xx]|
|000057c0| 29 20 3e 20 30 20 29 0a | 20 20 20 20 20 20 20 20 |) > 0 ).| |
|000057d0| 20 20 20 20 7b 0a 20 20 | 20 20 20 20 20 20 20 20 | {. | |
|000057e0| 20 20 23 20 73 65 65 20 | 69 66 20 74 68 65 20 73 | # see |if the s|
|000057f0| 74 61 72 74 20 6f 66 20 | 74 68 65 20 66 75 6e 63 |tart of |the func|
|00005800| 74 69 6f 6e 20 73 75 6d | 6d 61 72 79 0a 09 20 20 |tion sum|mary.. |
|00005810| 20 20 69 66 28 20 69 6e | 70 75 74 73 74 72 20 3d | if( in|putstr =|
|00005820| 3d 20 22 2f 2f 20 44 65 | 73 63 72 69 70 74 69 6f |= "// De|scriptio|
|00005830| 6e 3a 22 20 29 0a 09 09 | 7b 0a 09 09 69 66 28 20 |n:" )...|{...if( |
|00005840| 64 65 73 63 72 69 70 74 | 69 6f 6e 63 6f 75 6e 74 |descript|ioncount|
|00005850| 20 3e 20 30 20 29 0a 09 | 09 20 20 20 20 66 6f 72 | > 0 )..|. for|
|00005860| 6d 61 74 5f 6c 69 6e 65 | 28 20 22 2e 53 4b 22 20 |mat_line|( ".SK" |
|00005870| 29 3b 0a 09 09 64 65 73 | 63 72 69 70 74 69 6f 6e |);...des|cription|
|00005880| 63 6f 75 6e 74 2b 2b 0a | 0a 09 09 23 20 6e 75 6d |count++.|...# num|
|00005890| 62 65 72 20 6f 66 20 6c | 69 6e 65 73 20 74 6f 20 |ber of l|ines to |
|000058a0| 6f 75 74 70 75 74 20 66 | 6f 72 20 74 68 69 73 20 |output f|or this |
|000058b0| 64 65 73 63 72 69 70 74 | 69 6f 6e 0a 09 09 64 61 |descript|ion...da|
|000058c0| 74 61 63 6f 75 6e 74 3d | 20 30 3b 0a 09 09 74 69 |tacount=| 0;...ti|
|000058d0| 74 6c 65 63 6f 75 6e 74 | 3d 20 30 3b 0a 0a 20 20 |tlecount|= 0;.. |
|000058e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 23 20 | | # |
|000058f0| 6c 6f 6f 70 20 72 65 61 | 64 69 6e 67 20 74 68 65 |loop rea|ding the|
|00005900| 20 73 75 6d 6d 61 72 79 | 0a 09 09 77 68 69 6c 65 | summary|...while|
|00005910| 28 20 28 67 65 74 6c 69 | 6e 65 20 69 6e 70 75 74 |( (getli|ne input|
|00005920| 73 74 72 20 3c 73 6f 75 | 72 63 65 66 69 6c 65 5b |str <sou|rcefile[|
|00005930| 78 78 5d 29 20 3e 20 30 | 20 29 0a 09 09 20 20 20 |xx]) > 0| )... |
|00005940| 20 7b 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | {. | |
|00005950| 20 20 20 20 20 20 20 23 | 20 73 65 65 20 69 66 20 | #| see if |
|00005960| 61 6c 6c 20 64 6f 6e 65 | 20 77 69 74 68 20 74 68 |all done| with th|
|00005970| 69 73 20 64 65 73 63 72 | 69 70 74 69 6f 6e 0a 09 |is descr|iption..|
|00005980| 09 20 20 20 20 69 66 28 | 20 69 6e 70 75 74 73 74 |. if(| inputst|
|00005990| 72 20 7e 20 22 5e 5b 5c | 74 20 5d 2b 5b 3a 7b 5d |r ~ "^[\|t ]+[:{]|
|000059a0| 2e 2a 22 20 29 0a 09 09 | 09 7b 0a 09 09 09 23 20 |.*" )...|.{....# |
|000059b0| 6f 75 74 70 75 74 20 77 | 68 61 74 20 77 65 20 63 |output w|hat we c|
|000059c0| 6f 6c 6c 65 63 74 65 64 | 20 66 6f 72 20 74 68 65 |ollected| for the|
|000059d0| 20 64 65 73 63 72 69 70 | 74 69 6f 6e 0a 09 09 09 | descrip|tion....|
|000059e0| 66 6f 72 6d 61 74 5f 6c | 69 6e 65 28 20 22 2e 42 |format_l|ine( ".B|
|000059f0| 4f 22 20 29 0a 09 09 09 | 66 6f 72 28 20 79 79 3d |O" )....|for( yy=|
|00005a00| 20 30 3b 20 79 79 20 3c | 20 74 69 74 6c 65 63 6f | 0; yy <| titleco|
|00005a10| 75 6e 74 3b 20 79 79 2b | 2b 20 29 0a 09 09 09 20 |unt; yy+|+ ).... |
|00005a20| 20 20 20 66 6f 72 6d 61 | 74 5f 6c 69 6e 65 28 20 | forma|t_line( |
|00005a30| 74 69 74 6c 65 5b 79 79 | 5d 20 29 3b 0a 09 09 09 |title[yy|] );....|
|00005a40| 66 6f 72 6d 61 74 5f 6c | 69 6e 65 28 20 22 2e 4e |format_l|ine( ".N|
|00005a50| 42 22 20 29 0a 09 09 09 | 66 6f 72 28 20 79 79 3d |B" )....|for( yy=|
|00005a60| 20 30 3b 20 79 79 20 3c | 20 64 61 74 61 63 6f 75 | 0; yy <| datacou|
|00005a70| 6e 74 3b 20 79 79 2b 2b | 20 29 0a 09 09 09 20 20 |nt; yy++| ).... |
|00005a80| 20 20 66 6f 72 6d 61 74 | 5f 6c 69 6e 65 28 20 64 | format|_line( d|
|00005a90| 61 74 61 5b 79 79 5d 20 | 29 3b 0a 09 09 09 62 72 |ata[yy] |);....br|
|00005aa0| 65 61 6b 3b 0a 09 09 09 | 7d 0a 0a 20 20 20 20 20 |eak;....|}.. |
|00005ab0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 23 | | #|
|00005ac0| 20 73 74 72 69 70 20 74 | 68 65 20 63 6f 6d 6d 65 | strip t|he comme|
|00005ad0| 6e 74 20 61 6e 64 20 6c | 65 61 64 69 6e 67 20 77 |nt and l|eading w|
|00005ae0| 68 69 74 65 73 70 61 63 | 65 0a 09 09 20 20 20 20 |hitespac|e... |
|00005af0| 69 66 28 20 67 73 75 62 | 28 20 22 2f 2f 5b 5c 74 |if( gsub|( "//[\t|
|00005b00| 20 5d 2a 22 2c 20 22 22 | 2c 20 69 6e 70 75 74 73 | ]*", ""|, inputs|
|00005b10| 74 72 20 29 20 21 3d 20 | 30 20 29 0a 09 09 09 7b |tr ) != |0 )....{|
|00005b20| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00005b30| 20 20 20 20 20 20 20 20 | 20 23 20 6f 6e 6c 79 20 | | # only |
|00005b40| 6b 65 65 70 20 6c 69 6e | 65 73 20 6e 6f 74 20 65 |keep lin|es not e|
|00005b50| 6e 64 69 6e 67 20 69 6e | 20 3a 0a 09 09 09 69 66 |nding in| :....if|
|00005b60| 28 20 69 6e 70 75 74 73 | 74 72 20 21 7e 20 22 2e |( inputs|tr !~ ".|
|00005b70| 2a 3a 24 22 20 29 0a 09 | 09 09 20 20 20 20 7b 0a |*:$" )..|.. {.|
|00005b80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005b90| 20 20 20 20 20 20 20 20 | 20 20 20 20 23 20 73 61 | | # sa|
|00005ba0| 76 65 20 74 68 65 20 6c | 69 6e 65 20 6f 66 20 64 |ve the l|ine of d|
|00005bb0| 61 74 61 0a 09 09 09 20 | 20 20 20 64 61 74 61 5b |ata.... | data[|
|00005bc0| 20 64 61 74 61 63 6f 75 | 6e 74 2b 2b 20 5d 20 3d | datacou|nt++ ] =|
|00005bd0| 20 22 25 40 22 20 69 6e | 70 75 74 73 74 72 0a 09 | "%@" in|putstr..|
|00005be0| 09 09 20 20 20 20 7d 0a | 09 09 09 7d 0a 09 09 20 |.. }.|...}... |
|00005bf0| 20 20 20 65 6c 73 65 0a | 09 09 09 7b 0a 20 20 20 | else.|...{. |
|00005c00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005c10| 20 20 20 20 20 23 20 6f | 6e 6c 79 20 6b 65 65 70 | # o|nly keep|
|00005c20| 20 6c 69 6e 65 73 20 74 | 68 61 74 20 61 72 65 20 | lines t|hat are |
|00005c30| 6e 6f 74 20 62 6c 61 6e | 6b 0a 09 09 09 69 66 28 |not blan|k....if(|
|00005c40| 20 6c 65 6e 67 74 68 28 | 20 69 6e 70 75 74 73 74 | length(| inputst|
|00005c50| 72 20 29 20 29 0a 09 09 | 09 20 20 20 20 7b 0a 20 |r ) )...|. {. |
|00005c60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005c70| 20 20 20 20 20 20 20 20 | 20 20 20 23 20 73 61 76 | | # sav|
|00005c80| 65 20 74 68 65 20 6c 69 | 6e 65 20 6f 66 20 74 68 |e the li|ne of th|
|00005c90| 65 20 66 75 6e 63 74 69 | 6f 6e 20 6e 61 6d 65 0a |e functi|on name.|
|00005ca0| 09 09 09 20 20 20 20 74 | 69 74 6c 65 5b 20 74 69 |... t|itle[ ti|
|00005cb0| 74 6c 65 63 6f 75 6e 74 | 2b 2b 20 5d 20 3d 20 69 |tlecount|++ ] = i|
|00005cc0| 6e 70 75 74 73 74 72 0a | 09 09 09 20 20 20 20 7d |nputstr.|... }|
|00005cd0| 0a 09 09 09 7d 0a 09 09 | 20 20 20 20 7d 0a 09 09 |....}...| }...|
|00005ce0| 7d 0a 09 20 20 20 20 7d | 0a 09 7d 0a 20 20 20 20 |}.. }|..}. |
|00005cf0| 7d 0a 0a 23 20 73 74 72 | 69 70 73 20 6c 65 61 64 |}..# str|ips lead|
|00005d00| 69 6e 67 20 61 6e 64 20 | 74 72 61 69 6c 69 6e 67 |ing and |trailing|
|00005d10| 20 77 68 69 74 65 73 70 | 61 63 65 20 66 72 6f 6d | whitesp|ace from|
|00005d20| 20 74 68 65 20 73 70 65 | 63 69 66 69 65 64 20 73 | the spe|cified s|
|00005d30| 74 72 69 6e 67 20 61 6e | 64 0a 23 20 72 65 74 75 |tring an|d.# retu|
|00005d40| 72 6e 73 20 74 68 65 20 | 73 74 72 69 6e 67 0a 66 |rns the |string.f|
|00005d50| 75 6e 63 74 69 6f 6e 20 | 73 74 72 69 70 5f 77 68 |unction |strip_wh|
|00005d60| 69 74 65 28 20 64 61 74 | 61 20 29 0a 20 20 20 20 |ite( dat|a ). |
|00005d70| 7b 0a 20 20 20 20 67 73 | 75 62 28 20 22 5e 5b 5c |{. gs|ub( "^[\|
|00005d80| 74 20 5d 2b 22 2c 20 22 | 22 2c 20 64 61 74 61 20 |t ]+", "|", data |
|00005d90| 29 0a 20 20 20 20 67 73 | 75 62 28 20 22 5b 5c 74 |). gs|ub( "[\t|
|00005da0| 20 5d 2b 24 22 2c 20 22 | 22 2c 20 64 61 74 61 20 | ]+$", "|", data |
|00005db0| 29 0a 20 20 20 20 72 65 | 74 75 72 6e 20 64 61 74 |). re|turn dat|
|00005dc0| 61 0a 20 20 20 20 7d 0a | 0a 23 20 54 68 69 73 20 |a. }.|.# This |
|00005dd0| 72 6f 75 74 69 6e 65 20 | 74 61 6b 65 73 20 61 20 |routine |takes a |
|00005de0| 6c 69 6e 65 20 6f 66 20 | 64 61 74 61 20 61 6e 64 |line of |data and|
|00005df0| 20 63 6f 6e 76 65 72 74 | 73 20 69 74 20 69 6e 74 | convert|s it int|
|00005e00| 6f 0a 23 20 74 68 65 20 | 61 70 70 72 6f 70 72 69 |o.# the |appropri|
|00005e10| 61 74 65 20 66 6f 72 6d | 61 74 20 66 6f 72 20 74 |ate form|at for t|
|00005e20| 68 65 20 6f 75 74 70 75 | 74 20 64 65 76 69 63 65 |he outpu|t device|
|00005e30| 2e 0a 23 0a 23 20 44 6f | 63 75 6d 65 6e 74 61 74 |..#.# Do|cumentat|
|00005e40| 69 6f 6e 20 6f 66 20 69 | 6d 62 65 64 64 65 64 20 |ion of i|mbedded |
|00005e50| 66 6f 72 6d 61 74 74 69 | 6e 67 20 63 6f 6d 6d 61 |formatti|ng comma|
|00005e60| 6e 64 73 2e 0a 23 20 20 | 20 2e 46 49 20 6f 6e 20 |nds..# | .FI on |
|00005e70| 61 20 6c 69 6e 65 20 62 | 79 20 69 74 73 65 6c 66 |a line b|y itself|
|00005e80| 20 6d 65 61 6e 73 20 74 | 75 72 6e 20 6f 6e 20 66 | means t|urn on f|
|00005e90| 69 6c 6c 20 6d 6f 64 65 | 0a 23 20 20 20 2e 4e 46 |ill mode|.# .NF|
|00005ea0| 20 6f 6e 20 61 20 6c 69 | 6e 65 20 62 79 20 69 74 | on a li|ne by it|
|00005eb0| 73 65 6c 66 20 6d 65 61 | 6e 73 20 74 75 72 6e 20 |self mea|ns turn |
|00005ec0| 6f 66 66 20 66 69 6c 6c | 20 6d 6f 64 65 0a 23 20 |off fill| mode.# |
|00005ed0| 20 20 2e 42 4f 20 6f 6e | 20 61 20 6c 69 6e 65 20 | .BO on| a line |
|00005ee0| 62 79 20 69 74 73 65 6c | 66 20 6d 65 61 6e 73 20 |by itsel|f means |
|00005ef0| 74 75 72 6e 20 6f 6e 20 | 62 6f 6c 64 20 6d 6f 64 |turn on |bold mod|
|00005f00| 65 0a 23 20 20 20 2e 4e | 42 20 6f 6e 20 61 20 6c |e.# .N|B on a l|
|00005f10| 69 6e 65 20 62 79 20 69 | 74 73 65 6c 66 20 6d 65 |ine by i|tself me|
|00005f20| 61 6e 73 20 74 75 72 6e | 20 6f 66 66 20 62 6f 6c |ans turn| off bol|
|00005f30| 64 20 6d 6f 64 65 0a 23 | 20 20 20 2e 53 4b 20 6f |d mode.#| .SK o|
|00005f40| 6e 20 61 20 6c 69 6e 65 | 20 62 79 20 69 74 73 65 |n a line| by itse|
|00005f50| 6c 66 20 6d 65 61 6e 73 | 20 73 6b 69 70 20 61 20 |lf means| skip a |
|00005f60| 6c 69 6e 65 0a 23 20 20 | 20 25 68 20 6d 65 61 6e |line.# | %h mean|
|00005f70| 73 20 74 68 65 20 72 65 | 73 74 20 6f 66 20 74 68 |s the re|st of th|
|00005f80| 65 20 6c 69 6e 65 20 69 | 73 20 61 20 73 65 63 74 |e line i|s a sect|
|00005f90| 69 6f 6e 20 68 65 61 64 | 65 72 0a 23 20 20 20 25 |ion head|er.# %|
|00005fa0| 40 20 6d 65 61 6e 73 20 | 69 6e 64 65 6e 74 20 6f |@ means |indent o|
|00005fb0| 6e 65 20 6c 65 76 65 6c | 0a 66 75 6e 63 74 69 6f |ne level|.functio|
|00005fc0| 6e 20 66 6f 72 6d 61 74 | 5f 6c 69 6e 65 28 20 64 |n format|_line( d|
|00005fd0| 61 74 61 20 29 0a 20 20 | 20 20 7b 0a 20 20 20 20 |ata ). | {. |
|00005fe0| 23 20 54 68 69 73 20 73 | 65 63 74 69 6f 6e 20 69 |# This s|ection i|
|00005ff0| 73 20 66 6f 72 20 70 72 | 6f 64 75 63 69 6e 67 20 |s for pr|oducing |
|00006000| 74 72 6f 66 66 20 6f 75 | 74 70 75 74 2e 0a 20 20 |troff ou|tput.. |
|00006010| 20 20 69 66 28 20 64 65 | 76 69 63 65 20 3d 3d 20 | if( de|vice == |
|00006020| 22 74 72 6f 66 66 22 20 | 29 0a 09 7b 0a 09 23 20 |"troff" |)..{..# |
|00006030| 73 65 65 20 69 66 20 61 | 20 73 70 65 63 69 61 6c |see if a| special|
|00006040| 20 66 6f 72 6d 61 74 74 | 69 6e 67 20 63 6f 6d 6d | formatt|ing comm|
|00006050| 61 6e 64 0a 09 69 66 28 | 20 6c 65 6e 67 74 68 28 |and..if(| length(|
|00006060| 64 61 74 61 29 20 3d 3d | 20 33 20 29 0a 09 20 20 |data) ==| 3 ).. |
|00006070| 20 20 7b 0a 09 20 20 20 | 20 69 66 28 20 64 61 74 | {.. | if( dat|
|00006080| 61 20 3d 3d 20 22 2e 46 | 49 22 20 29 0a 09 09 7b |a == ".F|I" )...{|
|00006090| 0a 09 09 70 72 69 6e 74 | 20 22 2e 66 69 22 0a 09 |...print| ".fi"..|
|000060a0| 09 6e 6f 66 69 6c 6c 3d | 20 22 22 0a 09 09 72 65 |.nofill=| ""...re|
|000060b0| 74 75 72 6e 3b 0a 09 09 | 7d 0a 09 20 20 20 20 65 |turn;...|}.. e|
|000060c0| 6c 73 65 0a 09 20 20 20 | 20 69 66 28 20 64 61 74 |lse.. | if( dat|
|000060d0| 61 20 3d 3d 20 22 2e 4e | 46 22 20 29 0a 09 09 7b |a == ".N|F" )...{|
|000060e0| 0a 09 09 70 72 69 6e 74 | 20 22 2e 6e 66 22 0a 09 |...print| ".nf"..|
|000060f0| 09 6e 6f 66 69 6c 6c 3d | 20 22 5c 6e 2e 6e 66 22 |.nofill=| "\n.nf"|
|00006100| 0a 09 09 72 65 74 75 72 | 6e 3b 0a 09 09 7d 0a 09 |...retur|n;...}..|
|00006110| 20 20 20 20 65 6c 73 65 | 0a 09 20 20 20 20 69 66 | else|.. if|
|00006120| 28 20 64 61 74 61 20 3d | 3d 20 22 2e 42 4f 22 20 |( data =|= ".BO" |
|00006130| 29 0a 09 09 7b 0a 09 09 | 62 6f 6c 64 3d 20 22 2e |)...{...|bold= ".|
|00006140| 42 20 5c 6e 22 0a 09 09 | 72 65 74 75 72 6e 3b 0a |B \n"...|return;.|
|00006150| 09 09 7d 0a 09 20 20 20 | 20 65 6c 73 65 0a 09 20 |..}.. | else.. |
|00006160| 20 20 20 69 66 28 20 64 | 61 74 61 20 3d 3d 20 22 | if( d|ata == "|
|00006170| 2e 4e 42 22 20 29 0a 09 | 09 7b 0a 09 09 62 6f 6c |.NB" )..|.{...bol|
|00006180| 64 3d 20 22 22 0a 09 09 | 72 65 74 75 72 6e 3b 0a |d= ""...|return;.|
|00006190| 09 09 7d 0a 09 20 20 20 | 20 65 6c 73 65 0a 09 20 |..}.. | else.. |
|000061a0| 20 20 20 69 66 28 20 64 | 61 74 61 20 3d 3d 20 22 | if( d|ata == "|
|000061b0| 2e 53 4b 22 20 29 0a 09 | 09 7b 0a 09 09 70 72 69 |.SK" )..|.{...pri|
|000061c0| 6e 74 20 22 2e 50 50 22 | 0a 09 09 72 65 74 75 72 |nt ".PP"|...retur|
|000061d0| 6e 3b 0a 09 09 7d 0a 09 | 20 20 20 20 7d 0a 0a 09 |n;...}..| }...|
|000061e0| 23 20 53 65 65 20 69 66 | 20 61 20 68 65 61 64 69 |# See if| a headi|
|000061f0| 6e 67 2e 0a 09 69 66 28 | 20 64 61 74 61 20 7e 20 |ng...if(| data ~ |
|00006200| 22 25 68 2e 2a 22 20 29 | 0a 09 20 20 20 20 7b 0a |"%h.*" )|.. {.|
|00006210| 09 20 20 20 20 64 61 74 | 61 3d 20 73 75 62 73 74 |. dat|a= subst|
|00006220| 72 28 20 64 61 74 61 2c | 20 33 20 29 3b 0a 09 20 |r( data,| 3 );.. |
|00006230| 20 20 20 70 72 69 6e 74 | 20 22 2e 53 48 20 22 20 | print| ".SH " |
|00006240| 22 5c 22 22 20 74 6f 75 | 70 70 65 72 28 64 61 74 |"\"" tou|pper(dat|
|00006250| 61 29 20 22 5c 22 22 20 | 6e 6f 66 69 6c 6c 0a 09 |a) "\"" |nofill..|
|00006260| 20 20 20 20 7d 0a 0a 09 | 23 20 65 6c 73 65 20 61 | }...|# else a|
|00006270| 20 72 65 67 75 6c 61 72 | 20 6c 69 6e 65 0a 09 65 | regular| line..e|
|00006280| 6c 73 65 0a 09 20 20 20 | 20 7b 0a 09 20 20 20 20 |lse.. | {.. |
|00006290| 23 20 63 6f 6e 76 65 72 | 74 20 69 6e 64 65 6e 74 |# conver|t indent|
|000062a0| 20 6d 61 72 6b 73 20 74 | 6f 20 73 70 61 63 65 73 | marks t|o spaces|
|000062b0| 0a 09 20 20 20 20 67 73 | 75 62 28 20 22 25 40 22 |.. gs|ub( "%@"|
|000062c0| 2c 20 6c 70 5f 69 6e 64 | 65 6e 74 2c 20 64 61 74 |, lp_ind|ent, dat|
|000062d0| 61 20 29 0a 0a 09 20 20 | 20 20 23 20 61 64 64 20 |a )... | # add |
|000062e0| 65 6d 62 6f 6c 64 69 6e | 67 0a 09 20 20 20 20 64 |emboldin|g.. d|
|000062f0| 61 74 61 3d 20 62 6f 6c | 64 20 64 61 74 61 0a 0a |ata= bol|d data..|
|00006300| 09 20 20 20 20 23 20 70 | 72 69 6e 74 20 74 68 65 |. # p|rint the|
|00006310| 20 64 61 74 61 0a 20 20 | 20 20 20 20 20 20 20 20 | data. | |
|00006320| 20 20 70 72 69 6e 74 20 | 64 61 74 61 0a 09 20 20 | print |data.. |
|00006330| 20 20 7d 0a 09 7d 0a 0a | 20 20 20 20 23 20 54 68 | }..}..| # Th|
|00006340| 69 73 20 73 65 63 74 69 | 6f 6e 20 69 73 20 66 6f |is secti|on is fo|
|00006350| 72 20 70 72 6f 64 75 63 | 69 6e 67 20 61 73 63 69 |r produc|ing asci|
|00006360| 69 20 66 6f 72 6d 61 74 | 74 65 64 20 6f 75 74 70 |i format|ted outp|
|00006370| 75 74 2e 0a 20 20 20 20 | 65 6c 73 65 0a 09 7b 0a |ut.. |else..{.|
|00006380| 09 23 20 73 65 65 20 69 | 66 20 61 20 73 70 65 63 |.# see i|f a spec|
|00006390| 69 61 6c 20 66 6f 72 6d | 61 74 74 69 6e 67 20 63 |ial form|atting c|
|000063a0| 6f 6d 6d 61 6e 64 0a 09 | 69 66 28 20 6c 65 6e 67 |ommand..|if( leng|
|000063b0| 74 68 28 64 61 74 61 29 | 20 3d 3d 20 33 20 29 0a |th(data)| == 3 ).|
|000063c0| 09 20 20 20 20 7b 0a 09 | 20 20 20 20 23 20 49 67 |. {..| # Ig|
|000063d0| 6e 6f 72 65 20 66 69 6c | 6c 20 61 6e 64 20 62 6f |nore fil|l and bo|
|000063e0| 6c 64 20 74 72 61 6e 73 | 69 74 69 6f 6e 73 2e 0a |ld trans|itions..|
|000063f0| 09 20 20 20 20 69 66 28 | 20 28 64 61 74 61 20 3d |. if(| (data =|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.