home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: SHell self-extracting ARchive
(archive/shar).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Newsgroup Content (archive/news)
| magic
| Supported |
100%
| dexvert
| SHell self-extracting ARchive (archive/shar)
| magic
| Supported |
100%
| dexvert
| Internet Message Format (text/imf)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| news or mail, ASCII text
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/329 Shell Archive Format
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
| |
100%
| xdgMime
| message/rfc822
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 53 75 62 6a 65 63 74 3a | 20 20 76 32 33 69 30 37 |Subject:| v23i07|
|00000010| 36 3a 20 20 46 65 65 64 | 20 6d 75 6c 74 69 70 6c |6: Feed| multipl|
|00000020| 65 20 70 72 69 6e 74 65 | 72 73 20 66 72 6f 6d 20 |e printe|rs from |
|00000030| 6f 6e 65 20 42 53 44 20 | 6c 70 72 20 71 75 65 75 |one BSD |lpr queu|
|00000040| 65 0a 4e 65 77 73 67 72 | 6f 75 70 73 3a 20 63 6f |e.Newsgr|oups: co|
|00000050| 6d 70 2e 73 6f 75 72 63 | 65 73 2e 75 6e 69 78 0a |mp.sourc|es.unix.|
|00000060| 41 70 70 72 6f 76 65 64 | 3a 20 72 73 61 6c 7a 40 |Approved|: rsalz@|
|00000070| 75 75 6e 65 74 2e 55 55 | 2e 4e 45 54 0a 58 2d 43 |uunet.UU|.NET.X-C|
|00000080| 68 65 63 6b 73 75 6d 2d | 53 6e 65 66 72 75 3a 20 |hecksum-|Snefru: |
|00000090| 36 64 63 36 64 31 33 64 | 20 31 63 65 35 32 36 35 |6dc6d13d| 1ce5265|
|000000a0| 62 20 66 38 63 30 38 36 | 36 62 20 30 62 30 64 62 |b f8c086|6b 0b0db|
|000000b0| 38 36 63 0a 0a 53 75 62 | 6d 69 74 74 65 64 2d 62 |86c..Sub|mitted-b|
|000000c0| 79 3a 20 6d 61 74 74 20 | 72 6f 62 69 6e 73 6f 6e |y: matt |robinson|
|000000d0| 20 3c 79 61 6b 6b 65 72 | 40 75 63 72 6d 61 74 68 | <yakker|@ucrmath|
|000000e0| 2e 75 63 72 2e 65 64 75 | 3e 0a 50 6f 73 74 69 6e |.ucr.edu|>.Postin|
|000000f0| 67 2d 6e 75 6d 62 65 72 | 3a 20 56 6f 6c 75 6d 65 |g-number|: Volume|
|00000100| 20 32 33 2c 20 49 73 73 | 75 65 20 37 36 0a 41 72 | 23, Iss|ue 76.Ar|
|00000110| 63 68 69 76 65 2d 6e 61 | 6d 65 3a 20 6d 6c 70 64 |chive-na|me: mlpd|
|00000120| 0a 0a 5b 20 49 20 68 61 | 76 65 20 6e 6f 74 20 74 |..[ I ha|ve not t|
|00000130| 65 73 74 65 64 20 74 68 | 69 73 20 61 73 20 49 20 |ested th|is as I |
|00000140| 64 6f 6e 27 74 20 72 75 | 6e 20 4c 44 50 2e 20 20 |don't ru|n LDP. |
|00000150| 2d 2d 72 24 20 5d 0a 0a | 54 68 69 73 20 70 72 6f |--r$ ]..|This pro|
|00000160| 67 72 61 6d 20 28 4d 4c | 50 44 29 20 69 73 20 61 |gram (ML|PD) is a|
|00000170| 20 6c 69 74 74 6c 65 20 | 70 69 65 63 65 20 6f 66 | little |piece of|
|00000180| 20 63 6f 64 65 20 49 20 | 77 72 6f 74 65 20 74 6f | code I |wrote to|
|00000190| 20 75 73 65 20 61 20 73 | 69 6e 67 6c 65 0a 70 72 | use a s|ingle.pr|
|000001a0| 69 6e 74 65 72 20 71 75 | 65 75 65 20 66 6f 72 20 |inter qu|eue for |
|000001b0| 61 20 73 65 74 20 6f 66 | 20 6d 75 6c 74 69 70 6c |a set of| multipl|
|000001c0| 65 20 70 72 69 6e 74 65 | 72 73 2e 20 20 49 74 27 |e printe|rs. It'|
|000001d0| 73 20 6b 69 6e 64 20 6f | 66 20 77 69 65 72 64 20 |s kind o|f wierd |
|000001e0| 74 6f 0a 73 65 74 20 75 | 70 2c 20 62 75 74 20 6f |to.set u|p, but o|
|000001f0| 6e 63 65 20 69 74 20 69 | 73 20 72 75 6e 6e 69 6e |nce it i|s runnin|
|00000200| 67 2c 20 69 74 20 73 68 | 6f 75 6c 64 20 68 65 6c |g, it sh|ould hel|
|00000210| 70 20 6f 75 74 20 61 20 | 6c 6f 74 2e 0a 0a 54 68 |p out a |lot...Th|
|00000220| 65 20 70 72 6f 67 72 61 | 6d 20 72 75 6e 73 20 75 |e progra|m runs u|
|00000230| 6e 64 65 72 20 61 20 53 | 75 6e 20 4f 53 20 65 6e |nder a S|un OS en|
|00000240| 76 69 72 6f 6e 6d 65 6e | 74 2e 20 20 49 74 20 68 |vironmen|t. It h|
|00000250| 61 73 20 62 65 65 6e 20 | 74 72 69 65 64 20 6f 75 |as been |tried ou|
|00000260| 74 0a 75 6e 64 65 72 20 | 34 2e 31 20 53 75 6e 4f |t.under |4.1 SunO|
|00000270| 53 2c 20 61 6e 64 20 49 | 20 68 61 64 20 69 74 20 |S, and I| had it |
|00000280| 74 72 69 65 64 20 6f 75 | 74 20 75 6e 64 65 72 20 |tried ou|t under |
|00000290| 61 20 34 2e 33 20 42 53 | 44 20 65 6e 76 69 72 6f |a 4.3 BS|D enviro|
|000002a0| 6e 6d 65 6e 74 2c 0a 74 | 68 61 6e 6b 73 20 74 6f |nment,.t|hanks to|
|000002b0| 20 74 68 65 20 68 65 6c | 70 20 6f 66 20 6e 61 73 | the hel|p of nas|
|000002c0| 68 40 75 63 73 65 6c 78 | 2e 73 64 73 75 2e 65 64 |h@ucselx|.sdsu.ed|
|000002d0| 75 20 28 54 68 61 6e 6b | 73 2c 20 52 6f 6e 21 29 |u (Thank|s, Ron!)|
|000002e0| 20 49 20 68 6f 70 65 20 | 74 68 61 74 20 0a 69 74 | I hope |that .it|
|000002f0| 20 77 6f 72 6b 73 20 66 | 6f 72 20 79 6f 75 2e 20 | works f|or you. |
|00000300| 20 50 6c 65 61 73 65 20 | 73 65 6e 64 20 6d 65 20 | Please |send me |
|00000310| 61 6c 6c 20 62 75 67 20 | 72 65 70 6f 72 74 73 2c |all bug |reports,|
|00000320| 20 73 70 65 63 69 61 6c | 20 74 68 69 6e 67 73 20 | special| things |
|00000330| 74 68 61 74 0a 77 6f 75 | 6c 64 20 6d 61 6b 65 20 |that.wou|ld make |
|00000340| 79 6f 75 72 20 6c 69 66 | 65 20 65 61 73 69 65 72 |your lif|e easier|
|00000350| 2c 20 65 74 63 2e 2c 20 | 73 6f 20 6f 6e 2c 20 73 |, etc., |so on, s|
|00000360| 6f 20 66 6f 72 74 68 2e | 20 20 49 66 20 79 6f 75 |o forth.| If you|
|00000370| 20 64 6f 20 68 61 76 65 | 20 61 6e 79 0a 71 75 65 | do have| any.que|
|00000380| 73 74 69 6f 6e 73 20 61 | 74 20 61 6c 6c 2c 20 70 |stions a|t all, p|
|00000390| 6c 65 61 73 65 20 6d 61 | 69 6c 20 6d 65 20 74 6f |lease ma|il me to|
|000003a0| 20 6c 65 74 20 6d 65 20 | 6b 6e 6f 77 20 61 62 6f | let me |know abo|
|000003b0| 75 74 20 77 68 61 74 20 | 79 6f 75 20 6e 65 65 64 |ut what |you need|
|000003c0| 2e 0a 0a 23 21 20 2f 62 | 69 6e 2f 73 68 0a 23 20 |...#! /b|in/sh.# |
|000003d0| 54 68 69 73 20 69 73 20 | 61 20 73 68 65 6c 6c 20 |This is |a shell |
|000003e0| 61 72 63 68 69 76 65 2e | 20 20 52 65 6d 6f 76 65 |archive.| Remove|
|000003f0| 20 61 6e 79 74 68 69 6e | 67 20 62 65 66 6f 72 65 | anythin|g before|
|00000400| 20 74 68 69 73 20 6c 69 | 6e 65 2c 20 74 68 65 6e | this li|ne, then|
|00000410| 20 66 65 65 64 20 69 74 | 0a 23 20 69 6e 74 6f 20 | feed it|.# into |
|00000420| 61 20 73 68 65 6c 6c 20 | 76 69 61 20 22 73 68 20 |a shell |via "sh |
|00000430| 66 69 6c 65 22 20 6f 72 | 20 73 69 6d 69 6c 61 72 |file" or| similar|
|00000440| 2e 20 20 54 6f 20 6f 76 | 65 72 77 72 69 74 65 20 |. To ov|erwrite |
|00000450| 65 78 69 73 74 69 6e 67 | 20 66 69 6c 65 73 2c 0a |existing| files,.|
|00000460| 23 20 74 79 70 65 20 22 | 73 68 20 66 69 6c 65 20 |# type "|sh file |
|00000470| 2d 63 22 2e 0a 23 20 54 | 68 65 20 74 6f 6f 6c 20 |-c"..# T|he tool |
|00000480| 74 68 61 74 20 67 65 6e | 65 72 61 74 65 64 20 74 |that gen|erated t|
|00000490| 68 69 73 20 61 70 70 65 | 61 72 65 64 20 69 6e 20 |his appe|ared in |
|000004a0| 74 68 65 20 63 6f 6d 70 | 2e 73 6f 75 72 63 65 73 |the comp|.sources|
|000004b0| 2e 75 6e 69 78 20 6e 65 | 77 73 67 72 6f 75 70 3b |.unix ne|wsgroup;|
|000004c0| 0a 23 20 73 65 6e 64 20 | 6d 61 69 6c 20 74 6f 20 |.# send |mail to |
|000004d0| 63 6f 6d 70 2d 73 6f 75 | 72 63 65 73 2d 75 6e 69 |comp-sou|rces-uni|
|000004e0| 78 40 75 75 6e 65 74 2e | 75 75 2e 6e 65 74 20 69 |x@uunet.|uu.net i|
|000004f0| 66 20 79 6f 75 20 77 61 | 6e 74 20 74 68 61 74 20 |f you wa|nt that |
|00000500| 74 6f 6f 6c 2e 0a 23 20 | 43 6f 6e 74 65 6e 74 73 |tool..# |Contents|
|00000510| 3a 20 20 43 4f 50 59 52 | 49 47 48 54 20 4d 61 6b |: COPYR|IGHT Mak|
|00000520| 65 66 69 6c 65 20 52 45 | 41 44 4d 45 20 63 6f 6e |efile RE|ADME con|
|00000530| 66 69 67 2e 68 20 64 61 | 65 6d 6f 6e 2e 63 20 6c |fig.h da|emon.c l|
|00000540| 6f 63 6b 2e 63 20 6d 6c | 70 2e 63 0a 23 20 20 20 |ock.c ml|p.c.# |
|00000550| 6d 6c 70 64 2e 38 20 70 | 66 69 6c 65 2e 63 20 70 |mlpd.8 p|file.c p|
|00000560| 72 69 6e 74 63 61 70 2e | 63 20 70 72 69 6e 74 65 |rintcap.|c printe|
|00000570| 72 2e 63 0a 23 20 57 72 | 61 70 70 65 64 20 62 79 |r.c.# Wr|apped by|
|00000580| 20 72 73 61 6c 7a 40 6c | 69 74 63 68 69 2e 62 62 | rsalz@l|itchi.bb|
|00000590| 6e 2e 63 6f 6d 20 6f 6e | 20 57 65 64 20 44 65 63 |n.com on| Wed Dec|
|000005a0| 20 20 35 20 31 32 3a 32 | 34 3a 35 36 20 31 39 39 | 5 12:2|4:56 199|
|000005b0| 30 0a 50 41 54 48 3d 2f | 62 69 6e 3a 2f 75 73 72 |0.PATH=/|bin:/usr|
|000005c0| 2f 62 69 6e 3a 2f 75 73 | 72 2f 75 63 62 20 3b 20 |/bin:/us|r/ucb ; |
|000005d0| 65 78 70 6f 72 74 20 50 | 41 54 48 0a 65 63 68 6f |export P|ATH.echo|
|000005e0| 20 49 66 20 74 68 69 73 | 20 61 72 63 68 69 76 65 | If this| archive|
|000005f0| 20 69 73 20 63 6f 6d 70 | 6c 65 74 65 2c 20 79 6f | is comp|lete, yo|
|00000600| 75 20 77 69 6c 6c 20 73 | 65 65 20 74 68 65 20 66 |u will s|ee the f|
|00000610| 6f 6c 6c 6f 77 69 6e 67 | 20 6d 65 73 73 61 67 65 |ollowing| message|
|00000620| 3a 0a 65 63 68 6f 20 27 | 20 20 20 20 20 20 20 20 |:.echo '| |
|00000630| 20 20 22 73 68 61 72 3a | 20 45 6e 64 20 6f 66 20 | "shar:| End of |
|00000640| 61 72 63 68 69 76 65 2e | 22 27 0a 69 66 20 74 65 |archive.|"'.if te|
|00000650| 73 74 20 2d 66 20 27 43 | 4f 50 59 52 49 47 48 54 |st -f 'C|OPYRIGHT|
|00000660| 27 20 2d 61 20 22 24 7b | 31 7d 22 20 21 3d 20 22 |' -a "${|1}" != "|
|00000670| 2d 63 22 20 3b 20 74 68 | 65 6e 20 0a 20 20 65 63 |-c" ; th|en . ec|
|00000680| 68 6f 20 73 68 61 72 3a | 20 57 69 6c 6c 20 6e 6f |ho shar:| Will no|
|00000690| 74 20 63 6c 6f 62 62 65 | 72 20 65 78 69 73 74 69 |t clobbe|r existi|
|000006a0| 6e 67 20 66 69 6c 65 20 | 5c 22 27 43 4f 50 59 52 |ng file |\"'COPYR|
|000006b0| 49 47 48 54 27 5c 22 0a | 65 6c 73 65 0a 20 20 65 |IGHT'\".|else. e|
|000006c0| 63 68 6f 20 73 68 61 72 | 3a 20 45 78 74 72 61 63 |cho shar|: Extrac|
|000006d0| 74 69 6e 67 20 5c 22 27 | 43 4f 50 59 52 49 47 48 |ting \"'|COPYRIGH|
|000006e0| 54 27 5c 22 20 5c 28 31 | 30 35 34 20 63 68 61 72 |T'\" \(1|054 char|
|000006f0| 61 63 74 65 72 73 5c 29 | 0a 20 20 73 65 64 20 22 |acters\)|. sed "|
|00000700| 73 2f 5e 58 2f 2f 22 20 | 3e 27 43 4f 50 59 52 49 |s/^X//" |>'COPYRI|
|00000710| 47 48 54 27 20 3c 3c 27 | 45 4e 44 5f 4f 46 5f 46 |GHT' <<'|END_OF_F|
|00000720| 49 4c 45 27 0a 58 2f 2a | 0a 58 20 2a 20 43 6f 70 |ILE'.X/*|.X * Cop|
|00000730| 79 72 69 67 68 74 20 28 | 63 29 20 31 39 39 30 20 |yright (|c) 1990 |
|00000740| 52 65 67 65 6e 74 73 20 | 6f 66 20 74 68 65 20 55 |Regents |of the U|
|00000750| 6e 69 76 65 72 73 69 74 | 79 20 6f 66 20 43 61 6c |niversit|y of Cal|
|00000760| 69 66 6f 72 6e 69 61 2e | 0a 58 20 2a 20 41 6c 6c |ifornia.|.X * All|
|00000770| 20 72 69 67 68 74 73 20 | 72 65 73 65 72 76 65 64 | rights |reserved|
|00000780| 2e 0a 58 20 2a 0a 58 20 | 2a 20 52 65 64 69 73 74 |..X *.X |* Redist|
|00000790| 72 69 62 75 74 69 6f 6e | 20 61 6e 64 20 75 73 65 |ribution| and use|
|000007a0| 20 69 6e 20 73 6f 75 72 | 63 65 20 61 6e 64 20 62 | in sour|ce and b|
|000007b0| 69 6e 61 72 79 20 66 6f | 72 6d 73 20 61 72 65 20 |inary fo|rms are |
|000007c0| 70 65 72 6d 69 74 74 65 | 64 0a 58 20 2a 20 70 72 |permitte|d.X * pr|
|000007d0| 6f 76 69 64 65 64 20 74 | 68 61 74 20 74 68 65 20 |ovided t|hat the |
|000007e0| 61 62 6f 76 65 20 63 6f | 70 79 72 69 67 68 74 20 |above co|pyright |
|000007f0| 6e 6f 74 69 63 65 20 61 | 6e 64 20 74 68 69 73 20 |notice a|nd this |
|00000800| 70 61 72 61 67 72 61 70 | 68 20 61 72 65 0a 58 20 |paragrap|h are.X |
|00000810| 2a 20 64 75 70 6c 69 63 | 61 74 65 64 20 69 6e 20 |* duplic|ated in |
|00000820| 61 6c 6c 20 73 75 63 68 | 20 66 6f 72 6d 73 20 61 |all such| forms a|
|00000830| 6e 64 20 74 68 61 74 20 | 61 6e 79 20 64 6f 63 75 |nd that |any docu|
|00000840| 6d 65 6e 74 61 74 69 6f | 6e 2c 0a 58 20 2a 20 61 |mentatio|n,.X * a|
|00000850| 64 76 65 72 74 69 73 69 | 6e 67 20 6d 61 74 65 72 |dvertisi|ng mater|
|00000860| 69 61 6c 73 2c 20 61 6e | 64 20 6f 74 68 65 72 20 |ials, an|d other |
|00000870| 6d 61 74 65 72 69 61 6c | 73 20 72 65 6c 61 74 65 |material|s relate|
|00000880| 64 20 74 6f 20 73 75 63 | 68 0a 58 20 2a 20 64 69 |d to suc|h.X * di|
|00000890| 73 74 72 69 62 75 74 69 | 6f 6e 20 61 6e 64 20 75 |stributi|on and u|
|000008a0| 73 65 20 61 63 6b 6e 6f | 77 6c 65 64 67 65 20 74 |se ackno|wledge t|
|000008b0| 68 61 74 20 74 68 65 20 | 73 6f 66 74 77 61 72 65 |hat the |software|
|000008c0| 20 77 61 73 20 64 65 76 | 65 6c 6f 70 65 64 0a 58 | was dev|eloped.X|
|000008d0| 20 2a 20 62 79 20 74 68 | 65 20 55 6e 69 76 65 72 | * by th|e Univer|
|000008e0| 73 69 74 79 20 6f 66 20 | 43 61 6c 69 66 6f 72 6e |sity of |Californ|
|000008f0| 69 61 2c 20 52 69 76 65 | 72 73 69 64 65 2e 20 0a |ia, Rive|rside. .|
|00000900| 58 20 2a 0a 58 20 2a 20 | 4e 4f 54 45 20 3a 20 54 |X *.X * |NOTE : T|
|00000910| 68 61 74 27 73 20 52 69 | 76 65 72 73 69 64 65 2e |hat's Ri|verside.|
|00000920| 20 20 4e 6f 74 20 42 65 | 72 6b 65 6c 65 79 2c 20 | Not Be|rkeley, |
|00000930| 6e 6f 74 20 53 61 6e 74 | 61 20 43 72 75 7a 2c 20 |not Sant|a Cruz, |
|00000940| 6e 6f 74 20 65 76 65 6e | 0a 58 20 2a 20 20 20 20 |not even|.X * |
|00000950| 20 20 20 20 49 72 76 69 | 6e 65 2e 20 20 52 69 76 | Irvi|ne. Riv|
|00000960| 65 72 73 69 64 65 2e 20 | 20 52 69 20 2d 20 76 65 |erside. | Ri - ve|
|00000970| 72 20 2d 20 73 69 64 65 | 2e 0a 58 20 2a 0a 58 20 |r - side|..X *.X |
|00000980| 2a 20 54 68 65 20 6e 61 | 6d 65 20 6f 66 20 74 68 |* The na|me of th|
|00000990| 65 20 55 6e 69 76 65 72 | 73 69 74 79 20 6d 61 79 |e Univer|sity may|
|000009a0| 20 6e 6f 74 20 62 65 20 | 75 73 65 64 20 74 6f 20 | not be |used to |
|000009b0| 65 6e 64 6f 72 73 65 20 | 6f 72 20 70 72 6f 6d 6f |endorse |or promo|
|000009c0| 74 65 20 0a 58 20 2a 20 | 70 72 6f 64 75 63 74 73 |te .X * |products|
|000009d0| 20 64 65 72 69 76 65 64 | 20 66 72 6f 6d 20 74 68 | derived| from th|
|000009e0| 69 73 20 73 6f 66 74 77 | 61 72 65 20 77 69 74 68 |is softw|are with|
|000009f0| 6f 75 74 20 73 70 65 63 | 69 66 69 63 20 70 72 69 |out spec|ific pri|
|00000a00| 6f 72 20 77 72 69 74 74 | 65 6e 0a 58 20 2a 20 70 |or writt|en.X * p|
|00000a10| 65 72 6d 69 73 73 69 6f | 6e 2e 0a 58 20 2a 0a 58 |ermissio|n..X *.X|
|00000a20| 20 2a 20 54 48 49 53 20 | 53 4f 46 54 57 41 52 45 | * THIS |SOFTWARE|
|00000a30| 20 49 53 20 50 52 4f 56 | 49 44 45 44 20 60 60 41 | IS PROV|IDED ``A|
|00000a40| 53 20 49 53 27 27 20 41 | 4e 44 20 57 49 54 48 4f |S IS'' A|ND WITHO|
|00000a50| 55 54 20 41 4e 59 20 45 | 58 50 52 45 53 53 20 4f |UT ANY E|XPRESS O|
|00000a60| 52 0a 58 20 2a 20 49 4d | 50 4c 49 45 44 20 57 41 |R.X * IM|PLIED WA|
|00000a70| 52 52 41 4e 54 49 45 53 | 2c 20 49 4e 43 4c 55 44 |RRANTIES|, INCLUD|
|00000a80| 49 4e 47 2c 20 57 49 54 | 48 4f 55 54 20 4c 49 4d |ING, WIT|HOUT LIM|
|00000a90| 49 54 41 54 49 4f 4e 2c | 20 54 48 45 20 49 4d 50 |ITATION,| THE IMP|
|00000aa0| 4c 49 45 44 0a 58 20 2a | 20 57 41 52 52 41 4e 54 |LIED.X *| WARRANT|
|00000ab0| 49 45 53 20 4f 46 20 4d | 45 52 43 48 41 4e 54 49 |IES OF M|ERCHANTI|
|00000ac0| 42 49 4c 49 54 59 20 41 | 4e 44 20 46 49 54 4e 45 |BILITY A|ND FITNE|
|00000ad0| 53 53 20 46 4f 52 20 41 | 20 50 41 52 54 49 43 55 |SS FOR A| PARTICU|
|00000ae0| 4c 41 52 20 50 55 52 50 | 4f 53 45 2e 0a 58 20 2a |LAR PURP|OSE..X *|
|00000af0| 20 0a 58 20 2a 20 4d 4c | 50 44 20 2d 2d 20 4d 75 | .X * ML|PD -- Mu|
|00000b00| 6c 74 69 70 6c 65 20 4c | 69 6e 65 20 50 72 69 6e |ltiple L|ine Prin|
|00000b10| 74 65 72 20 44 61 65 6d | 6f 6e 20 28 56 65 72 73 |ter Daem|on (Vers|
|00000b20| 69 6f 6e 20 31 2e 33 29 | 0a 58 20 2a 20 53 43 43 |ion 1.3)|.X * SCC|
|00000b30| 53 20 6b 65 79 77 6f 72 | 64 73 3a 20 40 28 23 29 |S keywor|ds: @(#)|
|00000b40| 43 4f 50 59 52 49 47 48 | 54 09 31 2e 33 20 31 32 |COPYRIGH|T.1.3 12|
|00000b50| 2f 31 2f 39 30 0a 58 20 | 2a 2f 0a 58 0a 45 4e 44 |/1/90.X |*/.X.END|
|00000b60| 5f 4f 46 5f 46 49 4c 45 | 0a 20 20 69 66 20 74 65 |_OF_FILE|. if te|
|00000b70| 73 74 20 31 30 35 34 20 | 2d 6e 65 20 60 77 63 20 |st 1054 |-ne `wc |
|00000b80| 2d 63 20 3c 27 43 4f 50 | 59 52 49 47 48 54 27 60 |-c <'COP|YRIGHT'`|
|00000b90| 3b 20 74 68 65 6e 0a 20 | 20 20 20 65 63 68 6f 20 |; then. | echo |
|00000ba0| 73 68 61 72 3a 20 5c 22 | 27 43 4f 50 59 52 49 47 |shar: \"|'COPYRIG|
|00000bb0| 48 54 27 5c 22 20 75 6e | 70 61 63 6b 65 64 20 77 |HT'\" un|packed w|
|00000bc0| 69 74 68 20 77 72 6f 6e | 67 20 73 69 7a 65 21 0a |ith wron|g size!.|
|00000bd0| 20 20 66 69 0a 20 20 23 | 20 65 6e 64 20 6f 66 20 | fi. #| end of |
|00000be0| 27 43 4f 50 59 52 49 47 | 48 54 27 0a 66 69 0a 69 |'COPYRIG|HT'.fi.i|
|00000bf0| 66 20 74 65 73 74 20 2d | 66 20 27 4d 61 6b 65 66 |f test -|f 'Makef|
|00000c00| 69 6c 65 27 20 2d 61 20 | 22 24 7b 31 7d 22 20 21 |ile' -a |"${1}" !|
|00000c10| 3d 20 22 2d 63 22 20 3b | 20 74 68 65 6e 20 0a 20 |= "-c" ;| then . |
|00000c20| 20 65 63 68 6f 20 73 68 | 61 72 3a 20 57 69 6c 6c | echo sh|ar: Will|
|00000c30| 20 6e 6f 74 20 63 6c 6f | 62 62 65 72 20 65 78 69 | not clo|bber exi|
|00000c40| 73 74 69 6e 67 20 66 69 | 6c 65 20 5c 22 27 4d 61 |sting fi|le \"'Ma|
|00000c50| 6b 65 66 69 6c 65 27 5c | 22 0a 65 6c 73 65 0a 20 |kefile'\|".else. |
|00000c60| 20 65 63 68 6f 20 73 68 | 61 72 3a 20 45 78 74 72 | echo sh|ar: Extr|
|00000c70| 61 63 74 69 6e 67 20 5c | 22 27 4d 61 6b 65 66 69 |acting \|"'Makefi|
|00000c80| 6c 65 27 5c 22 20 5c 28 | 31 37 37 35 20 63 68 61 |le'\" \(|1775 cha|
|00000c90| 72 61 63 74 65 72 73 5c | 29 0a 20 20 73 65 64 20 |racters\|). sed |
|00000ca0| 22 73 2f 5e 58 2f 2f 22 | 20 3e 27 4d 61 6b 65 66 |"s/^X//"| >'Makef|
|00000cb0| 69 6c 65 27 20 3c 3c 27 | 45 4e 44 5f 4f 46 5f 46 |ile' <<'|END_OF_F|
|00000cc0| 49 4c 45 27 0a 58 23 0a | 58 23 20 43 6f 70 79 72 |ILE'.X#.|X# Copyr|
|00000cd0| 69 67 68 74 20 28 63 29 | 20 31 39 39 30 20 52 65 |ight (c)| 1990 Re|
|00000ce0| 67 65 6e 74 73 20 6f 66 | 20 74 68 65 20 55 6e 69 |gents of| the Uni|
|00000cf0| 76 65 72 73 69 74 79 20 | 6f 66 20 43 61 6c 69 66 |versity |of Calif|
|00000d00| 6f 72 6e 69 61 2e 0a 58 | 23 20 41 6c 6c 20 72 69 |ornia..X|# All ri|
|00000d10| 67 68 74 73 20 72 65 73 | 65 72 76 65 64 2e 0a 58 |ghts res|erved..X|
|00000d20| 23 0a 58 23 20 52 65 64 | 69 73 74 72 69 62 75 74 |#.X# Red|istribut|
|00000d30| 69 6f 6e 20 61 6e 64 20 | 75 73 65 20 69 6e 20 73 |ion and |use in s|
|00000d40| 6f 75 72 63 65 20 61 6e | 64 20 62 69 6e 61 72 79 |ource an|d binary|
|00000d50| 20 66 6f 72 6d 73 20 61 | 72 65 20 70 65 72 6d 69 | forms a|re permi|
|00000d60| 74 74 65 64 0a 58 23 20 | 70 72 6f 76 69 64 65 64 |tted.X# |provided|
|00000d70| 20 74 68 61 74 20 74 68 | 65 20 61 62 6f 76 65 20 | that th|e above |
|00000d80| 63 6f 70 79 72 69 67 68 | 74 20 6e 6f 74 69 63 65 |copyrigh|t notice|
|00000d90| 20 61 6e 64 20 74 68 69 | 73 20 70 61 72 61 67 72 | and thi|s paragr|
|00000da0| 61 70 68 20 61 72 65 0a | 58 23 20 64 75 70 6c 69 |aph are.|X# dupli|
|00000db0| 63 61 74 65 64 20 69 6e | 20 61 6c 6c 20 73 75 63 |cated in| all suc|
|00000dc0| 68 20 66 6f 72 6d 73 20 | 61 6e 64 20 74 68 61 74 |h forms |and that|
|00000dd0| 20 61 6e 79 20 64 6f 63 | 75 6d 65 6e 74 61 74 69 | any doc|umentati|
|00000de0| 6f 6e 2c 0a 58 23 20 61 | 64 76 65 72 74 69 73 69 |on,.X# a|dvertisi|
|00000df0| 6e 67 20 6d 61 74 65 72 | 69 61 6c 73 2c 20 61 6e |ng mater|ials, an|
|00000e00| 64 20 6f 74 68 65 72 20 | 6d 61 74 65 72 69 61 6c |d other |material|
|00000e10| 73 20 72 65 6c 61 74 65 | 64 20 74 6f 20 73 75 63 |s relate|d to suc|
|00000e20| 68 0a 58 23 20 64 69 73 | 74 72 69 62 75 74 69 6f |h.X# dis|tributio|
|00000e30| 6e 20 61 6e 64 20 75 73 | 65 20 61 63 6b 6e 6f 77 |n and us|e acknow|
|00000e40| 6c 65 64 67 65 20 74 68 | 61 74 20 74 68 65 20 73 |ledge th|at the s|
|00000e50| 6f 66 74 77 61 72 65 20 | 77 61 73 20 64 65 76 65 |oftware |was deve|
|00000e60| 6c 6f 70 65 64 0a 58 23 | 20 62 79 20 74 68 65 20 |loped.X#| by the |
|00000e70| 55 6e 69 76 65 72 73 69 | 74 79 20 6f 66 20 43 61 |Universi|ty of Ca|
|00000e80| 6c 69 66 6f 72 6e 69 61 | 2c 20 52 69 76 65 72 73 |lifornia|, Rivers|
|00000e90| 69 64 65 2e 20 0a 58 23 | 0a 58 23 20 4e 4f 54 45 |ide. .X#|.X# NOTE|
|00000ea0| 20 3a 20 54 68 61 74 27 | 73 20 52 69 76 65 72 73 | : That'|s Rivers|
|00000eb0| 69 64 65 2e 20 20 4e 6f | 74 20 42 65 72 6b 65 6c |ide. No|t Berkel|
|00000ec0| 65 79 2c 20 6e 6f 74 20 | 53 61 6e 74 61 20 43 72 |ey, not |Santa Cr|
|00000ed0| 75 7a 2c 20 6e 6f 74 20 | 65 76 65 6e 0a 58 23 20 |uz, not |even.X# |
|00000ee0| 20 20 20 20 20 20 20 49 | 72 76 69 6e 65 2e 20 20 | I|rvine. |
|00000ef0| 52 69 76 65 72 73 69 64 | 65 2e 20 20 52 69 20 2d |Riversid|e. Ri -|
|00000f00| 20 76 65 72 20 2d 20 73 | 69 64 65 2e 0a 58 23 0a | ver - s|ide..X#.|
|00000f10| 58 23 20 54 68 65 20 6e | 61 6d 65 20 6f 66 20 74 |X# The n|ame of t|
|00000f20| 68 65 20 55 6e 69 76 65 | 72 73 69 74 79 20 6d 61 |he Unive|rsity ma|
|00000f30| 79 20 6e 6f 74 20 62 65 | 20 75 73 65 64 20 74 6f |y not be| used to|
|00000f40| 20 65 6e 64 6f 72 73 65 | 20 6f 72 20 70 72 6f 6d | endorse| or prom|
|00000f50| 6f 74 65 20 0a 58 23 20 | 70 72 6f 64 75 63 74 73 |ote .X# |products|
|00000f60| 20 64 65 72 69 76 65 64 | 20 66 72 6f 6d 20 74 68 | derived| from th|
|00000f70| 69 73 20 73 6f 66 74 77 | 61 72 65 20 77 69 74 68 |is softw|are with|
|00000f80| 6f 75 74 20 73 70 65 63 | 69 66 69 63 20 70 72 69 |out spec|ific pri|
|00000f90| 6f 72 20 77 72 69 74 74 | 65 6e 0a 58 23 20 70 65 |or writt|en.X# pe|
|00000fa0| 72 6d 69 73 73 69 6f 6e | 2e 0a 58 23 0a 58 23 20 |rmission|..X#.X# |
|00000fb0| 54 48 49 53 20 53 4f 46 | 54 57 41 52 45 20 49 53 |THIS SOF|TWARE IS|
|00000fc0| 20 50 52 4f 56 49 44 45 | 44 20 60 60 41 53 20 49 | PROVIDE|D ``AS I|
|00000fd0| 53 27 27 20 41 4e 44 20 | 57 49 54 48 4f 55 54 20 |S'' AND |WITHOUT |
|00000fe0| 41 4e 59 20 45 58 50 52 | 45 53 53 20 4f 52 0a 58 |ANY EXPR|ESS OR.X|
|00000ff0| 23 20 49 4d 50 4c 49 45 | 44 20 57 41 52 52 41 4e |# IMPLIE|D WARRAN|
|00001000| 54 49 45 53 2c 20 49 4e | 43 4c 55 44 49 4e 47 2c |TIES, IN|CLUDING,|
|00001010| 20 57 49 54 48 4f 55 54 | 20 4c 49 4d 49 54 41 54 | WITHOUT| LIMITAT|
|00001020| 49 4f 4e 2c 20 54 48 45 | 20 49 4d 50 4c 49 45 44 |ION, THE| IMPLIED|
|00001030| 0a 58 23 20 57 41 52 52 | 41 4e 54 49 45 53 20 4f |.X# WARR|ANTIES O|
|00001040| 46 20 4d 45 52 43 48 41 | 4e 54 49 42 49 4c 49 54 |F MERCHA|NTIBILIT|
|00001050| 59 20 41 4e 44 20 46 49 | 54 4e 45 53 53 20 46 4f |Y AND FI|TNESS FO|
|00001060| 52 20 41 20 50 41 52 54 | 49 43 55 4c 41 52 20 50 |R A PART|ICULAR P|
|00001070| 55 52 50 4f 53 45 2e 0a | 58 23 20 0a 58 23 20 4d |URPOSE..|X# .X# M|
|00001080| 4c 50 44 20 2d 2d 20 4d | 75 6c 74 69 70 6c 65 20 |LPD -- M|ultiple |
|00001090| 4c 69 6e 65 20 50 72 69 | 6e 74 65 72 20 44 61 65 |Line Pri|nter Dae|
|000010a0| 6d 6f 6e 20 28 56 65 72 | 73 69 6f 6e 20 31 2e 33 |mon (Ver|sion 1.3|
|000010b0| 29 0a 58 23 20 53 43 43 | 53 20 6b 65 79 77 6f 72 |).X# SCC|S keywor|
|000010c0| 64 73 3a 20 40 28 23 29 | 4d 61 6b 65 66 69 6c 65 |ds: @(#)|Makefile|
|000010d0| 09 31 2e 33 20 31 32 2f | 31 2f 39 30 0a 58 23 0a |.1.3 12/|1/90.X#.|
|000010e0| 58 0a 58 23 0a 58 23 20 | 4e 6f 74 65 20 3a 20 4d |X.X#.X# |Note : M|
|000010f0| 61 6b 65 20 73 75 72 65 | 20 74 6f 20 6c 6f 6f 6b |ake sure| to look|
|00001100| 20 69 6e 20 63 6f 6e 66 | 69 67 2e 68 20 66 6f 72 | in conf|ig.h for|
|00001110| 20 6f 74 68 65 72 20 70 | 61 72 61 6d 65 74 65 72 | other p|arameter|
|00001120| 73 2e 0a 58 23 0a 58 0a | 58 23 20 49 6e 63 6c 75 |s..X#.X.|X# Inclu|
|00001130| 64 65 20 74 68 69 73 20 | 6c 69 6e 65 20 69 66 20 |de this |line if |
|00001140| 79 6f 75 20 61 72 65 20 | 72 75 6e 6e 69 6e 67 20 |you are |running |
|00001150| 75 6e 64 65 72 20 74 68 | 65 20 53 75 6e 20 4f 53 |under th|e Sun OS|
|00001160| 20 65 6e 76 69 72 6f 6e | 6d 65 6e 74 2e 0a 58 23 | environ|ment..X#|
|00001170| 20 49 74 20 69 73 20 64 | 65 73 69 67 6e 65 64 20 | It is d|esigned |
|00001180| 62 61 73 69 63 61 6c 6c | 79 20 74 6f 20 63 68 61 |basicall|y to cha|
|00001190| 6e 67 65 20 66 72 6f 6d | 20 75 73 69 6e 67 20 3c |nge from| using <|
|000011a0| 73 79 73 2f 64 69 72 2e | 68 3e 20 74 6f 20 75 73 |sys/dir.|h> to us|
|000011b0| 69 6e 67 0a 58 23 20 3c | 64 69 72 65 6e 74 2e 68 |ing.X# <|dirent.h|
|000011c0| 3e 2c 20 62 65 63 61 75 | 73 65 20 6f 66 20 74 68 |>, becau|se of th|
|000011d0| 65 20 53 79 73 74 65 6d | 20 56 20 63 6f 6d 70 61 |e System| V compa|
|000011e0| 74 69 62 69 6c 69 74 79 | 2e 0a 58 23 0a 58 23 20 |tibility|..X#.X# |
|000011f0| 54 68 65 20 64 65 62 75 | 67 20 66 6c 61 67 20 69 |The debu|g flag i|
|00001200| 73 20 61 6c 73 6f 20 73 | 70 65 63 69 66 69 65 64 |s also s|pecified|
|00001210| 20 62 65 63 61 75 73 65 | 20 6f 66 20 73 6f 6d 65 | because| of some|
|00001220| 20 70 65 6f 70 6c 65 27 | 73 20 64 65 73 69 72 65 | people'|s desire|
|00001230| 20 74 6f 0a 58 23 20 74 | 61 6b 65 20 61 20 73 6d | to.X# t|ake a sm|
|00001240| 61 6c 6c 20 70 65 65 6b | 20 61 74 20 77 68 61 74 |all peek| at what|
|00001250| 20 69 73 20 67 6f 69 6e | 67 20 6f 6e 2e 20 20 59 | is goin|g on. Y|
|00001260| 6f 75 20 63 61 6e 20 75 | 73 65 20 69 74 2c 20 62 |ou can u|se it, b|
|00001270| 75 74 20 69 74 20 69 73 | 0a 58 23 20 76 65 72 79 |ut it is|.X# very|
|00001280| 20 6e 6f 69 73 79 2c 20 | 61 6e 64 20 73 68 6f 75 | noisy, |and shou|
|00001290| 6c 64 6e 27 74 20 62 65 | 20 75 73 65 64 20 77 68 |ldn't be| used wh|
|000012a0| 65 6e 20 72 75 6e 6e 69 | 6e 67 20 6e 6f 72 6d 61 |en runni|ng norma|
|000012b0| 6c 6c 79 2e 0a 58 23 0a | 58 45 58 54 52 41 5f 46 |lly..X#.|XEXTRA_F|
|000012c0| 4c 41 47 53 20 20 3d 20 | 2d 44 53 55 4e 20 23 2d |LAGS = |-DSUN #-|
|000012d0| 44 44 45 42 55 47 20 2d | 67 0a 58 23 0a 58 23 20 |DDEBUG -|g.X#.X# |
|000012e0| 41 6e 64 20 6e 6f 77 2c | 20 74 68 65 20 72 65 73 |And now,| the res|
|000012f0| 74 20 6f 66 20 74 68 65 | 20 73 74 6f 72 79 2e 0a |t of the| story..|
|00001300| 58 23 0a 58 4f 42 4a 53 | 20 20 20 20 20 20 20 20 |X#.XOBJS| |
|00001310| 20 3d 20 20 64 61 65 6d | 6f 6e 2e 6f 20 6c 6f 63 | = daem|on.o loc|
|00001320| 6b 2e 6f 20 70 66 69 6c | 65 2e 6f 20 6d 6c 70 2e |k.o pfil|e.o mlp.|
|00001330| 6f 20 70 72 69 6e 74 63 | 61 70 2e 6f 20 70 72 69 |o printc|ap.o pri|
|00001340| 6e 74 65 72 2e 6f 0a 58 | 50 52 4f 47 20 20 20 20 |nter.o.X|PROG |
|00001350| 20 20 20 20 20 3d 20 20 | 6d 6c 70 64 0a 58 43 43 | = |mlpd.XCC|
|00001360| 20 20 20 20 20 20 20 20 | 20 20 20 3d 20 20 63 63 | | = cc|
|00001370| 0a 58 43 46 4c 41 47 53 | 20 20 20 20 20 20 20 3d |.XCFLAGS| =|
|00001380| 20 20 2d 63 20 24 28 45 | 58 54 52 41 5f 46 4c 41 | -c $(E|XTRA_FLA|
|00001390| 47 53 29 0a 58 0a 58 24 | 28 50 52 4f 47 29 20 3a |GS).X.X$|(PROG) :|
|000013a0| 20 24 28 4f 42 4a 53 29 | 0a 58 09 24 28 43 43 29 | $(OBJS)|.X.$(CC)|
|000013b0| 20 2d 6f 20 24 28 50 52 | 4f 47 29 20 24 28 4f 42 | -o $(PR|OG) $(OB|
|000013c0| 4a 53 29 0a 58 0a 58 63 | 6c 65 61 6e 09 3a 0a 58 |JS).X.Xc|lean.:.X|
|000013d0| 09 2f 62 69 6e 2f 72 6d | 20 2d 66 20 2a 2e 6f 20 |./bin/rm| -f *.o |
|000013e0| 24 28 50 52 4f 47 29 0a | 45 4e 44 5f 4f 46 5f 46 |$(PROG).|END_OF_F|
|000013f0| 49 4c 45 0a 20 20 69 66 | 20 74 65 73 74 20 31 37 |ILE. if| test 17|
|00001400| 37 35 20 2d 6e 65 20 60 | 77 63 20 2d 63 20 3c 27 |75 -ne `|wc -c <'|
|00001410| 4d 61 6b 65 66 69 6c 65 | 27 60 3b 20 74 68 65 6e |Makefile|'`; then|
|00001420| 0a 20 20 20 20 65 63 68 | 6f 20 73 68 61 72 3a 20 |. ech|o shar: |
|00001430| 5c 22 27 4d 61 6b 65 66 | 69 6c 65 27 5c 22 20 75 |\"'Makef|ile'\" u|
|00001440| 6e 70 61 63 6b 65 64 20 | 77 69 74 68 20 77 72 6f |npacked |with wro|
|00001450| 6e 67 20 73 69 7a 65 21 | 0a 20 20 66 69 0a 20 20 |ng size!|. fi. |
|00001460| 23 20 65 6e 64 20 6f 66 | 20 27 4d 61 6b 65 66 69 |# end of| 'Makefi|
|00001470| 6c 65 27 0a 66 69 0a 69 | 66 20 74 65 73 74 20 2d |le'.fi.i|f test -|
|00001480| 66 20 27 52 45 41 44 4d | 45 27 20 2d 61 20 22 24 |f 'READM|E' -a "$|
|00001490| 7b 31 7d 22 20 21 3d 20 | 22 2d 63 22 20 3b 20 74 |{1}" != |"-c" ; t|
|000014a0| 68 65 6e 20 0a 20 20 65 | 63 68 6f 20 73 68 61 72 |hen . e|cho shar|
|000014b0| 3a 20 57 69 6c 6c 20 6e | 6f 74 20 63 6c 6f 62 62 |: Will n|ot clobb|
|000014c0| 65 72 20 65 78 69 73 74 | 69 6e 67 20 66 69 6c 65 |er exist|ing file|
|000014d0| 20 5c 22 27 52 45 41 44 | 4d 45 27 5c 22 0a 65 6c | \"'READ|ME'\".el|
|000014e0| 73 65 0a 20 20 65 63 68 | 6f 20 73 68 61 72 3a 20 |se. ech|o shar: |
|000014f0| 45 78 74 72 61 63 74 69 | 6e 67 20 5c 22 27 52 45 |Extracti|ng \"'RE|
|00001500| 41 44 4d 45 27 5c 22 20 | 5c 28 34 30 38 35 20 63 |ADME'\" |\(4085 c|
|00001510| 68 61 72 61 63 74 65 72 | 73 5c 29 0a 20 20 73 65 |haracter|s\). se|
|00001520| 64 20 22 73 2f 5e 58 2f | 2f 22 20 3e 27 52 45 41 |d "s/^X/|/" >'REA|
|00001530| 44 4d 45 27 20 3c 3c 27 | 45 4e 44 5f 4f 46 5f 46 |DME' <<'|END_OF_F|
|00001540| 49 4c 45 27 0a 58 2f 2a | 0a 58 20 2a 20 43 6f 70 |ILE'.X/*|.X * Cop|
|00001550| 79 72 69 67 68 74 20 28 | 63 29 20 31 39 39 30 20 |yright (|c) 1990 |
|00001560| 52 65 67 65 6e 74 73 20 | 6f 66 20 74 68 65 20 55 |Regents |of the U|
|00001570| 6e 69 76 65 72 73 69 74 | 79 20 6f 66 20 43 61 6c |niversit|y of Cal|
|00001580| 69 66 6f 72 6e 69 61 2e | 0a 58 20 2a 20 41 6c 6c |ifornia.|.X * All|
|00001590| 20 72 69 67 68 74 73 20 | 72 65 73 65 72 76 65 64 | rights |reserved|
|000015a0| 2e 0a 58 20 2a 0a 58 20 | 2a 20 52 65 64 69 73 74 |..X *.X |* Redist|
|000015b0| 72 69 62 75 74 69 6f 6e | 20 61 6e 64 20 75 73 65 |ribution| and use|
|000015c0| 20 69 6e 20 73 6f 75 72 | 63 65 20 61 6e 64 20 62 | in sour|ce and b|
|000015d0| 69 6e 61 72 79 20 66 6f | 72 6d 73 20 61 72 65 20 |inary fo|rms are |
|000015e0| 70 65 72 6d 69 74 74 65 | 64 0a 58 20 2a 20 70 72 |permitte|d.X * pr|
|000015f0| 6f 76 69 64 65 64 20 74 | 68 61 74 20 74 68 65 20 |ovided t|hat the |
|00001600| 61 62 6f 76 65 20 63 6f | 70 79 72 69 67 68 74 20 |above co|pyright |
|00001610| 6e 6f 74 69 63 65 20 61 | 6e 64 20 74 68 69 73 20 |notice a|nd this |
|00001620| 70 61 72 61 67 72 61 70 | 68 20 61 72 65 0a 58 20 |paragrap|h are.X |
|00001630| 2a 20 64 75 70 6c 69 63 | 61 74 65 64 20 69 6e 20 |* duplic|ated in |
|00001640| 61 6c 6c 20 73 75 63 68 | 20 66 6f 72 6d 73 20 61 |all such| forms a|
|00001650| 6e 64 20 74 68 61 74 20 | 61 6e 79 20 64 6f 63 75 |nd that |any docu|
|00001660| 6d 65 6e 74 61 74 69 6f | 6e 2c 0a 58 20 2a 20 61 |mentatio|n,.X * a|
|00001670| 64 76 65 72 74 69 73 69 | 6e 67 20 6d 61 74 65 72 |dvertisi|ng mater|
|00001680| 69 61 6c 73 2c 20 61 6e | 64 20 6f 74 68 65 72 20 |ials, an|d other |
|00001690| 6d 61 74 65 72 69 61 6c | 73 20 72 65 6c 61 74 65 |material|s relate|
|000016a0| 64 20 74 6f 20 73 75 63 | 68 0a 58 20 2a 20 64 69 |d to suc|h.X * di|
|000016b0| 73 74 72 69 62 75 74 69 | 6f 6e 20 61 6e 64 20 75 |stributi|on and u|
|000016c0| 73 65 20 61 63 6b 6e 6f | 77 6c 65 64 67 65 20 74 |se ackno|wledge t|
|000016d0| 68 61 74 20 74 68 65 20 | 73 6f 66 74 77 61 72 65 |hat the |software|
|000016e0| 20 77 61 73 20 64 65 76 | 65 6c 6f 70 65 64 0a 58 | was dev|eloped.X|
|000016f0| 20 2a 20 62 79 20 74 68 | 65 20 55 6e 69 76 65 72 | * by th|e Univer|
|00001700| 73 69 74 79 20 6f 66 20 | 43 61 6c 69 66 6f 72 6e |sity of |Californ|
|00001710| 69 61 2c 20 52 69 76 65 | 72 73 69 64 65 2e 20 0a |ia, Rive|rside. .|
|00001720| 58 20 2a 0a 58 20 2a 20 | 4e 4f 54 45 20 3a 20 54 |X *.X * |NOTE : T|
|00001730| 68 61 74 27 73 20 52 69 | 76 65 72 73 69 64 65 2e |hat's Ri|verside.|
|00001740| 20 20 4e 6f 74 20 42 65 | 72 6b 65 6c 65 79 2c 20 | Not Be|rkeley, |
|00001750| 6e 6f 74 20 53 61 6e 74 | 61 20 43 72 75 7a 2c 20 |not Sant|a Cruz, |
|00001760| 6e 6f 74 20 65 76 65 6e | 0a 58 20 2a 20 20 20 20 |not even|.X * |
|00001770| 20 20 20 20 49 72 76 69 | 6e 65 2e 20 20 52 69 76 | Irvi|ne. Riv|
|00001780| 65 72 73 69 64 65 2e 20 | 20 52 69 20 2d 20 76 65 |erside. | Ri - ve|
|00001790| 72 20 2d 20 73 69 64 65 | 2e 0a 58 20 2a 0a 58 20 |r - side|..X *.X |
|000017a0| 2a 20 54 68 65 20 6e 61 | 6d 65 20 6f 66 20 74 68 |* The na|me of th|
|000017b0| 65 20 55 6e 69 76 65 72 | 73 69 74 79 20 6d 61 79 |e Univer|sity may|
|000017c0| 20 6e 6f 74 20 62 65 20 | 75 73 65 64 20 74 6f 20 | not be |used to |
|000017d0| 65 6e 64 6f 72 73 65 20 | 6f 72 20 70 72 6f 6d 6f |endorse |or promo|
|000017e0| 74 65 20 0a 58 20 2a 20 | 70 72 6f 64 75 63 74 73 |te .X * |products|
|000017f0| 20 64 65 72 69 76 65 64 | 20 66 72 6f 6d 20 74 68 | derived| from th|
|00001800| 69 73 20 73 6f 66 74 77 | 61 72 65 20 77 69 74 68 |is softw|are with|
|00001810| 6f 75 74 20 73 70 65 63 | 69 66 69 63 20 70 72 69 |out spec|ific pri|
|00001820| 6f 72 20 77 72 69 74 74 | 65 6e 0a 58 20 2a 20 70 |or writt|en.X * p|
|00001830| 65 72 6d 69 73 73 69 6f | 6e 2e 0a 58 20 2a 0a 58 |ermissio|n..X *.X|
|00001840| 20 2a 20 54 48 49 53 20 | 53 4f 46 54 57 41 52 45 | * THIS |SOFTWARE|
|00001850| 20 49 53 20 50 52 4f 56 | 49 44 45 44 20 60 60 41 | IS PROV|IDED ``A|
|00001860| 53 20 49 53 27 27 20 41 | 4e 44 20 57 49 54 48 4f |S IS'' A|ND WITHO|
|00001870| 55 54 20 41 4e 59 20 45 | 58 50 52 45 53 53 20 4f |UT ANY E|XPRESS O|
|00001880| 52 0a 58 20 2a 20 49 4d | 50 4c 49 45 44 20 57 41 |R.X * IM|PLIED WA|
|00001890| 52 52 41 4e 54 49 45 53 | 2c 20 49 4e 43 4c 55 44 |RRANTIES|, INCLUD|
|000018a0| 49 4e 47 2c 20 57 49 54 | 48 4f 55 54 20 4c 49 4d |ING, WIT|HOUT LIM|
|000018b0| 49 54 41 54 49 4f 4e 2c | 20 54 48 45 20 49 4d 50 |ITATION,| THE IMP|
|000018c0| 4c 49 45 44 0a 58 20 2a | 20 57 41 52 52 41 4e 54 |LIED.X *| WARRANT|
|000018d0| 49 45 53 20 4f 46 20 4d | 45 52 43 48 41 4e 54 49 |IES OF M|ERCHANTI|
|000018e0| 42 49 4c 49 54 59 20 41 | 4e 44 20 46 49 54 4e 45 |BILITY A|ND FITNE|
|000018f0| 53 53 20 46 4f 52 20 41 | 20 50 41 52 54 49 43 55 |SS FOR A| PARTICU|
|00001900| 4c 41 52 20 50 55 52 50 | 4f 53 45 2e 0a 58 20 2a |LAR PURP|OSE..X *|
|00001910| 20 0a 58 20 2a 20 4d 4c | 50 44 20 2d 2d 20 4d 75 | .X * ML|PD -- Mu|
|00001920| 6c 74 69 70 6c 65 20 4c | 69 6e 65 20 50 72 69 6e |ltiple L|ine Prin|
|00001930| 74 65 72 20 44 61 65 6d | 6f 6e 20 28 56 65 72 73 |ter Daem|on (Vers|
|00001940| 69 6f 6e 20 31 2e 33 29 | 0a 58 20 2a 20 53 43 43 |ion 1.3)|.X * SCC|
|00001950| 53 20 6b 65 79 77 6f 72 | 64 73 3a 20 40 28 23 29 |S keywor|ds: @(#)|
|00001960| 52 45 41 44 4d 45 09 31 | 2e 33 20 31 32 2f 31 2f |README.1|.3 12/1/|
|00001970| 39 30 0a 58 20 2a 2f 0a | 58 0a 58 4e 4f 54 45 3a |90.X */.|X.XNOTE:|
|00001980| 20 20 54 68 69 73 20 70 | 72 6f 67 72 61 6d 20 69 | This p|rogram i|
|00001990| 73 20 69 6e 20 69 74 73 | 20 66 69 72 73 74 20 74 |s in its| first t|
|000019a0| 65 73 74 69 6e 67 20 73 | 74 61 67 65 73 2e 20 20 |esting s|tages. |
|000019b0| 49 66 20 49 20 73 65 6e | 64 20 69 74 20 6f 75 74 |If I sen|d it out|
|000019c0| 2c 0a 58 20 20 20 20 20 | 20 20 61 6e 64 20 70 65 |,.X | and pe|
|000019d0| 6f 70 6c 65 20 6c 69 6b | 65 20 69 74 2c 20 49 27 |ople lik|e it, I'|
|000019e0| 6c 6c 20 70 6f 73 74 20 | 69 74 20 74 6f 20 74 68 |ll post |it to th|
|000019f0| 65 20 55 53 45 4e 45 54 | 20 6e 65 74 77 6f 72 6b |e USENET| network|
|00001a00| 2e 20 20 49 66 0a 58 20 | 20 20 20 20 20 20 6e 6f |. If.X | no|
|00001a10| 74 2c 20 49 27 6c 6c 20 | 6a 75 73 74 20 70 75 74 |t, I'll |just put|
|00001a20| 20 69 74 20 6f 6e 20 61 | 20 72 65 73 75 6d 65 2e | it on a| resume.|
|00001a30| 20 20 54 68 69 73 20 69 | 73 20 74 68 65 20 66 69 | This i|s the fi|
|00001a40| 72 73 74 20 76 65 72 73 | 69 6f 6e 2c 0a 58 20 20 |rst vers|ion,.X |
|00001a50| 20 20 20 20 20 61 6e 64 | 20 49 20 68 61 76 65 20 | and| I have |
|00001a60| 61 6c 72 65 61 64 79 20 | 73 74 61 72 74 65 64 20 |already |started |
|00001a70| 77 6f 72 6b 69 6e 67 20 | 6f 6e 20 61 20 6e 65 77 |working |on a new|
|00001a80| 20 76 65 72 73 69 6f 6e | 20 74 68 61 74 20 68 61 | version| that ha|
|00001a90| 73 0a 58 20 20 20 20 20 | 20 20 6d 61 6e 79 20 6d |s.X | many m|
|00001aa0| 6f 72 65 20 66 65 61 74 | 75 72 65 73 2c 20 61 6c |ore feat|ures, al|
|00001ab0| 6c 20 74 68 61 74 20 72 | 65 6d 61 69 6e 20 76 65 |l that r|emain ve|
|00001ac0| 72 79 20 73 69 6d 70 6c | 69 73 74 69 63 20 74 6f |ry simpl|istic to|
|00001ad0| 20 74 68 65 0a 58 20 20 | 20 20 20 20 20 75 73 65 | the.X | use|
|00001ae0| 72 2c 20 77 68 69 63 68 | 20 69 73 20 6d 79 20 6d |r, which| is my m|
|00001af0| 61 69 6e 20 6f 62 6a 65 | 63 74 69 76 65 2e 0a 58 |ain obje|ctive..X|
|00001b00| 0a 58 0a 58 4e 6f 77 20 | 6f 6e 20 77 69 74 68 20 |.X.XNow |on with |
|00001b10| 74 68 65 20 72 65 61 6c | 20 69 6d 70 6f 72 74 61 |the real| importa|
|00001b20| 6e 74 20 73 74 75 66 66 | 3a 0a 58 0a 58 0a 58 54 |nt stuff|:.X.X.XT|
|00001b30| 68 69 73 20 70 72 6f 67 | 72 61 6d 20 28 4d 4c 50 |his prog|ram (MLP|
|00001b40| 44 29 20 69 73 20 61 20 | 6c 69 74 74 6c 65 20 70 |D) is a |little p|
|00001b50| 69 65 63 65 20 6f 66 20 | 63 6f 64 65 20 49 20 77 |iece of |code I w|
|00001b60| 72 6f 74 65 20 74 6f 20 | 75 73 65 20 61 20 73 69 |rote to |use a si|
|00001b70| 6e 67 6c 65 0a 58 70 72 | 69 6e 74 65 72 20 71 75 |ngle.Xpr|inter qu|
|00001b80| 65 75 65 20 66 6f 72 20 | 61 20 73 65 74 20 6f 66 |eue for |a set of|
|00001b90| 20 6d 75 6c 74 69 70 6c | 65 20 70 72 69 6e 74 65 | multipl|e printe|
|00001ba0| 72 73 2e 20 20 49 74 27 | 73 20 6b 69 6e 64 20 6f |rs. It'|s kind o|
|00001bb0| 66 20 77 69 65 72 64 20 | 74 6f 0a 58 73 65 74 20 |f wierd |to.Xset |
|00001bc0| 75 70 2c 20 62 75 74 20 | 6f 6e 63 65 20 69 74 20 |up, but |once it |
|00001bd0| 69 73 20 72 75 6e 6e 69 | 6e 67 2c 20 69 74 20 73 |is runni|ng, it s|
|00001be0| 68 6f 75 6c 64 20 68 65 | 6c 70 20 6f 75 74 20 61 |hould he|lp out a|
|00001bf0| 20 6c 6f 74 2e 0a 58 0a | 58 48 65 72 65 20 61 72 | lot..X.|XHere ar|
|00001c00| 65 20 74 68 65 20 73 74 | 65 70 73 20 66 6f 72 20 |e the st|eps for |
|00001c10| 61 20 63 6c 65 61 6e 20 | 63 6f 6e 66 69 67 75 72 |a clean |configur|
|00001c20| 61 74 69 6f 6e 2c 20 69 | 6e 20 70 72 6f 70 65 72 |ation, i|n proper|
|00001c30| 20 6f 72 64 65 72 20 3a | 0a 58 2d 2d 2d 2d 2d 2d | order :|.X------|
|00001c40| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001c50| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001c60| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001c70| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 0a 58 0a 58 31 2e 20 |--------|-.X.X1. |
|00001c80| 20 45 64 69 74 20 4d 61 | 6b 65 66 69 6c 65 20 74 | Edit Ma|kefile t|
|00001c90| 6f 20 79 6f 75 72 20 70 | 61 72 74 69 63 75 6c 61 |o your p|articula|
|00001ca0| 72 20 73 79 73 74 65 6d | 20 61 6e 64 20 6e 65 65 |r system| and nee|
|00001cb0| 64 73 2e 20 20 49 66 20 | 79 6f 75 20 61 72 65 20 |ds. If |you are |
|00001cc0| 72 75 6e 6e 69 6e 67 0a | 58 20 20 20 20 75 6e 64 |running.|X und|
|00001cd0| 65 72 20 61 20 53 75 6e | 4f 53 20 65 6e 76 69 72 |er a Sun|OS envir|
|00001ce0| 6f 6e 6d 65 6e 74 2c 20 | 79 6f 75 20 6e 65 65 64 |onment, |you need|
|00001cf0| 20 74 6f 20 64 65 66 69 | 6e 65 20 2d 44 53 55 4e | to defi|ne -DSUN|
|00001d00| 2c 20 61 6e 64 20 69 66 | 20 79 6f 75 20 77 61 6e |, and if| you wan|
|00001d10| 74 0a 58 20 20 20 20 74 | 6f 20 70 72 69 6e 74 20 |t.X t|o print |
|00001d20| 6f 75 74 20 68 61 72 69 | 2d 6b 61 72 69 20 64 65 |out hari|-kari de|
|00001d30| 62 75 67 20 6d 65 73 73 | 61 67 65 73 2c 20 79 6f |bug mess|ages, yo|
|00001d40| 75 20 6e 65 65 64 20 74 | 6f 20 73 70 65 63 69 66 |u need t|o specif|
|00001d50| 79 20 2d 44 44 45 42 55 | 47 2e 0a 58 0a 58 32 2e |y -DDEBU|G..X.X2.|
|00001d60| 20 20 43 6f 6d 70 69 6c | 65 20 74 68 65 20 70 72 | Compil|e the pr|
|00001d70| 6f 67 72 61 6d 2c 20 6f | 72 20 67 65 74 20 69 74 |ogram, o|r get it|
|00001d80| 20 6f 70 65 72 61 74 69 | 6f 6e 61 6c 2e 20 28 57 | operati|onal. (W|
|00001d90| 68 69 63 68 65 76 65 72 | 20 63 6f 6d 65 73 20 66 |hichever| comes f|
|00001da0| 69 72 73 74 2e 29 0a 58 | 0a 58 33 2e 20 20 54 75 |irst.).X|.X3. Tu|
|00001db0| 72 6e 20 6f 66 66 20 74 | 68 65 20 70 72 69 6e 74 |rn off t|he print|
|00001dc0| 69 6e 67 20 74 6f 20 74 | 68 65 20 62 61 73 65 20 |ing to t|he base |
|00001dd0| 70 72 69 6e 74 65 72 20 | 74 68 61 74 20 79 6f 75 |printer |that you|
|00001de0| 72 20 65 6d 70 6c 6f 79 | 65 65 73 2c 20 66 72 69 |r employ|ees, fri|
|00001df0| 65 6e 64 73 2c 0a 58 20 | 20 20 20 6f 72 20 73 74 |ends,.X | or st|
|00001e00| 75 64 65 6e 74 73 20 70 | 72 69 6e 74 20 74 6f 2c |udents p|rint to,|
|00001e10| 20 61 6e 64 20 74 75 72 | 6e 20 6f 66 66 20 71 75 | and tur|n off qu|
|00001e20| 65 75 65 69 6e 67 20 6f | 6e 20 74 68 65 20 6f 74 |eueing o|n the ot|
|00001e30| 68 65 72 20 70 72 69 6e | 74 65 72 73 2e 20 20 46 |her prin|ters. F|
|00001e40| 6f 72 0a 58 20 20 20 20 | 65 78 61 6d 70 6c 65 2c |or.X |example,|
|00001e50| 20 27 6c 70 27 20 69 73 | 20 79 6f 75 72 20 62 61 | 'lp' is| your ba|
|00001e60| 73 65 20 70 72 69 6e 74 | 65 72 20 28 57 68 65 72 |se print|er (Wher|
|00001e70| 65 20 6d 6f 73 74 20 70 | 65 6f 70 6c 65 20 74 79 |e most p|eople ty|
|00001e80| 70 65 20 69 6e 20 27 6c | 70 72 27 29 2c 0a 58 20 |pe in 'l|pr'),.X |
|00001e90| 20 20 20 61 6e 64 20 79 | 6f 75 72 20 6f 74 68 65 | and y|our othe|
|00001ea0| 72 20 70 72 69 6e 74 65 | 72 73 20 61 72 65 20 74 |r printe|rs are t|
|00001eb0| 68 65 20 72 65 61 6c 20 | 70 72 69 6e 74 65 72 73 |he real |printers|
|00001ec0| 20 74 68 61 74 20 77 69 | 6c 6c 20 62 65 20 64 6f | that wi|ll be do|
|00001ed0| 69 6e 67 20 74 68 65 0a | 58 20 20 20 20 61 63 74 |ing the.|X act|
|00001ee0| 75 61 6c 20 70 72 69 6e | 74 69 6e 67 20 28 6c 69 |ual prin|ting (li|
|00001ef0| 6b 65 20 27 6c 70 31 27 | 2c 20 27 6c 70 32 27 2c |ke 'lp1'|, 'lp2',|
|00001f00| 20 65 74 63 2e 29 0a 58 | 0a 58 34 2e 20 20 4d 61 | etc.).X|.X4. Ma|
|00001f10| 6b 65 20 73 75 72 65 20 | 61 6c 6c 20 6f 66 20 74 |ke sure |all of t|
|00001f20| 68 65 20 70 72 69 6e 74 | 65 72 73 20 61 72 65 20 |he print|ers are |
|00001f30| 70 72 6f 70 65 72 6c 79 | 20 73 65 74 20 75 70 20 |properly| set up |
|00001f40| 69 6e 20 74 68 65 20 2f | 65 74 63 2f 70 72 69 6e |in the /|etc/prin|
|00001f50| 74 63 61 70 0a 58 20 20 | 20 20 73 6f 20 74 68 61 |tcap.X | so tha|
|00001f60| 74 20 74 68 65 20 70 72 | 69 6e 74 65 72 73 20 63 |t the pr|inters c|
|00001f70| 61 6e 20 72 75 6e 20 73 | 6d 6f 6f 74 68 6c 79 2e |an run s|moothly.|
|00001f80| 20 20 4d 61 6b 65 20 73 | 75 72 65 20 74 68 61 74 | Make s|ure that|
|00001f90| 20 79 6f 75 72 20 6d 61 | 69 6e 0a 58 20 20 20 20 | your ma|in.X |
|00001fa0| 70 72 69 6e 74 65 72 20 | 28 27 6c 70 27 20 69 73 |printer |('lp' is|
|00001fb0| 20 79 6f 75 72 20 6d 61 | 69 6e 20 70 72 69 6e 74 | your ma|in print|
|00001fc0| 65 72 2c 20 66 72 6f 6d | 20 23 33 2e 29 20 64 6f |er, from| #3.) do|
|00001fd0| 65 73 6e 27 74 20 64 6f | 20 61 6e 79 20 70 72 69 |esn't do| any pri|
|00001fe0| 6e 74 69 6e 67 0a 58 20 | 20 20 20 61 6e 64 20 74 |nting.X | and t|
|00001ff0| 68 61 74 20 79 6f 75 72 | 20 6f 74 68 65 72 20 70 |hat your| other p|
|00002000| 72 69 6e 74 65 72 73 20 | 61 72 65 61 20 61 63 74 |rinters |area act|
|00002010| 75 61 6c 6c 79 20 63 6f | 6e 6e 65 63 74 65 64 20 |ually co|nnected |
|00002020| 74 6f 20 74 68 65 20 64 | 65 76 69 63 65 73 2e 0a |to the d|evices..|
|00002030| 58 0a 58 35 2e 20 20 54 | 72 79 20 69 74 20 6f 75 |X.X5. T|ry it ou|
|00002040| 74 21 20 20 54 68 65 20 | 63 6f 6d 6d 61 6e 64 20 |t! The |command |
|00002050| 74 6f 20 73 74 61 72 74 | 20 6f 66 66 20 74 68 65 |to start| off the|
|00002060| 20 70 72 6f 67 72 61 6d | 20 69 73 20 3a 0a 58 0a | program| is :.X.|
|00002070| 58 20 20 20 20 6d 6c 70 | 64 20 2d 70 20 5b 3c 62 |X mlp|d -p [<b|
|00002080| 61 73 65 20 70 72 69 6e | 74 65 72 3e 20 3c 70 72 |ase prin|ter> <pr|
|00002090| 69 6e 74 65 72 31 3e 20 | 3c 70 72 69 6e 74 65 72 |inter1> |<printer|
|000020a0| 32 3e 20 2e 2e 2e 5d 20 | 5b 2d 74 20 3c 74 69 6d |2> ...] |[-t <tim|
|000020b0| 65 6f 75 74 3e 5d 0a 58 | 0a 58 20 20 20 20 46 6f |eout>].X|.X Fo|
|000020c0| 72 20 65 78 61 6d 70 6c | 65 2c 20 61 20 63 6f 6d |r exampl|e, a com|
|000020d0| 6d 61 6e 64 20 6c 69 6e | 65 20 66 6f 6c 6c 6f 77 |mand lin|e follow|
|000020e0| 69 6e 67 20 23 33 20 61 | 6e 64 20 23 34 20 77 6f |ing #3 a|nd #4 wo|
|000020f0| 75 6c 64 20 62 65 3a 0a | 58 0a 58 20 20 20 20 6d |uld be:.|X.X m|
|00002100| 6c 70 64 20 2d 70 20 6c | 70 20 6c 70 31 20 6c 70 |lpd -p l|p lp1 lp|
|00002110| 32 20 2d 74 20 35 0a 58 | 0a 58 20 20 20 20 49 6e |2 -t 5.X|.X In|
|00002120| 20 74 68 69 73 20 65 78 | 61 6d 70 6c 65 2c 20 74 | this ex|ample, t|
|00002130| 68 65 20 6d 61 69 6e 20 | 71 75 65 75 65 69 6e 67 |he main |queueing|
|00002140| 20 70 72 69 6e 74 65 72 | 20 69 73 20 6c 70 2c 20 | printer| is lp, |
|00002150| 74 68 65 20 6f 74 68 65 | 72 20 70 72 69 6e 74 65 |the othe|r printe|
|00002160| 72 73 0a 58 20 20 20 20 | 61 72 65 20 6c 70 31 20 |rs.X |are lp1 |
|00002170| 61 6e 64 20 6c 70 32 2c | 20 61 6e 64 20 74 68 65 |and lp2,| and the|
|00002180| 20 74 69 6d 65 6f 75 74 | 20 74 6f 20 63 68 65 63 | timeout| to chec|
|00002190| 6b 20 66 6f 72 20 61 20 | 70 72 69 6e 74 20 6a 6f |k for a |print jo|
|000021a0| 62 20 69 73 20 35 20 73 | 65 63 6f 6e 64 73 2e 0a |b is 5 s|econds..|
|000021b0| 58 20 0a 58 36 2e 20 20 | 49 66 20 69 74 20 77 6f |X .X6. |If it wo|
|000021c0| 72 6b 73 2c 20 74 72 79 | 20 74 6f 20 73 65 74 20 |rks, try| to set |
|000021d0| 69 74 20 75 70 20 69 6e | 20 79 6f 75 72 20 72 63 |it up in| your rc|
|000021e0| 2e 6c 6f 63 61 6c 20 74 | 6f 20 73 74 61 72 74 20 |.local t|o start |
|000021f0| 75 70 20 77 68 65 6e 20 | 79 6f 75 20 0a 58 20 20 |up when |you .X |
|00002200| 20 20 73 74 61 72 74 20 | 75 70 20 79 6f 75 72 20 | start |up your |
|00002210| 73 79 73 74 65 6d 2e 20 | 20 4d 61 6b 65 20 73 75 |system. | Make su|
|00002220| 72 65 2c 20 68 6f 77 65 | 76 65 72 2c 20 74 68 61 |re, howe|ver, tha|
|00002230| 74 20 79 6f 75 20 70 75 | 74 20 74 68 65 20 6d 6c |t you pu|t the ml|
|00002240| 70 64 20 65 6e 74 72 79 | 0a 58 20 20 20 20 61 66 |pd entry|.X af|
|00002250| 74 65 72 20 73 74 61 72 | 74 69 6e 67 20 75 70 20 |ter star|ting up |
|00002260| 6c 70 64 2e 20 20 4f 74 | 68 65 72 77 69 73 65 2c |lpd. Ot|herwise,|
|00002270| 20 6d 6c 70 64 20 77 69 | 6c 6c 20 6e 6f 74 20 66 | mlpd wi|ll not f|
|00002280| 75 6e 63 74 69 6f 6e 2e | 0a 58 0a 58 54 68 65 20 |unction.|.X.XThe |
|00002290| 70 72 6f 67 72 61 6d 20 | 72 75 6e 73 20 75 6e 64 |program |runs und|
|000022a0| 65 72 20 61 20 53 75 6e | 20 4f 53 20 65 6e 76 69 |er a Sun| OS envi|
|000022b0| 72 6f 6e 6d 65 6e 74 2e | 20 20 49 74 20 68 61 73 |ronment.| It has|
|000022c0| 20 62 65 65 6e 20 74 72 | 69 65 64 20 6f 75 74 0a | been tr|ied out.|
|000022d0| 58 75 6e 64 65 72 20 34 | 2e 31 20 53 75 6e 4f 53 |Xunder 4|.1 SunOS|
|000022e0| 2c 20 61 6e 64 20 49 20 | 68 61 64 20 69 74 20 74 |, and I |had it t|
|000022f0| 72 69 65 64 20 6f 75 74 | 20 75 6e 64 65 72 20 61 |ried out| under a|
|00002300| 20 34 2e 33 20 42 53 44 | 20 65 6e 76 69 72 6f 6e | 4.3 BSD| environ|
|00002310| 6d 65 6e 74 2c 0a 58 74 | 68 61 6e 6b 73 20 74 6f |ment,.Xt|hanks to|
|00002320| 20 74 68 65 20 68 65 6c | 70 20 6f 66 20 6e 61 73 | the hel|p of nas|
|00002330| 68 40 75 63 73 65 6c 78 | 2e 73 64 73 75 2e 65 64 |h@ucselx|.sdsu.ed|
|00002340| 75 20 28 54 68 61 6e 6b | 73 2c 20 52 6f 6e 21 29 |u (Thank|s, Ron!)|
|00002350| 20 49 20 68 6f 70 65 20 | 74 68 61 74 20 0a 58 69 | I hope |that .Xi|
|00002360| 74 20 77 6f 72 6b 73 20 | 66 6f 72 20 79 6f 75 2e |t works |for you.|
|00002370| 20 20 50 6c 65 61 73 65 | 20 73 65 6e 64 20 6d 65 | Please| send me|
|00002380| 20 61 6c 6c 20 62 75 67 | 20 72 65 70 6f 72 74 73 | all bug| reports|
|00002390| 2c 20 73 70 65 63 69 61 | 6c 20 74 68 69 6e 67 73 |, specia|l things|
|000023a0| 20 74 68 61 74 0a 58 77 | 6f 75 6c 64 20 6d 61 6b | that.Xw|ould mak|
|000023b0| 65 20 79 6f 75 72 20 6c | 69 66 65 20 65 61 73 69 |e your l|ife easi|
|000023c0| 65 72 2c 20 65 74 63 2e | 2c 20 73 6f 20 6f 6e 2c |er, etc.|, so on,|
|000023d0| 20 73 6f 20 66 6f 72 74 | 68 2e 20 20 49 66 20 79 | so fort|h. If y|
|000023e0| 6f 75 20 64 6f 20 68 61 | 76 65 20 61 6e 79 0a 58 |ou do ha|ve any.X|
|000023f0| 71 75 65 73 74 69 6f 6e | 73 20 61 74 20 61 6c 6c |question|s at all|
|00002400| 2c 20 70 6c 65 61 73 65 | 20 6d 61 69 6c 20 6d 65 |, please| mail me|
|00002410| 20 74 6f 20 6c 65 74 20 | 6d 65 20 6b 6e 6f 77 20 | to let |me know |
|00002420| 61 62 6f 75 74 20 77 68 | 61 74 20 79 6f 75 20 6e |about wh|at you n|
|00002430| 65 65 64 2e 0a 58 49 27 | 6c 6c 20 62 65 20 6f 75 |eed..XI'|ll be ou|
|00002440| 74 20 77 69 74 68 20 61 | 20 6d 61 6e 75 61 6c 20 |t with a| manual |
|00002450| 70 61 67 65 20 73 6f 6f | 6e 20 65 6e 6f 75 67 68 |page soo|n enough|
|00002460| 2e 20 20 28 47 6f 74 74 | 61 20 6c 65 61 72 6e 20 |. (Gott|a learn |
|00002470| 61 20 62 69 74 20 61 62 | 6f 75 74 0a 58 6e 72 6f |a bit ab|out.Xnro|
|00002480| 66 66 2e 2e 2e 54 6f 6f | 20 6d 75 63 68 20 54 65 |ff...Too| much Te|
|00002490| 58 20 61 6e 64 20 4c 61 | 54 65 58 2e 29 0a 58 0a |X and La|TeX.).X.|
|000024a0| 58 2d 2d 4d 61 74 74 0a | 58 0a 58 5f 5f 5f 5f 5f |X--Matt.|X.X_____|
|000024b0| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|000024c0| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|000024d0| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|000024e0| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|000024f0| 5f 5f 5f 5f 5f 5f 5f 0a | 58 4d 61 74 74 20 44 2e |_______.|XMatt D.|
|00002500| 20 52 6f 62 69 6e 73 6f | 6e 20 20 20 20 20 20 20 | Robinso|n |
|00002510| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002520| 20 20 20 20 20 49 6e 74 | 65 72 6e 65 74 3a 20 79 | Int|ernet: y|
|00002530| 61 6b 6b 65 72 40 75 63 | 72 6d 61 74 68 2e 75 63 |akker@uc|rmath.uc|
|00002540| 72 2e 65 64 75 0a 58 53 | 79 73 74 65 6d 73 20 50 |r.edu.XS|ystems P|
|00002550| 72 6f 67 72 61 6d 6d 69 | 6e 67 20 47 72 6f 75 70 |rogrammi|ng Group|
|00002560| 2c 20 55 43 20 52 69 76 | 65 72 73 69 64 65 20 20 |, UC Riv|erside |
|00002570| 20 20 20 20 20 20 20 55 | 55 43 50 3a 20 2e 2e 21 | U|UCP: ..!|
|00002580| 75 63 73 64 21 75 63 72 | 6d 61 74 68 21 79 61 6b |ucsd!ucr|math!yak|
|00002590| 6b 65 72 0a 45 4e 44 5f | 4f 46 5f 46 49 4c 45 0a |ker.END_|OF_FILE.|
|000025a0| 20 20 69 66 20 74 65 73 | 74 20 34 30 38 35 20 2d | if tes|t 4085 -|
|000025b0| 6e 65 20 60 77 63 20 2d | 63 20 3c 27 52 45 41 44 |ne `wc -|c <'READ|
|000025c0| 4d 45 27 60 3b 20 74 68 | 65 6e 0a 20 20 20 20 65 |ME'`; th|en. e|
|000025d0| 63 68 6f 20 73 68 61 72 | 3a 20 5c 22 27 52 45 41 |cho shar|: \"'REA|
|000025e0| 44 4d 45 27 5c 22 20 75 | 6e 70 61 63 6b 65 64 20 |DME'\" u|npacked |
|000025f0| 77 69 74 68 20 77 72 6f | 6e 67 20 73 69 7a 65 21 |with wro|ng size!|
|00002600| 0a 20 20 66 69 0a 20 20 | 23 20 65 6e 64 20 6f 66 |. fi. |# end of|
|00002610| 20 27 52 45 41 44 4d 45 | 27 0a 66 69 0a 69 66 20 | 'README|'.fi.if |
|00002620| 74 65 73 74 20 2d 66 20 | 27 63 6f 6e 66 69 67 2e |test -f |'config.|
|00002630| 68 27 20 2d 61 20 22 24 | 7b 31 7d 22 20 21 3d 20 |h' -a "$|{1}" != |
|00002640| 22 2d 63 22 20 3b 20 74 | 68 65 6e 20 0a 20 20 65 |"-c" ; t|hen . e|
|00002650| 63 68 6f 20 73 68 61 72 | 3a 20 57 69 6c 6c 20 6e |cho shar|: Will n|
|00002660| 6f 74 20 63 6c 6f 62 62 | 65 72 20 65 78 69 73 74 |ot clobb|er exist|
|00002670| 69 6e 67 20 66 69 6c 65 | 20 5c 22 27 63 6f 6e 66 |ing file| \"'conf|
|00002680| 69 67 2e 68 27 5c 22 0a | 65 6c 73 65 0a 20 20 65 |ig.h'\".|else. e|
|00002690| 63 68 6f 20 73 68 61 72 | 3a 20 45 78 74 72 61 63 |cho shar|: Extrac|
|000026a0| 74 69 6e 67 20 5c 22 27 | 63 6f 6e 66 69 67 2e 68 |ting \"'|config.h|
|000026b0| 27 5c 22 20 5c 28 31 38 | 32 34 20 63 68 61 72 61 |'\" \(18|24 chara|
|000026c0| 63 74 65 72 73 5c 29 0a | 20 20 73 65 64 20 22 73 |cters\).| sed "s|
|000026d0| 2f 5e 58 2f 2f 22 20 3e | 27 63 6f 6e 66 69 67 2e |/^X//" >|'config.|
|000026e0| 68 27 20 3c 3c 27 45 4e | 44 5f 4f 46 5f 46 49 4c |h' <<'EN|D_OF_FIL|
|000026f0| 45 27 0a 58 2f 2a 0a 58 | 20 2a 20 43 6f 70 79 72 |E'.X/*.X| * Copyr|
|00002700| 69 67 68 74 20 28 63 29 | 20 31 39 39 30 20 52 65 |ight (c)| 1990 Re|
|00002710| 67 65 6e 74 73 20 6f 66 | 20 74 68 65 20 55 6e 69 |gents of| the Uni|
|00002720| 76 65 72 73 69 74 79 20 | 6f 66 20 43 61 6c 69 66 |versity |of Calif|
|00002730| 6f 72 6e 69 61 2e 0a 58 | 20 2a 20 41 6c 6c 20 72 |ornia..X| * All r|
|00002740| 69 67 68 74 73 20 72 65 | 73 65 72 76 65 64 2e 0a |ights re|served..|
|00002750| 58 20 2a 0a 58 20 2a 20 | 52 65 64 69 73 74 72 69 |X *.X * |Redistri|
|00002760| 62 75 74 69 6f 6e 20 61 | 6e 64 20 75 73 65 20 69 |bution a|nd use i|
|00002770| 6e 20 73 6f 75 72 63 65 | 20 61 6e 64 20 62 69 6e |n source| and bin|
|00002780| 61 72 79 20 66 6f 72 6d | 73 20 61 72 65 20 70 65 |ary form|s are pe|
|00002790| 72 6d 69 74 74 65 64 0a | 58 20 2a 20 70 72 6f 76 |rmitted.|X * prov|
|000027a0| 69 64 65 64 20 74 68 61 | 74 20 74 68 65 20 61 62 |ided tha|t the ab|
|000027b0| 6f 76 65 20 63 6f 70 79 | 72 69 67 68 74 20 6e 6f |ove copy|right no|
|000027c0| 74 69 63 65 20 61 6e 64 | 20 74 68 69 73 20 70 61 |tice and| this pa|
|000027d0| 72 61 67 72 61 70 68 20 | 61 72 65 0a 58 20 2a 20 |ragraph |are.X * |
|000027e0| 64 75 70 6c 69 63 61 74 | 65 64 20 69 6e 20 61 6c |duplicat|ed in al|
|000027f0| 6c 20 73 75 63 68 20 66 | 6f 72 6d 73 20 61 6e 64 |l such f|orms and|
|00002800| 20 74 68 61 74 20 61 6e | 79 20 64 6f 63 75 6d 65 | that an|y docume|
|00002810| 6e 74 61 74 69 6f 6e 2c | 0a 58 20 2a 20 61 64 76 |ntation,|.X * adv|
|00002820| 65 72 74 69 73 69 6e 67 | 20 6d 61 74 65 72 69 61 |ertising| materia|
|00002830| 6c 73 2c 20 61 6e 64 20 | 6f 74 68 65 72 20 6d 61 |ls, and |other ma|
|00002840| 74 65 72 69 61 6c 73 20 | 72 65 6c 61 74 65 64 20 |terials |related |
|00002850| 74 6f 20 73 75 63 68 0a | 58 20 2a 20 64 69 73 74 |to such.|X * dist|
|00002860| 72 69 62 75 74 69 6f 6e | 20 61 6e 64 20 75 73 65 |ribution| and use|
|00002870| 20 61 63 6b 6e 6f 77 6c | 65 64 67 65 20 74 68 61 | acknowl|edge tha|
|00002880| 74 20 74 68 65 20 73 6f | 66 74 77 61 72 65 20 77 |t the so|ftware w|
|00002890| 61 73 20 64 65 76 65 6c | 6f 70 65 64 0a 58 20 2a |as devel|oped.X *|
|000028a0| 20 62 79 20 74 68 65 20 | 55 6e 69 76 65 72 73 69 | by the |Universi|
|000028b0| 74 79 20 6f 66 20 43 61 | 6c 69 66 6f 72 6e 69 61 |ty of Ca|lifornia|
|000028c0| 2c 20 52 69 76 65 72 73 | 69 64 65 2e 20 0a 58 20 |, Rivers|ide. .X |
|000028d0| 2a 0a 58 20 2a 20 4e 4f | 54 45 20 3a 20 54 68 61 |*.X * NO|TE : Tha|
|000028e0| 74 27 73 20 52 69 76 65 | 72 73 69 64 65 2e 20 20 |t's Rive|rside. |
|000028f0| 4e 6f 74 20 42 65 72 6b | 65 6c 65 79 2c 20 6e 6f |Not Berk|eley, no|
|00002900| 74 20 53 61 6e 74 61 20 | 43 72 75 7a 2c 20 6e 6f |t Santa |Cruz, no|
|00002910| 74 20 65 76 65 6e 0a 58 | 20 2a 20 20 20 20 20 20 |t even.X| * |
|00002920| 20 20 49 72 76 69 6e 65 | 2e 20 20 52 69 76 65 72 | Irvine|. River|
|00002930| 73 69 64 65 2e 20 20 52 | 69 20 2d 20 76 65 72 20 |side. R|i - ver |
|00002940| 2d 20 73 69 64 65 2e 0a | 58 20 2a 0a 58 20 2a 20 |- side..|X *.X * |
|00002950| 54 68 65 20 6e 61 6d 65 | 20 6f 66 20 74 68 65 20 |The name| of the |
|00002960| 55 6e 69 76 65 72 73 69 | 74 79 20 6d 61 79 20 6e |Universi|ty may n|
|00002970| 6f 74 20 62 65 20 75 73 | 65 64 20 74 6f 20 65 6e |ot be us|ed to en|
|00002980| 64 6f 72 73 65 20 6f 72 | 20 70 72 6f 6d 6f 74 65 |dorse or| promote|
|00002990| 20 0a 58 20 2a 20 70 72 | 6f 64 75 63 74 73 20 64 | .X * pr|oducts d|
|000029a0| 65 72 69 76 65 64 20 66 | 72 6f 6d 20 74 68 69 73 |erived f|rom this|
|000029b0| 20 73 6f 66 74 77 61 72 | 65 20 77 69 74 68 6f 75 | softwar|e withou|
|000029c0| 74 20 73 70 65 63 69 66 | 69 63 20 70 72 69 6f 72 |t specif|ic prior|
|000029d0| 20 77 72 69 74 74 65 6e | 0a 58 20 2a 20 70 65 72 | written|.X * per|
|000029e0| 6d 69 73 73 69 6f 6e 2e | 0a 58 20 2a 0a 58 20 2a |mission.|.X *.X *|
|000029f0| 20 54 48 49 53 20 53 4f | 46 54 57 41 52 45 20 49 | THIS SO|FTWARE I|
|00002a00| 53 20 50 52 4f 56 49 44 | 45 44 20 60 60 41 53 20 |S PROVID|ED ``AS |
|00002a10| 49 53 27 27 20 41 4e 44 | 20 57 49 54 48 4f 55 54 |IS'' AND| WITHOUT|
|00002a20| 20 41 4e 59 20 45 58 50 | 52 45 53 53 20 4f 52 0a | ANY EXP|RESS OR.|
|00002a30| 58 20 2a 20 49 4d 50 4c | 49 45 44 20 57 41 52 52 |X * IMPL|IED WARR|
|00002a40| 41 4e 54 49 45 53 2c 20 | 49 4e 43 4c 55 44 49 4e |ANTIES, |INCLUDIN|
|00002a50| 47 2c 20 57 49 54 48 4f | 55 54 20 4c 49 4d 49 54 |G, WITHO|UT LIMIT|
|00002a60| 41 54 49 4f 4e 2c 20 54 | 48 45 20 49 4d 50 4c 49 |ATION, T|HE IMPLI|
|00002a70| 45 44 0a 58 20 2a 20 57 | 41 52 52 41 4e 54 49 45 |ED.X * W|ARRANTIE|
|00002a80| 53 20 4f 46 20 4d 45 52 | 43 48 41 4e 54 49 42 49 |S OF MER|CHANTIBI|
|00002a90| 4c 49 54 59 20 41 4e 44 | 20 46 49 54 4e 45 53 53 |LITY AND| FITNESS|
|00002aa0| 20 46 4f 52 20 41 20 50 | 41 52 54 49 43 55 4c 41 | FOR A P|ARTICULA|
|00002ab0| 52 20 50 55 52 50 4f 53 | 45 2e 0a 58 20 2a 20 0a |R PURPOS|E..X * .|
|00002ac0| 58 20 2a 20 4d 4c 50 44 | 20 2d 2d 20 4d 75 6c 74 |X * MLPD| -- Mult|
|00002ad0| 69 70 6c 65 20 4c 69 6e | 65 20 50 72 69 6e 74 65 |iple Lin|e Printe|
|00002ae0| 72 20 44 61 65 6d 6f 6e | 20 28 56 65 72 73 69 6f |r Daemon| (Versio|
|00002af0| 6e 20 31 2e 33 29 0a 58 | 20 2a 20 53 43 43 53 20 |n 1.3).X| * SCCS |
|00002b00| 6b 65 79 77 6f 72 64 73 | 3a 20 40 28 23 29 63 6f |keywords|: @(#)co|
|00002b10| 6e 66 69 67 2e 68 09 31 | 2e 33 20 31 32 2f 31 2f |nfig.h.1|.3 12/1/|
|00002b20| 39 30 0a 58 20 2a 2f 0a | 58 0a 58 23 69 6e 63 6c |90.X */.|X.X#incl|
|00002b30| 75 64 65 20 3c 73 79 73 | 2f 74 79 70 65 73 2e 68 |ude <sys|/types.h|
|00002b40| 3e 0a 58 23 69 6e 63 6c | 75 64 65 20 3c 73 79 73 |>.X#incl|ude <sys|
|00002b50| 2f 73 6f 63 6b 65 74 2e | 68 3e 0a 58 23 69 6e 63 |/socket.|h>.X#inc|
|00002b60| 6c 75 64 65 20 3c 73 79 | 73 2f 75 6e 2e 68 3e 0a |lude <sy|s/un.h>.|
|00002b70| 58 23 69 6e 63 6c 75 64 | 65 20 3c 73 79 73 2f 70 |X#includ|e <sys/p|
|00002b80| 61 72 61 6d 2e 68 3e 0a | 58 23 69 6e 63 6c 75 64 |aram.h>.|X#includ|
|00002b90| 65 20 3c 73 79 73 2f 69 | 6f 63 74 6c 2e 68 3e 0a |e <sys/i|octl.h>.|
|00002ba0| 58 23 69 6e 63 6c 75 64 | 65 20 3c 73 79 73 2f 74 |X#includ|e <sys/t|
|00002bb0| 69 6d 65 2e 68 3e 0a 58 | 23 69 6e 63 6c 75 64 65 |ime.h>.X|#include|
|00002bc0| 20 3c 73 79 73 2f 77 61 | 69 74 2e 68 3e 0a 58 23 | <sys/wa|it.h>.X#|
|00002bd0| 69 6e 63 6c 75 64 65 20 | 3c 73 79 73 2f 73 74 61 |include |<sys/sta|
|00002be0| 74 2e 68 3e 0a 58 23 69 | 6e 63 6c 75 64 65 20 3c |t.h>.X#i|nclude <|
|00002bf0| 73 79 73 6c 6f 67 2e 68 | 3e 0a 58 23 69 6e 63 6c |syslog.h|>.X#incl|
|00002c00| 75 64 65 20 3c 74 69 6d | 65 2e 68 3e 0a 58 23 69 |ude <tim|e.h>.X#i|
|00002c10| 66 64 65 66 20 53 55 4e | 0a 58 23 69 6e 63 6c 75 |fdef SUN|.X#inclu|
|00002c20| 64 65 20 3c 64 69 72 65 | 6e 74 2e 68 3e 0a 58 23 |de <dire|nt.h>.X#|
|00002c30| 65 6c 73 65 0a 58 23 69 | 6e 63 6c 75 64 65 20 3c |else.X#i|nclude <|
|00002c40| 73 79 73 2f 64 69 72 2e | 68 3e 0a 58 23 65 6e 64 |sys/dir.|h>.X#end|
|00002c50| 69 66 0a 58 23 69 6e 63 | 6c 75 64 65 20 3c 73 74 |if.X#inc|lude <st|
|00002c60| 64 69 6f 2e 68 3e 0a 58 | 23 69 6e 63 6c 75 64 65 |dio.h>.X|#include|
|00002c70| 20 3c 63 74 79 70 65 2e | 68 3e 0a 58 23 69 6e 63 | <ctype.|h>.X#inc|
|00002c80| 6c 75 64 65 20 3c 65 72 | 72 6e 6f 2e 68 3e 0a 58 |lude <er|rno.h>.X|
|00002c90| 0a 58 23 64 65 66 69 6e | 65 20 54 52 55 45 20 20 |.X#defin|e TRUE |
|00002ca0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 31 | | 1|
|00002cb0| 0a 58 23 64 65 66 69 6e | 65 20 46 41 4c 53 45 20 |.X#defin|e FALSE |
|00002cc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 30 | | 0|
|00002cd0| 0a 58 23 69 66 64 65 66 | 20 44 45 42 55 47 0a 58 |.X#ifdef| DEBUG.X|
|00002ce0| 23 64 65 66 69 6e 65 20 | 64 65 62 75 67 28 78 29 |#define |debug(x)|
|00002cf0| 20 66 70 72 69 6e 74 66 | 28 73 74 64 65 72 72 2c | fprintf|(stderr,|
|00002d00| 20 22 25 73 22 2c 20 28 | 78 29 29 0a 58 23 65 6c | "%s", (|x)).X#el|
|00002d10| 73 65 0a 58 23 64 65 66 | 69 6e 65 20 64 65 62 75 |se.X#def|ine debu|
|00002d20| 67 28 78 29 20 66 70 72 | 69 6e 74 66 28 73 74 64 |g(x) fpr|intf(std|
|00002d30| 65 72 72 2c 20 22 25 73 | 22 2c 20 22 22 29 0a 58 |err, "%s|", "").X|
|00002d40| 23 65 6e 64 69 66 0a 58 | 0a 58 74 79 70 65 64 65 |#endif.X|.Xtypede|
|00002d50| 66 20 73 74 72 75 63 74 | 20 0a 58 7b 0a 58 09 63 |f struct| .X{.X.c|
|00002d60| 68 61 72 20 2a 6e 61 6d | 65 5b 35 31 32 5d 3b 0a |har *nam|e[512];.|
|00002d70| 58 09 63 68 61 72 20 2a | 64 69 72 65 63 74 6f 72 |X.char *|director|
|00002d80| 79 5b 35 31 32 5d 3b 0a | 58 7d 20 70 72 69 6e 74 |y[512];.|X} print|
|00002d90| 65 72 73 74 72 75 63 74 | 3b 0a 58 0a 58 65 78 74 |erstruct|;.X.Xext|
|00002da0| 65 72 6e 20 63 68 61 72 | 20 2a 4c 50 5f 53 50 4f |ern char| *LP_SPO|
|00002db0| 4f 4c 5f 44 49 52 45 43 | 54 4f 52 59 3b 0a 58 65 |OL_DIREC|TORY;.Xe|
|00002dc0| 78 74 65 72 6e 20 69 6e | 74 20 20 54 49 4d 45 4f |xtern in|t TIMEO|
|00002dd0| 55 54 3b 0a 58 0a 58 69 | 6e 74 20 69 6e 69 74 5f |UT;.X.Xi|nt init_|
|00002de0| 64 61 65 6d 6f 6e 28 29 | 3b 0a 58 69 6e 74 20 6c |daemon()|;.Xint l|
|00002df0| 6f 63 6b 5f 70 72 69 6e | 74 65 72 28 29 3b 0a 58 |ock_prin|ter();.X|
|00002e00| 69 6e 74 20 62 6f 6d 62 | 28 29 3b 0a 58 69 6e 74 |int bomb|();.Xint|
|00002e10| 20 63 68 65 63 6b 5f 70 | 72 73 28 29 3b 0a 58 69 | check_p|rs();.Xi|
|00002e20| 6e 74 20 63 68 65 63 6b | 5f 62 61 73 65 5f 70 72 |nt check|_base_pr|
|00002e30| 69 6e 74 65 72 28 29 3b | 0a 58 76 6f 69 64 20 65 |inter();|.Xvoid e|
|00002e40| 78 69 74 28 29 3b 0a 58 | 63 68 61 72 20 2a 6d 61 |xit();.X|char *ma|
|00002e50| 6c 6c 6f 63 28 29 3b 0a | 45 4e 44 5f 4f 46 5f 46 |lloc();.|END_OF_F|
|00002e60| 49 4c 45 0a 20 20 69 66 | 20 74 65 73 74 20 31 38 |ILE. if| test 18|
|00002e70| 32 34 20 2d 6e 65 20 60 | 77 63 20 2d 63 20 3c 27 |24 -ne `|wc -c <'|
|00002e80| 63 6f 6e 66 69 67 2e 68 | 27 60 3b 20 74 68 65 6e |config.h|'`; then|
|00002e90| 0a 20 20 20 20 65 63 68 | 6f 20 73 68 61 72 3a 20 |. ech|o shar: |
|00002ea0| 5c 22 27 63 6f 6e 66 69 | 67 2e 68 27 5c 22 20 75 |\"'confi|g.h'\" u|
|00002eb0| 6e 70 61 63 6b 65 64 20 | 77 69 74 68 20 77 72 6f |npacked |with wro|
|00002ec0| 6e 67 20 73 69 7a 65 21 | 0a 20 20 66 69 0a 20 20 |ng size!|. fi. |
|00002ed0| 23 20 65 6e 64 20 6f 66 | 20 27 63 6f 6e 66 69 67 |# end of| 'config|
|00002ee0| 2e 68 27 0a 66 69 0a 69 | 66 20 74 65 73 74 20 2d |.h'.fi.i|f test -|
|00002ef0| 66 20 27 64 61 65 6d 6f | 6e 2e 63 27 20 2d 61 20 |f 'daemo|n.c' -a |
|00002f00| 22 24 7b 31 7d 22 20 21 | 3d 20 22 2d 63 22 20 3b |"${1}" !|= "-c" ;|
|00002f10| 20 74 68 65 6e 20 0a 20 | 20 65 63 68 6f 20 73 68 | then . | echo sh|
|00002f20| 61 72 3a 20 57 69 6c 6c | 20 6e 6f 74 20 63 6c 6f |ar: Will| not clo|
|00002f30| 62 62 65 72 20 65 78 69 | 73 74 69 6e 67 20 66 69 |bber exi|sting fi|
|00002f40| 6c 65 20 5c 22 27 64 61 | 65 6d 6f 6e 2e 63 27 5c |le \"'da|emon.c'\|
|00002f50| 22 0a 65 6c 73 65 0a 20 | 20 65 63 68 6f 20 73 68 |".else. | echo sh|
|00002f60| 61 72 3a 20 45 78 74 72 | 61 63 74 69 6e 67 20 5c |ar: Extr|acting \|
|00002f70| 22 27 64 61 65 6d 6f 6e | 2e 63 27 5c 22 20 5c 28 |"'daemon|.c'\" \(|
|00002f80| 33 34 37 39 20 63 68 61 | 72 61 63 74 65 72 73 5c |3479 cha|racters\|
|00002f90| 29 0a 20 20 73 65 64 20 | 22 73 2f 5e 58 2f 2f 22 |). sed |"s/^X//"|
|00002fa0| 20 3e 27 64 61 65 6d 6f | 6e 2e 63 27 20 3c 3c 27 | >'daemo|n.c' <<'|
|00002fb0| 45 4e 44 5f 4f 46 5f 46 | 49 4c 45 27 0a 58 2f 2a |END_OF_F|ILE'.X/*|
|00002fc0| 0a 58 20 2a 20 43 6f 70 | 79 72 69 67 68 74 20 28 |.X * Cop|yright (|
|00002fd0| 63 29 20 31 39 39 30 20 | 52 65 67 65 6e 74 73 20 |c) 1990 |Regents |
|00002fe0| 6f 66 20 74 68 65 20 55 | 6e 69 76 65 72 73 69 74 |of the U|niversit|
|00002ff0| 79 20 6f 66 20 43 61 6c | 69 66 6f 72 6e 69 61 2e |y of Cal|ifornia.|
|00003000| 0a 58 20 2a 20 41 6c 6c | 20 72 69 67 68 74 73 20 |.X * All| rights |
|00003010| 72 65 73 65 72 76 65 64 | 2e 0a 58 20 2a 0a 58 20 |reserved|..X *.X |
|00003020| 2a 20 52 65 64 69 73 74 | 72 69 62 75 74 69 6f 6e |* Redist|ribution|
|00003030| 20 61 6e 64 20 75 73 65 | 20 69 6e 20 73 6f 75 72 | and use| in sour|
|00003040| 63 65 20 61 6e 64 20 62 | 69 6e 61 72 79 20 66 6f |ce and b|inary fo|
|00003050| 72 6d 73 20 61 72 65 20 | 70 65 72 6d 69 74 74 65 |rms are |permitte|
|00003060| 64 0a 58 20 2a 20 70 72 | 6f 76 69 64 65 64 20 74 |d.X * pr|ovided t|
|00003070| 68 61 74 20 74 68 65 20 | 61 62 6f 76 65 20 63 6f |hat the |above co|
|00003080| 70 79 72 69 67 68 74 20 | 6e 6f 74 69 63 65 20 61 |pyright |notice a|
|00003090| 6e 64 20 74 68 69 73 20 | 70 61 72 61 67 72 61 70 |nd this |paragrap|
|000030a0| 68 20 61 72 65 0a 58 20 | 2a 20 64 75 70 6c 69 63 |h are.X |* duplic|
|000030b0| 61 74 65 64 20 69 6e 20 | 61 6c 6c 20 73 75 63 68 |ated in |all such|
|000030c0| 20 66 6f 72 6d 73 20 61 | 6e 64 20 74 68 61 74 20 | forms a|nd that |
|000030d0| 61 6e 79 20 64 6f 63 75 | 6d 65 6e 74 61 74 69 6f |any docu|mentatio|
|000030e0| 6e 2c 0a 58 20 2a 20 61 | 64 76 65 72 74 69 73 69 |n,.X * a|dvertisi|
|000030f0| 6e 67 20 6d 61 74 65 72 | 69 61 6c 73 2c 20 61 6e |ng mater|ials, an|
|00003100| 64 20 6f 74 68 65 72 20 | 6d 61 74 65 72 69 61 6c |d other |material|
|00003110| 73 20 72 65 6c 61 74 65 | 64 20 74 6f 20 73 75 63 |s relate|d to suc|
|00003120| 68 0a 58 20 2a 20 64 69 | 73 74 72 69 62 75 74 69 |h.X * di|stributi|
|00003130| 6f 6e 20 61 6e 64 20 75 | 73 65 20 61 63 6b 6e 6f |on and u|se ackno|
|00003140| 77 6c 65 64 67 65 20 74 | 68 61 74 20 74 68 65 20 |wledge t|hat the |
|00003150| 73 6f 66 74 77 61 72 65 | 20 77 61 73 20 64 65 76 |software| was dev|
|00003160| 65 6c 6f 70 65 64 0a 58 | 20 2a 20 62 79 20 74 68 |eloped.X| * by th|
|00003170| 65 20 55 6e 69 76 65 72 | 73 69 74 79 20 6f 66 20 |e Univer|sity of |
|00003180| 43 61 6c 69 66 6f 72 6e | 69 61 2c 20 52 69 76 65 |Californ|ia, Rive|
|00003190| 72 73 69 64 65 2e 20 0a | 58 20 2a 0a 58 20 2a 20 |rside. .|X *.X * |
|000031a0| 4e 4f 54 45 20 3a 20 54 | 68 61 74 27 73 20 52 69 |NOTE : T|hat's Ri|
|000031b0| 76 65 72 73 69 64 65 2e | 20 20 4e 6f 74 20 42 65 |verside.| Not Be|
|000031c0| 72 6b 65 6c 65 79 2c 20 | 6e 6f 74 20 53 61 6e 74 |rkeley, |not Sant|
|000031d0| 61 20 43 72 75 7a 2c 20 | 6e 6f 74 20 65 76 65 6e |a Cruz, |not even|
|000031e0| 0a 58 20 2a 20 20 20 20 | 20 20 20 20 49 72 76 69 |.X * | Irvi|
|000031f0| 6e 65 2e 20 20 52 69 76 | 65 72 73 69 64 65 2e 20 |ne. Riv|erside. |
|00003200| 20 52 69 20 2d 20 76 65 | 72 20 2d 20 73 69 64 65 | Ri - ve|r - side|
|00003210| 2e 0a 58 20 2a 0a 58 20 | 2a 20 54 68 65 20 6e 61 |..X *.X |* The na|
|00003220| 6d 65 20 6f 66 20 74 68 | 65 20 55 6e 69 76 65 72 |me of th|e Univer|
|00003230| 73 69 74 79 20 6d 61 79 | 20 6e 6f 74 20 62 65 20 |sity may| not be |
|00003240| 75 73 65 64 20 74 6f 20 | 65 6e 64 6f 72 73 65 20 |used to |endorse |
|00003250| 6f 72 20 70 72 6f 6d 6f | 74 65 20 0a 58 20 2a 20 |or promo|te .X * |
|00003260| 70 72 6f 64 75 63 74 73 | 20 64 65 72 69 76 65 64 |products| derived|
|00003270| 20 66 72 6f 6d 20 74 68 | 69 73 20 73 6f 66 74 77 | from th|is softw|
|00003280| 61 72 65 20 77 69 74 68 | 6f 75 74 20 73 70 65 63 |are with|out spec|
|00003290| 69 66 69 63 20 70 72 69 | 6f 72 20 77 72 69 74 74 |ific pri|or writt|
|000032a0| 65 6e 0a 58 20 2a 20 70 | 65 72 6d 69 73 73 69 6f |en.X * p|ermissio|
|000032b0| 6e 2e 0a 58 20 2a 0a 58 | 20 2a 20 54 48 49 53 20 |n..X *.X| * THIS |
|000032c0| 53 4f 46 54 57 41 52 45 | 20 49 53 20 50 52 4f 56 |SOFTWARE| IS PROV|
|000032d0| 49 44 45 44 20 60 60 41 | 53 20 49 53 27 27 20 41 |IDED ``A|S IS'' A|
|000032e0| 4e 44 20 57 49 54 48 4f | 55 54 20 41 4e 59 20 45 |ND WITHO|UT ANY E|
|000032f0| 58 50 52 45 53 53 20 4f | 52 0a 58 20 2a 20 49 4d |XPRESS O|R.X * IM|
|00003300| 50 4c 49 45 44 20 57 41 | 52 52 41 4e 54 49 45 53 |PLIED WA|RRANTIES|
|00003310| 2c 20 49 4e 43 4c 55 44 | 49 4e 47 2c 20 57 49 54 |, INCLUD|ING, WIT|
|00003320| 48 4f 55 54 20 4c 49 4d | 49 54 41 54 49 4f 4e 2c |HOUT LIM|ITATION,|
|00003330| 20 54 48 45 20 49 4d 50 | 4c 49 45 44 0a 58 20 2a | THE IMP|LIED.X *|
|00003340| 20 57 41 52 52 41 4e 54 | 49 45 53 20 4f 46 20 4d | WARRANT|IES OF M|
|00003350| 45 52 43 48 41 4e 54 49 | 42 49 4c 49 54 59 20 41 |ERCHANTI|BILITY A|
|00003360| 4e 44 20 46 49 54 4e 45 | 53 53 20 46 4f 52 20 41 |ND FITNE|SS FOR A|
|00003370| 20 50 41 52 54 49 43 55 | 4c 41 52 20 50 55 52 50 | PARTICU|LAR PURP|
|00003380| 4f 53 45 2e 0a 58 20 2a | 20 0a 58 20 2a 20 4d 4c |OSE..X *| .X * ML|
|00003390| 50 44 20 2d 2d 20 4d 75 | 6c 74 69 70 6c 65 20 4c |PD -- Mu|ltiple L|
|000033a0| 69 6e 65 20 50 72 69 6e | 74 65 72 20 44 61 65 6d |ine Prin|ter Daem|
|000033b0| 6f 6e 20 28 56 65 72 73 | 69 6f 6e 20 31 2e 33 29 |on (Vers|ion 1.3)|
|000033c0| 0a 58 20 2a 20 53 43 43 | 53 20 6b 65 79 77 6f 72 |.X * SCC|S keywor|
|000033d0| 64 73 3a 20 40 28 23 29 | 64 61 65 6d 6f 6e 2e 63 |ds: @(#)|daemon.c|
|000033e0| 09 31 2e 33 20 31 32 2f | 31 2f 39 30 0a 58 20 2a |.1.3 12/|1/90.X *|
|000033f0| 2f 0a 58 0a 58 23 69 6e | 63 6c 75 64 65 20 22 63 |/.X.X#in|clude "c|
|00003400| 6f 6e 66 69 67 2e 68 22 | 0a 58 0a 58 2f 2a 0a 58 |onfig.h"|.X.X/*.X|
|00003410| 2f 2f 20 28 69 6e 74 29 | 20 69 6e 69 74 5f 64 61 |// (int)| init_da|
|00003420| 65 6d 6f 6e 28 29 20 2d | 2d 20 49 6e 69 74 69 61 |emon() -|- Initia|
|00003430| 6c 69 7a 65 20 61 20 70 | 72 6f 63 65 73 73 20 61 |lize a p|rocess a|
|00003440| 73 20 61 20 64 61 65 6d | 6f 6e 20 70 72 6f 63 65 |s a daem|on proce|
|00003450| 73 73 2e 0a 58 2f 2f 0a | 58 2f 2f 20 54 68 69 73 |ss..X//.|X// This|
|00003460| 20 66 75 6e 63 74 69 6f | 6e 20 77 69 6c 6c 20 73 | functio|n will s|
|00003470| 74 61 72 74 20 6f 66 66 | 20 62 79 20 66 6f 72 6b |tart off| by fork|
|00003480| 69 6e 67 20 61 20 70 72 | 6f 63 65 73 73 20 6f 66 |ing a pr|ocess of|
|00003490| 66 20 66 72 6f 6d 20 74 | 68 65 0a 58 2f 2f 20 70 |f from t|he.X// p|
|000034a0| 61 72 65 6e 74 2c 20 61 | 6e 64 20 67 69 76 65 20 |arent, a|nd give |
|000034b0| 63 6f 6e 74 72 6f 6c 20 | 6f 76 65 72 20 74 6f 20 |control |over to |
|000034c0| 74 68 65 20 63 68 69 6c | 64 20 62 79 20 6f 70 65 |the chil|d by ope|
|000034d0| 6e 69 6e 67 20 75 70 20 | 74 68 65 0a 58 2f 2f 20 |ning up |the.X// |
|000034e0| 72 6f 6f 74 20 64 69 72 | 65 63 74 6f 72 79 2c 20 |root dir|ectory, |
|000034f0| 64 75 70 6c 69 63 61 74 | 69 6e 67 20 73 74 64 6f |duplicat|ing stdo|
|00003500| 75 74 20 61 6e 64 20 73 | 74 64 65 72 72 20 66 6f |ut and s|tderr fo|
|00003510| 72 20 74 68 65 20 63 68 | 69 6c 64 2c 0a 58 2f 2f |r the ch|ild,.X//|
|00003520| 20 61 6e 64 20 72 65 6c | 65 61 73 65 20 74 68 65 | and rel|ease the|
|00003530| 20 74 65 72 6d 69 6e 61 | 6c 20 63 6f 6e 74 72 6f | termina|l contro|
|00003540| 6c 20 66 6f 72 20 74 68 | 65 20 6d 61 69 6e 20 74 |l for th|e main t|
|00003550| 65 72 6d 69 6e 61 6c 2e | 0a 58 2f 2f 20 54 68 65 |erminal.|.X// The|
|00003560| 20 70 72 6f 67 72 61 6d | 20 61 6c 73 6f 20 63 61 | program| also ca|
|00003570| 6c 6c 73 20 6c 6f 63 6b | 5f 70 72 69 6e 74 65 72 |lls lock|_printer|
|00003580| 28 29 20 61 66 74 65 72 | 20 74 68 65 20 66 6f 72 |() after| the for|
|00003590| 6b 28 29 2c 20 73 6f 20 | 74 68 61 74 0a 58 2f 2f |k(), so |that.X//|
|000035a0| 20 74 68 65 20 63 68 69 | 6c 64 20 70 72 6f 63 65 | the chi|ld proce|
|000035b0| 73 73 20 69 73 20 73 61 | 76 65 64 20 69 6e 74 6f |ss is sa|ved into|
|000035c0| 20 61 20 66 69 6c 65 20 | 77 68 65 6e 20 74 68 65 | a file |when the|
|000035d0| 20 73 74 61 74 75 73 20 | 6f 66 20 74 68 65 20 0a | status |of the .|
|000035e0| 58 2f 2f 20 70 72 6f 67 | 72 61 6d 20 6e 65 65 64 |X// prog|ram need|
|000035f0| 73 20 74 6f 20 62 65 20 | 63 68 65 63 6b 65 64 2e |s to be |checked.|
|00003600| 0a 58 2f 2f 0a 58 2f 2f | 20 41 72 67 75 6d 65 6e |.X//.X//| Argumen|
|00003610| 74 73 20 3a 20 4e 6f 6e | 65 0a 58 2a 2f 0a 58 69 |ts : Non|e.X*/.Xi|
|00003620| 6e 74 20 69 6e 69 74 5f | 64 61 65 6d 6f 6e 28 62 |nt init_|daemon(b|
|00003630| 61 73 65 29 0a 58 63 68 | 61 72 20 2a 62 61 73 65 |ase).Xch|ar *base|
|00003640| 3b 0a 58 7b 0a 58 09 69 | 6e 74 20 70 69 64 3b 0a |;.X{.X.i|nt pid;.|
|00003650| 58 0a 58 09 2f 2a 0a 58 | 09 2f 2f 20 46 6f 72 6b |X.X./*.X|.// Fork|
|00003660| 20 6f 66 66 20 61 20 70 | 72 6f 63 65 73 73 2e 0a | off a p|rocess..|
|00003670| 58 09 2a 2f 0a 58 09 69 | 66 20 28 28 70 69 64 20 |X.*/.X.i|f ((pid |
|00003680| 3d 20 66 6f 72 6b 28 29 | 29 20 3c 20 30 29 0a 58 |= fork()|) < 0).X|
|00003690| 09 7b 0a 58 09 09 62 6f | 6d 62 28 22 66 6f 72 6b |.{.X..bo|mb("fork|
|000036a0| 22 29 3b 0a 58 09 7d 0a | 58 09 2f 2a 0a 58 09 2f |");.X.}.|X./*.X./|
|000036b0| 2f 20 46 69 72 73 74 20 | 77 65 20 77 69 6c 6c 20 |/ First |we will |
|000036c0| 63 68 65 63 6b 20 69 6e | 20 6f 6e 20 74 68 65 20 |check in| on the |
|000036d0| 70 61 72 65 6e 74 2c 20 | 61 6e 64 20 67 65 74 20 |parent, |and get |
|000036e0| 72 69 64 20 6f 66 20 69 | 74 2e 0a 58 09 2a 2f 0a |rid of i|t..X.*/.|
|000036f0| 58 09 69 66 20 28 70 69 | 64 29 0a 58 09 7b 0a 58 |X.if (pi|d).X.{.X|
|00003700| 09 09 65 78 69 74 28 30 | 29 3b 0a 58 09 7d 0a 58 |..exit(0|);.X.}.X|
|00003710| 09 2f 2a 0a 58 09 2f 2f | 20 4e 6f 77 20 77 65 20 |./*.X.//| Now we |
|00003720| 73 70 65 63 69 66 69 63 | 61 6c 6c 79 20 77 61 6e |specific|ally wan|
|00003730| 74 20 61 6c 6c 20 6f 66 | 20 74 68 65 20 63 6f 64 |t all of| the cod|
|00003740| 65 20 69 6e 20 74 68 65 | 20 63 68 69 6c 64 2e 0a |e in the| child..|
|00003750| 58 09 2f 2f 20 57 65 20 | 74 72 79 20 74 6f 20 6c |X.// We |try to l|
|00003760| 6f 63 6b 20 64 6f 77 6e | 20 74 68 65 20 70 72 69 |ock down| the pri|
|00003770| 6e 74 65 72 20 64 61 65 | 6d 6f 6e 20 62 79 20 63 |nter dae|mon by c|
|00003780| 72 65 61 74 69 6e 67 20 | 61 20 6c 6f 63 6b 0a 58 |reating |a lock.X|
|00003790| 09 2f 2f 20 66 69 6c 65 | 2e 0a 58 09 2a 2f 0a 58 |.// file|..X.*/.X|
|000037a0| 09 69 66 20 28 6c 6f 63 | 6b 5f 70 72 69 6e 74 65 |.if (loc|k_printe|
|000037b0| 72 28 62 61 73 65 29 20 | 3c 20 30 29 0a 58 09 7b |r(base) |< 0).X.{|
|000037c0| 0a 58 09 09 62 6f 6d 62 | 28 22 6c 6f 63 6b 5f 70 |.X..bomb|("lock_p|
|000037d0| 72 69 6e 74 65 72 22 29 | 3b 0a 58 09 7d 0a 58 09 |rinter")|;.X.}.X.|
|000037e0| 2f 2a 0a 58 09 2f 2f 20 | 57 65 6c 6c 2c 20 69 66 |/*.X.// |Well, if|
|000037f0| 20 74 68 69 73 20 72 65 | 74 75 72 6e 73 2c 20 74 | this re|turns, t|
|00003800| 68 65 6e 20 77 65 20 6d | 75 73 74 20 73 74 61 72 |hen we m|ust star|
|00003810| 74 20 63 6c 6f 73 69 6e | 67 20 6f 66 66 20 74 68 |t closin|g off th|
|00003820| 65 0a 58 09 2f 2f 20 74 | 65 72 6d 69 6e 61 6c 20 |e.X.// t|erminal |
|00003830| 63 6f 6e 74 72 6f 6c 2e | 20 20 57 65 20 63 61 6c |control.| We cal|
|00003840| 6c 20 6f 70 65 6e 28 29 | 2c 20 74 68 65 6e 20 64 |l open()|, then d|
|00003850| 75 70 32 28 29 20 66 6f | 72 20 73 74 64 6f 75 74 |up2() fo|r stdout|
|00003860| 0a 58 09 2f 2f 20 61 6e | 64 20 73 74 64 65 72 72 |.X.// an|d stderr|
|00003870| 2c 20 74 68 65 6e 20 77 | 65 20 74 72 79 20 74 6f |, then w|e try to|
|00003880| 20 63 61 6c 6c 20 73 65 | 74 70 67 72 70 20 6f 6e | call se|tpgrp on|
|00003890| 20 74 68 65 20 70 72 6f | 63 65 73 73 20 74 6f 0a | the pro|cess to.|
|000038a0| 58 09 2f 2f 20 70 75 74 | 20 69 74 73 65 6c 66 20 |X.// put| itself |
|000038b0| 69 6e 74 6f 20 74 68 65 | 20 62 61 63 6b 67 72 6f |into the| backgro|
|000038c0| 75 6e 64 2e 20 20 4f 6e | 6c 79 20 74 68 65 20 69 |und. On|ly the i|
|000038d0| 6f 63 74 6c 20 63 61 6c | 6c 20 77 69 6c 6c 0a 58 |octl cal|l will.X|
|000038e0| 09 2f 2f 20 72 65 6c 65 | 61 73 65 20 63 6f 6e 74 |.// rele|ase cont|
|000038f0| 72 6f 6c 20 66 72 6f 6d | 20 74 68 65 20 74 65 72 |rol from| the ter|
|00003900| 6d 69 6e 61 6c 2e 20 20 | 54 68 65 6e 20 77 65 20 |minal. |Then we |
|00003910| 63 6c 6f 73 65 20 74 68 | 65 20 64 65 2d 0a 58 09 |close th|e de-.X.|
|00003920| 2f 2f 20 73 63 72 69 70 | 74 6f 72 20 63 72 65 61 |// scrip|tor crea|
|00003930| 74 65 64 20 62 79 20 74 | 68 65 20 73 65 63 6f 6e |ted by t|he secon|
|00003940| 64 20 6f 70 65 6e 28 29 | 20 63 61 6c 6c 2e 0a 58 |d open()| call..X|
|00003950| 09 2a 2f 0a 58 09 69 66 | 20 28 6f 70 65 6e 28 22 |.*/.X.if| (open("|
|00003960| 2f 22 2c 20 30 29 20 3c | 20 30 29 20 7b 20 62 6f |/", 0) <| 0) { bo|
|00003970| 6d 62 28 22 6f 70 65 6e | 22 29 3b 20 7d 0a 58 09 |mb("open|"); }.X.|
|00003980| 69 66 20 28 64 75 70 32 | 28 30 2c 20 31 29 20 3c |if (dup2|(0, 1) <|
|00003990| 20 30 29 20 7b 20 62 6f | 6d 62 28 22 64 75 70 32 | 0) { bo|mb("dup2|
|000039a0| 3a 73 74 64 6f 75 74 22 | 29 3b 20 7d 0a 58 09 69 |:stdout"|); }.X.i|
|000039b0| 66 20 28 64 75 70 32 28 | 30 2c 20 32 29 20 3c 20 |f (dup2(|0, 2) < |
|000039c0| 30 29 20 7b 20 62 6f 6d | 62 28 22 64 75 70 32 3a |0) { bom|b("dup2:|
|000039d0| 73 74 64 65 72 72 22 29 | 3b 20 7d 0a 58 09 69 66 |stderr")|; }.X.if|
|000039e0| 20 28 73 65 74 70 67 72 | 70 28 30 2c 20 67 65 74 | (setpgr|p(0, get|
|000039f0| 70 69 64 28 29 29 20 3c | 20 30 29 20 7b 20 62 6f |pid()) <| 0) { bo|
|00003a00| 6d 62 28 22 73 65 74 70 | 67 72 70 22 29 3b 20 7d |mb("setp|grp"); }|
|00003a10| 0a 58 09 2f 2a 0a 58 09 | 2f 2f 20 57 65 6c 6c 2c |.X./*.X.|// Well,|
|00003a20| 20 65 76 65 72 79 74 68 | 69 6e 67 20 6d 75 73 74 | everyth|ing must|
|00003a30| 20 68 61 76 65 20 77 6f | 72 6b 65 64 20 63 6f 72 | have wo|rked cor|
|00003a40| 72 65 63 74 6c 79 2c 20 | 73 6f 20 77 65 20 77 69 |rectly, |so we wi|
|00003a50| 6c 6c 20 64 65 66 61 75 | 6c 74 0a 58 09 2f 2f 20 |ll defau|lt.X.// |
|00003a60| 62 61 63 6b 20 74 6f 20 | 74 68 65 20 70 61 72 65 |back to |the pare|
|00003a70| 6e 74 2e 0a 58 09 2a 2f | 0a 58 7d 0a 58 0a 58 2f |nt..X.*/|.X}.X.X/|
|00003a80| 2a 0a 58 2f 2f 20 28 69 | 6e 74 29 20 62 6f 6d 62 |*.X// (i|nt) bomb|
|00003a90| 28 29 20 2d 2d 20 44 69 | 73 70 6c 61 79 20 61 6e |() -- Di|splay an|
|00003aa0| 20 65 72 72 6f 72 20 6d | 65 73 73 61 67 65 2c 20 | error m|essage, |
|00003ab0| 74 68 65 6e 20 65 78 69 | 74 2e 0a 58 2f 2f 0a 58 |then exi|t..X//.X|
|00003ac0| 2f 2f 20 62 6f 6d 62 28 | 29 20 73 69 6d 70 6c 79 |// bomb(|) simply|
|00003ad0| 20 77 69 6c 6c 20 63 61 | 6c 6c 20 70 65 72 72 6f | will ca|ll perro|
|00003ae0| 72 28 29 20 61 6e 64 20 | 73 65 6e 64 20 74 68 65 |r() and |send the|
|00003af0| 20 66 75 6e 63 74 69 6f | 6e 20 63 61 6c 6c 20 61 | functio|n call a|
|00003b00| 20 73 74 72 69 6e 67 0a | 58 2f 2f 20 64 65 63 6c | string.|X// decl|
|00003b10| 61 72 69 6e 67 20 74 68 | 65 20 65 72 72 6f 72 20 |aring th|e error |
|00003b20| 74 6f 20 62 65 20 64 69 | 73 70 6c 61 79 65 64 20 |to be di|splayed |
|00003b30| 74 6f 20 74 68 65 20 75 | 73 65 72 2e 20 20 4f 6e |to the u|ser. On|
|00003b40| 63 65 20 74 68 69 73 20 | 72 65 74 75 72 6e 73 0a |ce this |returns.|
|00003b50| 58 2f 2f 20 77 65 20 63 | 61 6e 20 74 68 65 6e 20 |X// we c|an then |
|00003b60| 63 61 6c 6c 20 65 78 69 | 74 28 29 2e 0a 58 2f 2f |call exi|t()..X//|
|00003b70| 0a 58 2f 2f 20 41 72 67 | 75 6d 65 6e 74 73 20 3a |.X// Arg|uments :|
|00003b80| 20 63 68 61 72 20 2a 73 | 74 72 20 28 54 68 65 20 | char *s|tr (The |
|00003b90| 73 74 72 69 6e 67 20 6d | 65 73 73 61 67 65 20 74 |string m|essage t|
|00003ba0| 6f 20 62 65 20 64 69 73 | 70 6c 61 79 65 64 29 0a |o be dis|played).|
|00003bb0| 58 2a 2f 0a 58 69 6e 74 | 20 62 6f 6d 62 28 73 74 |X*/.Xint| bomb(st|
|00003bc0| 72 29 0a 58 63 68 61 72 | 20 2a 73 74 72 3b 0a 58 |r).Xchar| *str;.X|
|00003bd0| 7b 0a 58 09 63 68 61 72 | 20 62 75 66 5b 31 30 32 |{.X.char| buf[102|
|00003be0| 34 5d 3b 0a 58 09 74 69 | 6d 65 5f 74 20 6e 6f 77 |4];.X.ti|me_t now|
|00003bf0| 3b 0a 58 09 73 74 72 75 | 63 74 20 74 6d 20 2a 6e |;.X.stru|ct tm *n|
|00003c00| 6f 77 74 69 6d 65 3b 0a | 58 0a 58 0a 58 09 62 75 |owtime;.|X.X.X.bu|
|00003c10| 66 5b 30 5d 20 3d 20 27 | 5c 30 27 3b 0a 58 09 28 |f[0] = '|\0';.X.(|
|00003c20| 76 6f 69 64 29 70 65 72 | 72 6f 72 28 73 74 72 29 |void)per|ror(str)|
|00003c30| 3b 0a 58 09 6e 6f 77 20 | 3d 20 28 74 69 6d 65 5f |;.X.now |= (time_|
|00003c40| 74 29 74 69 6d 65 28 29 | 3b 0a 58 09 6e 6f 77 74 |t)time()|;.X.nowt|
|00003c50| 69 6d 65 20 3d 20 6c 6f | 63 61 6c 74 69 6d 65 28 |ime = lo|caltime(|
|00003c60| 26 6e 6f 77 29 3b 0a 58 | 09 28 76 6f 69 64 29 73 |&now);.X|.(void)s|
|00003c70| 70 72 69 6e 74 66 28 62 | 75 66 2c 20 22 44 61 74 |printf(b|uf, "Dat|
|00003c80| 65 3a 20 28 25 64 2f 25 | 64 2f 25 64 29 5c 6e 5c |e: (%d/%|d/%d)\n\|
|00003c90| 0a 58 09 09 54 69 6d 65 | 3a 20 28 25 64 3a 25 64 |.X..Time|: (%d:%d|
|00003ca0| 3a 25 64 29 5c 6e 5c 0a | 58 09 09 4d 65 73 73 61 |:%d)\n\.|X..Messa|
|00003cb0| 67 65 3a 20 50 72 6f 63 | 65 73 73 20 64 69 65 64 |ge: Proc|ess died|
|00003cc0| 20 66 72 6f 6d 20 65 72 | 72 6f 72 20 6d 65 73 73 | from er|ror mess|
|00003cd0| 61 67 65 20 28 25 73 29 | 5c 6e 5c 6e 22 2c 20 0a |age (%s)|\n\n", .|
|00003ce0| 58 09 09 6e 6f 77 74 69 | 6d 65 2d 3e 74 6d 5f 6d |X..nowti|me->tm_m|
|00003cf0| 6f 6e 2c 20 6e 6f 77 74 | 69 6d 65 2d 3e 74 6d 5f |on, nowt|ime->tm_|
|00003d00| 6d 64 61 79 2c 20 6e 6f | 77 74 69 6d 65 2d 3e 74 |mday, no|wtime->t|
|00003d10| 6d 5f 79 65 61 72 2c 20 | 0a 58 09 09 6e 6f 77 74 |m_year, |.X..nowt|
|00003d20| 69 6d 65 2d 3e 74 6d 5f | 68 6f 75 72 2c 20 6e 6f |ime->tm_|hour, no|
|00003d30| 77 74 69 6d 65 2d 3e 74 | 6d 5f 6d 69 6e 2c 20 6e |wtime->t|m_min, n|
|00003d40| 6f 77 74 69 6d 65 2d 3e | 74 6d 5f 73 65 63 2c 20 |owtime->|tm_sec, |
|00003d50| 0a 58 09 09 73 74 72 29 | 3b 0a 58 09 28 76 6f 69 |.X..str)|;.X.(voi|
|00003d60| 64 29 6f 70 65 6e 6c 6f | 67 28 22 6d 6c 70 64 22 |d)openlo|g("mlpd"|
|00003d70| 2c 20 4c 4f 47 5f 50 49 | 44 2c 20 4c 4f 47 5f 4c |, LOG_PI|D, LOG_L|
|00003d80| 50 52 29 3b 0a 58 09 28 | 76 6f 69 64 29 73 79 73 |PR);.X.(|void)sys|
|00003d90| 6c 6f 67 28 4c 4f 47 5f | 45 52 52 2c 20 62 75 66 |log(LOG_|ERR, buf|
|00003da0| 29 3b 0a 58 09 28 76 6f | 69 64 29 63 6c 6f 73 65 |);.X.(vo|id)close|
|00003db0| 6c 6f 67 28 29 3b 0a 58 | 09 28 76 6f 69 64 29 65 |log();.X|.(void)e|
|00003dc0| 78 69 74 28 31 29 3b 0a | 58 7d 0a 45 4e 44 5f 4f |xit(1);.|X}.END_O|
|00003dd0| 46 5f 46 49 4c 45 0a 20 | 20 69 66 20 74 65 73 74 |F_FILE. | if test|
|00003de0| 20 33 34 37 39 20 2d 6e | 65 20 60 77 63 20 2d 63 | 3479 -n|e `wc -c|
|00003df0| 20 3c 27 64 61 65 6d 6f | 6e 2e 63 27 60 3b 20 74 | <'daemo|n.c'`; t|
|00003e00| 68 65 6e 0a 20 20 20 20 | 65 63 68 6f 20 73 68 61 |hen. |echo sha|
|00003e10| 72 3a 20 5c 22 27 64 61 | 65 6d 6f 6e 2e 63 27 5c |r: \"'da|emon.c'\|
|00003e20| 22 20 75 6e 70 61 63 6b | 65 64 20 77 69 74 68 20 |" unpack|ed with |
|00003e30| 77 72 6f 6e 67 20 73 69 | 7a 65 21 0a 20 20 66 69 |wrong si|ze!. fi|
|00003e40| 0a 20 20 23 20 65 6e 64 | 20 6f 66 20 27 64 61 65 |. # end| of 'dae|
|00003e50| 6d 6f 6e 2e 63 27 0a 66 | 69 0a 69 66 20 74 65 73 |mon.c'.f|i.if tes|
|00003e60| 74 20 2d 66 20 27 6c 6f | 63 6b 2e 63 27 20 2d 61 |t -f 'lo|ck.c' -a|
|00003e70| 20 22 24 7b 31 7d 22 20 | 21 3d 20 22 2d 63 22 20 | "${1}" |!= "-c" |
|00003e80| 3b 20 74 68 65 6e 20 0a | 20 20 65 63 68 6f 20 73 |; then .| echo s|
|00003e90| 68 61 72 3a 20 57 69 6c | 6c 20 6e 6f 74 20 63 6c |har: Wil|l not cl|
|00003ea0| 6f 62 62 65 72 20 65 78 | 69 73 74 69 6e 67 20 66 |obber ex|isting f|
|00003eb0| 69 6c 65 20 5c 22 27 6c | 6f 63 6b 2e 63 27 5c 22 |ile \"'l|ock.c'\"|
|00003ec0| 0a 65 6c 73 65 0a 20 20 | 65 63 68 6f 20 73 68 61 |.else. |echo sha|
|00003ed0| 72 3a 20 45 78 74 72 61 | 63 74 69 6e 67 20 5c 22 |r: Extra|cting \"|
|00003ee0| 27 6c 6f 63 6b 2e 63 27 | 5c 22 20 5c 28 33 36 33 |'lock.c'|\" \(363|
|00003ef0| 37 20 63 68 61 72 61 63 | 74 65 72 73 5c 29 0a 20 |7 charac|ters\). |
|00003f00| 20 73 65 64 20 22 73 2f | 5e 58 2f 2f 22 20 3e 27 | sed "s/|^X//" >'|
|00003f10| 6c 6f 63 6b 2e 63 27 20 | 3c 3c 27 45 4e 44 5f 4f |lock.c' |<<'END_O|
|00003f20| 46 5f 46 49 4c 45 27 0a | 58 2f 2a 0a 58 20 2a 20 |F_FILE'.|X/*.X * |
|00003f30| 43 6f 70 79 72 69 67 68 | 74 20 28 63 29 20 31 39 |Copyrigh|t (c) 19|
|00003f40| 39 30 20 52 65 67 65 6e | 74 73 20 6f 66 20 74 68 |90 Regen|ts of th|
|00003f50| 65 20 55 6e 69 76 65 72 | 73 69 74 79 20 6f 66 20 |e Univer|sity of |
|00003f60| 43 61 6c 69 66 6f 72 6e | 69 61 2e 0a 58 20 2a 20 |Californ|ia..X * |
|00003f70| 41 6c 6c 20 72 69 67 68 | 74 73 20 72 65 73 65 72 |All righ|ts reser|
|00003f80| 76 65 64 2e 0a 58 20 2a | 0a 58 20 2a 20 52 65 64 |ved..X *|.X * Red|
|00003f90| 69 73 74 72 69 62 75 74 | 69 6f 6e 20 61 6e 64 20 |istribut|ion and |
|00003fa0| 75 73 65 20 69 6e 20 73 | 6f 75 72 63 65 20 61 6e |use in s|ource an|
|00003fb0| 64 20 62 69 6e 61 72 79 | 20 66 6f 72 6d 73 20 61 |d binary| forms a|
|00003fc0| 72 65 20 70 65 72 6d 69 | 74 74 65 64 0a 58 20 2a |re permi|tted.X *|
|00003fd0| 20 70 72 6f 76 69 64 65 | 64 20 74 68 61 74 20 74 | provide|d that t|
|00003fe0| 68 65 20 61 62 6f 76 65 | 20 63 6f 70 79 72 69 67 |he above| copyrig|
|00003ff0| 68 74 20 6e 6f 74 69 63 | 65 20 61 6e 64 20 74 68 |ht notic|e and th|
|00004000| 69 73 20 70 61 72 61 67 | 72 61 70 68 20 61 72 65 |is parag|raph are|
|00004010| 0a 58 20 2a 20 64 75 70 | 6c 69 63 61 74 65 64 20 |.X * dup|licated |
|00004020| 69 6e 20 61 6c 6c 20 73 | 75 63 68 20 66 6f 72 6d |in all s|uch form|
|00004030| 73 20 61 6e 64 20 74 68 | 61 74 20 61 6e 79 20 64 |s and th|at any d|
|00004040| 6f 63 75 6d 65 6e 74 61 | 74 69 6f 6e 2c 0a 58 20 |ocumenta|tion,.X |
|00004050| 2a 20 61 64 76 65 72 74 | 69 73 69 6e 67 20 6d 61 |* advert|ising ma|
|00004060| 74 65 72 69 61 6c 73 2c | 20 61 6e 64 20 6f 74 68 |terials,| and oth|
|00004070| 65 72 20 6d 61 74 65 72 | 69 61 6c 73 20 72 65 6c |er mater|ials rel|
|00004080| 61 74 65 64 20 74 6f 20 | 73 75 63 68 0a 58 20 2a |ated to |such.X *|
|00004090| 20 64 69 73 74 72 69 62 | 75 74 69 6f 6e 20 61 6e | distrib|ution an|
|000040a0| 64 20 75 73 65 20 61 63 | 6b 6e 6f 77 6c 65 64 67 |d use ac|knowledg|
|000040b0| 65 20 74 68 61 74 20 74 | 68 65 20 73 6f 66 74 77 |e that t|he softw|
|000040c0| 61 72 65 20 77 61 73 20 | 64 65 76 65 6c 6f 70 65 |are was |develope|
|000040d0| 64 0a 58 20 2a 20 62 79 | 20 74 68 65 20 55 6e 69 |d.X * by| the Uni|
|000040e0| 76 65 72 73 69 74 79 20 | 6f 66 20 43 61 6c 69 66 |versity |of Calif|
|000040f0| 6f 72 6e 69 61 2c 20 52 | 69 76 65 72 73 69 64 65 |ornia, R|iverside|
|00004100| 2e 20 0a 58 20 2a 0a 58 | 20 2a 20 4e 4f 54 45 20 |. .X *.X| * NOTE |
|00004110| 3a 20 54 68 61 74 27 73 | 20 52 69 76 65 72 73 69 |: That's| Riversi|
|00004120| 64 65 2e 20 20 4e 6f 74 | 20 42 65 72 6b 65 6c 65 |de. Not| Berkele|
|00004130| 79 2c 20 6e 6f 74 20 53 | 61 6e 74 61 20 43 72 75 |y, not S|anta Cru|
|00004140| 7a 2c 20 6e 6f 74 20 65 | 76 65 6e 0a 58 20 2a 20 |z, not e|ven.X * |
|00004150| 20 20 20 20 20 20 20 49 | 72 76 69 6e 65 2e 20 20 | I|rvine. |
|00004160| 52 69 76 65 72 73 69 64 | 65 2e 20 20 52 69 20 2d |Riversid|e. Ri -|
|00004170| 20 76 65 72 20 2d 20 73 | 69 64 65 2e 0a 58 20 2a | ver - s|ide..X *|
|00004180| 0a 58 20 2a 20 54 68 65 | 20 6e 61 6d 65 20 6f 66 |.X * The| name of|
|00004190| 20 74 68 65 20 55 6e 69 | 76 65 72 73 69 74 79 20 | the Uni|versity |
|000041a0| 6d 61 79 20 6e 6f 74 20 | 62 65 20 75 73 65 64 20 |may not |be used |
|000041b0| 74 6f 20 65 6e 64 6f 72 | 73 65 20 6f 72 20 70 72 |to endor|se or pr|
|000041c0| 6f 6d 6f 74 65 20 0a 58 | 20 2a 20 70 72 6f 64 75 |omote .X| * produ|
|000041d0| 63 74 73 20 64 65 72 69 | 76 65 64 20 66 72 6f 6d |cts deri|ved from|
|000041e0| 20 74 68 69 73 20 73 6f | 66 74 77 61 72 65 20 77 | this so|ftware w|
|000041f0| 69 74 68 6f 75 74 20 73 | 70 65 63 69 66 69 63 20 |ithout s|pecific |
|00004200| 70 72 69 6f 72 20 77 72 | 69 74 74 65 6e 0a 58 20 |prior wr|itten.X |
|00004210| 2a 20 70 65 72 6d 69 73 | 73 69 6f 6e 2e 0a 58 20 |* permis|sion..X |
|00004220| 2a 0a 58 20 2a 20 54 48 | 49 53 20 53 4f 46 54 57 |*.X * TH|IS SOFTW|
|00004230| 41 52 45 20 49 53 20 50 | 52 4f 56 49 44 45 44 20 |ARE IS P|ROVIDED |
|00004240| 60 60 41 53 20 49 53 27 | 27 20 41 4e 44 20 57 49 |``AS IS'|' AND WI|
|00004250| 54 48 4f 55 54 20 41 4e | 59 20 45 58 50 52 45 53 |THOUT AN|Y EXPRES|
|00004260| 53 20 4f 52 0a 58 20 2a | 20 49 4d 50 4c 49 45 44 |S OR.X *| IMPLIED|
|00004270| 20 57 41 52 52 41 4e 54 | 49 45 53 2c 20 49 4e 43 | WARRANT|IES, INC|
|00004280| 4c 55 44 49 4e 47 2c 20 | 57 49 54 48 4f 55 54 20 |LUDING, |WITHOUT |
|00004290| 4c 49 4d 49 54 41 54 49 | 4f 4e 2c 20 54 48 45 20 |LIMITATI|ON, THE |
|000042a0| 49 4d 50 4c 49 45 44 0a | 58 20 2a 20 57 41 52 52 |IMPLIED.|X * WARR|
|000042b0| 41 4e 54 49 45 53 20 4f | 46 20 4d 45 52 43 48 41 |ANTIES O|F MERCHA|
|000042c0| 4e 54 49 42 49 4c 49 54 | 59 20 41 4e 44 20 46 49 |NTIBILIT|Y AND FI|
|000042d0| 54 4e 45 53 53 20 46 4f | 52 20 41 20 50 41 52 54 |TNESS FO|R A PART|
|000042e0| 49 43 55 4c 41 52 20 50 | 55 52 50 4f 53 45 2e 0a |ICULAR P|URPOSE..|
|000042f0| 58 20 2a 20 0a 58 20 2a | 20 4d 4c 50 44 20 2d 2d |X * .X *| MLPD --|
|00004300| 20 4d 75 6c 74 69 70 6c | 65 20 4c 69 6e 65 20 50 | Multipl|e Line P|
|00004310| 72 69 6e 74 65 72 20 44 | 61 65 6d 6f 6e 20 28 56 |rinter D|aemon (V|
|00004320| 65 72 73 69 6f 6e 20 31 | 2e 33 29 0a 58 20 2a 20 |ersion 1|.3).X * |
|00004330| 53 43 43 53 20 6b 65 79 | 77 6f 72 64 73 3a 20 40 |SCCS key|words: @|
|00004340| 28 23 29 6c 6f 63 6b 2e | 63 09 31 2e 33 20 31 32 |(#)lock.|c.1.3 12|
|00004350| 2f 31 2f 39 30 0a 58 20 | 2a 2f 0a 58 0a 58 23 69 |/1/90.X |*/.X.X#i|
|00004360| 6e 63 6c 75 64 65 20 22 | 63 6f 6e 66 69 67 2e 68 |nclude "|config.h|
|00004370| 22 0a 58 0a 58 2f 2a 0a | 58 2f 2f 20 6c 6f 63 6b |".X.X/*.|X// lock|
|00004380| 5f 70 72 69 6e 74 65 72 | 28 29 20 2d 2d 20 4c 6f |_printer|() -- Lo|
|00004390| 63 6b 20 75 70 20 74 68 | 65 20 70 72 69 6e 74 65 |ck up th|e printe|
|000043a0| 72 20 64 61 65 6d 6f 6e | 20 66 6f 72 20 6f 6e 63 |r daemon| for onc|
|000043b0| 65 20 70 65 72 20 6d 61 | 63 68 69 6e 65 2e 0a 58 |e per ma|chine..X|
|000043c0| 2f 2f 20 0a 58 2f 2f 20 | 54 68 65 20 6c 6f 63 6b |// .X// |The lock|
|000043d0| 5f 70 72 69 6e 74 65 72 | 28 29 20 70 72 6f 63 65 |_printer|() proce|
|000043e0| 73 73 20 77 69 6c 6c 20 | 74 72 79 20 74 6f 20 73 |ss will |try to s|
|000043f0| 61 76 65 20 74 68 65 20 | 70 69 64 20 6f 66 20 74 |ave the |pid of t|
|00004400| 68 65 20 70 72 6f 63 65 | 73 73 0a 58 2f 2f 20 74 |he proce|ss.X// t|
|00004410| 68 61 74 20 69 73 20 61 | 62 6f 75 74 20 74 6f 20 |hat is a|bout to |
|00004420| 72 75 6e 20 74 6f 20 61 | 20 66 69 6c 65 2c 20 74 |run to a| file, t|
|00004430| 6f 20 72 65 66 65 72 65 | 6e 63 65 20 6c 61 74 65 |o refere|nce late|
|00004440| 72 20 77 68 65 6e 20 77 | 65 20 6e 65 65 64 20 74 |r when w|e need t|
|00004450| 6f 0a 58 2f 2f 20 63 68 | 65 63 6b 20 74 6f 20 73 |o.X// ch|eck to s|
|00004460| 65 65 20 69 66 20 74 68 | 65 20 70 72 6f 67 72 61 |ee if th|e progra|
|00004470| 6d 20 69 73 20 72 75 6e | 6e 69 6e 67 20 28 57 65 |m is run|ning (We|
|00004480| 20 64 6f 20 6e 6f 74 20 | 77 61 6e 74 20 74 6f 20 | do not |want to |
|00004490| 6c 65 74 20 74 68 65 0a | 58 2f 2f 20 70 72 6f 67 |let the.|X// prog|
|000044a0| 72 61 6d 20 72 75 6e 20 | 6d 6f 72 65 20 74 68 61 |ram run |more tha|
|000044b0| 6e 20 6f 6e 63 65 20 70 | 65 72 20 6d 61 63 68 69 |n once p|er machi|
|000044c0| 6e 65 2e 29 0a 58 2f 2f | 0a 58 2f 2f 20 41 72 67 |ne.).X//|.X// Arg|
|000044d0| 75 6d 65 6e 74 73 20 3a | 20 4e 6f 6e 65 0a 58 2a |uments :| None.X*|
|000044e0| 2f 0a 58 69 6e 74 20 6c | 6f 63 6b 5f 70 72 69 6e |/.Xint l|ock_prin|
|000044f0| 74 65 72 28 62 61 73 65 | 29 0a 58 63 68 61 72 20 |ter(base|).Xchar |
|00004500| 2a 62 61 73 65 3b 0a 58 | 7b 0a 58 09 46 49 4c 45 |*base;.X|{.X.FILE|
|00004510| 20 2a 66 70 2c 20 2a 66 | 6f 70 65 6e 28 29 3b 0a | *fp, *f|open();.|
|00004520| 58 09 76 6f 69 64 20 65 | 78 69 74 28 29 3b 0a 58 |X.void e|xit();.X|
|00004530| 09 63 68 61 72 20 62 75 | 66 5b 31 30 32 34 5d 3b |.char bu|f[1024];|
|00004540| 0a 58 09 69 6e 74 20 70 | 69 64 3b 0a 58 0a 58 09 |.X.int p|id;.X.X.|
|00004550| 2f 2a 0a 58 09 2f 2f 20 | 46 69 72 73 74 20 77 65 |/*.X.// |First we|
|00004560| 20 77 69 6c 6c 20 74 72 | 79 20 74 6f 20 66 6f 70 | will tr|y to fop|
|00004570| 65 6e 28 29 20 74 68 65 | 20 66 69 6c 65 2e 20 20 |en() the| file. |
|00004580| 49 66 20 77 65 20 63 61 | 6e 27 74 20 67 65 74 0a |If we ca|n't get.|
|00004590| 58 09 2f 2f 20 74 68 65 | 20 66 69 6c 65 20 6f 70 |X.// the| file op|
|000045a0| 65 6e 2c 20 77 65 20 68 | 61 76 65 20 74 6f 20 61 |en, we h|ave to a|
|000045b0| 73 73 75 6d 65 20 74 68 | 61 74 20 65 69 74 68 65 |ssume th|at eithe|
|000045c0| 72 20 74 68 65 20 66 69 | 6c 65 20 68 61 73 0a 58 |r the fi|le has.X|
|000045d0| 09 2f 2f 20 62 65 65 6e | 20 6d 6f 76 65 64 2c 20 |.// been| moved, |
|000045e0| 6f 72 20 74 68 65 20 70 | 72 6f 67 72 61 6d 20 68 |or the p|rogram h|
|000045f0| 61 73 20 62 65 65 6e 20 | 72 65 63 6f 6d 70 69 6c |as been |recompil|
|00004600| 65 64 20 61 6e 64 20 74 | 68 65 72 65 0a 58 09 2f |ed and t|here.X./|
|00004610| 2f 20 69 73 20 61 20 6e | 65 77 20 6c 6f 63 6b 20 |/ is a n|ew lock |
|00004620| 66 69 6c 65 20 64 69 72 | 65 63 74 6f 72 79 2e 20 |file dir|ectory. |
|00004630| 20 49 66 20 77 65 20 63 | 61 6e 20 66 6f 70 65 6e | If we c|an fopen|
|00004640| 28 29 20 69 74 2c 0a 58 | 09 2f 2f 20 77 65 20 77 |() it,.X|.// we w|
|00004650| 69 6c 6c 20 72 75 6e 20 | 74 68 72 6f 75 67 68 20 |ill run |through |
|00004660| 74 68 69 73 20 5b 69 66 | 2e 2e 74 68 65 6e 5d 20 |this [if|..then] |
|00004670| 6c 6f 6f 70 20 61 6e 64 | 20 68 61 6e 64 6c 65 20 |loop and| handle |
|00004680| 74 68 65 0a 58 09 2f 2f | 20 63 6f 6e 64 69 74 69 |the.X.//| conditi|
|00004690| 6f 6e 73 2e 0a 58 09 2a | 2f 0a 58 09 62 75 66 5b |ons..X.*|/.X.buf[|
|000046a0| 30 5d 20 3d 20 27 5c 30 | 27 3b 0a 58 09 28 76 6f |0] = '\0|';.X.(vo|
|000046b0| 69 64 29 73 70 72 69 6e | 74 66 28 62 75 66 2c 20 |id)sprin|tf(buf, |
|000046c0| 22 2f 65 74 63 2f 6d 6c | 70 64 2e 25 73 2e 70 69 |"/etc/ml|pd.%s.pi|
|000046d0| 64 22 2c 20 62 61 73 65 | 29 3b 0a 58 09 69 66 20 |d", base|);.X.if |
|000046e0| 28 28 66 70 20 3d 20 66 | 6f 70 65 6e 28 62 75 66 |((fp = f|open(buf|
|000046f0| 2c 20 22 72 22 29 29 20 | 21 3d 20 4e 55 4c 4c 29 |, "r")) |!= NULL)|
|00004700| 0a 58 09 7b 0a 58 09 09 | 2f 2a 0a 58 09 09 2f 2f |.X.{.X..|/*.X..//|
|00004710| 20 54 72 79 20 74 6f 20 | 72 65 61 64 20 74 68 65 | Try to |read the|
|00004720| 20 6e 75 6d 62 65 72 20 | 66 72 6f 6d 20 74 68 65 | number |from the|
|00004730| 20 66 69 6c 65 2e 0a 58 | 09 09 2a 2f 0a 58 09 09 | file..X|..*/.X..|
|00004740| 69 66 20 28 66 73 63 61 | 6e 66 28 66 70 2c 20 22 |if (fsca|nf(fp, "|
|00004750| 25 64 22 2c 20 26 70 69 | 64 29 20 3c 20 30 29 0a |%d", &pi|d) < 0).|
|00004760| 58 09 09 7b 0a 58 09 09 | 09 70 65 72 72 6f 72 28 |X..{.X..|.perror(|
|00004770| 22 6c 6f 63 6b 5f 70 72 | 69 6e 74 65 72 3a 66 73 |"lock_pr|inter:fs|
|00004780| 63 61 6e 66 3a 66 6f 70 | 65 6e 22 29 3b 0a 58 09 |canf:fop|en");.X.|
|00004790| 09 09 65 78 69 74 28 2d | 31 29 3b 0a 58 09 09 7d |..exit(-|1);.X..}|
|000047a0| 0a 58 09 09 2f 2a 0a 58 | 09 09 2f 2f 20 49 66 20 |.X../*.X|..// If |
|000047b0| 77 65 20 63 61 6e 20 72 | 65 61 64 20 74 68 65 20 |we can r|ead the |
|000047c0| 6e 75 6d 62 65 72 2c 20 | 74 68 65 6e 20 77 65 20 |number, |then we |
|000047d0| 6e 65 65 64 20 74 6f 20 | 73 65 65 20 77 68 65 74 |need to |see whet|
|000047e0| 68 65 72 0a 58 09 09 2f | 2f 20 74 68 65 20 70 72 |her.X../|/ the pr|
|000047f0| 6f 63 65 73 73 20 73 74 | 69 6c 6c 20 65 78 69 73 |ocess st|ill exis|
|00004800| 74 73 2e 20 20 49 66 20 | 69 74 20 64 6f 65 73 2c |ts. If |it does,|
|00004810| 20 74 68 65 6e 20 77 65 | 20 77 61 6e 74 20 74 6f | then we| want to|
|00004820| 0a 58 09 09 2f 2f 20 4a | 75 73 74 20 65 78 69 74 |.X..// J|ust exit|
|00004830| 20 6f 75 74 2c 20 61 6e | 64 20 74 65 6c 6c 20 74 | out, an|d tell t|
|00004840| 68 65 20 75 73 65 72 20 | 74 68 61 74 20 74 68 65 |he user |that the|
|00004850| 20 70 72 6f 67 72 61 6d | 20 69 73 20 0a 58 09 09 | program| is .X..|
|00004860| 2f 2f 20 73 74 69 6c 6c | 20 72 75 6e 6e 69 6e 67 |// still| running|
|00004870| 3b 20 6f 74 68 65 72 77 | 69 73 65 2c 20 77 65 20 |; otherw|ise, we |
|00004880| 6e 65 65 64 20 74 6f 20 | 63 6c 65 61 6e 20 75 70 |need to |clean up|
|00004890| 20 74 68 65 20 66 69 6c | 65 0a 58 09 09 2f 2f 20 | the fil|e.X..// |
|000048a0| 74 68 61 74 20 65 78 69 | 73 74 73 20 69 6e 20 74 |that exi|sts in t|
|000048b0| 68 65 20 64 69 72 65 63 | 74 6f 72 79 2c 20 61 6e |he direc|tory, an|
|000048c0| 64 20 63 72 65 61 74 65 | 20 74 68 65 20 66 69 6c |d create| the fil|
|000048d0| 65 20 73 68 6f 77 69 6e | 67 0a 58 09 09 2f 2f 20 |e showin|g.X..// |
|000048e0| 74 68 65 20 6e 65 77 20 | 50 49 44 20 69 6e 20 74 |the new |PID in t|
|000048f0| 68 65 20 66 69 6c 65 2e | 0a 58 09 09 2a 2f 0a 58 |he file.|.X..*/.X|
|00004900| 09 09 69 66 20 28 67 65 | 74 70 67 72 70 28 70 69 |..if (ge|tpgrp(pi|
|00004910| 64 29 20 3e 3d 20 30 29 | 0a 58 09 09 7b 0a 58 09 |d) >= 0)|.X..{.X.|
|00004920| 09 09 69 66 20 28 66 70 | 72 69 6e 74 66 28 73 74 |..if (fp|rintf(st|
|00004930| 64 65 72 72 2c 20 22 54 | 68 69 73 20 70 72 6f 67 |derr, "T|his prog|
|00004940| 72 61 6d 20 69 73 20 61 | 6c 72 65 61 64 79 20 72 |ram is a|lready r|
|00004950| 75 6e 6e 69 6e 67 20 5c | 0a 58 09 09 09 09 09 28 |unning \|.X.....(|
|00004960| 50 49 44 23 20 3a 20 25 | 64 29 5c 6e 22 2c 20 70 |PID# : %|d)\n", p|
|00004970| 69 64 29 20 3c 20 30 29 | 0a 58 09 09 09 7b 0a 58 |id) < 0)|.X...{.X|
|00004980| 09 09 09 09 62 6f 6d 62 | 28 22 6c 6f 63 6b 5f 70 |....bomb|("lock_p|
|00004990| 72 69 6e 74 65 72 22 29 | 3b 0a 58 09 09 09 7d 0a |rinter")|;.X...}.|
|000049a0| 58 09 09 09 65 78 69 74 | 28 31 29 3b 0a 58 09 09 |X...exit|(1);.X..|
|000049b0| 7d 0a 58 09 7d 0a 58 09 | 2f 2a 0a 58 09 2f 2f 20 |}.X.}.X.|/*.X.// |
|000049c0| 49 66 20 77 65 20 67 6f | 74 20 74 6f 20 74 68 69 |If we go|t to thi|
|000049d0| 73 20 70 6f 69 6e 74 20 | 69 6e 20 74 68 65 20 63 |s point |in the c|
|000049e0| 6f 64 65 2c 20 74 68 65 | 6e 20 65 69 74 68 65 72 |ode, the|n either|
|000049f0| 20 74 68 65 72 65 20 77 | 61 73 6e 27 74 20 61 0a | there w|asn't a.|
|00004a00| 58 09 2f 2f 20 6c 6f 63 | 6b 20 66 69 6c 65 20 69 |X.// loc|k file i|
|00004a10| 6e 20 74 68 65 20 64 69 | 72 65 63 74 6f 72 79 2c |n the di|rectory,|
|00004a20| 20 6f 72 20 74 68 65 20 | 70 72 6f 63 65 73 73 20 | or the |process |
|00004a30| 77 68 69 63 68 20 77 61 | 73 20 72 75 6e 6e 69 6e |which wa|s runnin|
|00004a40| 67 0a 58 09 2f 2f 20 64 | 69 65 64 20 6f 66 66 2e |g.X.// d|ied off.|
|00004a50| 20 20 49 6e 20 65 69 74 | 68 65 72 20 63 61 73 65 | In eit|her case|
|00004a60| 2c 20 72 65 6d 6f 76 65 | 20 74 68 65 20 66 69 6c |, remove| the fil|
|00004a70| 65 20 74 68 61 74 20 77 | 65 20 66 6f 75 6e 64 2c |e that w|e found,|
|00004a80| 20 69 66 0a 58 09 2f 2f | 20 74 68 65 72 65 2e 0a | if.X.//| there..|
|00004a90| 58 09 2a 2f 0a 58 09 69 | 66 20 28 75 6e 6c 69 6e |X.*/.X.i|f (unlin|
|00004aa0| 6b 28 62 75 66 29 20 3c | 20 30 29 0a 58 09 7b 0a |k(buf) <| 0).X.{.|
|00004ab0| 58 09 09 2f 2a 20 0a 58 | 09 09 2f 2f 20 44 6f 20 |X../* .X|..// Do |
|00004ac0| 6e 6f 74 68 69 6e 67 2e | 20 20 57 65 20 77 61 6e |nothing.| We wan|
|00004ad0| 74 20 74 6f 20 74 72 79 | 20 74 6f 20 72 65 6d 6f |t to try| to remo|
|00004ae0| 76 65 20 74 68 65 20 0a | 58 09 09 2f 2f 20 66 69 |ve the .|X..// fi|
|00004af0| 6c 65 20 6e 6f 20 6d 61 | 74 74 65 72 20 77 68 61 |le no ma|tter wha|
|00004b00| 74 2e 0a 58 09 09 2a 2f | 0a 58 09 7d 0a 58 09 2f |t..X..*/|.X.}.X./|
|00004b10| 2a 0a 58 09 2f 2f 20 4e | 6f 77 20 77 65 20 77 61 |*.X.// N|ow we wa|
|00004b20| 6e 74 20 74 6f 20 74 72 | 79 20 61 6e 64 20 66 6f |nt to tr|y and fo|
|00004b30| 70 65 6e 20 74 68 65 20 | 66 69 6c 65 20 66 6f 72 |pen the |file for|
|00004b40| 20 77 72 69 74 69 6e 67 | 2e 20 20 54 68 69 73 20 | writing|. This |
|00004b50| 69 73 0a 58 09 2f 2f 20 | 74 6f 20 70 6c 61 63 65 |is.X.// |to place|
|00004b60| 20 74 68 65 20 70 72 65 | 73 65 6e 74 20 67 65 74 | the pre|sent get|
|00004b70| 70 69 64 28 29 20 69 6e | 74 6f 20 74 68 65 20 66 |pid() in|to the f|
|00004b80| 69 6c 65 20 66 6f 72 20 | 72 65 66 65 72 65 6e 63 |ile for |referenc|
|00004b90| 65 0a 58 09 2f 2f 20 6c | 61 74 65 72 2e 0a 58 09 |e.X.// l|ater..X.|
|00004ba0| 2a 2f 0a 58 09 69 66 20 | 28 28 66 70 20 3d 20 66 |*/.X.if |((fp = f|
|00004bb0| 6f 70 65 6e 28 62 75 66 | 2c 20 22 77 22 29 29 20 |open(buf|, "w")) |
|00004bc0| 3d 3d 20 4e 55 4c 4c 29 | 0a 58 09 7b 0a 58 09 09 |== NULL)|.X.{.X..|
|00004bd0| 62 6f 6d 62 28 22 6c 6f | 63 6b 5f 70 72 69 6e 74 |bomb("lo|ck_print|
|00004be0| 65 72 3a 2f 65 74 63 2f | 6d 6c 70 64 2e 70 69 64 |er:/etc/|mlpd.pid|
|00004bf0| 3a 66 6f 70 65 6e 22 29 | 3b 0a 58 09 7d 0a 58 09 |:fopen")|;.X.}.X.|
|00004c00| 2f 2a 0a 58 09 2f 2f 20 | 54 72 79 20 74 6f 20 66 |/*.X.// |Try to f|
|00004c10| 70 72 69 6e 74 66 28 29 | 20 74 68 65 20 67 65 74 |printf()| the get|
|00004c20| 70 69 64 28 29 20 72 65 | 74 75 72 6e 20 76 61 6c |pid() re|turn val|
|00004c30| 75 65 20 69 6e 74 6f 20 | 74 68 65 20 66 69 6c 65 |ue into |the file|
|00004c40| 2e 0a 58 09 2a 2f 0a 58 | 09 69 66 20 28 66 70 72 |..X.*/.X|.if (fpr|
|00004c50| 69 6e 74 66 28 66 70 2c | 20 22 25 64 22 2c 20 67 |intf(fp,| "%d", g|
|00004c60| 65 74 70 69 64 28 29 29 | 20 3c 20 30 29 0a 58 09 |etpid())| < 0).X.|
|00004c70| 7b 0a 58 09 09 62 6f 6d | 62 28 22 6c 6f 63 6b 5f |{.X..bom|b("lock_|
|00004c80| 70 72 69 6e 74 65 72 3a | 66 70 72 69 6e 74 66 22 |printer:|fprintf"|
|00004c90| 29 3b 0a 58 09 7d 0a 58 | 09 2f 2a 0a 58 09 2f 2f |);.X.}.X|./*.X.//|
|00004ca0| 20 49 66 20 77 65 20 67 | 65 74 20 68 65 72 65 2c | If we g|et here,|
|00004cb0| 20 61 6c 6c 20 77 65 20 | 68 61 76 65 20 74 6f 20 | all we |have to |
|00004cc0| 64 6f 20 69 73 20 63 6c | 6f 73 65 20 74 68 65 20 |do is cl|ose the |
|00004cd0| 66 69 6c 65 2c 20 61 6e | 64 0a 58 09 2f 2f 20 67 |file, an|d.X.// g|
|00004ce0| 6f 20 62 61 63 6b 20 74 | 6f 20 74 68 65 20 69 6e |o back t|o the in|
|00004cf0| 69 74 5f 64 61 65 6d 6f | 6e 28 29 20 70 72 6f 63 |it_daemo|n() proc|
|00004d00| 65 73 73 2e 0a 58 09 2a | 2f 0a 58 09 69 66 20 28 |ess..X.*|/.X.if (|
|00004d10| 66 63 6c 6f 73 65 28 66 | 70 29 20 3c 20 30 29 0a |fclose(f|p) < 0).|
|00004d20| 58 09 7b 0a 58 09 09 62 | 6f 6d 62 28 22 6c 6f 63 |X.{.X..b|omb("loc|
|00004d30| 6b 5f 70 72 69 6e 74 65 | 72 3a 66 63 6c 6f 73 65 |k_printe|r:fclose|
|00004d40| 22 29 3b 0a 58 09 7d 0a | 58 09 2f 2a 0a 58 09 2f |");.X.}.|X./*.X./|
|00004d50| 2f 20 57 65 6c 6c 2c 20 | 65 76 65 72 79 74 68 69 |/ Well, |everythi|
|00004d60| 6e 67 20 6d 75 73 74 20 | 68 61 76 65 20 77 6f 72 |ng must |have wor|
|00004d70| 6b 65 64 2c 20 73 6f 20 | 77 65 27 6c 6c 20 6a 75 |ked, so |we'll ju|
|00004d80| 73 74 20 68 65 61 64 20 | 62 61 63 6b 20 61 6e 64 |st head |back and|
|00004d90| 0a 58 09 2f 2f 20 74 65 | 6c 6c 20 74 68 65 20 63 |.X.// te|ll the c|
|00004da0| 61 6c 6c 69 6e 67 20 70 | 72 6f 67 72 61 6d 20 74 |alling p|rogram t|
|00004db0| 68 61 74 20 65 76 65 72 | 79 74 68 69 6e 67 20 69 |hat ever|ything i|
|00004dc0| 73 20 6f 6b 61 79 2e 0a | 58 09 2a 2f 0a 58 09 72 |s okay..|X.*/.X.r|
|00004dd0| 65 74 75 72 6e 20 31 3b | 0a 58 7d 0a 45 4e 44 5f |eturn 1;|.X}.END_|
|00004de0| 4f 46 5f 46 49 4c 45 0a | 20 20 69 66 20 74 65 73 |OF_FILE.| if tes|
|00004df0| 74 20 33 36 33 37 20 2d | 6e 65 20 60 77 63 20 2d |t 3637 -|ne `wc -|
|00004e00| 63 20 3c 27 6c 6f 63 6b | 2e 63 27 60 3b 20 74 68 |c <'lock|.c'`; th|
|00004e10| 65 6e 0a 20 20 20 20 65 | 63 68 6f 20 73 68 61 72 |en. e|cho shar|
|00004e20| 3a 20 5c 22 27 6c 6f 63 | 6b 2e 63 27 5c 22 20 75 |: \"'loc|k.c'\" u|
|00004e30| 6e 70 61 63 6b 65 64 20 | 77 69 74 68 20 77 72 6f |npacked |with wro|
|00004e40| 6e 67 20 73 69 7a 65 21 | 0a 20 20 66 69 0a 20 20 |ng size!|. fi. |
|00004e50| 23 20 65 6e 64 20 6f 66 | 20 27 6c 6f 63 6b 2e 63 |# end of| 'lock.c|
|00004e60| 27 0a 66 69 0a 69 66 20 | 74 65 73 74 20 2d 66 20 |'.fi.if |test -f |
|00004e70| 27 6d 6c 70 2e 63 27 20 | 2d 61 20 22 24 7b 31 7d |'mlp.c' |-a "${1}|
|00004e80| 22 20 21 3d 20 22 2d 63 | 22 20 3b 20 74 68 65 6e |" != "-c|" ; then|
|00004e90| 20 0a 20 20 65 63 68 6f | 20 73 68 61 72 3a 20 57 | . echo| shar: W|
|00004ea0| 69 6c 6c 20 6e 6f 74 20 | 63 6c 6f 62 62 65 72 20 |ill not |clobber |
|00004eb0| 65 78 69 73 74 69 6e 67 | 20 66 69 6c 65 20 5c 22 |existing| file \"|
|00004ec0| 27 6d 6c 70 2e 63 27 5c | 22 0a 65 6c 73 65 0a 20 |'mlp.c'\|".else. |
|00004ed0| 20 65 63 68 6f 20 73 68 | 61 72 3a 20 45 78 74 72 | echo sh|ar: Extr|
|00004ee0| 61 63 74 69 6e 67 20 5c | 22 27 6d 6c 70 2e 63 27 |acting \|"'mlp.c'|
|00004ef0| 5c 22 20 5c 28 34 31 32 | 36 20 63 68 61 72 61 63 |\" \(412|6 charac|
|00004f00| 74 65 72 73 5c 29 0a 20 | 20 73 65 64 20 22 73 2f |ters\). | sed "s/|
|00004f10| 5e 58 2f 2f 22 20 3e 27 | 6d 6c 70 2e 63 27 20 3c |^X//" >'|mlp.c' <|
|00004f20| 3c 27 45 4e 44 5f 4f 46 | 5f 46 49 4c 45 27 0a 58 |<'END_OF|_FILE'.X|
|00004f30| 2f 2a 0a 58 20 2a 20 43 | 6f 70 79 72 69 67 68 74 |/*.X * C|opyright|
|00004f40| 20 28 63 29 20 31 39 39 | 30 20 52 65 67 65 6e 74 | (c) 199|0 Regent|
|00004f50| 73 20 6f 66 20 74 68 65 | 20 55 6e 69 76 65 72 73 |s of the| Univers|
|00004f60| 69 74 79 20 6f 66 20 43 | 61 6c 69 66 6f 72 6e 69 |ity of C|aliforni|
|00004f70| 61 2e 0a 58 20 2a 20 41 | 6c 6c 20 72 69 67 68 74 |a..X * A|ll right|
|00004f80| 73 20 72 65 73 65 72 76 | 65 64 2e 0a 58 20 2a 0a |s reserv|ed..X *.|
|00004f90| 58 20 2a 20 52 65 64 69 | 73 74 72 69 62 75 74 69 |X * Redi|stributi|
|00004fa0| 6f 6e 20 61 6e 64 20 75 | 73 65 20 69 6e 20 73 6f |on and u|se in so|
|00004fb0| 75 72 63 65 20 61 6e 64 | 20 62 69 6e 61 72 79 20 |urce and| binary |
|00004fc0| 66 6f 72 6d 73 20 61 72 | 65 20 70 65 72 6d 69 74 |forms ar|e permit|
|00004fd0| 74 65 64 0a 58 20 2a 20 | 70 72 6f 76 69 64 65 64 |ted.X * |provided|
|00004fe0| 20 74 68 61 74 20 74 68 | 65 20 61 62 6f 76 65 20 | that th|e above |
|00004ff0| 63 6f 70 79 72 69 67 68 | 74 20 6e 6f 74 69 63 65 |copyrigh|t notice|
|00005000| 20 61 6e 64 20 74 68 69 | 73 20 70 61 72 61 67 72 | and thi|s paragr|
|00005010| 61 70 68 20 61 72 65 0a | 58 20 2a 20 64 75 70 6c |aph are.|X * dupl|
|00005020| 69 63 61 74 65 64 20 69 | 6e 20 61 6c 6c 20 73 75 |icated i|n all su|
|00005030| 63 68 20 66 6f 72 6d 73 | 20 61 6e 64 20 74 68 61 |ch forms| and tha|
|00005040| 74 20 61 6e 79 20 64 6f | 63 75 6d 65 6e 74 61 74 |t any do|cumentat|
|00005050| 69 6f 6e 2c 0a 58 20 2a | 20 61 64 76 65 72 74 69 |ion,.X *| adverti|
|00005060| 73 69 6e 67 20 6d 61 74 | 65 72 69 61 6c 73 2c 20 |sing mat|erials, |
|00005070| 61 6e 64 20 6f 74 68 65 | 72 20 6d 61 74 65 72 69 |and othe|r materi|
|00005080| 61 6c 73 20 72 65 6c 61 | 74 65 64 20 74 6f 20 73 |als rela|ted to s|
|00005090| 75 63 68 0a 58 20 2a 20 | 64 69 73 74 72 69 62 75 |uch.X * |distribu|
|000050a0| 74 69 6f 6e 20 61 6e 64 | 20 75 73 65 20 61 63 6b |tion and| use ack|
|000050b0| 6e 6f 77 6c 65 64 67 65 | 20 74 68 61 74 20 74 68 |nowledge| that th|
|000050c0| 65 20 73 6f 66 74 77 61 | 72 65 20 77 61 73 20 64 |e softwa|re was d|
|000050d0| 65 76 65 6c 6f 70 65 64 | 0a 58 20 2a 20 62 79 20 |eveloped|.X * by |
|000050e0| 74 68 65 20 55 6e 69 76 | 65 72 73 69 74 79 20 6f |the Univ|ersity o|
|000050f0| 66 20 43 61 6c 69 66 6f | 72 6e 69 61 2c 20 52 69 |f Califo|rnia, Ri|
|00005100| 76 65 72 73 69 64 65 2e | 20 0a 58 20 2a 0a 58 20 |verside.| .X *.X |
|00005110| 2a 20 4e 4f 54 45 20 3a | 20 54 68 61 74 27 73 20 |* NOTE :| That's |
|00005120| 52 69 76 65 72 73 69 64 | 65 2e 20 20 4e 6f 74 20 |Riversid|e. Not |
|00005130| 42 65 72 6b 65 6c 65 79 | 2c 20 6e 6f 74 20 53 61 |Berkeley|, not Sa|
|00005140| 6e 74 61 20 43 72 75 7a | 2c 20 6e 6f 74 20 65 76 |nta Cruz|, not ev|
|00005150| 65 6e 0a 58 20 2a 20 20 | 20 20 20 20 20 20 49 72 |en.X * | Ir|
|00005160| 76 69 6e 65 2e 20 20 52 | 69 76 65 72 73 69 64 65 |vine. R|iverside|
|00005170| 2e 20 20 52 69 20 2d 20 | 76 65 72 20 2d 20 73 69 |. Ri - |ver - si|
|00005180| 64 65 2e 0a 58 20 2a 0a | 58 20 2a 20 54 68 65 20 |de..X *.|X * The |
|00005190| 6e 61 6d 65 20 6f 66 20 | 74 68 65 20 55 6e 69 76 |name of |the Univ|
|000051a0| 65 72 73 69 74 79 20 6d | 61 79 20 6e 6f 74 20 62 |ersity m|ay not b|
|000051b0| 65 20 75 73 65 64 20 74 | 6f 20 65 6e 64 6f 72 73 |e used t|o endors|
|000051c0| 65 20 6f 72 20 70 72 6f | 6d 6f 74 65 20 0a 58 20 |e or pro|mote .X |
|000051d0| 2a 20 70 72 6f 64 75 63 | 74 73 20 64 65 72 69 76 |* produc|ts deriv|
|000051e0| 65 64 20 66 72 6f 6d 20 | 74 68 69 73 20 73 6f 66 |ed from |this sof|
|000051f0| 74 77 61 72 65 20 77 69 | 74 68 6f 75 74 20 73 70 |tware wi|thout sp|
|00005200| 65 63 69 66 69 63 20 70 | 72 69 6f 72 20 77 72 69 |ecific p|rior wri|
|00005210| 74 74 65 6e 0a 58 20 2a | 20 70 65 72 6d 69 73 73 |tten.X *| permiss|
|00005220| 69 6f 6e 2e 0a 58 20 2a | 0a 58 20 2a 20 54 48 49 |ion..X *|.X * THI|
|00005230| 53 20 53 4f 46 54 57 41 | 52 45 20 49 53 20 50 52 |S SOFTWA|RE IS PR|
|00005240| 4f 56 49 44 45 44 20 60 | 60 41 53 20 49 53 27 27 |OVIDED `|`AS IS''|
|00005250| 20 41 4e 44 20 57 49 54 | 48 4f 55 54 20 41 4e 59 | AND WIT|HOUT ANY|
|00005260| 20 45 58 50 52 45 53 53 | 20 4f 52 0a 58 20 2a 20 | EXPRESS| OR.X * |
|00005270| 49 4d 50 4c 49 45 44 20 | 57 41 52 52 41 4e 54 49 |IMPLIED |WARRANTI|
|00005280| 45 53 2c 20 49 4e 43 4c | 55 44 49 4e 47 2c 20 57 |ES, INCL|UDING, W|
|00005290| 49 54 48 4f 55 54 20 4c | 49 4d 49 54 41 54 49 4f |ITHOUT L|IMITATIO|
|000052a0| 4e 2c 20 54 48 45 20 49 | 4d 50 4c 49 45 44 0a 58 |N, THE I|MPLIED.X|
|000052b0| 20 2a 20 57 41 52 52 41 | 4e 54 49 45 53 20 4f 46 | * WARRA|NTIES OF|
|000052c0| 20 4d 45 52 43 48 41 4e | 54 49 42 49 4c 49 54 59 | MERCHAN|TIBILITY|
|000052d0| 20 41 4e 44 20 46 49 54 | 4e 45 53 53 20 46 4f 52 | AND FIT|NESS FOR|
|000052e0| 20 41 20 50 41 52 54 49 | 43 55 4c 41 52 20 50 55 | A PARTI|CULAR PU|
|000052f0| 52 50 4f 53 45 2e 0a 58 | 20 2a 20 0a 58 20 2a 20 |RPOSE..X| * .X * |
|00005300| 4d 4c 50 44 20 2d 2d 20 | 4d 75 6c 74 69 70 6c 65 |MLPD -- |Multiple|
|00005310| 20 4c 69 6e 65 20 50 72 | 69 6e 74 65 72 20 44 61 | Line Pr|inter Da|
|00005320| 65 6d 6f 6e 20 28 56 65 | 72 73 69 6f 6e 20 31 2e |emon (Ve|rsion 1.|
|00005330| 33 29 0a 58 20 2a 20 53 | 43 43 53 20 6b 65 79 77 |3).X * S|CCS keyw|
|00005340| 6f 72 64 73 3a 20 40 28 | 23 29 6d 6c 70 2e 63 09 |ords: @(|#)mlp.c.|
|00005350| 31 2e 33 20 31 32 2f 31 | 2f 39 30 0a 58 20 2a 2f |1.3 12/1|/90.X */|
|00005360| 0a 58 0a 58 23 69 6e 63 | 6c 75 64 65 20 22 63 6f |.X.X#inc|lude "co|
|00005370| 6e 66 69 67 2e 68 22 0a | 58 63 68 61 72 20 2a 4c |nfig.h".|Xchar *L|
|00005380| 50 5f 53 50 4f 4f 4c 5f | 44 49 52 45 43 54 4f 52 |P_SPOOL_|DIRECTOR|
|00005390| 59 3b 0a 58 69 6e 74 20 | 20 54 49 4d 45 4f 55 54 |Y;.Xint | TIMEOUT|
|000053a0| 3b 0a 58 69 6e 74 20 20 | 65 72 72 6e 6f 3b 0a 58 |;.Xint |errno;.X|
|000053b0| 0a 58 2f 2a 0a 58 2f 2f | 20 6d 61 69 6e 28 29 20 |.X/*.X//| main() |
|000053c0| 2d 2d 20 54 68 65 20 6d | 61 69 6e 20 70 72 6f 67 |-- The m|ain prog|
|000053d0| 72 61 6d 2e 0a 58 2f 2f | 0a 58 2f 2f 20 54 68 69 |ram..X//|.X// Thi|
|000053e0| 73 20 77 69 6c 6c 20 73 | 74 61 72 74 20 6f 66 66 |s will s|tart off|
|000053f0| 20 6c 6f 6f 6b 69 6e 67 | 20 74 6f 20 63 72 65 61 | looking| to crea|
|00005400| 74 65 20 74 68 65 20 70 | 72 69 6e 74 65 72 20 73 |te the p|rinter s|
|00005410| 74 72 75 63 74 75 72 65 | 2c 0a 58 2f 2f 20 69 6e |tructure|,.X// in|
|00005420| 69 74 69 61 6c 69 7a 65 | 20 74 68 65 20 70 72 6f |itialize| the pro|
|00005430| 63 65 73 73 20 73 6f 20 | 74 68 61 74 20 69 74 20 |cess so |that it |
|00005440| 69 73 20 72 75 6e 6e 69 | 6e 67 20 61 73 20 61 20 |is runni|ng as a |
|00005450| 64 61 65 6d 6f 6e 2c 0a | 58 2f 2f 20 66 69 6e 64 |daemon,.|X// find|
|00005460| 20 74 68 65 20 74 6f 74 | 61 6c 20 6e 75 6d 62 65 | the tot|al numbe|
|00005470| 72 20 6f 66 20 70 72 69 | 6e 74 65 72 73 20 74 6f |r of pri|nters to|
|00005480| 20 63 68 65 63 6b 2c 20 | 61 6e 64 20 73 74 61 72 | check, |and star|
|00005490| 74 20 75 70 20 61 0a 58 | 2f 2f 20 73 65 6c 65 63 |t up a.X|// selec|
|000054a0| 74 2f 74 65 73 74 20 6c | 6f 6f 70 20 74 68 61 74 |t/test l|oop that|
|000054b0| 20 6c 6f 6f 6b 73 20 66 | 6f 72 20 70 72 69 6e 74 | looks f|or print|
|000054c0| 20 6a 6f 62 73 20 69 6e | 20 74 68 65 20 6d 61 69 | jobs in| the mai|
|000054d0| 6e 20 71 75 65 75 65 0a | 58 2f 2f 20 61 6e 64 20 |n queue.|X// and |
|000054e0| 6d 6f 76 65 73 2f 70 72 | 69 6e 74 73 20 74 68 65 |moves/pr|ints the|
|000054f0| 20 6e 65 77 20 66 69 6c | 65 73 20 69 6e 20 6e 65 | new fil|es in ne|
|00005500| 77 20 71 75 65 75 65 73 | 2e 0a 58 2f 2f 0a 58 2f |w queues|..X//.X/|
|00005510| 2f 20 41 72 67 75 6d 65 | 6e 74 73 20 3a 20 4e 6f |/ Argume|nts : No|
|00005520| 6e 65 0a 58 2a 2f 0a 58 | 69 6e 74 20 6d 61 69 6e |ne.X*/.X|int main|
|00005530| 28 61 72 67 63 2c 20 61 | 72 67 76 29 0a 58 69 6e |(argc, a|rgv).Xin|
|00005540| 74 20 61 72 67 63 3b 0a | 58 63 68 61 72 20 2a 61 |t argc;.|Xchar *a|
|00005550| 72 67 76 5b 5d 3b 0a 58 | 7b 0a 58 09 69 6e 74 20 |rgv[];.X|{.X.int |
|00005560| 63 6f 75 6e 74 2c 20 63 | 6c 74 2c 20 6e 72 65 61 |count, c|lt, nrea|
|00005570| 64 79 2c 20 70 72 65 61 | 64 79 2c 20 6e 6f 5f 6f |dy, prea|dy, no_o|
|00005580| 66 5f 70 72 69 6e 74 65 | 72 73 3b 0a 58 09 73 74 |f_printe|rs;.X.st|
|00005590| 72 75 63 74 20 74 69 6d | 65 76 61 6c 20 74 69 6d |ruct tim|eval tim|
|000055a0| 65 6f 75 74 3b 0a 58 09 | 70 72 69 6e 74 65 72 73 |eout;.X.|printers|
|000055b0| 74 72 75 63 74 20 2a 70 | 72 69 6e 74 65 72 73 3b |truct *p|rinters;|
|000055c0| 0a 58 23 69 66 6e 64 65 | 66 20 6c 69 6e 74 0a 58 |.X#ifnde|f lint.X|
|000055d0| 09 46 49 4c 45 20 2a 6d | 79 66 70 2c 20 2a 66 6f |.FILE *m|yfp, *fo|
|000055e0| 70 65 6e 28 29 3b 0a 58 | 23 65 6e 64 69 66 0a 58 |pen();.X|#endif.X|
|000055f0| 09 69 6e 74 20 66 70 72 | 69 6e 74 66 28 29 3b 0a |.int fpr|intf();.|
|00005600| 58 09 69 6e 74 20 77 72 | 69 74 65 28 29 3b 0a 58 |X.int wr|ite();.X|
|00005610| 09 76 6f 69 64 20 65 78 | 69 74 28 29 3b 0a 58 0a |.void ex|it();.X.|
|00005620| 58 09 2f 2a 20 0a 58 09 | 2f 2f 20 46 69 72 73 74 |X./* .X.|// First|
|00005630| 2c 20 69 6e 69 74 69 61 | 6c 69 7a 65 20 74 68 65 |, initia|lize the|
|00005640| 20 70 72 69 6e 74 65 72 | 20 73 74 72 75 63 74 75 | printer| structu|
|00005650| 72 65 2e 0a 58 09 2a 2f | 0a 58 23 69 66 64 65 66 |re..X.*/|.X#ifdef|
|00005660| 20 6c 69 6e 74 0a 58 09 | 70 72 69 6e 74 65 72 73 | lint.X.|printers|
|00005670| 20 3d 20 4e 55 4c 4c 3b | 0a 58 23 65 6c 73 65 0a | = NULL;|.X#else.|
|00005680| 58 09 70 72 69 6e 74 65 | 72 73 20 3d 20 28 70 72 |X.printe|rs = (pr|
|00005690| 69 6e 74 65 72 73 74 72 | 75 63 74 20 2a 29 20 6d |interstr|uct *) m|
|000056a0| 61 6c 6c 6f 63 28 73 69 | 7a 65 6f 66 28 70 72 69 |alloc(si|zeof(pri|
|000056b0| 6e 74 65 72 73 74 72 75 | 63 74 29 29 3b 0a 58 23 |nterstru|ct));.X#|
|000056c0| 65 6e 64 69 66 0a 58 09 | 2f 2a 0a 58 09 2f 2f 20 |endif.X.|/*.X.// |
|000056d0| 4e 65 78 74 2c 20 70 61 | 72 73 65 20 74 68 72 6f |Next, pa|rse thro|
|000056e0| 75 67 68 20 61 6c 6c 20 | 6f 66 20 74 68 65 20 61 |ugh all |of the a|
|000056f0| 72 67 75 6d 65 6e 74 73 | 20 74 6f 20 66 69 6e 64 |rguments| to find|
|00005700| 20 69 6e 66 6f 72 6d 61 | 74 69 6f 6e 0a 58 09 2f | informa|tion.X./|
|00005710| 2f 20 74 68 61 74 20 77 | 65 20 6e 65 65 64 2c 20 |/ that w|e need, |
|00005720| 61 6e 64 20 73 65 74 20 | 61 6c 6c 20 76 61 72 69 |and set |all vari|
|00005730| 61 62 6c 65 73 20 6e 65 | 63 65 73 73 61 72 79 2e |ables ne|cessary.|
|00005740| 0a 58 09 2a 2f 0a 58 09 | 6e 6f 5f 6f 66 5f 70 72 |.X.*/.X.|no_of_pr|
|00005750| 69 6e 74 65 72 73 20 3d | 20 70 61 72 73 65 5f 61 |inters =| parse_a|
|00005760| 72 67 75 6d 65 6e 74 73 | 28 61 72 67 63 2c 20 61 |rguments|(argc, a|
|00005770| 72 67 76 2c 20 70 72 69 | 6e 74 65 72 73 29 3b 0a |rgv, pri|nters);.|
|00005780| 58 09 2f 2a 20 0a 58 09 | 2f 2f 20 53 65 74 20 74 |X./* .X.|// Set t|
|00005790| 68 65 20 74 69 6d 65 6f | 75 74 20 76 61 6c 75 65 |he timeo|ut value|
|000057a0| 73 20 66 6f 72 20 74 68 | 65 20 73 65 6c 65 63 74 |s for th|e select|
|000057b0| 20 70 72 6f 63 65 73 73 | 20 74 6f 20 62 65 20 32 | process| to be 2|
|000057c0| 20 73 65 63 6f 6e 64 73 | 2c 0a 58 09 2f 2f 20 77 | seconds|,.X.// w|
|000057d0| 68 69 63 68 20 6b 65 65 | 70 73 20 74 68 65 20 43 |hich kee|ps the C|
|000057e0| 50 55 20 75 73 61 67 65 | 20 64 6f 77 6e 2e 0a 58 |PU usage| down..X|
|000057f0| 09 2a 2f 0a 58 09 74 69 | 6d 65 6f 75 74 2e 74 76 |.*/.X.ti|meout.tv|
|00005800| 5f 73 65 63 20 3d 20 32 | 3b 0a 58 09 74 69 6d 65 |_sec = 2|;.X.time|
|00005810| 6f 75 74 2e 74 76 5f 75 | 73 65 63 20 3d 20 30 3b |out.tv_u|sec = 0;|
|00005820| 0a 58 09 63 6f 75 6e 74 | 20 3d 20 30 3b 0a 58 09 |.X.count| = 0;.X.|
|00005830| 77 68 69 6c 65 28 54 52 | 55 45 29 0a 58 09 7b 0a |while(TR|UE).X.{.|
|00005840| 58 09 09 2f 2a 0a 58 09 | 09 2f 2f 20 44 6f 20 61 |X../*.X.|.// Do a|
|00005850| 20 73 65 6c 65 63 74 28 | 29 20 66 6f 72 20 61 62 | select(|) for ab|
|00005860| 6f 75 74 20 32 20 73 65 | 63 6f 6e 64 73 20 6f 6e |out 2 se|conds on|
|00005870| 20 6e 6f 74 68 69 6e 67 | 2c 20 73 6f 20 74 68 61 | nothing|, so tha|
|00005880| 74 0a 58 09 09 2f 2f 20 | 61 6c 6c 20 77 65 20 64 |t.X..// |all we d|
|00005890| 6f 20 69 73 20 61 20 74 | 69 6d 65 20 77 61 69 74 |o is a t|ime wait|
|000058a0| 20 77 69 74 68 6f 75 74 | 20 63 61 75 73 69 6e 67 | without| causing|
|000058b0| 20 61 20 6c 6f 74 20 6f | 66 20 43 50 55 0a 58 09 | a lot o|f CPU.X.|
|000058c0| 09 2f 2f 20 75 73 61 67 | 65 2e 20 20 49 27 6d 20 |.// usag|e. I'm |
|000058d0| 68 6f 70 69 6e 67 20 74 | 68 61 74 20 74 68 69 73 |hoping t|hat this|
|000058e0| 20 69 73 6e 27 74 20 74 | 6f 6f 20 6d 75 63 68 20 | isn't t|oo much |
|000058f0| 62 6f 74 68 65 72 20 66 | 6f 72 0a 58 09 09 2f 2f |bother f|or.X..//|
|00005900| 20 74 68 65 20 75 73 65 | 72 73 2e 20 20 0a 58 09 | the use|rs. .X.|
|00005910| 09 2a 2f 0a 58 09 09 69 | 66 20 28 63 6f 75 6e 74 |.*/.X..i|f (count|
|00005920| 20 3d 3d 20 30 29 0a 58 | 09 09 7b 0a 58 09 09 09 | == 0).X|..{.X...|
|00005930| 28 76 6f 69 64 29 72 65 | 73 74 61 72 74 5f 61 6c |(void)re|start_al|
|00005940| 6c 5f 70 72 69 6e 74 65 | 72 73 28 6e 6f 5f 6f 66 |l_printe|rs(no_of|
|00005950| 5f 70 72 69 6e 74 65 72 | 73 2c 20 70 72 69 6e 74 |_printer|s, print|
|00005960| 65 72 73 29 3b 0a 58 09 | 09 09 2f 2a 20 0a 58 09 |ers);.X.|../* .X.|
|00005970| 09 09 2f 2f 20 28 31 35 | 20 2a 20 32 20 73 65 63 |..// (15| * 2 sec|
|00005980| 6f 6e 64 73 29 20 2b 20 | 32 20 73 65 63 6f 6e 64 |onds) + |2 second|
|00005990| 73 3b 0a 58 09 09 09 2a | 2f 0a 58 09 09 09 63 6f |s;.X...*|/.X...co|
|000059a0| 75 6e 74 20 3d 20 31 36 | 3b 20 20 20 20 20 20 20 |unt = 16|; |
|000059b0| 20 20 20 20 20 0a 58 09 | 09 7d 0a 58 09 09 2d 2d | .X.|.}.X..--|
|000059c0| 63 6f 75 6e 74 3b 0a 58 | 09 09 69 66 20 28 28 6e |count;.X|..if ((n|
|000059d0| 72 65 61 64 79 20 3d 20 | 73 65 6c 65 63 74 28 28 |ready = |select((|
|000059e0| 69 6e 74 29 20 30 2c 20 | 28 66 64 5f 73 65 74 20 |int) 0, |(fd_set |
|000059f0| 2a 29 20 4e 55 4c 4c 2c | 20 28 66 64 5f 73 65 74 |*) NULL,| (fd_set|
|00005a00| 20 2a 29 20 4e 55 4c 4c | 2c 20 0a 58 09 09 09 28 | *) NULL|, .X...(|
|00005a10| 66 64 5f 73 65 74 20 2a | 29 20 4e 55 4c 4c 2c 20 |fd_set *|) NULL, |
|00005a20| 28 73 74 72 75 63 74 20 | 74 69 6d 65 76 61 6c 20 |(struct |timeval |
|00005a30| 2a 29 20 26 74 69 6d 65 | 6f 75 74 29 29 20 3c 20 |*) &time|out)) < |
|00005a40| 30 29 0a 58 09 09 7b 0a | 58 09 09 09 69 66 20 28 |0).X..{.|X...if (|
|00005a50| 65 72 72 6e 6f 20 21 3d | 20 45 49 4e 54 52 29 0a |errno !=| EINTR).|
|00005a60| 58 09 09 09 7b 0a 58 09 | 09 09 09 62 6f 6d 62 28 |X...{.X.|...bomb(|
|00005a70| 22 73 65 6c 65 63 74 22 | 29 3b 0a 58 09 09 09 7d |"select"|);.X...}|
|00005a80| 0a 58 09 09 09 65 6c 73 | 65 0a 58 09 09 09 7b 0a |.X...els|e.X...{.|
|00005a90| 58 09 09 09 09 6e 72 65 | 61 64 79 20 3d 20 30 3b |X....nre|ady = 0;|
|00005aa0| 0a 58 09 09 09 7d 0a 58 | 09 09 7d 0a 58 09 09 2f |.X...}.X|..}.X../|
|00005ab0| 2a 0a 58 09 09 2f 2f 20 | 57 65 6c 6c 2c 20 66 72 |*.X..// |Well, fr|
|00005ac0| 6f 6d 20 68 65 72 65 2c | 20 77 65 20 77 61 6e 74 |om here,| we want|
|00005ad0| 20 74 6f 20 67 6f 20 74 | 68 72 6f 75 67 68 20 74 | to go t|hrough t|
|00005ae0| 68 65 20 70 72 69 6e 74 | 65 72 73 0a 58 09 09 2f |he print|ers.X../|
|00005af0| 2f 20 74 6f 20 6d 61 6b | 65 20 73 75 72 65 20 77 |/ to mak|e sure w|
|00005b00| 65 20 65 69 74 68 65 72 | 20 64 6f 6e 27 74 20 68 |e either| don't h|
|00005b10| 61 76 65 20 61 6e 79 74 | 68 69 6e 67 20 74 6f 20 |ave anyt|hing to |
|00005b20| 70 72 69 6e 74 2c 0a 58 | 09 09 2f 2f 20 6f 72 20 |print,.X|..// or |
|00005b30| 61 6c 6c 20 6f 66 20 74 | 68 65 20 70 72 69 6e 74 |all of t|he print|
|00005b40| 65 72 73 20 61 72 65 20 | 62 75 73 79 2e 20 20 57 |ers are |busy. W|
|00005b50| 65 20 63 68 65 63 6b 20 | 74 68 65 20 62 61 73 65 |e check |the base|
|00005b60| 0a 58 09 09 2f 2f 20 70 | 72 69 6e 74 65 72 20 28 |.X..// p|rinter (|
|00005b70| 57 68 69 63 68 20 65 76 | 65 72 20 6f 6e 65 20 74 |Which ev|er one t|
|00005b80| 68 61 74 20 69 73 29 2c | 20 61 6e 64 20 73 65 65 |hat is),| and see|
|00005b90| 20 69 66 20 69 74 20 68 | 61 73 0a 58 09 09 2f 2f | if it h|as.X..//|
|00005ba0| 20 61 6e 79 20 66 69 6c | 65 73 20 74 6f 20 70 72 | any fil|es to pr|
|00005bb0| 69 6e 74 2e 20 20 49 66 | 20 69 74 20 64 6f 65 73 |int. If| it does|
|00005bc0| 2c 20 74 68 65 6e 20 77 | 65 20 77 61 6e 74 20 74 |, then w|e want t|
|00005bd0| 6f 20 70 72 69 6e 74 0a | 58 09 09 2f 2f 20 6f 75 |o print.|X..// ou|
|00005be0| 74 20 74 68 65 20 66 69 | 6c 65 20 74 6f 20 6f 6e |t the fi|le to on|
|00005bf0| 65 20 6f 66 20 74 68 65 | 20 6f 74 68 65 72 20 70 |e of the| other p|
|00005c00| 72 69 6e 74 65 72 73 2c | 20 69 66 20 61 6e 79 0a |rinters,| if any.|
|00005c10| 58 09 09 2f 2f 20 6f 66 | 20 74 68 65 6d 20 61 72 |X..// of| them ar|
|00005c20| 65 20 61 76 61 69 6c 61 | 62 6c 65 2e 0a 58 09 09 |e availa|ble..X..|
|00005c30| 2a 2f 0a 58 09 09 70 72 | 65 61 64 79 20 3d 20 30 |*/.X..pr|eady = 0|
|00005c40| 3b 0a 58 09 09 77 68 69 | 6c 65 20 28 28 6e 72 65 |;.X..whi|le ((nre|
|00005c50| 61 64 79 20 3d 3d 20 30 | 29 20 26 26 20 0a 58 09 |ady == 0|) && .X.|
|00005c60| 09 09 28 63 68 65 63 6b | 5f 62 61 73 65 5f 70 72 |..(check|_base_pr|
|00005c70| 69 6e 74 65 72 28 29 20 | 3e 20 30 29 20 26 26 0a |inter() |> 0) &&.|
|00005c80| 58 09 09 09 28 70 72 65 | 61 64 79 20 3d 3d 20 30 |X...(pre|ady == 0|
|00005c90| 29 29 0a 58 09 09 7b 0a | 58 09 09 09 64 65 62 75 |)).X..{.|X...debu|
|00005ca0| 67 28 22 46 6f 75 6e 64 | 20 61 20 66 69 6c 65 20 |g("Found| a file |
|00005cb0| 74 6f 20 70 72 69 6e 74 | 2e 5c 6e 22 29 3b 0a 58 |to print|.\n");.X|
|00005cc0| 09 09 09 2f 2a 0a 58 09 | 09 09 2f 2f 20 42 65 67 |.../*.X.|..// Beg|
|00005cd0| 69 6e 20 74 6f 20 63 68 | 65 63 6b 20 74 68 72 6f |in to ch|eck thro|
|00005ce0| 75 67 68 20 74 68 65 20 | 6c 69 73 74 20 6f 66 20 |ugh the |list of |
|00005cf0| 70 72 69 6e 74 65 72 73 | 0a 58 09 09 09 2f 2f 20 |printers|.X...// |
|00005d00| 61 6e 64 20 73 65 65 20 | 69 66 20 77 65 20 68 61 |and see |if we ha|
|00005d10| 76 65 20 6f 6e 65 20 66 | 72 65 65 2e 20 20 49 66 |ve one f|ree. If|
|00005d20| 20 77 65 20 64 6f 2c 20 | 70 72 69 6e 74 0a 58 09 | we do, |print.X.|
|00005d30| 09 09 2f 2f 20 74 6f 20 | 74 68 61 74 20 70 72 69 |..// to |that pri|
|00005d40| 6e 74 65 72 2c 20 6f 74 | 68 65 72 77 69 73 65 2c |nter, ot|herwise,|
|00005d50| 20 73 6b 69 70 20 69 74 | 2e 20 20 57 65 20 64 6f | skip it|. We do|
|00005d60| 20 0a 58 09 09 09 2f 2f | 20 4e 4f 54 20 77 61 6e | .X...//| NOT wan|
|00005d70| 74 20 74 6f 20 71 75 65 | 75 65 20 66 69 6c 65 73 |t to que|ue files|
|00005d80| 20 6f 6e 20 70 72 69 6e | 74 65 72 73 2e 2e 2e 57 | on prin|ters...W|
|00005d90| 65 20 77 61 6e 74 0a 58 | 09 09 09 2f 2f 20 74 6f |e want.X|...// to|
|00005da0| 20 6d 61 69 6e 74 61 69 | 6e 20 6f 6e 65 20 71 75 | maintai|n one qu|
|00005db0| 65 75 65 2e 20 20 28 53 | 65 65 20 52 45 41 44 4d |eue. (S|ee READM|
|00005dc0| 45 29 2e 0a 58 09 09 09 | 2a 2f 0a 58 09 09 09 66 |E)..X...|*/.X...f|
|00005dd0| 6f 72 20 28 63 6c 74 20 | 3d 20 30 3b 20 63 6c 74 |or (clt |= 0; clt|
|00005de0| 20 3c 20 6e 6f 5f 6f 66 | 5f 70 72 69 6e 74 65 72 | < no_of|_printer|
|00005df0| 73 3b 20 2b 2b 63 6c 74 | 29 0a 58 09 09 09 7b 0a |s; ++clt|).X...{.|
|00005e00| 58 09 09 09 09 2f 2a 0a | 58 09 09 09 09 2f 2f 20 |X..../*.|X....// |
|00005e10| 54 68 69 73 20 63 68 65 | 63 6b 73 20 74 6f 20 73 |This che|cks to s|
|00005e20| 65 65 20 69 66 20 74 68 | 65 20 70 72 69 6e 74 65 |ee if th|e printe|
|00005e30| 72 20 69 73 0a 58 09 09 | 09 09 2f 2f 20 61 76 61 |r is.X..|..// ava|
|00005e40| 69 6c 61 62 6c 65 20 74 | 6f 20 70 72 69 6e 74 20 |ilable t|o print |
|00005e50| 6f 6e 2e 0a 58 09 09 09 | 09 2a 2f 0a 58 09 09 09 |on..X...|.*/.X...|
|00005e60| 09 69 66 20 28 28 70 72 | 65 61 64 79 20 3d 20 63 |.if ((pr|eady = c|
|00005e70| 68 65 63 6b 5f 70 72 73 | 28 70 72 69 6e 74 65 72 |heck_prs|(printer|
|00005e80| 73 2c 20 63 6c 74 29 29 | 20 3c 20 30 29 0a 58 09 |s, clt))| < 0).X.|
|00005e90| 09 09 09 7b 0a 58 09 09 | 09 09 09 62 6f 6d 62 28 |...{.X..|...bomb(|
|00005ea0| 22 63 68 65 63 6b 5f 70 | 72 73 22 29 3b 0a 58 09 |"check_p|rs");.X.|
|00005eb0| 09 09 09 7d 0a 58 09 09 | 09 09 65 6c 73 65 20 69 |...}.X..|..else i|
|00005ec0| 66 20 28 70 72 65 61 64 | 79 20 3d 3d 20 30 29 0a |f (pread|y == 0).|
|00005ed0| 58 09 09 09 09 7b 0a 58 | 09 09 09 09 09 64 65 62 |X....{.X|.....deb|
|00005ee0| 75 67 28 22 49 20 63 61 | 6e 20 70 72 69 6e 74 20 |ug("I ca|n print |
|00005ef0| 6f 75 74 20 61 20 66 69 | 6c 65 2e 5c 6e 22 29 3b |out a fi|le.\n");|
|00005f00| 0a 58 09 09 09 09 09 2f | 2a 0a 58 09 09 09 09 09 |.X...../|*.X.....|
|00005f10| 2f 2f 20 49 66 20 77 65 | 20 67 65 74 20 68 65 72 |// If we| get her|
|00005f20| 65 2c 20 77 65 20 63 61 | 6e 20 70 72 69 6e 74 0a |e, we ca|n print.|
|00005f30| 58 09 09 09 09 09 2f 2f | 20 6f 75 74 20 61 20 66 |X.....//| out a f|
|00005f40| 69 6c 65 20 6f 6e 20 74 | 68 69 73 20 70 72 69 6e |ile on t|his prin|
|00005f50| 74 65 72 2e 0a 58 09 09 | 09 09 09 2a 2f 0a 58 09 |ter..X..|...*/.X.|
|00005f60| 09 09 09 09 69 66 20 28 | 70 72 69 6e 74 5f 66 69 |....if (|print_fi|
|00005f70| 6c 65 28 70 72 69 6e 74 | 65 72 73 2c 20 63 6c 74 |le(print|ers, clt|
|00005f80| 29 20 3c 20 30 29 0a 58 | 09 09 09 09 09 7b 0a 58 |) < 0).X|.....{.X|
|00005f90| 09 09 09 09 09 09 62 6f | 6d 62 28 22 70 72 69 6e |......bo|mb("prin|
|00005fa0| 74 5f 66 69 6c 65 22 29 | 3b 0a 58 09 09 09 09 09 |t_file")|;.X.....|
|00005fb0| 7d 0a 58 09 09 09 09 09 | 63 6c 74 20 3d 20 6e 6f |}.X.....|clt = no|
|00005fc0| 5f 6f 66 5f 70 72 69 6e | 74 65 72 73 3b 0a 58 09 |_of_prin|ters;.X.|
|00005fd0| 09 09 09 7d 0a 58 09 09 | 09 7d 0a 58 09 09 7d 0a |...}.X..|.}.X..}.|
|00005fe0| 58 09 7d 0a 58 7d 0a 45 | 4e 44 5f 4f 46 5f 46 49 |X.}.X}.E|ND_OF_FI|
|00005ff0| 4c 45 0a 20 20 69 66 20 | 74 65 73 74 20 34 31 32 |LE. if |test 412|
|00006000| 36 20 2d 6e 65 20 60 77 | 63 20 2d 63 20 3c 27 6d |6 -ne `w|c -c <'m|
|00006010| 6c 70 2e 63 27 60 3b 20 | 74 68 65 6e 0a 20 20 20 |lp.c'`; |then. |
|00006020| 20 65 63 68 6f 20 73 68 | 61 72 3a 20 5c 22 27 6d | echo sh|ar: \"'m|
|00006030| 6c 70 2e 63 27 5c 22 20 | 75 6e 70 61 63 6b 65 64 |lp.c'\" |unpacked|
|00006040| 20 77 69 74 68 20 77 72 | 6f 6e 67 20 73 69 7a 65 | with wr|ong size|
|00006050| 21 0a 20 20 66 69 0a 20 | 20 23 20 65 6e 64 20 6f |!. fi. | # end o|
|00006060| 66 20 27 6d 6c 70 2e 63 | 27 0a 66 69 0a 69 66 20 |f 'mlp.c|'.fi.if |
|00006070| 74 65 73 74 20 2d 66 20 | 27 6d 6c 70 64 2e 38 27 |test -f |'mlpd.8'|
|00006080| 20 2d 61 20 22 24 7b 31 | 7d 22 20 21 3d 20 22 2d | -a "${1|}" != "-|
|00006090| 63 22 20 3b 20 74 68 65 | 6e 20 0a 20 20 65 63 68 |c" ; the|n . ech|
|000060a0| 6f 20 73 68 61 72 3a 20 | 57 69 6c 6c 20 6e 6f 74 |o shar: |Will not|
|000060b0| 20 63 6c 6f 62 62 65 72 | 20 65 78 69 73 74 69 6e | clobber| existin|
|000060c0| 67 20 66 69 6c 65 20 5c | 22 27 6d 6c 70 64 2e 38 |g file \|"'mlpd.8|
|000060d0| 27 5c 22 0a 65 6c 73 65 | 0a 20 20 65 63 68 6f 20 |'\".else|. echo |
|000060e0| 73 68 61 72 3a 20 45 78 | 74 72 61 63 74 69 6e 67 |shar: Ex|tracting|
|000060f0| 20 5c 22 27 6d 6c 70 64 | 2e 38 27 5c 22 20 5c 28 | \"'mlpd|.8'\" \(|
|00006100| 33 37 38 36 20 63 68 61 | 72 61 63 74 65 72 73 5c |3786 cha|racters\|
|00006110| 29 0a 20 20 73 65 64 20 | 22 73 2f 5e 58 2f 2f 22 |). sed |"s/^X//"|
|00006120| 20 3e 27 6d 6c 70 64 2e | 38 27 20 3c 3c 27 45 4e | >'mlpd.|8' <<'EN|
|00006130| 44 5f 4f 46 5f 46 49 4c | 45 27 0a 58 2e 5c 22 20 |D_OF_FIL|E'.X.\" |
|00006140| 43 6f 70 79 72 69 67 68 | 74 20 28 63 29 20 31 39 |Copyrigh|t (c) 19|
|00006150| 38 33 20 52 65 67 65 6e | 74 73 20 6f 66 20 74 68 |83 Regen|ts of th|
|00006160| 65 20 55 6e 69 76 65 72 | 73 69 74 79 20 6f 66 20 |e Univer|sity of |
|00006170| 43 61 6c 69 66 6f 72 6e | 69 61 2e 0a 58 2e 5c 22 |Californ|ia..X.\"|
|00006180| 20 41 6c 6c 20 72 69 67 | 68 74 73 20 72 65 73 65 | All rig|hts rese|
|00006190| 72 76 65 64 2e 20 20 54 | 68 65 20 42 65 72 6b 65 |rved. T|he Berke|
|000061a0| 6c 65 79 20 73 6f 66 74 | 77 61 72 65 20 4c 69 63 |ley soft|ware Lic|
|000061b0| 65 6e 73 65 20 41 67 72 | 65 65 6d 65 6e 74 0a 58 |ense Agr|eement.X|
|000061c0| 2e 5c 22 20 73 70 65 63 | 69 66 69 65 73 20 74 68 |.\" spec|ifies th|
|000061d0| 65 20 74 65 72 6d 73 20 | 61 6e 64 20 63 6f 6e 64 |e terms |and cond|
|000061e0| 69 74 69 6f 6e 73 20 66 | 6f 72 20 72 65 64 69 73 |itions f|or redis|
|000061f0| 74 72 69 62 75 74 69 6f | 6e 2e 0a 58 2e 5c 22 0a |tributio|n..X.\".|
|00006200| 58 2e 5c 22 20 40 28 23 | 29 6d 6c 70 64 2e 38 20 |X.\" @(#|)mlpd.8 |
|00006210| 31 2e 33 20 31 32 2f 31 | 2f 39 30 3b 20 66 72 6f |1.3 12/1|/90; fro|
|00006220| 6d 20 55 43 52 20 53 75 | 6e 4f 53 20 34 2e 31 0a |m UCR Su|nOS 4.1.|
|00006230| 58 2e 5c 22 0a 58 2e 54 | 48 20 4d 4c 50 44 20 38 |X.\".X.T|H MLPD 8|
|00006240| 20 22 38 20 4e 6f 76 65 | 6d 62 65 72 20 31 39 39 | "8 Nove|mber 199|
|00006250| 30 22 0a 58 2e 53 48 20 | 4e 41 4d 45 0a 58 6d 6c |0".X.SH |NAME.Xml|
|00006260| 70 64 20 5c 2d 20 6d 75 | 6c 74 69 70 6c 65 20 6c |pd \- mu|ltiple l|
|00006270| 69 6e 65 20 70 72 69 6e | 74 65 72 20 64 61 65 6d |ine prin|ter daem|
|00006280| 6f 6e 0a 58 2e 53 48 20 | 53 59 4e 4f 50 53 49 53 |on.X.SH |SYNOPSIS|
|00006290| 0a 58 0a 58 2e 42 20 6d | 6c 70 64 20 0a 58 5b 0a |.X.X.B m|lpd .X[.|
|000062a0| 58 2e 42 20 5c 2d 70 20 | 3c 62 61 73 65 20 70 72 |X.B \-p |<base pr|
|000062b0| 3e 20 3c 70 72 31 3e 20 | 3c 70 72 32 3e 20 2e 2e |> <pr1> |<pr2> ..|
|000062c0| 2e 0a 58 5d 20 5b 0a 58 | 2e 42 20 5c 2d 74 20 3c |..X] [.X|.B \-t <|
|000062d0| 74 69 6d 65 6f 75 74 3e | 0a 58 5d 0a 58 2e 53 48 |timeout>|.X].X.SH|
|000062e0| 20 44 45 53 43 52 49 50 | 54 49 4f 4e 0a 58 0a 58 | DESCRIP|TION.X.X|
|000062f0| 2e 4c 50 0a 58 2e 42 20 | 6d 6c 70 64 20 0a 58 69 |.LP.X.B |mlpd .Xi|
|00006300| 73 20 61 20 6d 75 6c 74 | 69 70 6c 65 20 6c 69 6e |s a mult|iple lin|
|00006310| 65 20 70 72 69 6e 74 65 | 72 20 64 61 65 6d 6f 6e |e printe|r daemon|
|00006320| 2c 20 77 68 69 63 68 20 | 69 73 20 73 65 74 20 75 |, which |is set u|
|00006330| 70 20 69 6e 20 79 6f 75 | 72 0a 58 72 63 2e 6c 6f |p in you|r.Xrc.lo|
|00006340| 63 61 6c 20 28 72 65 61 | 64 20 74 68 65 20 6d 61 |cal (rea|d the ma|
|00006350| 6e 75 61 6c 20 6f 6e 20 | 72 63 20 28 38 29 29 20 |nual on |rc (8)) |
|00006360| 73 63 72 69 70 74 2c 20 | 77 68 69 63 68 20 77 69 |script, |which wi|
|00006370| 6c 6c 20 6d 6f 6e 69 74 | 6f 72 20 66 69 6c 65 73 |ll monit|or files|
|00006380| 0a 58 62 65 69 6e 67 20 | 70 72 69 6e 74 65 64 20 |.Xbeing |printed |
|00006390| 6f 6e 20 79 6f 75 72 20 | 73 79 73 74 65 6d 2e 20 |on your |system. |
|000063a0| 20 6d 6c 70 64 20 77 69 | 6c 6c 20 6c 6f 6f 6b 20 | mlpd wi|ll look |
|000063b0| 69 6e 20 74 68 65 20 62 | 61 73 65 20 70 72 69 6e |in the b|ase prin|
|000063c0| 74 65 72 0a 58 64 69 72 | 65 63 74 6f 72 79 20 66 |ter.Xdir|ectory f|
|000063d0| 6f 72 20 66 69 6c 65 73 | 2c 20 74 72 79 20 74 6f |or files|, try to|
|000063e0| 20 66 69 6e 64 20 6a 6f | 62 73 20 74 68 61 74 20 | find jo|bs that |
|000063f0| 6e 65 65 64 20 74 6f 20 | 62 65 20 70 72 69 6e 74 |need to |be print|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.