home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / MODEM / UWPC201.ZIP / UWSERVER.TAR < prev   
Tape Archive  |  1991-01-26  |  328.0 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: Tape Archive (archive/tar).

You can browse this item here: UWSERVER.TAR

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Tape Archive (archive/tar) magic Supported
100% file tar archive default
99% file tar archive (V7), file Makefile, mode 600 , uid 11722 , gid 76400 , size 4545 , seconds 4750124461 default
98% file data default
100% siegfried x-fmt/265 Tape Archive Format default
100% lsar Tar default
100% gt2 TAR Archiv gefunden (Auflistung ist deaktiviert) default
100% disktype Pre-POSIX tar archive default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 4d 61 6b 65 66 69 6c 65 | 00 00 00 00 00 00 00 00 |Makefile|........|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000060| 00 00 00 00 20 20 20 36 | 30 30 20 00 20 31 31 37 |.... 6|00 . 117|
|00000070| 32 32 20 00 20 37 36 34 | 30 30 20 00 20 20 20 20 |22 . 764|00 . |
|00000080| 20 20 20 34 35 34 35 20 | 20 34 37 35 30 31 32 34 | 4545 | 4750124|
|00000090| 34 36 31 20 20 20 35 37 | 30 36 00 20 00 00 00 00 |461 57|06. ....|
|000000a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000100| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000120| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000200| 23 21 20 2f 62 69 6e 2f | 6d 61 6b 65 20 2d 66 0a |#! /bin/|make -f.|
|00000210| 23 0a 23 09 4d 61 6b 65 | 66 69 6c 65 20 66 6f 72 |#.#.Make|file for|
|00000220| 20 55 57 20 76 65 72 73 | 69 6f 6e 20 34 2e 32 0a | UW vers|ion 4.2.|
|00000230| 23 0a 23 20 53 70 65 63 | 69 66 79 20 56 45 52 53 |#.# Spec|ify VERS|
|00000240| 49 4f 4e 20 34 2e 33 20 | 66 6f 72 20 34 2e 33 42 |ION 4.3 |for 4.3B|
|00000250| 53 44 2c 20 34 2e 32 20 | 66 6f 72 20 34 2e 32 42 |SD, 4.2 |for 4.2B|
|00000260| 53 44 20 28 69 6e 63 6c | 75 64 69 6e 67 20 53 75 |SD (incl|uding Su|
|00000270| 6e 20 33 2e 78 29 0a 23 | 0a 23 20 44 45 46 49 4e |n 3.x).#|.# DEFIN|
|00000280| 45 53 20 69 73 20 61 20 | 6c 69 73 74 20 6f 66 20 |ES is a |list of |
|00000290| 74 68 65 20 73 69 74 65 | 2d 64 65 70 65 6e 64 65 |the site|-depende|
|000002a0| 6e 74 20 63 6f 6d 70 69 | 6c 65 2d 74 69 6d 65 20 |nt compi|le-time |
|000002b0| 6f 70 74 69 6f 6e 73 3a | 0a 23 20 09 2d 44 55 54 |options:|.# .-DUT|
|000002c0| 4d 50 09 09 61 74 74 65 | 6d 70 74 20 74 6f 20 75 |MP..atte|mpt to u|
|000002d0| 70 64 61 74 65 20 22 2f | 65 74 63 2f 75 74 6d 70 |pdate "/|etc/utmp|
|000002e0| 22 20 28 77 68 6f 29 20 | 66 69 6c 65 0a 23 20 09 |" (who) |file.# .|
|000002f0| 2d 44 56 37 54 54 59 53 | 09 56 37 2d 66 6f 72 6d |-DV7TTYS|.V7-form|
|00000300| 61 74 20 22 2f 65 74 63 | 2f 74 74 79 73 22 20 28 |at "/etc|/ttys" (|
|00000310| 70 72 65 2d 34 2e 33 42 | 53 44 29 0a 23 09 2d 44 |pre-4.3B|SD).#.-D|
|00000320| 53 45 54 4f 57 4e 5f 42 | 55 47 09 66 63 6e 74 6c |SETOWN_B|UG.fcntl|
|00000330| 28 66 64 2c 20 46 5f 53 | 45 54 4f 57 4e 2c 20 70 |(fd, F_S|ETOWN, p|
|00000340| 67 72 70 29 20 69 73 20 | 62 72 6f 6b 65 6e 20 28 |grp) is |broken (|
|00000350| 70 72 65 2d 34 2e 33 42 | 53 44 29 0a 23 09 2d 44 |pre-4.3B|SD).#.-D|
|00000360| 76 6f 69 64 3d 69 6e 74 | 09 6b 6c 75 64 67 65 20 |void=int|.kludge |
|00000370| 61 72 6f 75 6e 64 20 62 | 72 6f 6b 65 6e 20 43 20 |around b|roken C |
|00000380| 63 6f 6d 70 69 6c 65 72 | 73 0a 23 0a 23 20 55 54 |compiler|s.#.# UT|
|00000390| 4d 50 20 73 70 65 63 69 | 66 69 65 73 20 74 68 61 |MP speci|fies tha|
|000003a0| 74 20 55 57 20 73 68 6f | 75 6c 64 20 61 74 74 65 |t UW sho|uld atte|
|000003b0| 6d 70 74 20 74 6f 20 75 | 70 64 61 74 65 20 74 68 |mpt to u|pdate th|
|000003c0| 65 20 22 2f 65 74 63 2f | 75 74 6d 70 22 20 66 69 |e "/etc/|utmp" fi|
|000003d0| 6c 65 2e 0a 23 20 4f 6e | 20 73 6f 6d 65 20 28 66 |le..# On| some (f|
|000003e0| 6f 6f 6c 69 73 68 29 20 | 73 79 73 74 65 6d 73 20 |oolish) |systems |
|000003f0| 74 68 69 73 20 66 69 6c | 65 20 69 73 20 77 6f 72 |this fil|e is wor|
|00000400| 6c 64 2d 77 72 69 74 65 | 61 62 6c 65 2e 20 20 4f |ld-write|able. O|
|00000410| 74 68 65 72 0a 23 20 69 | 6e 73 74 61 6c 6c 61 74 |ther.# i|nstallat|
|00000420| 69 6f 6e 73 20 6d 61 79 | 20 77 69 73 68 20 41 46 |ions may| wish AF|
|00000430| 54 45 52 20 43 41 52 45 | 46 55 4c 20 45 58 41 4d |TER CARE|FUL EXAM|
|00000440| 49 4e 41 54 49 4f 4e 20 | 4f 46 20 54 48 45 20 49 |INATION |OF THE I|
|00000450| 53 53 55 45 53 20 74 6f | 0a 23 20 69 6e 73 74 61 |SSUES to|.# insta|
|00000460| 6c 6c 20 74 68 65 20 55 | 57 20 73 65 72 76 65 72 |ll the U|W server|
|00000470| 20 77 69 74 68 20 67 72 | 6f 75 70 20 77 72 69 74 | with gr|oup writ|
|00000480| 65 20 61 63 63 65 73 73 | 20 74 6f 20 74 68 65 20 |e access| to the |
|00000490| 75 74 6d 70 20 66 69 6c | 65 2e 0a 23 0a 23 20 56 |utmp fil|e..#.# V|
|000004a0| 37 54 54 59 53 20 73 68 | 6f 75 6c 64 20 62 65 20 |7TTYS sh|ould be |
|000004b0| 75 73 65 64 20 66 6f 72 | 20 56 37 2d 64 65 72 69 |used for| V7-deri|
|000004c0| 76 65 64 20 73 79 73 74 | 65 6d 73 20 74 68 61 74 |ved syst|ems that|
|000004d0| 20 64 6f 20 6e 6f 74 20 | 68 61 76 65 20 34 2e 33 | do not |have 4.3|
|000004e0| 42 53 44 27 73 0a 23 20 | 22 2f 65 74 63 2f 74 74 |BSD's.# |"/etc/tt|
|000004f0| 79 73 22 20 66 69 6c 65 | 2e 20 20 54 68 69 73 20 |ys" file|. This |
|00000500| 69 6e 63 6c 75 64 65 73 | 20 34 2e 32 42 53 44 20 |includes| 4.2BSD |
|00000510| 61 6e 64 20 53 75 6e 20 | 55 4e 49 58 2e 20 20 54 |and Sun |UNIX. T|
|00000520| 68 65 72 65 20 69 73 20 | 6e 6f 0a 23 20 73 75 70 |here is |no.# sup|
|00000530| 70 6f 72 74 20 66 6f 72 | 20 55 53 47 27 73 20 22 |port for| USG's "|
|00000540| 2f 65 74 63 2f 69 6e 69 | 74 74 61 62 22 2e 0a 23 |/etc/ini|ttab"..#|
|00000550| 0a 23 20 53 45 54 4f 57 | 4e 5f 42 55 47 20 73 68 |.# SETOW|N_BUG sh|
|00000560| 6f 75 6c 64 20 62 65 20 | 64 65 66 69 6e 65 64 20 |ould be |defined |
|00000570| 69 66 20 74 68 65 20 66 | 63 6e 74 6c 28 66 64 2c |if the f|cntl(fd,|
|00000580| 20 46 5f 53 45 54 4f 57 | 4e 2c 20 70 67 72 70 29 | F_SETOW|N, pgrp)|
|00000590| 20 73 79 73 74 65 6d 0a | 23 20 63 61 6c 6c 20 69 | system.|# call i|
|000005a0| 73 20 62 72 6f 6b 65 6e | 20 28 61 73 20 69 74 20 |s broken| (as it |
|000005b0| 69 73 20 69 6e 20 34 2e | 32 42 53 44 20 61 6e 64 |is in 4.|2BSD and|
|000005c0| 20 53 75 6e 20 33 2e 30 | 20 55 4e 49 58 29 2e 20 | Sun 3.0| UNIX). |
|000005d0| 20 4f 6e 20 74 68 6f 73 | 65 0a 23 20 6d 61 63 68 | On thos|e.# mach|
|000005e0| 69 6e 65 73 20 74 68 65 | 20 74 68 69 72 64 20 61 |ines the| third a|
|000005f0| 72 67 75 6d 65 6e 74 20 | 6d 75 73 74 20 62 65 20 |rgument |must be |
|00000600| 6e 65 67 61 74 69 76 65 | 20 74 6f 20 73 70 65 63 |negative| to spec|
|00000610| 69 66 79 20 61 20 70 72 | 6f 63 65 73 73 20 49 44 |ify a pr|ocess ID|
|00000620| 0a 23 20 61 6e 64 20 70 | 6f 73 69 74 69 76 65 20 |.# and p|ositive |
|00000630| 74 6f 20 73 70 65 63 69 | 66 79 20 61 20 70 72 6f |to speci|fy a pro|
|00000640| 63 65 73 73 20 67 72 6f | 75 70 2e 0a 23 0a 23 20 |cess gro|up..#.# |
|00000650| 53 6f 6d 65 20 43 20 63 | 6f 6d 70 69 6c 65 72 73 |Some C c|ompilers|
|00000660| 20 64 6f 20 6e 6f 74 20 | 75 6e 64 65 72 73 74 61 | do not |understa|
|00000670| 6e 64 20 70 6f 69 6e 74 | 65 72 73 20 74 6f 20 76 |nd point|ers to v|
|00000680| 6f 69 64 20 66 75 6e 63 | 74 69 6f 6e 73 2e 20 20 |oid func|tions. |
|00000690| 54 68 65 0a 23 20 63 6f | 6d 6d 6f 6e 20 6b 6c 75 |The.# co|mmon klu|
|000006a0| 64 67 65 20 61 72 6f 75 | 6e 64 20 74 68 69 73 20 |dge arou|nd this |
|000006b0| 70 72 6f 62 6c 65 6d 20 | 69 73 20 74 6f 20 73 75 |problem |is to su|
|000006c0| 62 73 74 69 74 75 74 65 | 20 22 69 6e 74 22 20 66 |bstitute| "int" f|
|000006d0| 6f 72 20 22 76 6f 69 64 | 22 0a 23 20 65 76 65 72 |or "void|".# ever|
|000006e0| 79 77 68 65 72 65 2e 20 | 20 22 6c 69 6e 74 22 20 |ywhere. | "lint" |
|000006f0| 64 6f 65 73 6e 27 74 20 | 6c 69 6b 65 20 74 68 69 |doesn't |like thi|
|00000700| 73 2c 20 62 75 74 20 74 | 68 65 20 70 72 6f 67 72 |s, but t|he progr|
|00000710| 61 6d 20 77 69 6c 6c 20 | 63 6f 6d 70 69 6c 65 0a |am will |compile.|
|00000720| 23 20 69 6e 74 6f 20 77 | 6f 72 6b 69 6e 67 20 63 |# into w|orking c|
|00000730| 6f 64 65 2e 0a 23 0a 42 | 49 4e 44 49 52 09 3d 09 |ode..#.B|INDIR.=.|
|00000740| 2f 75 73 72 2f 6c 6f 63 | 61 6c 2f 62 69 6e 0a 49 |/usr/loc|al/bin.I|
|00000750| 4e 43 44 49 52 09 3d 09 | 2f 75 73 72 2f 69 6e 63 |NCDIR.=.|/usr/inc|
|00000760| 6c 75 64 65 2f 75 77 0a | 4c 49 42 44 49 52 09 3d |lude/uw.|LIBDIR.=|
|00000770| 09 2f 75 73 72 2f 6c 6f | 63 61 6c 2f 6c 69 62 0a |./usr/lo|cal/lib.|
|00000780| 56 45 52 53 49 4f 4e 09 | 3d 09 34 2e 33 0a 0a 44 |VERSION.|=.4.3..D|
|00000790| 45 46 49 4e 45 53 09 3d | 09 2d 44 55 54 4d 50 0a |EFINES.=|.-DUTMP.|
|000007a0| 0a 4d 4b 46 49 4c 45 53 | 09 3d 09 73 65 72 76 65 |.MKFILES|.=.serve|
|000007b0| 72 2f 4d 61 6b 65 66 69 | 6c 65 20 6c 69 62 2f 4d |r/Makefi|le lib/M|
|000007c0| 61 6b 65 66 69 6c 65 20 | 75 74 69 6c 69 74 79 2f |akefile |utility/|
|000007d0| 4d 61 6b 65 66 69 6c 65 | 0a 0a 61 6c 6c 3a 09 44 |Makefile|..all:.D|
|000007e0| 45 46 49 4e 45 53 20 24 | 28 4d 4b 46 49 4c 45 53 |EFINES $|(MKFILES|
|000007f0| 29 0a 09 63 64 20 73 65 | 72 76 65 72 3b 20 6d 61 |)..cd se|rver; ma|
|00000800| 6b 65 0a 09 63 64 20 6c | 69 62 3b 20 6d 61 6b 65 |ke..cd l|ib; make|
|00000810| 0a 09 63 64 20 75 74 69 | 6c 69 74 79 3b 20 6d 61 |..cd uti|lity; ma|
|00000820| 6b 65 0a 0a 64 65 70 65 | 6e 64 3a 0a 09 63 64 20 |ke..depe|nd:..cd |
|00000830| 73 65 72 76 65 72 3b 20 | 6d 61 6b 65 20 64 65 70 |server; |make dep|
|00000840| 65 6e 64 0a 09 63 64 20 | 6c 69 62 3b 20 6d 61 6b |end..cd |lib; mak|
|00000850| 65 20 64 65 70 65 6e 64 | 0a 09 63 64 20 75 74 69 |e depend|..cd uti|
|00000860| 6c 69 74 79 3b 20 6d 61 | 6b 65 20 64 65 70 65 6e |lity; ma|ke depen|
|00000870| 64 0a 0a 69 6e 73 74 61 | 6c 6c 3a 09 61 6c 6c 0a |d..insta|ll:.all.|
|00000880| 09 6c 6e 20 2d 73 20 60 | 70 77 64 60 2f 68 20 24 |.ln -s `|pwd`/h $|
|00000890| 28 49 4e 43 44 49 52 29 | 0a 09 69 6e 73 74 61 6c |(INCDIR)|..instal|
|000008a0| 6c 20 2d 73 20 73 65 72 | 76 65 72 2f 75 77 20 24 |l -s ser|ver/uw $|
|000008b0| 28 42 49 4e 44 49 52 29 | 2f 75 77 0a 09 69 6e 73 |(BINDIR)|/uw..ins|
|000008c0| 74 61 6c 6c 20 2d 73 20 | 75 74 69 6c 69 74 79 2f |tall -s |utility/|
|000008d0| 75 77 74 6f 6f 6c 20 24 | 28 42 49 4e 44 49 52 29 |uwtool $|(BINDIR)|
|000008e0| 2f 75 77 74 6f 6f 6c 0a | 09 69 6e 73 74 61 6c 6c |/uwtool.|.install|
|000008f0| 20 2d 73 20 75 74 69 6c | 69 74 79 2f 75 77 74 69 | -s util|ity/uwti|
|00000900| 74 6c 65 20 24 28 42 49 | 4e 44 49 52 29 2f 75 77 |tle $(BI|NDIR)/uw|
|00000910| 74 69 74 6c 65 0a 09 69 | 6e 73 74 61 6c 6c 20 2d |title..i|nstall -|
|00000920| 73 20 75 74 69 6c 69 74 | 79 2f 75 77 74 65 72 6d |s utilit|y/uwterm|
|00000930| 20 24 28 42 49 4e 44 49 | 52 29 2f 75 77 74 65 72 | $(BINDI|R)/uwter|
|00000940| 6d 0a 09 69 6e 73 74 61 | 6c 6c 20 2d 73 20 75 74 |m..insta|ll -s ut|
|00000950| 69 6c 69 74 79 2f 75 77 | 70 6c 6f 74 20 24 28 42 |ility/uw|plot $(B|
|00000960| 49 4e 44 49 52 29 2f 75 | 77 70 6c 6f 74 0a 09 63 |INDIR)/u|wplot..c|
|00000970| 70 20 6c 69 62 2f 6c 69 | 62 75 77 2e 61 20 24 28 |p lib/li|buw.a $(|
|00000980| 4c 49 42 44 49 52 29 3b | 20 72 61 6e 6c 69 62 20 |LIBDIR);| ranlib |
|00000990| 24 28 4c 49 42 44 49 52 | 29 2f 6c 69 62 75 77 2e |$(LIBDIR|)/libuw.|
|000009a0| 61 0a 0a 63 6c 65 61 6e | 3a 0a 09 63 64 20 73 65 |a..clean|:..cd se|
|000009b0| 72 76 65 72 3b 20 6d 61 | 6b 65 20 63 6c 65 61 6e |rver; ma|ke clean|
|000009c0| 0a 09 63 64 20 6c 69 62 | 3b 20 6d 61 6b 65 20 63 |..cd lib|; make c|
|000009d0| 6c 65 61 6e 0a 09 63 64 | 20 75 74 69 6c 69 74 79 |lean..cd| utility|
|000009e0| 3b 20 6d 61 6b 65 20 63 | 6c 65 61 6e 0a 0a 44 45 |; make c|lean..DE|
|000009f0| 46 49 4e 45 53 3a 09 4d | 61 6b 65 66 69 6c 65 0a |FINES:.M|akefile.|
|00000a00| 09 65 63 68 6f 20 22 22 | 20 24 28 44 45 46 49 4e |.echo ""| $(DEFIN|
|00000a10| 45 53 29 20 3e 20 44 45 | 46 49 4e 45 53 0a 0a 73 |ES) > DE|FINES..s|
|00000a20| 65 72 76 65 72 2f 4d 61 | 6b 65 66 69 6c 65 3a 09 |erver/Ma|kefile:.|
|00000a30| 4d 61 6b 65 66 69 6c 65 | 20 73 65 72 76 65 72 2f |Makefile| server/|
|00000a40| 4d 61 6b 65 66 69 6c 65 | 5f 24 28 56 45 52 53 49 |Makefile|_$(VERSI|
|00000a50| 4f 4e 29 0a 09 63 64 20 | 73 65 72 76 65 72 3b 20 |ON)..cd |server; |
|00000a60| 63 70 20 4d 61 6b 65 66 | 69 6c 65 5f 24 28 56 45 |cp Makef|ile_$(VE|
|00000a70| 52 53 49 4f 4e 29 20 4d | 61 6b 65 66 69 6c 65 3b |RSION) M|akefile;|
|00000a80| 20 6d 61 6b 65 20 64 65 | 70 65 6e 64 0a 0a 6c 69 | make de|pend..li|
|00000a90| 62 2f 4d 61 6b 65 66 69 | 6c 65 3a 09 4d 61 6b 65 |b/Makefi|le:.Make|
|00000aa0| 66 69 6c 65 20 6c 69 62 | 2f 4d 61 6b 65 66 69 6c |file lib|/Makefil|
|00000ab0| 65 5f 24 28 56 45 52 53 | 49 4f 4e 29 0a 09 63 64 |e_$(VERS|ION)..cd|
|00000ac0| 20 6c 69 62 3b 20 63 70 | 20 4d 61 6b 65 66 69 6c | lib; cp| Makefil|
|00000ad0| 65 5f 24 28 56 45 52 53 | 49 4f 4e 29 20 4d 61 6b |e_$(VERS|ION) Mak|
|00000ae0| 65 66 69 6c 65 3b 20 6d | 61 6b 65 20 64 65 70 65 |efile; m|ake depe|
|00000af0| 6e 64 0a 0a 75 74 69 6c | 69 74 79 2f 4d 61 6b 65 |nd..util|ity/Make|
|00000b00| 66 69 6c 65 3a 09 4d 61 | 6b 65 66 69 6c 65 20 75 |file:.Ma|kefile u|
|00000b10| 74 69 6c 69 74 79 2f 4d | 61 6b 65 66 69 6c 65 5f |tility/M|akefile_|
|00000b20| 24 28 56 45 52 53 49 4f | 4e 29 0a 09 63 64 20 75 |$(VERSIO|N)..cd u|
|00000b30| 74 69 6c 69 74 79 3b 20 | 63 70 20 4d 61 6b 65 66 |tility; |cp Makef|
|00000b40| 69 6c 65 5f 24 28 56 45 | 52 53 49 4f 4e 29 20 4d |ile_$(VE|RSION) M|
|00000b50| 61 6b 65 66 69 6c 65 3b | 20 6d 61 6b 65 20 64 65 |akefile;| make de|
|00000b60| 70 65 6e 64 0a 00 00 00 | 00 00 00 00 00 00 00 00 |pend....|........|
|00000b70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ba0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000bb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000bc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000bd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000be0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000bf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000c00| 52 45 41 44 4d 45 00 00 | 00 00 00 00 00 00 00 00 |README..|........|
|00000c10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000c20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000c30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000c40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000c50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000c60| 00 00 00 00 20 20 20 36 | 30 30 20 00 20 31 31 37 |.... 6|00 . 117|
|00000c70| 32 32 20 00 20 37 36 34 | 30 30 20 00 20 20 20 20 |22 . 764|00 . |
|00000c80| 20 20 20 37 36 34 33 20 | 20 34 37 35 30 31 32 34 | 7643 | 4750124|
|00000c90| 32 31 32 20 20 20 35 31 | 32 32 00 20 00 00 00 00 |212 51|22. ....|
|00000ca0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000cb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000cc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000cd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ce0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000cf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000da0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000db0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000dc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000dd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000de0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000df0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e00| 09 09 09 20 20 20 20 55 | 57 20 56 65 72 73 69 6f |... U|W Versio|
|00000e10| 6e 20 34 2e 32 0a 09 09 | 09 20 20 20 20 33 31 20 |n 4.2...|. 31 |
|00000e20| 4a 61 6e 75 61 72 79 20 | 31 39 38 38 0a 0a 54 68 |January |1988..Th|
|00000e30| 69 73 20 69 73 20 76 65 | 72 73 69 6f 6e 20 34 2e |is is ve|rsion 4.|
|00000e40| 32 20 6f 66 20 55 57 2c | 20 61 20 6d 75 6c 74 69 |2 of UW,| a multi|
|00000e50| 70 6c 65 2d 77 69 6e 64 | 6f 77 20 69 6e 74 65 72 |ple-wind|ow inter|
|00000e60| 66 61 63 65 20 74 6f 20 | 55 4e 49 58 20 66 6f 72 |face to |UNIX for|
|00000e70| 0a 74 68 65 20 4d 61 63 | 69 6e 74 6f 73 68 20 63 |.the Mac|intosh c|
|00000e80| 6f 6d 70 75 74 65 72 2e | 20 20 54 68 65 20 64 69 |omputer.| The di|
|00000e90| 73 74 72 69 62 75 74 69 | 6f 6e 20 66 6f 72 20 55 |stributi|on for U|
|00000ea0| 57 20 63 6f 6e 73 69 73 | 74 73 20 6f 66 20 74 77 |W consis|ts of tw|
|00000eb0| 6f 0a 62 69 6e 61 72 79 | 20 66 69 6c 65 73 20 66 |o.binary| files f|
|00000ec0| 6f 72 20 74 68 65 20 4d | 61 63 69 6e 74 6f 73 68 |or the M|acintosh|
|00000ed0| 20 28 69 6e 20 42 69 6e | 48 65 78 20 34 2e 30 20 | (in Bin|Hex 4.0 |
|00000ee0| 66 6f 72 6d 61 74 29 20 | 61 6e 64 20 61 20 6e 75 |format) |and a nu|
|00000ef0| 6d 62 65 72 0a 6f 66 20 | 73 6f 75 72 63 65 20 66 |mber.of |source f|
|00000f00| 69 6c 65 73 20 66 6f 72 | 20 74 68 65 20 28 42 53 |iles for| the (BS|
|00000f10| 44 29 20 55 4e 49 58 20 | 73 65 72 76 65 72 2e 0a |D) UNIX |server..|
|00000f20| 0a 54 68 65 20 64 69 73 | 74 72 69 62 75 74 69 6f |.The dis|tributio|
|00000f30| 6e 20 69 6e 63 6c 75 64 | 65 73 20 74 68 65 20 66 |n includ|es the f|
|00000f40| 6f 6c 6c 6f 77 69 6e 67 | 20 64 69 72 65 63 74 6f |ollowing| directo|
|00000f50| 72 69 65 73 3a 0a 0a 09 | 68 09 2d 20 61 6c 6c 20 |ries:...|h.- all |
|00000f60| 55 57 20 69 6e 63 6c 75 | 64 65 20 66 69 6c 65 73 |UW inclu|de files|
|00000f70| 0a 09 73 65 72 76 65 72 | 09 2d 20 73 6f 75 72 63 |..server|.- sourc|
|00000f80| 65 20 63 6f 64 65 20 66 | 6f 72 20 74 68 65 20 55 |e code f|or the U|
|00000f90| 57 20 73 65 72 76 65 72 | 0a 09 6c 69 62 09 2d 20 |W server|..lib.- |
|00000fa0| 73 6f 75 72 63 65 20 63 | 6f 64 65 20 66 6f 72 20 |source c|ode for |
|00000fb0| 74 68 65 20 55 57 20 70 | 72 6f 67 72 61 6d 6d 65 |the UW p|rogramme|
|00000fc0| 72 27 73 20 6c 69 62 72 | 61 72 79 0a 09 75 74 69 |r's libr|ary..uti|
|00000fd0| 6c 69 74 79 09 2d 20 73 | 6f 75 72 63 65 20 63 6f |lity.- s|ource co|
|00000fe0| 64 65 20 66 6f 72 20 6d | 69 73 63 65 6c 6c 61 6e |de for m|iscellan|
|00000ff0| 65 6f 75 73 20 75 74 69 | 6c 69 74 79 20 70 72 6f |eous uti|lity pro|
|00001000| 67 72 61 6d 73 0a 09 64 | 6f 63 09 2d 20 5b 6e 74 |grams..d|oc.- [nt|
|00001010| 5d 72 6f 66 66 20 64 6f | 63 75 6d 65 6e 74 61 74 |]roff do|cumentat|
|00001020| 69 6f 6e 20 28 2d 6d 73 | 20 61 6e 64 20 2d 6d 61 |ion (-ms| and -ma|
|00001030| 6e 20 66 6f 72 6d 61 74 | 73 29 0a 09 68 71 78 09 |n format|s)..hqx.|
|00001040| 2d 20 4d 61 63 69 6e 74 | 6f 73 68 20 62 69 6e 61 |- Macint|osh bina|
|00001050| 72 79 20 66 69 6c 65 73 | 0a 09 6d 69 73 63 09 2d |ry files|..misc.-|
|00001060| 20 6f 74 68 65 72 20 74 | 68 69 6e 67 73 20 6f 66 | other t|hings of|
|00001070| 20 70 6f 73 73 69 62 6c | 65 20 69 6e 74 65 72 65 | possibl|e intere|
|00001080| 73 74 0a 0a 54 68 65 20 | 74 77 6f 20 4d 61 63 69 |st..The |two Maci|
|00001090| 6e 74 6f 73 68 20 66 69 | 6c 65 73 20 61 72 65 20 |ntosh fi|les are |
|000010a0| 22 75 77 2e 68 71 78 22 | 2c 20 77 68 69 63 68 20 |"uw.hqx"|, which |
|000010b0| 69 73 20 74 68 65 20 65 | 78 65 63 75 74 61 62 6c |is the e|xecutabl|
|000010c0| 65 20 62 69 6e 61 72 79 | 0a 61 6e 64 20 22 75 77 |e binary|.and "uw|
|000010d0| 2e 64 6f 63 2e 68 71 78 | 22 2c 20 77 68 69 63 68 |.doc.hqx|", which|
|000010e0| 20 69 73 20 61 20 4d 61 | 63 57 72 69 74 65 2d 66 | is a Ma|cWrite-f|
|000010f0| 6f 72 6d 61 74 20 64 6f | 63 75 6d 65 6e 74 20 64 |ormat do|cument d|
|00001100| 65 73 63 72 69 62 69 6e | 67 20 74 68 65 0a 4d 61 |escribin|g the.Ma|
|00001110| 63 69 6e 74 6f 73 68 20 | 75 73 65 72 20 69 6e 74 |cintosh |user int|
|00001120| 65 72 66 61 63 65 2e 0a | 0a 55 57 20 77 61 73 20 |erface..|.UW was |
|00001130| 64 65 76 65 6c 6f 70 65 | 64 20 61 6c 74 65 72 6e |develope|d altern|
|00001140| 61 74 65 6c 79 20 6f 6e | 20 61 20 53 75 6e 20 33 |ately on| a Sun 3|
|00001150| 20 61 6e 64 20 34 2e 33 | 42 53 44 20 56 41 58 2e | and 4.3|BSD VAX.|
|00001160| 20 20 49 74 20 61 6c 73 | 6f 0a 68 61 73 20 62 65 | It als|o.has be|
|00001170| 65 6e 20 74 65 73 74 65 | 64 20 28 6d 6f 72 65 20 |en teste|d (more |
|00001180| 62 72 69 65 66 6c 79 29 | 20 6f 6e 20 61 20 53 75 |briefly)| on a Su|
|00001190| 6e 20 32 20 28 72 65 6c | 65 61 73 65 20 32 2e 30 |n 2 (rel|ease 2.0|
|000011a0| 29 2c 20 49 6e 74 65 67 | 72 61 74 65 64 0a 53 6f |), Integ|rated.So|
|000011b0| 6c 75 74 69 6f 6e 73 20 | 56 4d 45 20 36 38 30 32 |lutions |VME 6802|
|000011c0| 30 20 28 72 65 6c 65 61 | 73 65 20 33 2e 30 35 29 |0 (relea|se 3.05)|
|000011d0| 2c 20 61 6e 64 20 61 20 | 50 79 72 61 6d 69 64 2e |, and a |Pyramid.|
|000011e0| 20 49 74 20 64 65 70 65 | 6e 64 73 20 71 75 69 74 | It depe|nds quit|
|000011f0| 65 20 61 0a 62 69 74 20 | 75 70 6f 6e 20 42 53 44 |e a.bit |upon BSD|
|00001200| 2d 73 70 65 63 69 66 69 | 63 20 66 65 61 74 75 72 |-specifi|c featur|
|00001210| 65 73 20 73 75 63 68 20 | 61 73 20 69 6e 74 65 72 |es such |as inter|
|00001220| 70 72 6f 63 65 73 73 20 | 63 6f 6d 6d 75 6e 69 63 |process |communic|
|00001230| 61 74 69 6f 6e 20 61 6e | 64 0a 77 69 6c 6c 20 6e |ation an|d.will n|
|00001240| 6f 74 20 72 75 6e 20 77 | 69 74 68 6f 75 74 20 6d |ot run w|ithout m|
|00001250| 6f 64 69 66 69 63 61 74 | 69 6f 6e 20 6f 6e 20 61 |odificat|ion on a|
|00001260| 20 53 79 73 74 65 6d 20 | 56 20 55 4e 49 58 20 73 | System |V UNIX s|
|00001270| 79 73 74 65 6d 2e 0a 0a | 54 68 69 73 20 64 69 73 |ystem...|This dis|
|00001280| 74 72 69 62 75 74 69 6f | 6e 2c 20 6c 69 6b 65 20 |tributio|n, like |
|00001290| 74 68 65 20 76 65 72 73 | 69 6f 6e 20 33 2e 34 20 |the vers|ion 3.4 |
|000012a0| 64 69 73 74 72 69 62 75 | 74 69 6f 6e 2c 20 69 6e |distribu|tion, in|
|000012b0| 63 6c 75 64 65 73 0a 6d | 61 6b 65 20 66 69 6c 65 |cludes.m|ake file|
|000012c0| 73 20 66 6f 72 20 62 6f | 74 68 20 34 2e 32 42 53 |s for bo|th 4.2BS|
|000012d0| 44 20 61 6e 64 20 34 2e | 33 42 53 44 2e 20 20 54 |D and 4.|3BSD. T|
|000012e0| 68 65 20 63 68 6f 69 63 | 65 20 6f 66 20 6d 61 6b |he choic|e of mak|
|000012f0| 65 20 66 69 6c 65 73 0a | 61 6e 64 20 6f 74 68 65 |e files.|and othe|
|00001300| 72 20 63 6f 6e 66 69 67 | 75 72 61 74 69 6f 6e 20 |r config|uration |
|00001310| 6f 70 74 69 6f 6e 73 20 | 69 73 20 64 65 74 65 72 |options |is deter|
|00001320| 6d 69 6e 65 64 20 62 79 | 20 74 68 65 20 74 6f 70 |mined by| the top|
|00001330| 2d 6c 65 76 65 6c 0a 22 | 4d 61 6b 65 66 69 6c 65 |-level."|Makefile|
|00001340| 22 2e 20 20 43 6f 6d 6d | 65 6e 74 73 20 69 6e 20 |". Comm|ents in |
|00001350| 74 68 61 74 20 66 69 6c | 65 20 64 65 73 63 72 69 |that fil|e descri|
|00001360| 62 65 20 74 68 65 20 63 | 6f 6e 66 69 67 75 72 61 |be the c|onfigura|
|00001370| 74 69 6f 6e 20 6f 70 74 | 69 6f 6e 73 2e 0a 0a 41 |tion opt|ions...A|
|00001380| 20 22 6d 61 6b 65 20 69 | 6e 73 74 61 6c 6c 22 20 | "make i|nstall" |
|00001390| 69 6e 20 74 68 65 20 74 | 6f 70 2d 6c 65 76 65 6c |in the t|op-level|
|000013a0| 20 64 69 72 65 63 74 6f | 72 79 20 77 69 6c 6c 20 | directo|ry will |
|000013b0| 63 6f 6d 70 69 6c 65 20 | 61 6e 64 20 69 6e 73 74 |compile |and inst|
|000013c0| 61 6c 6c 0a 61 6c 6c 20 | 6f 66 20 74 68 65 20 28 |all.all |of the (|
|000013d0| 55 4e 49 58 29 20 70 69 | 65 63 65 73 20 6f 66 20 |UNIX) pi|eces of |
|000013e0| 74 68 65 20 55 57 20 64 | 69 73 74 72 69 62 75 74 |the UW d|istribut|
|000013f0| 69 6f 6e 2e 20 20 41 73 | 20 64 69 73 74 72 69 62 |ion. As| distrib|
|00001400| 75 74 65 64 2c 0a 74 68 | 69 73 20 77 69 6c 6c 20 |uted,.th|is will |
|00001410| 63 72 65 61 74 65 20 61 | 20 6c 69 6e 6b 20 62 65 |create a| link be|
|00001420| 74 77 65 65 6e 20 74 68 | 65 20 64 69 72 65 63 74 |tween th|e direct|
|00001430| 6f 72 79 20 6e 61 6d 65 | 20 22 2f 75 73 72 2f 69 |ory name| "/usr/i|
|00001440| 6e 63 6c 75 64 65 2f 75 | 77 22 0a 61 6e 64 20 74 |nclude/u|w".and t|
|00001450| 68 65 20 22 68 22 20 73 | 75 62 64 69 72 65 63 74 |he "h" s|ubdirect|
|00001460| 6f 72 79 20 61 6e 64 20 | 77 69 6c 6c 20 63 72 65 |ory and |will cre|
|00001470| 61 74 65 20 61 20 22 2f | 75 73 72 2f 6c 6f 63 61 |ate a "/|usr/loca|
|00001480| 6c 2f 62 69 6e 2f 6c 69 | 62 75 77 2e 61 22 0a 6c |l/bin/li|buw.a".l|
|00001490| 69 62 72 61 72 79 20 66 | 69 6c 65 2e 20 20 54 68 |ibrary f|ile. Th|
|000014a0| 65 73 65 20 74 77 6f 20 | 73 74 65 70 73 20 61 6c |ese two |steps al|
|000014b0| 6c 6f 77 20 61 70 70 6c | 69 63 61 74 69 6f 6e 20 |low appl|ication |
|000014c0| 70 72 6f 67 72 61 6d 20 | 74 6f 20 75 73 65 0a 09 |program |to use..|
|000014d0| 23 69 6e 63 6c 75 64 65 | 20 3c 75 77 2f 75 77 6c |#include| <uw/uwl|
|000014e0| 69 62 2e 68 3e 0a 61 6e | 64 0a 09 63 63 20 2d 6f |ib.h>.an|d..cc -o|
|000014f0| 20 78 79 7a 7a 79 20 78 | 79 7a 7a 79 2e 6f 20 2d | xyzzy x|yzzy.o -|
|00001500| 6c 75 77 0a 66 6f 72 20 | 67 72 65 61 74 65 72 20 |luw.for |greater |
|00001510| 63 6f 6e 76 65 6e 69 65 | 6e 63 65 20 69 6e 20 63 |convenie|nce in c|
|00001520| 72 65 61 74 69 6e 67 20 | 70 72 6f 67 72 61 6d 73 |reating |programs|
|00001530| 20 74 68 61 74 20 75 73 | 65 20 74 68 65 20 55 57 | that us|e the UW|
|00001540| 20 6c 69 62 72 61 72 79 | 2e 0a 0a 49 66 20 79 6f | library|...If yo|
|00001550| 75 20 64 6f 20 6e 6f 74 | 20 68 61 76 65 20 74 68 |u do not| have th|
|00001560| 65 20 22 67 65 74 6f 70 | 74 22 20 6c 69 62 72 61 |e "getop|t" libra|
|00001570| 72 79 20 72 6f 75 74 69 | 6e 65 2c 20 79 6f 75 20 |ry routi|ne, you |
|00001580| 77 69 6c 6c 20 66 69 6e | 64 20 74 68 65 0a 73 6f |will fin|d the.so|
|00001590| 75 72 63 65 20 69 6e 20 | 22 6d 69 73 63 2f 67 65 |urce in |"misc/ge|
|000015a0| 74 6f 70 74 2e 63 22 20 | 20 54 68 69 73 20 73 6f |topt.c" | This so|
|000015b0| 75 72 63 65 20 63 6f 64 | 65 20 77 61 73 20 70 75 |urce cod|e was pu|
|000015c0| 62 6c 69 63 6c 79 20 64 | 69 73 74 72 69 62 75 74 |blicly d|istribut|
|000015d0| 65 64 20 62 79 0a 41 54 | 26 54 20 61 6e 64 20 69 |ed by.AT|&T and i|
|000015e0| 73 20 61 6c 73 6f 20 61 | 76 61 69 6c 61 62 6c 65 |s also a|vailable|
|000015f0| 20 69 6e 20 74 68 65 20 | 22 6d 6f 64 2e 73 6f 75 | in the |"mod.sou|
|00001600| 72 63 65 73 22 20 61 72 | 63 68 69 76 65 2e 20 20 |rces" ar|chive. |
|00001610| 59 6f 75 20 73 68 6f 75 | 6c 64 0a 63 6f 6d 70 69 |You shou|ld.compi|
|00001620| 6c 65 20 69 74 20 61 6e | 64 20 69 6e 73 74 61 6c |le it an|d instal|
|00001630| 6c 20 69 74 20 69 6e 20 | 79 6f 75 72 20 6d 61 63 |l it in |your mac|
|00001640| 68 69 6e 65 27 73 20 22 | 2f 6c 69 62 2f 6c 69 62 |hine's "|/lib/lib|
|00001650| 63 2e 61 22 20 20 28 4e | 6f 74 65 20 74 68 61 74 |c.a" (N|ote that|
|00001660| 0a 73 69 6e 63 65 20 69 | 74 20 75 73 65 73 20 22 |.since i|t uses "|
|00001670| 73 74 72 63 68 72 22 2c | 20 79 6f 75 20 73 68 6f |strchr",| you sho|
|00001680| 75 6c 64 20 63 6f 6d 70 | 69 6c 65 20 69 74 20 6f |uld comp|ile it o|
|00001690| 6e 20 61 20 42 53 44 20 | 73 79 73 74 65 6d 20 77 |n a BSD |system w|
|000016a0| 69 74 68 20 74 68 65 0a | 63 6f 6d 6d 61 6e 64 20 |ith the.|command |
|000016b0| 22 63 63 20 2d 4f 20 2d | 63 20 67 65 74 6f 70 74 |"cc -O -|c getopt|
|000016c0| 2e 63 20 2d 44 73 74 72 | 63 68 72 3d 69 6e 64 65 |.c -Dstr|chr=inde|
|000016d0| 78 22 2e 29 20 20 5b 53 | 6f 72 72 79 2c 20 49 20 |x".) [S|orry, I |
|000016e0| 63 61 6e 27 74 20 66 69 | 6e 64 20 61 0a 6d 61 6e |can't fi|nd a.man|
|000016f0| 75 61 6c 20 70 61 67 65 | 20 77 68 69 63 68 20 49 |ual page| which I|
|00001700| 20 63 61 6e 20 28 6c 65 | 67 61 6c 6c 79 29 20 69 | can (le|gally) i|
|00001710| 6e 63 6c 75 64 65 2e 5d | 20 20 49 66 20 79 6f 75 |nclude.]| If you|
|00001720| 20 63 61 6e 27 74 20 63 | 68 61 6e 67 65 0a 22 6c | can't c|hange."l|
|00001730| 69 62 63 2e 61 22 2c 20 | 74 68 65 6e 20 79 6f 75 |ibc.a", |then you|
|00001740| 20 73 68 6f 75 6c 64 20 | 61 64 64 20 69 74 20 74 | should |add it t|
|00001750| 6f 20 74 68 65 20 6d 61 | 6b 65 66 69 6c 65 73 20 |o the ma|kefiles |
|00001760| 69 6e 20 74 68 65 20 22 | 73 65 72 76 65 72 22 0a |in the "|server".|
|00001770| 61 6e 64 20 22 6c 69 62 | 22 20 64 69 72 65 63 74 |and "lib|" direct|
|00001780| 6f 72 69 65 73 2e 0a 0a | 56 65 72 73 69 6f 6e 20 |ories...|Version |
|00001790| 34 2e 32 20 69 73 20 70 | 72 69 6d 61 72 69 6c 79 |4.2 is p|rimarily|
|000017a0| 20 61 20 6d 61 69 6e 74 | 65 6e 61 6e 63 65 20 72 | a maint|enance r|
|000017b0| 65 6c 65 61 73 65 2e 20 | 20 42 65 63 61 75 73 65 |elease. | Because|
|000017c0| 20 6f 66 20 63 6f 6e 73 | 74 72 61 69 6e 74 73 0a | of cons|traints.|
|000017d0| 6f 6e 20 74 68 65 20 61 | 75 74 68 6f 72 27 73 20 |on the a|uthor's |
|000017e0| 74 69 6d 65 2c 20 66 65 | 77 20 74 68 69 6e 67 73 |time, fe|w things|
|000017f0| 20 68 61 76 65 20 63 68 | 61 6e 67 65 64 20 73 69 | have ch|anged si|
|00001800| 6e 63 65 20 76 65 72 73 | 69 6f 6e 20 34 2e 31 2e |nce vers|ion 4.1.|
|00001810| 20 20 53 6f 6d 65 0a 6f | 66 20 74 68 65 20 64 69 | Some.o|f the di|
|00001820| 66 66 65 72 65 6e 63 65 | 73 20 61 72 65 3a 0a 0a |fference|s are:..|
|00001830| 20 20 20 20 31 29 09 55 | 57 20 76 34 2e 32 20 69 | 1).U|W v4.2 i|
|00001840| 73 20 63 6f 6d 70 61 74 | 69 62 6c 65 20 77 69 74 |s compat|ible wit|
|00001850| 68 20 4d 75 6c 74 69 66 | 69 6e 64 65 72 2e 20 20 |h Multif|inder. |
|00001860| 49 74 20 75 6e 64 65 72 | 73 74 61 6e 64 73 20 62 |It under|stands b|
|00001870| 61 63 6b 67 72 6f 75 6e | 64 0a 09 65 76 65 6e 74 |ackgroun|d..event|
|00001880| 73 2c 20 73 6f 20 69 74 | 20 63 61 6e 20 72 65 63 |s, so it| can rec|
|00001890| 65 69 76 65 20 69 6e 70 | 75 74 20 61 6e 64 20 75 |eive inp|ut and u|
|000018a0| 70 64 61 74 65 20 77 69 | 6e 64 6f 77 73 20 65 76 |pdate wi|ndows ev|
|000018b0| 65 6e 20 77 68 65 6e 0a | 09 61 6e 6f 74 68 65 72 |en when.|.another|
|000018c0| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 27 73 20 77 | applica|tion's w|
|000018d0| 69 6e 64 6f 77 20 69 73 | 20 61 63 74 69 76 65 2e |indow is| active.|
|000018e0| 0a 0a 20 20 20 20 32 29 | 09 53 6f 6d 65 20 70 72 |.. 2)|.Some pr|
|000018f0| 6f 62 6c 65 6d 73 20 72 | 65 6c 61 74 69 6e 67 20 |oblems r|elating |
|00001900| 74 6f 20 6b 65 79 62 6f | 61 72 64 20 6d 61 70 70 |to keybo|ard mapp|
|00001910| 69 6e 67 20 68 61 76 65 | 20 62 65 65 6e 20 66 69 |ing have| been fi|
|00001920| 78 65 64 2e 0a 09 55 57 | 20 72 65 63 6f 67 6e 69 |xed...UW| recogni|
|00001930| 7a 65 73 20 74 68 65 20 | 43 6f 6e 74 72 6f 6c 20 |zes the |Control |
|00001940| 61 6e 64 20 45 53 43 20 | 6b 65 79 73 2e 20 20 54 |and ESC |keys. T|
|00001950| 68 65 20 6d 61 70 70 69 | 6e 67 20 66 6f 72 20 74 |he mappi|ng for t|
|00001960| 68 65 0a 09 6e 75 6d 65 | 72 69 63 20 6b 65 79 70 |he..nume|ric keyp|
|00001970| 61 64 20 73 74 69 6c 6c | 20 73 65 65 6d 73 20 74 |ad still| seems t|
|00001980| 6f 20 62 65 20 69 6e 63 | 6f 6d 70 6c 65 74 65 2e |o be inc|omplete.|
|00001990| 20 20 54 68 65 20 61 75 | 74 68 6f 72 20 69 73 0a | The au|thor is.|
|000019a0| 09 68 61 6d 70 65 72 65 | 64 20 62 79 20 74 68 65 |.hampere|d by the|
|000019b0| 20 66 61 63 74 20 74 68 | 61 74 20 68 69 73 20 64 | fact th|at his d|
|000019c0| 65 76 65 6c 6f 70 6d 65 | 6e 74 20 6d 61 63 68 69 |evelopme|nt machi|
|000019d0| 6e 65 20 73 74 69 6c 6c | 20 68 61 73 0a 09 69 74 |ne still| has..it|
|000019e0| 73 20 6f 72 69 67 69 6e | 61 6c 20 35 31 32 4b 20 |s origin|al 512K |
|000019f0| 4d 61 63 20 6b 65 79 62 | 6f 61 72 64 2e 20 20 28 |Mac keyb|oard. (|
|00001a00| 48 65 20 64 69 73 6c 69 | 6b 65 73 20 74 68 65 20 |He disli|kes the |
|00001a10| 4d 61 63 2b 20 61 6e 64 | 0a 09 53 45 20 6b 65 79 |Mac+ and|..SE key|
|00001a20| 62 6f 61 72 64 73 2e 29 | 0a 0a 20 20 20 20 33 29 |boards.)|.. 3)|
|00001a30| 09 41 20 6e 65 77 20 77 | 69 6e 64 6f 77 20 74 79 |.A new w|indow ty|
|00001a40| 70 65 20 2d 2d 20 70 6c | 6f 74 20 2d 2d 20 68 61 |pe -- pl|ot -- ha|
|00001a50| 73 20 62 65 65 6e 20 64 | 65 66 69 6e 65 64 2e 20 |s been d|efined. |
|00001a60| 20 54 68 69 73 20 74 79 | 70 65 20 6f 66 0a 09 77 | This ty|pe of..w|
|00001a70| 69 6e 64 6f 77 20 63 61 | 6e 20 6f 6e 6c 79 20 62 |indow ca|n only b|
|00001a80| 65 20 63 72 65 61 74 65 | 64 20 62 79 20 74 68 65 |e create|d by the|
|00001a90| 20 68 6f 73 74 2e 20 20 | 49 74 20 69 6e 74 65 72 | host. |It inter|
|00001aa0| 70 72 65 74 73 20 6f 75 | 74 70 75 74 0a 09 69 6e |prets ou|tput..in|
|00001ab0| 20 55 4e 49 58 20 76 37 | 20 70 6c 6f 74 28 35 29 | UNIX v7| plot(5)|
|00001ac0| 20 66 6f 72 6d 61 74 2e | 0a 0a 20 20 20 20 34 29 | format.|.. 4)|
|00001ad0| 09 57 69 6e 64 6f 77 73 | 20 6d 61 79 20 75 73 65 |.Windows| may use|
|00001ae0| 20 37 2c 20 39 2c 20 31 | 30 2c 20 6f 72 20 31 32 | 7, 9, 1|0, or 12|
|00001af0| 20 70 6f 69 6e 74 20 66 | 69 78 65 64 2d 77 69 64 | point f|ixed-wid|
|00001b00| 74 68 20 66 6f 6e 74 73 | 2e 0a 09 55 57 20 69 6e |th fonts|...UW in|
|00001b10| 63 6c 75 64 65 73 20 6e | 6f 6e 2d 41 70 70 6c 65 |cludes n|on-Apple|
|00001b20| 2d 63 6f 70 79 72 69 67 | 68 74 65 64 20 4d 69 73 |-copyrig|hted Mis|
|00001b30| 68 61 77 61 6b 61 20 66 | 6f 6e 74 73 20 66 6f 72 |hawaka f|onts for|
|00001b40| 20 74 68 65 73 65 20 73 | 69 7a 65 73 2e 0a 0a 55 | these s|izes...U|
|00001b50| 57 20 69 73 20 6e 6f 74 | 20 70 75 62 6c 69 63 20 |W is not| public |
|00001b60| 64 6f 6d 61 69 6e 2e 20 | 20 49 74 20 69 73 20 63 |domain. | It is c|
|00001b70| 6f 70 79 72 69 67 68 74 | 65 64 2e 20 20 48 6f 77 |opyright|ed. How|
|00001b80| 65 76 65 72 2c 20 70 65 | 72 6d 69 73 73 69 6f 6e |ever, pe|rmission|
|00001b90| 20 74 6f 0a 63 6f 70 79 | 20 55 57 20 69 73 20 67 | to.copy| UW is g|
|00001ba0| 69 76 65 6e 20 70 72 6f | 76 69 64 65 64 20 74 68 |iven pro|vided th|
|00001bb0| 61 74 20 74 68 65 20 63 | 6f 70 69 65 73 20 61 72 |at the c|opies ar|
|00001bc0| 65 20 6e 6f 74 20 73 6f | 6c 64 20 61 6e 64 20 74 |e not so|ld and t|
|00001bd0| 68 61 74 20 74 68 65 0a | 63 6f 70 79 72 69 67 68 |hat the.|copyrigh|
|00001be0| 74 20 6e 6f 74 69 63 65 | 73 20 61 72 65 20 72 65 |t notice|s are re|
|00001bf0| 74 61 69 6e 65 64 2e 0a | 0a 43 6f 6d 6d 65 6e 74 |tained..|.Comment|
|00001c00| 73 20 61 62 6f 75 74 20 | 55 57 20 63 61 6e 20 62 |s about |UW can b|
|00001c10| 65 20 73 65 6e 74 20 74 | 6f 20 74 68 65 20 61 75 |e sent t|o the au|
|00001c20| 74 68 6f 72 20 28 6d 65 | 29 20 61 74 20 74 68 65 |thor (me|) at the|
|00001c30| 20 66 6f 6c 6c 6f 77 69 | 6e 67 0a 61 64 64 72 65 | followi|ng.addre|
|00001c40| 73 73 65 73 3a 0a 0a 09 | 41 52 50 41 4e 45 54 2f |sses:...|ARPANET/|
|00001c50| 4d 49 4c 4e 45 54 3a 09 | 6a 64 62 40 6d 6f 72 64 |MILNET:.|jdb@mord|
|00001c60| 6f 72 2e 73 31 2e 67 6f | 76 0a 0a 09 55 55 43 50 |or.s1.go|v...UUCP|
|00001c70| 3a 09 09 7b 6c 6c 6c 2d | 63 72 67 2c 64 65 63 77 |:..{lll-|crg,decw|
|00001c80| 72 6c 2c 63 61 69 70 7d | 21 6d 6f 72 64 6f 72 21 |rl,caip}|!mordor!|
|00001c90| 6a 64 62 0a 0a 09 55 2e | 53 2e 20 4d 61 69 6c 3a |jdb...U.|S. Mail:|
|00001ca0| 09 4a 6f 68 6e 20 42 72 | 75 6e 65 72 0a 09 09 09 |.John Br|uner....|
|00001cb0| 4c 61 77 72 65 6e 63 65 | 20 4c 69 76 65 72 6d 6f |Lawrence| Livermo|
|00001cc0| 72 65 20 4e 61 74 69 6f | 6e 61 6c 20 4c 61 62 6f |re Natio|nal Labo|
|00001cd0| 72 61 74 6f 72 79 0a 09 | 09 09 50 2e 4f 2e 20 42 |ratory..|..P.O. B|
|00001ce0| 6f 78 20 35 35 30 33 2c | 20 4c 2d 32 37 36 0a 09 |ox 5503,| L-276..|
|00001cf0| 09 09 4c 69 76 65 72 6d | 6f 72 65 2c 20 43 41 20 |..Liverm|ore, CA |
|00001d00| 20 39 34 35 35 30 0a 0a | 49 20 74 72 79 20 74 6f | 94550..|I try to|
|00001d10| 20 61 6e 73 77 65 72 20 | 61 6c 6c 20 6d 61 69 6c | answer |all mail|
|00001d20| 2c 20 62 75 74 20 73 6f | 6d 65 74 69 6d 65 73 20 |, but so|metimes |
|00001d30| 61 6d 20 75 6e 61 62 6c | 65 20 74 6f 20 64 6f 20 |am unabl|e to do |
|00001d40| 73 6f 20 66 6f 72 20 72 | 65 61 73 6f 6e 73 0a 62 |so for r|easons.b|
|00001d50| 65 79 6f 6e 64 20 6d 79 | 20 63 6f 6e 74 72 6f 6c |eyond my| control|
|00001d60| 20 28 65 2e 67 2e 20 69 | 6e 63 6f 6d 70 6c 65 74 | (e.g. i|ncomplet|
|00001d70| 65 20 6f 72 20 69 6e 63 | 6f 72 72 65 63 74 20 72 |e or inc|orrect r|
|00001d80| 65 74 75 72 6e 20 61 64 | 64 72 65 73 73 65 73 2c |eturn ad|dresses,|
|00001d90| 0a 66 69 6e 69 63 6b 79 | 20 6d 61 69 6c 65 72 73 |.finicky| mailers|
|00001da0| 29 2e 0a 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |).......|........|
|00001db0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001dc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001dd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001de0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001df0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001e00| 64 6f 63 2f 00 00 00 00 | 00 00 00 00 00 00 00 00 |doc/....|........|
|00001e10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001e20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001e30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001e40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001e50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001e60| 00 00 00 00 20 20 20 37 | 30 30 20 00 20 31 31 37 |.... 7|00 . 117|
|00001e70| 32 32 20 00 20 37 36 34 | 30 30 20 00 20 20 20 20 |22 . 764|00 . |
|00001e80| 20 20 20 20 20 20 30 20 | 20 34 37 35 30 31 32 34 | 0 | 4750124|
|00001e90| 32 33 34 20 20 20 34 37 | 31 32 00 20 00 00 00 00 |234 47|12. ....|
|00001ea0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001eb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ec0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ed0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ef0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001fa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001fb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001fc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001fd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001fe0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ff0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002000| 64 6f 63 2f 75 77 6c 69 | 62 2e 6d 73 00 00 00 00 |doc/uwli|b.ms....|
|00002010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002060| 00 00 00 00 20 20 20 36 | 30 30 20 00 20 31 31 37 |.... 6|00 . 117|
|00002070| 32 32 20 00 20 37 36 34 | 30 30 20 00 20 20 20 20 |22 . 764|00 . |
|00002080| 20 20 36 31 35 36 36 20 | 20 34 37 35 30 31 32 34 | 61566 | 4750124|
|00002090| 32 32 36 20 20 20 36 35 | 32 33 00 20 00 00 00 00 |226 65|23. ....|
|000020a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000020b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000020c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000020d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000020e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000020f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002100| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002120| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000021a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000021b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000021c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000021d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000021e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000021f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002200| 2e 5c 22 20 54 68 69 73 | 20 66 69 6c 65 20 73 68 |.\" This| file sh|
|00002210| 6f 75 6c 64 20 62 65 20 | 70 72 6f 63 65 73 73 65 |ould be |processe|
|00002220| 64 20 62 79 20 6e 72 6f | 66 66 20 6f 72 20 74 72 |d by nro|ff or tr|
|00002230| 6f 66 66 20 77 69 74 68 | 20 74 68 65 20 2d 6d 73 |off with| the -ms|
|00002240| 20 6d 61 63 72 6f 20 73 | 65 74 0a 2e 64 73 20 75 | macro s|et..ds u|
|00002250| 77 20 5c 73 2d 32 55 57 | 5c 73 30 0a 2e 44 41 20 |w \s-2UW|\s0..DA |
|00002260| 53 65 70 74 65 6d 62 65 | 72 20 33 30 2c 20 31 39 |Septembe|r 30, 19|
|00002270| 38 36 0a 2e 54 4c 0a 54 | 68 65 20 55 57 20 50 72 |86..TL.T|he UW Pr|
|00002280| 6f 67 72 61 6d 6d 65 72 | 27 73 20 4c 69 62 72 61 |ogrammer|'s Libra|
|00002290| 72 79 0a 2e 41 55 0a 4a | 6f 68 6e 20 44 2e 20 42 |ry..AU.J|ohn D. B|
|000022a0| 72 75 6e 65 72 0a 2e 53 | 48 0a 49 6e 74 72 6f 64 |runer..S|H.Introd|
|000022b0| 75 63 74 69 6f 6e 0a 2e | 50 50 0a 5c 2a 28 75 77 |uction..|PP.\*(uw|
|000022c0| 20 69 73 20 61 20 6d 75 | 6c 74 69 70 6c 65 2d 77 | is a mu|ltiple-w|
|000022d0| 69 6e 64 6f 77 20 4d 61 | 63 69 6e 74 6f 73 68 20 |indow Ma|cintosh |
|000022e0| 69 6e 74 65 72 66 61 63 | 65 20 74 6f 20 61 20 34 |interfac|e to a 4|
|000022f0| 2e 32 42 53 44 20 55 4e | 49 58 5c 2a 2a 2e 0a 2e |.2BSD UN|IX\**...|
|00002300| 46 53 0a 4d 61 63 69 6e | 74 6f 73 68 20 69 73 20 |FS.Macin|tosh is |
|00002310| 61 20 74 72 61 64 65 6d | 61 72 6b 20 6f 66 20 4d |a tradem|ark of M|
|00002320| 63 49 6e 74 6f 73 68 20 | 4c 61 62 6f 72 61 74 6f |cIntosh |Laborato|
|00002330| 72 69 65 73 20 77 68 69 | 63 68 0a 69 73 20 6c 69 |ries whi|ch.is li|
|00002340| 63 65 6e 73 65 64 20 74 | 6f 20 41 70 70 6c 65 20 |censed t|o Apple |
|00002350| 43 6f 6d 70 75 74 65 72 | 2c 20 49 6e 63 2e 0a 55 |Computer|, Inc..U|
|00002360| 4e 49 58 20 69 73 20 61 | 20 72 65 67 69 73 74 65 |NIX is a| registe|
|00002370| 72 65 64 20 74 72 61 64 | 65 6d 61 72 6b 20 6f 66 |red trad|emark of|
|00002380| 20 42 65 6c 6c 20 4c 61 | 62 6f 72 61 74 6f 72 69 | Bell La|boratori|
|00002390| 65 73 2e 0a 2e 46 45 0a | 5c 2a 28 75 77 20 76 65 |es...FE.|\*(uw ve|
|000023a0| 72 73 69 6f 6e 20 33 20 | 63 6f 6d 70 72 69 73 65 |rsion 3 |comprise|
|000023b0| 73 20 61 20 73 65 72 76 | 65 72 2c 0a 61 20 73 65 |s a serv|er,.a se|
|000023c0| 74 20 6f 66 20 75 74 69 | 6c 69 74 79 20 70 72 6f |t of uti|lity pro|
|000023d0| 67 72 61 6d 73 2c 0a 61 | 6e 64 20 61 6e 20 70 72 |grams,.a|nd an pr|
|000023e0| 6f 67 72 61 6d 2d 6c 65 | 76 65 6c 20 69 6e 74 65 |ogram-le|vel inte|
|000023f0| 72 66 61 63 65 2e 0a 54 | 68 69 73 20 6d 61 6e 75 |rface..T|his manu|
|00002400| 61 6c 20 64 65 73 63 72 | 69 62 65 73 20 74 68 65 |al descr|ibes the|
|00002410| 20 73 65 72 76 69 63 65 | 73 20 77 68 69 63 68 20 | service|s which |
|00002420| 61 72 65 20 61 76 61 69 | 6c 61 62 6c 65 0a 69 6e |are avai|lable.in|
|00002430| 20 74 68 65 20 5c 2a 28 | 75 77 20 70 72 6f 67 72 | the \*(|uw progr|
|00002440| 61 6d 6d 65 72 27 73 20 | 6c 69 62 72 61 72 79 2e |ammer's |library.|
|00002450| 0a 54 68 69 73 20 6c 69 | 62 72 61 72 79 20 61 6c |.This li|brary al|
|00002460| 6c 6f 77 20 70 72 6f 67 | 72 61 6d 73 20 74 6f 20 |low prog|rams to |
|00002470| 63 72 65 61 74 65 2c 0a | 63 6f 6d 6d 75 6e 69 63 |create,.|communic|
|00002480| 61 74 65 20 77 69 74 68 | 2c 0a 61 6e 64 20 70 65 |ate with|,.and pe|
|00002490| 72 66 6f 72 6d 20 73 6f | 6d 65 20 63 6f 6e 74 72 |rform so|me contr|
|000024a0| 6f 6c 20 6f 70 65 72 61 | 74 69 6f 6e 73 20 75 70 |ol opera|tions up|
|000024b0| 6f 6e 0a 77 69 6e 64 6f | 77 73 20 6f 6e 20 74 68 |on.windo|ws on th|
|000024c0| 65 20 4d 61 63 69 6e 74 | 6f 73 68 2e 0a 2e 53 48 |e Macint|osh...SH|
|000024d0| 0a 42 61 63 6b 67 72 6f | 75 6e 64 0a 2e 50 50 0a |.Backgro|und..PP.|
|000024e0| 42 65 66 6f 72 65 20 74 | 68 65 20 6c 69 62 72 61 |Before t|he libra|
|000024f0| 72 79 20 72 6f 75 74 69 | 6e 65 73 20 74 68 65 6d |ry routi|nes them|
|00002500| 73 65 6c 76 65 73 20 63 | 61 6e 20 62 65 20 64 69 |selves c|an be di|
|00002510| 73 63 75 73 73 65 64 2c | 0a 69 74 20 69 73 20 6e |scussed,|.it is n|
|00002520| 65 63 65 73 73 61 72 79 | 20 74 6f 20 63 6f 6e 73 |ecessary| to cons|
|00002530| 69 64 65 72 20 73 6f 6d | 65 20 61 73 70 65 63 74 |ider som|e aspect|
|00002540| 73 20 6f 66 20 74 68 65 | 20 5c 2a 28 75 77 0a 73 |s of the| \*(uw.s|
|00002550| 65 72 76 65 72 2e 0a 54 | 68 65 20 73 65 72 76 65 |erver..T|he serve|
|00002560| 72 20 77 68 69 63 68 20 | 77 61 73 20 64 69 73 74 |r which |was dist|
|00002570| 72 69 62 75 74 65 64 20 | 77 69 74 68 20 5c 2a 28 |ributed |with \*(|
|00002580| 75 77 20 76 65 72 73 69 | 6f 6e 73 20 31 2e 36 20 |uw versi|ons 1.6 |
|00002590| 61 6e 64 20 32 2e 31 30 | 0a 63 6f 6d 6d 75 6e 69 |and 2.10|.communi|
|000025a0| 63 61 74 65 64 20 77 69 | 74 68 20 74 68 65 20 4d |cated wi|th the M|
|000025b0| 61 63 69 6e 74 6f 73 68 | 20 75 73 69 6e 67 20 61 |acintosh| using a|
|000025c0| 20 70 72 6f 74 6f 63 6f | 6c 20 77 68 69 63 68 0a | protoco|l which.|
|000025d0| 69 73 20 72 65 66 65 72 | 72 65 64 20 74 6f 20 61 |is refer|red to a|
|000025e0| 73 20 74 68 65 20 60 60 | 6f 72 69 67 69 6e 61 6c |s the ``|original|
|000025f0| 20 70 72 6f 74 6f 63 6f | 6c 2e 27 27 0a 54 68 65 | protoco|l.''.The|
|00002600| 20 76 65 72 73 69 6f 6e | 20 33 20 73 65 72 76 65 | version| 3 serve|
|00002610| 72 20 69 73 20 63 61 70 | 61 62 6c 65 20 6f 66 20 |r is cap|able of |
|00002620| 63 6f 6d 6d 75 6e 69 63 | 61 74 69 6e 67 20 69 6e |communic|ating in|
|00002630| 20 74 68 69 73 20 70 72 | 6f 74 6f 63 6f 6c 3b 0a | this pr|otocol;.|
|00002640| 68 6f 77 65 76 65 72 2c | 0a 69 74 20 61 6c 73 6f |however,|.it also|
|00002650| 20 73 75 70 70 6f 72 74 | 73 20 61 6e 20 60 60 65 | support|s an ``e|
|00002660| 78 74 65 6e 64 65 64 20 | 70 72 6f 74 6f 63 6f 6c |xtended |protocol|
|00002670| 2e 27 27 0a 46 6f 72 20 | 63 6f 6e 76 65 6e 69 65 |.''.For |convenie|
|00002680| 6e 63 65 2c 0a 74 68 65 | 73 65 20 70 72 6f 74 6f |nce,.the|se proto|
|00002690| 63 6f 6c 73 20 61 72 65 | 20 61 73 73 69 67 6e 65 |cols are| assigne|
|000026a0| 64 20 6e 75 6d 62 65 72 | 73 3a 0a 70 72 6f 74 6f |d number|s:.proto|
|000026b0| 63 6f 6c 20 31 20 69 73 | 20 74 68 65 20 6f 72 69 |col 1 is| the ori|
|000026c0| 67 69 6e 61 6c 20 70 72 | 6f 74 6f 63 6f 6c 0a 61 |ginal pr|otocol.a|
|000026d0| 6e 64 20 70 72 6f 74 6f | 63 6f 6c 20 32 20 69 73 |nd proto|col 2 is|
|000026e0| 20 74 68 65 20 65 78 74 | 65 6e 64 65 64 20 70 72 | the ext|ended pr|
|000026f0| 6f 74 6f 63 6f 6c 2e 0a | 2e 50 50 0a 50 72 6f 74 |otocol..|.PP.Prot|
|00002700| 6f 63 6f 6c 20 31 20 70 | 72 6f 76 69 64 65 73 20 |ocol 1 p|rovides |
|00002710| 61 20 6d 65 63 68 61 6e | 69 73 6d 20 66 6f 72 0a |a mechan|ism for.|
|00002720| 74 68 65 20 63 72 65 61 | 74 69 6f 6e 20 61 6e 64 |the crea|tion and|
|00002730| 20 64 65 73 74 72 75 63 | 74 69 6f 6e 20 6f 66 20 | destruc|tion of |
|00002740| 77 69 6e 64 6f 77 73 0a | 61 73 20 77 65 6c 6c 20 |windows.|as well |
|00002750| 61 73 20 61 20 6d 65 61 | 6e 73 20 74 6f 20 6d 75 |as a mea|ns to mu|
|00002760| 6c 74 69 70 6c 65 78 20 | 61 20 73 69 6e 67 6c 65 |ltiplex |a single|
|00002770| 0a 63 6f 6d 6d 75 6e 69 | 63 61 74 69 6f 6e 73 20 |.communi|cations |
|00002780| 6c 69 6e 65 20 61 6d 6f | 6e 67 20 73 65 76 65 72 |line amo|ng sever|
|00002790| 61 6c 20 77 69 6e 64 6f | 77 73 2e 0a 49 74 20 70 |al windo|ws..It p|
|000027a0| 72 6f 76 69 64 65 73 20 | 61 20 6d 65 63 68 61 6e |rovides |a mechan|
|000027b0| 69 73 6d 20 66 6f 72 20 | 74 72 61 6e 73 6d 69 74 |ism for |transmit|
|000027c0| 74 69 6e 67 0a 63 6f 6e | 74 72 6f 6c 20 61 6e 64 |ting.con|trol and|
|000027d0| 20 60 60 6d 65 74 61 27 | 27 20 63 68 61 72 61 63 | ``meta'|' charac|
|000027e0| 74 65 72 73 2c 0a 61 6e | 64 20 69 74 20 61 6c 73 |ters,.an|d it als|
|000027f0| 6f 20 70 72 6f 76 69 64 | 65 73 20 74 77 6f 20 60 |o provid|es two `|
|00002800| 60 6d 61 69 6e 74 65 6e | 61 6e 63 65 20 66 75 6e |`mainten|ance fun|
|00002810| 63 74 69 6f 6e 73 27 27 | 0a 77 68 69 63 68 20 61 |ctions''|.which a|
|00002820| 72 65 20 75 73 65 64 20 | 66 6f 72 20 73 74 61 72 |re used |for star|
|00002830| 74 75 70 20 61 6e 64 20 | 73 68 75 74 64 6f 77 6e |tup and |shutdown|
|00002840| 2e 0a 2e 50 50 0a 50 72 | 6f 74 6f 63 6f 6c 20 32 |...PP.Pr|otocol 2|
|00002850| 20 70 72 6f 76 69 64 65 | 73 20 74 77 6f 20 73 69 | provide|s two si|
|00002860| 67 6e 69 66 69 63 61 6e | 74 20 65 6e 68 61 6e 63 |gnifican|t enhanc|
|00002870| 65 6d 65 6e 74 73 0a 72 | 65 6c 61 74 69 76 65 20 |ements.r|elative |
|00002880| 74 6f 20 70 72 6f 74 6f | 63 6f 6c 20 31 2e 0a 46 |to proto|col 1..F|
|00002890| 69 72 73 74 2c 0a 77 69 | 6e 64 6f 77 20 63 72 65 |irst,.wi|ndow cre|
|000028a0| 61 74 69 6f 6e 20 6d 65 | 73 73 61 67 65 73 20 73 |ation me|ssages s|
|000028b0| 70 65 63 69 66 79 20 74 | 68 65 20 77 69 6e 64 6f |pecify t|he windo|
|000028c0| 77 20 65 6d 75 6c 61 74 | 69 6f 6e 20 74 79 70 65 |w emulat|ion type|
|000028d0| 0a 28 5c 66 49 65 2e 67 | 2e 5c 66 50 20 61 64 6d |.(\fIe.g|.\fP adm|
|000028e0| 2d 33 31 2c 20 76 74 35 | 32 29 2e 0a 53 65 63 6f |-31, vt5|2)..Seco|
|000028f0| 6e 64 2c 0a 61 64 64 69 | 74 69 6f 6e 61 6c 20 69 |nd,.addi|tional i|
|00002900| 6e 66 6f 72 6d 61 74 69 | 6f 6e 20 61 62 6f 75 74 |nformati|on about|
|00002910| 20 77 69 6e 64 6f 77 73 | 2c 0a 63 61 6c 6c 65 64 | windows|,.called|
|00002920| 20 60 60 77 69 6e 64 6f | 77 20 6f 70 74 69 6f 6e | ``windo|w option|
|00002930| 73 2c 27 27 0a 69 73 20 | 74 72 61 6e 73 6d 69 74 |s,''.is |transmit|
|00002940| 74 65 64 20 62 65 74 77 | 65 65 6e 20 74 68 65 20 |ted betw|een the |
|00002950| 4d 61 63 69 6e 74 6f 73 | 68 20 63 6c 69 65 6e 74 |Macintos|h client|
|00002960| 20 61 6e 64 20 74 68 65 | 0a 73 65 72 76 65 72 20 | and the|.server |
|00002970| 6f 6e 20 74 68 65 20 68 | 6f 73 74 2e 0a 2e 50 50 |on the h|ost...PP|
|00002980| 0a 57 69 6e 64 6f 77 20 | 6f 70 74 69 6f 6e 73 20 |.Window |options |
|00002990| 61 72 65 20 61 6e 20 60 | 60 6f 75 74 2d 6f 66 2d |are an `|`out-of-|
|000029a0| 62 61 6e 64 27 27 20 63 | 68 61 6e 6e 65 6c 20 6f |band'' c|hannel o|
|000029b0| 66 0a 69 6e 66 6f 72 6d | 61 74 69 6f 6e 20 62 65 |f.inform|ation be|
|000029c0| 74 77 65 65 6e 20 74 68 | 65 20 4d 61 63 69 6e 74 |tween th|e Macint|
|000029d0| 6f 73 68 20 61 6e 64 20 | 74 68 65 20 68 6f 73 74 |osh and |the host|
|000029e0| 2e 0a 54 68 65 72 65 20 | 61 72 65 20 74 77 6f 20 |..There |are two |
|000029f0| 74 79 70 65 73 3a 0a 67 | 65 6e 65 72 69 63 0a 28 |types:.g|eneric.(|
|00002a00| 63 6f 6d 6d 6f 6e 20 74 | 6f 20 61 6c 6c 20 77 69 |common t|o all wi|
|00002a10| 6e 64 6f 77 20 74 79 70 | 65 73 29 0a 61 6e 64 20 |ndow typ|es).and |
|00002a20| 65 6d 75 6c 61 74 69 6f | 6e 2d 73 70 65 63 69 66 |emulatio|n-specif|
|00002a30| 69 63 2e 0a 54 68 65 20 | 66 6f 6c 6c 6f 77 69 6e |ic..The |followin|
|00002a40| 67 20 61 72 65 20 67 65 | 6e 65 72 69 63 3a 0a 2e |g are ge|neric:..|
|00002a50| 44 53 0a 77 69 6e 64 6f | 77 20 76 69 73 69 62 69 |DS.windo|w visibi|
|00002a60| 6c 69 74 79 0a 77 69 6e | 64 6f 77 20 74 79 70 65 |lity.win|dow type|
|00002a70| 0a 77 69 6e 64 6f 77 20 | 70 6f 73 69 74 69 6f 6e |.window |position|
|00002a80| 20 28 70 69 78 65 6c 20 | 61 64 64 72 65 73 73 20 | (pixel |address |
|00002a90| 6f 66 20 74 6f 70 20 6c | 65 66 74 20 63 6f 72 6e |of top l|eft corn|
|00002aa0| 65 72 29 0a 77 69 6e 64 | 6f 77 20 74 69 74 6c 65 |er).wind|ow title|
|00002ab0| 0a 77 69 6e 64 6f 77 20 | 73 69 7a 65 20 69 6e 20 |.window |size in |
|00002ac0| 70 69 78 65 6c 73 0a 2e | 44 45 0a 54 68 65 20 66 |pixels..|DE.The f|
|00002ad0| 6f 6c 6c 6f 77 69 6e 67 | 20 77 69 6e 64 6f 77 20 |ollowing| window |
|00002ae0| 6f 70 74 69 6f 6e 73 20 | 61 72 65 20 73 70 65 63 |options |are spec|
|00002af0| 69 66 69 63 20 74 6f 0a | 63 75 72 73 6f 72 2d 61 |ific to.|cursor-a|
|00002b00| 64 64 72 65 73 73 69 62 | 6c 65 20 74 65 72 6d 69 |ddressib|le termi|
|00002b10| 6e 61 6c 20 65 6d 75 6c | 61 74 69 6f 6e 73 3a 0a |nal emul|ations:.|
|00002b20| 2e 44 53 0a 74 65 72 6d | 69 6e 61 6c 20 73 69 7a |.DS.term|inal siz|
|00002b30| 65 20 28 6e 75 6d 62 65 | 72 20 6f 66 20 72 6f 77 |e (numbe|r of row|
|00002b40| 73 20 61 6e 64 20 63 6f | 6c 75 6d 6e 73 29 0a 66 |s and co|lumns).f|
|00002b50| 6f 6e 74 20 73 69 7a 65 | 20 69 6e 64 65 78 20 28 |ont size| index (|
|00002b60| 73 6d 61 6c 6c 3d 30 2c | 20 6c 61 72 67 65 3d 31 |small=0,| large=1|
|00002b70| 29 0a 6d 6f 75 73 65 20 | 68 61 6e 64 6c 69 6e 67 |).mouse |handling|
|00002b80| 20 28 63 6c 69 70 62 6f | 61 72 64 20 6f 72 20 65 | (clipbo|ard or e|
|00002b90| 6e 63 6f 64 65 64 20 73 | 65 6e 64 2d 74 6f 2d 68 |ncoded s|end-to-h|
|00002ba0| 6f 73 74 29 0a 62 65 6c | 6c 20 63 68 61 72 61 63 |ost).bel|l charac|
|00002bb0| 74 65 72 69 73 74 69 63 | 73 20 28 61 75 64 69 62 |teristic|s (audib|
|00002bc0| 6c 65 2c 20 76 69 73 69 | 62 6c 65 29 0a 63 75 72 |le, visi|ble).cur|
|00002bd0| 73 6f 72 20 61 70 70 65 | 61 72 61 6e 63 65 20 28 |sor appe|arance (|
|00002be0| 62 6c 6f 63 6b 20 6f 72 | 20 75 6e 64 65 72 73 63 |block or| undersc|
|00002bf0| 6f 72 65 29 0a 2e 44 45 | 0a 2e 50 50 0a 54 68 65 |ore)..DE|..PP.The|
|00002c00| 20 73 65 72 76 65 72 20 | 64 69 73 74 69 6e 67 75 | server |distingu|
|00002c10| 69 73 68 65 73 20 62 65 | 74 77 65 65 6e 20 74 77 |ishes be|tween tw|
|00002c20| 6f 20 77 69 6e 64 6f 77 | 20 63 6c 61 73 73 65 73 |o window| classes|
|00002c30| 20 5c 28 65 6d 0a 69 6e | 74 65 72 6e 61 6c 20 61 | \(em.in|ternal a|
|00002c40| 6e 64 20 65 78 74 65 72 | 6e 61 6c 2e 0a 49 6e 74 |nd exter|nal..Int|
|00002c50| 65 72 6e 61 6c 20 77 69 | 6e 64 6f 77 73 20 61 72 |ernal wi|ndows ar|
|00002c60| 65 20 68 61 6e 64 6c 65 | 64 20 65 6e 74 69 72 65 |e handle|d entire|
|00002c70| 6c 79 20 62 79 20 74 68 | 65 20 73 65 72 76 65 72 |ly by th|e server|
|00002c80| 2e 0a 54 68 65 79 20 61 | 72 65 20 61 6c 77 61 79 |..They a|re alway|
|00002c90| 73 20 74 65 72 6d 69 6e | 61 6c 20 65 6d 75 6c 61 |s termin|al emula|
|00002ca0| 74 69 6f 6e 73 20 61 6e | 64 20 61 72 65 20 61 6c |tions an|d are al|
|00002cb0| 77 61 79 73 0a 61 73 73 | 6f 63 69 61 74 65 64 20 |ways.ass|ociated |
|00002cc0| 77 69 74 68 20 61 20 70 | 73 65 75 64 6f 2d 74 65 |with a p|seudo-te|
|00002cd0| 72 6d 69 6e 61 6c 20 64 | 65 76 69 63 65 2e 0a 2e |rminal d|evice...|
|00002ce0| 50 50 0a 42 79 20 63 6f | 6e 74 72 61 73 74 2c 0a |PP.By co|ntrast,.|
|00002cf0| 61 6e 20 65 78 74 65 72 | 6e 61 6c 20 77 69 6e 64 |an exter|nal wind|
|00002d00| 6f 77 20 61 6c 77 61 79 | 73 20 69 6e 76 6f 6c 76 |ow alway|s involv|
|00002d10| 65 73 20 73 6f 6d 65 20 | 6f 75 74 73 69 64 65 20 |es some |outside |
|00002d20| 70 72 6f 63 65 73 73 2e | 0a 54 68 65 20 73 65 72 |process.|.The ser|
|00002d30| 76 65 72 20 63 6f 6d 6d | 75 6e 69 63 61 74 65 73 |ver comm|unicates|
|00002d40| 20 77 69 74 68 20 74 68 | 69 73 20 70 72 6f 63 65 | with th|is proce|
|00002d50| 73 73 20 74 68 72 6f 75 | 67 68 20 6f 6e 65 0a 6f |ss throu|gh one.o|
|00002d60| 72 20 74 77 6f 20 49 6e | 74 65 72 6e 65 74 20 64 |r two In|ternet d|
|00002d70| 6f 6d 61 69 6e 20 6e 65 | 74 77 6f 72 6b 20 63 6f |omain ne|twork co|
|00002d80| 6e 6e 65 63 74 69 6f 6e | 73 2e 0a 54 68 65 72 65 |nnection|s..There|
|00002d90| 20 69 73 20 61 6c 77 61 | 79 73 20 61 20 60 60 64 | is alwa|ys a ``d|
|00002da0| 61 74 61 27 27 20 63 6f | 6e 6e 65 63 74 69 6f 6e |ata'' co|nnection|
|00002db0| 2c 0a 74 68 72 6f 75 67 | 68 20 77 68 69 63 68 20 |,.throug|h which |
|00002dc0| 74 68 65 20 65 78 74 65 | 72 6e 61 6c 20 70 72 6f |the exte|rnal pro|
|00002dd0| 63 65 73 73 20 65 78 63 | 68 61 6e 67 65 73 20 69 |cess exc|hanges i|
|00002de0| 6e 66 6f 72 6d 61 74 69 | 6f 6e 0a 28 69 6e 64 69 |nformati|on.(indi|
|00002df0| 72 65 63 74 6c 79 2c 20 | 74 68 72 6f 75 67 68 20 |rectly, |through |
|00002e00| 74 68 65 20 73 65 72 76 | 65 72 29 0a 77 69 74 68 |the serv|er).with|
|00002e10| 20 74 68 65 20 4d 61 63 | 69 6e 74 6f 73 68 2e 0a | the Mac|intosh..|
|00002e20| 54 68 65 72 65 20 6d 61 | 79 20 61 6c 73 6f 20 62 |There ma|y also b|
|00002e30| 65 20 61 20 60 60 63 6f | 6e 74 72 6f 6c 27 27 20 |e a ``co|ntrol'' |
|00002e40| 63 6f 6e 6e 65 63 74 69 | 6f 6e 0a 74 68 72 6f 75 |connecti|on.throu|
|00002e50| 67 68 20 77 68 69 63 68 | 20 74 68 65 20 65 78 74 |gh which| the ext|
|00002e60| 65 72 6e 61 6c 20 70 72 | 6f 63 65 73 73 20 65 78 |ernal pr|ocess ex|
|00002e70| 63 68 61 6e 67 65 73 0a | 77 69 6e 64 6f 77 20 6f |changes.|window o|
|00002e80| 70 74 69 6f 6e 20 69 6e | 66 6f 72 6d 61 74 69 6f |ption in|formatio|
|00002e90| 6e 0a 28 61 67 61 69 6e | 20 69 6e 64 69 72 65 63 |n.(again| indirec|
|00002ea0| 74 6c 79 29 0a 77 69 74 | 68 20 74 68 65 20 4d 61 |tly).wit|h the Ma|
|00002eb0| 63 69 6e 74 6f 73 68 2e | 0a 54 68 65 20 73 65 72 |cintosh.|.The ser|
|00002ec0| 76 65 72 20 61 63 74 73 | 20 61 73 20 61 20 6d 75 |ver acts| as a mu|
|00002ed0| 6c 74 69 70 6c 65 78 6f | 72 20 61 6e 64 20 64 65 |ltiplexo|r and de|
|00002ee0| 6d 75 6c 74 69 70 6c 65 | 78 6f 72 0a 66 6f 72 20 |multiple|xor.for |
|00002ef0| 65 78 74 65 72 6e 61 6c | 20 77 69 6e 64 6f 77 73 |external| windows|
|00002f00| 2e 0a 49 74 20 61 6c 73 | 6f 20 63 61 63 68 65 73 |..It als|o caches|
|00002f10| 20 77 69 6e 64 6f 77 20 | 6f 70 74 69 6f 6e 20 69 | window |option i|
|00002f20| 6e 66 6f 72 6d 61 74 69 | 6f 6e 3b 0a 68 6f 77 65 |nformati|on;.howe|
|00002f30| 76 65 72 2c 0a 69 74 20 | 64 6f 65 73 20 6e 6f 74 |ver,.it |does not|
|00002f40| 20 70 65 72 66 6f 72 6d | 20 68 6f 73 74 2d 65 6e | perform| host-en|
|00002f50| 64 20 65 6d 75 6c 61 74 | 69 6f 6e 2d 73 70 65 63 |d emulat|ion-spec|
|00002f60| 69 66 69 63 20 74 61 73 | 6b 73 2e 0a 2e 50 50 0a |ific tas|ks...PP.|
|00002f70| 49 6e 74 65 72 6e 61 6c | 20 61 6e 64 20 65 78 74 |Internal| and ext|
|00002f80| 65 72 6e 61 6c 20 77 69 | 6e 64 6f 77 73 20 6d 65 |ernal wi|ndows me|
|00002f90| 65 74 20 64 69 66 66 65 | 72 65 6e 74 20 6e 65 65 |et diffe|rent nee|
|00002fa0| 64 73 2e 0a 54 65 72 6d | 69 6e 61 6c 20 65 6d 75 |ds..Term|inal emu|
|00002fb0| 6c 61 74 69 6f 6e 20 6f | 6e 20 74 68 65 20 6c 6f |lation o|n the lo|
|00002fc0| 63 61 6c 20 68 6f 73 74 | 20 69 73 20 62 65 73 74 |cal host| is best|
|00002fd0| 20 70 65 72 66 6f 72 6d | 65 64 0a 62 79 20 69 6e | perform|ed.by in|
|00002fe0| 74 65 72 6e 61 6c 20 77 | 69 6e 64 6f 77 73 2c 0a |ternal w|indows,.|
|00002ff0| 62 65 63 61 75 73 65 20 | 66 65 77 65 72 20 70 72 |because |fewer pr|
|00003000| 6f 63 65 73 73 65 73 20 | 61 72 65 20 69 6e 76 6f |ocesses |are invo|
|00003010| 6c 76 65 64 0a 28 61 6e | 64 20 72 65 73 70 6f 6e |lved.(an|d respon|
|00003020| 73 65 20 74 69 6d 65 20 | 69 73 20 62 65 74 74 65 |se time |is bette|
|00003030| 72 29 2e 0a 45 78 74 65 | 72 6e 61 6c 20 77 69 6e |r)..Exte|rnal win|
|00003040| 64 6f 77 73 20 61 72 65 | 20 73 75 69 74 61 62 6c |dows are| suitabl|
|00003050| 65 20 66 6f 72 20 72 65 | 6d 6f 74 65 20 70 72 6f |e for re|mote pro|
|00003060| 63 65 73 73 65 73 0a 28 | 5c 66 49 69 2e 65 2e 5c |cesses.(|\fIi.e.\|
|00003070| 66 50 20 74 68 6f 73 65 | 20 6f 6e 20 61 6e 6f 74 |fP those| on anot|
|00003080| 68 65 72 20 49 6e 74 65 | 72 6e 65 74 20 68 6f 73 |her Inte|rnet hos|
|00003090| 74 29 0a 6f 72 20 66 6f | 72 20 6e 6f 6e 2d 74 65 |t).or fo|r non-te|
|000030a0| 72 6d 69 6e 61 6c 20 74 | 61 73 6b 73 20 73 75 63 |rminal t|asks suc|
|000030b0| 68 20 61 73 20 66 69 6c | 65 20 74 72 61 6e 73 66 |h as fil|e transf|
|000030c0| 65 72 2e 0a 54 68 65 20 | 5c 2a 28 75 77 20 61 70 |er..The |\*(uw ap|
|000030d0| 70 6c 69 63 61 74 69 6f | 6e 20 6c 69 62 72 61 72 |plicatio|n librar|
|000030e0| 79 20 63 6f 6e 74 61 69 | 6e 73 20 72 6f 75 74 69 |y contai|ns routi|
|000030f0| 6e 65 73 0a 74 6f 20 63 | 72 65 61 74 65 20 61 6e |nes.to c|reate an|
|00003100| 64 20 6d 61 6e 69 70 75 | 6c 61 74 65 20 62 6f 74 |d manipu|late bot|
|00003110| 68 20 63 6c 61 73 73 65 | 73 20 6f 66 20 77 69 6e |h classe|s of win|
|00003120| 64 6f 77 73 2e 0a 2e 53 | 48 0a 57 69 6e 64 6f 77 |dows...S|H.Window|
|00003130| 20 49 44 27 73 20 61 6e | 64 20 4e 65 74 77 6f 72 | ID's an|d Networ|
|00003140| 6b 20 41 64 64 72 65 73 | 73 65 73 0a 2e 50 50 0a |k Addres|ses..PP.|
|00003150| 41 20 75 6e 69 71 75 65 | 20 33 32 2d 62 69 74 20 |A unique| 32-bit |
|00003160| 69 64 65 6e 74 69 66 69 | 63 61 74 69 6f 6e 20 6e |identifi|cation n|
|00003170| 75 6d 62 65 72 20 69 73 | 20 61 73 73 6f 63 69 61 |umber is| associa|
|00003180| 74 65 64 0a 77 69 74 68 | 20 65 61 63 68 20 77 69 |ted.with| each wi|
|00003190| 6e 64 6f 77 20 74 68 61 | 74 20 61 20 73 65 72 76 |ndow tha|t a serv|
|000031a0| 65 72 20 6d 61 6e 69 70 | 75 6c 61 74 65 73 2e 0a |er manip|ulates..|
|000031b0| 53 6f 6d 65 20 6f 70 65 | 72 61 74 69 6f 6e 73 0a |Some ope|rations.|
|000031c0| 28 64 65 73 63 72 69 62 | 65 64 20 62 65 6c 6f 77 |(describ|ed below|
|000031d0| 29 0a 72 65 71 75 69 72 | 65 20 74 68 65 20 77 69 |).requir|e the wi|
|000031e0| 6e 64 6f 77 20 6e 75 6d | 62 65 72 20 74 6f 20 62 |ndow num|ber to b|
|000031f0| 65 20 73 70 65 63 69 66 | 69 65 64 2e 0a 57 68 65 |e specif|ied..Whe|
|00003200| 6e 20 74 68 65 20 73 65 | 72 76 65 72 20 63 72 65 |n the se|rver cre|
|00003210| 61 74 65 73 20 61 20 6e | 65 77 20 69 6e 74 65 72 |ates a n|ew inter|
|00003220| 6e 61 6c 20 77 69 6e 64 | 6f 77 2c 0a 69 74 20 70 |nal wind|ow,.it p|
|00003230| 61 73 73 65 73 20 74 68 | 65 20 77 69 6e 64 6f 77 |asses th|e window|
|00003240| 20 49 44 20 61 73 20 74 | 68 65 20 65 6e 76 69 72 | ID as t|he envir|
|00003250| 6f 6e 6d 65 6e 74 20 76 | 61 72 69 61 62 6c 65 0a |onment v|ariable.|
|00003260| 60 60 55 57 5f 49 44 27 | 27 2e 0a 2e 50 50 0a 54 |``UW_ID'|'...PP.T|
|00003270| 68 65 20 73 65 72 76 65 | 72 20 63 72 65 61 74 65 |he serve|r create|
|00003280| 73 20 74 77 6f 20 6e 65 | 74 77 6f 72 6b 20 73 6f |s two ne|twork so|
|00003290| 63 6b 65 74 73 20 75 70 | 6f 6e 20 77 68 69 63 68 |ckets up|on which|
|000032a0| 20 74 6f 20 72 65 63 65 | 69 76 65 0a 69 6e 63 6f | to rece|ive.inco|
|000032b0| 6d 69 6e 67 20 6d 65 73 | 73 61 67 65 73 2e 0a 4f |ming mes|sages..O|
|000032c0| 6e 65 20 73 6f 63 6b 65 | 74 20 72 65 63 65 69 76 |ne socke|t receiv|
|000032d0| 65 73 20 55 4e 49 58 2d | 64 6f 6d 61 69 6e 20 64 |es UNIX-|domain d|
|000032e0| 61 74 61 67 72 61 6d 73 | 2c 0a 74 68 65 20 6f 74 |atagrams|,.the ot|
|000032f0| 68 65 72 20 6c 69 73 74 | 65 6e 73 20 66 6f 72 20 |her list|ens for |
|00003300| 49 6e 74 65 72 6e 65 74 | 2d 64 6f 6d 61 69 6e 20 |Internet|-domain |
|00003310| 73 74 72 65 61 6d 20 63 | 6f 6e 6e 65 63 74 69 6f |stream c|onnectio|
|00003320| 6e 73 2e 0a 54 68 65 20 | 61 64 64 72 65 73 73 65 |ns..The |addresse|
|00003330| 73 20 6f 66 20 74 68 65 | 73 65 20 73 6f 63 6b 65 |s of the|se socke|
|00003340| 74 73 20 61 72 65 20 70 | 6c 61 63 65 64 20 69 6e |ts are p|laced in|
|00003350| 20 74 68 65 20 65 6e 76 | 69 72 6f 6e 6d 65 6e 74 | the env|ironment|
|00003360| 0a 61 73 20 74 68 65 20 | 76 61 72 69 61 62 6c 65 |.as the |variable|
|00003370| 73 20 60 60 55 57 5f 55 | 49 50 43 27 27 0a 28 55 |s ``UW_U|IPC''.(U|
|00003380| 4e 49 58 2d 64 6f 6d 61 | 69 6e 29 0a 61 6e 64 20 |NIX-doma|in).and |
|00003390| 60 60 55 57 5f 49 4e 45 | 54 27 27 0a 28 49 6e 74 |``UW_INE|T''.(Int|
|000033a0| 65 72 6e 65 74 20 64 6f | 6d 61 69 6e 29 2e 0a 2e |ernet do|main)...|
|000033b0| 53 48 0a 44 61 74 61 20 | 54 79 70 65 73 20 61 6e |SH.Data |Types an|
|000033c0| 64 20 44 61 74 61 20 53 | 74 72 75 63 74 75 72 65 |d Data S|tructure|
|000033d0| 73 0a 2e 50 50 0a 54 68 | 65 20 5c 2a 28 75 77 20 |s..PP.Th|e \*(uw |
|000033e0| 70 72 6f 67 72 61 6d 6d | 65 72 27 73 20 6c 69 62 |programm|er's lib|
|000033f0| 72 61 72 79 20 75 73 65 | 73 20 61 20 6e 75 6d 62 |rary use|s a numb|
|00003400| 65 72 0a 6f 66 20 73 69 | 6d 70 6c 65 20 61 6e 64 |er.of si|mple and|
|00003410| 20 73 74 72 75 63 74 75 | 72 65 64 20 64 61 74 61 | structu|red data|
|00003420| 20 74 79 70 65 73 2e 0a | 2e 49 50 20 75 77 69 64 | types..|.IP uwid|
|00003430| 5f 74 20 31 69 0a 55 6e | 69 71 75 65 20 77 69 6e |_t 1i.Un|ique win|
|00003440| 64 6f 77 20 49 44 20 6e | 75 6d 62 65 72 73 20 61 |dow ID n|umbers a|
|00003450| 72 65 20 72 65 70 72 65 | 73 65 6e 74 65 64 20 62 |re repre|sented b|
|00003460| 79 20 74 68 65 20 64 61 | 74 61 20 74 79 70 65 20 |y the da|ta type |
|00003470| 60 60 75 77 69 64 5f 74 | 27 27 2e 0a 2e 49 50 20 |``uwid_t|''...IP |
|00003480| 55 57 49 4e 0a 4c 69 62 | 72 61 72 79 20 72 6f 75 |UWIN.Lib|rary rou|
|00003490| 74 69 6e 65 73 20 77 68 | 69 63 68 20 6f 70 65 72 |tines wh|ich oper|
|000034a0| 61 74 65 20 75 70 6f 6e | 20 65 78 74 65 72 6e 61 |ate upon| externa|
|000034b0| 6c 20 77 69 6e 64 6f 77 | 73 0a 70 75 74 20 61 20 |l window|s.put a |
|000034c0| 72 61 6e 67 65 20 6f 66 | 20 77 69 6e 64 6f 77 20 |range of| window |
|000034d0| 69 6e 66 6f 72 6d 61 74 | 69 6f 6e 20 69 6e 74 6f |informat|ion into|
|000034e0| 20 61 20 73 74 72 75 63 | 74 75 72 65 2e 0a 54 68 | a struc|ture..Th|
|000034f0| 65 20 74 79 70 65 20 60 | 60 55 57 49 4e 27 27 20 |e type `|`UWIN'' |
|00003500| 69 73 20 61 20 70 6f 69 | 6e 74 65 72 20 74 6f 20 |is a poi|nter to |
|00003510| 74 68 65 20 73 74 72 75 | 63 74 75 72 65 2e 0a 41 |the stru|cture..A|
|00003520| 6e 20 6f 62 6a 65 63 74 | 20 6f 66 20 74 68 69 73 |n object| of this|
|00003530| 20 64 61 74 61 74 79 70 | 65 20 69 73 20 72 65 66 | datatyp|e is ref|
|00003540| 65 72 72 65 64 20 74 6f | 20 61 73 20 61 20 60 60 |erred to| as a ``|
|00003550| 77 69 6e 64 6f 77 20 64 | 65 73 63 72 69 70 74 6f |window d|escripto|
|00003560| 72 2e 27 27 0a 54 68 69 | 73 20 64 65 63 6c 61 72 |r.''.Thi|s declar|
|00003570| 61 74 69 6f 6e 20 69 73 | 20 69 6e 74 65 6e 64 65 |ation is| intende|
|00003580| 64 20 74 6f 20 62 65 20 | 75 73 65 64 20 61 73 20 |d to be |used as |
|00003590| 61 6e 20 61 62 73 74 72 | 61 63 74 20 75 6e 69 74 |an abstr|act unit|
|000035a0| 0a 28 69 6e 20 74 68 65 | 20 6d 61 6e 6e 65 72 20 |.(in the| manner |
|000035b0| 6f 66 20 74 68 65 20 73 | 74 61 6e 64 61 72 64 20 |of the s|tandard |
|000035c0| 49 2f 4f 20 6c 69 62 72 | 61 72 79 27 73 20 60 60 |I/O libr|ary's ``|
|000035d0| 46 49 4c 45 5c 20 2a 27 | 27 29 2e 0a 2e 49 50 20 |FILE\ *'|')...IP |
|000035e0| 75 77 74 79 70 65 5f 74 | 0a 57 69 6e 64 6f 77 20 |uwtype_t|.Window |
|000035f0| 65 6d 75 6c 61 74 69 6f | 6e 20 74 79 70 65 73 20 |emulatio|n types |
|00003600| 68 61 76 65 20 74 68 65 | 20 64 61 74 61 20 74 79 |have the| data ty|
|00003610| 70 65 20 60 60 75 77 74 | 79 70 65 5f 74 27 27 2e |pe ``uwt|ype_t''.|
|00003620| 0a 54 68 65 20 66 6f 6c | 6c 6f 77 69 6e 67 20 65 |.The fol|lowing e|
|00003630| 6d 75 6c 61 74 69 6f 6e | 20 74 79 70 65 73 20 61 |mulation| types a|
|00003640| 72 65 20 64 65 66 69 6e | 65 64 3a 0a 2e 44 53 0a |re defin|ed:..DS.|
|00003650| 2e 74 61 20 38 6e 20 32 | 34 6e 20 33 32 6e 0a 23 |.ta 8n 2|4n 32n.#|
|00003660| 64 65 66 69 6e 65 09 55 | 57 54 5f 41 44 4d 33 31 |define.U|WT_ADM31|
|00003670| 09 30 09 2f 2a 20 41 44 | 4d 2d 33 31 20 63 75 72 |.0./* AD|M-31 cur|
|00003680| 73 6f 72 2d 61 64 64 72 | 65 73 73 69 62 6c 65 20 |sor-addr|essible |
|00003690| 74 65 72 6d 69 6e 61 6c | 20 2a 2f 0a 23 64 65 66 |terminal| */.#def|
|000036a0| 69 6e 65 09 55 57 54 5f | 56 54 35 32 09 31 09 2f |ine.UWT_|VT52.1./|
|000036b0| 2a 20 56 54 35 32 20 63 | 75 72 73 6f 72 2d 61 64 |* VT52 c|ursor-ad|
|000036c0| 64 72 65 73 73 69 62 6c | 65 20 74 65 72 6d 69 6e |dressibl|e termin|
|000036d0| 61 6c 20 2a 2f 0a 23 64 | 65 66 69 6e 65 09 55 57 |al */.#d|efine.UW|
|000036e0| 54 5f 41 4e 53 49 09 32 | 09 2f 2a 20 41 4e 53 49 |T_ANSI.2|./* ANSI|
|000036f0| 2d 63 6f 6d 70 61 74 69 | 62 6c 65 20 74 65 72 6d |-compati|ble term|
|00003700| 69 6e 61 6c 20 2a 2f 0a | 23 64 65 66 69 6e 65 09 |inal */.|#define.|
|00003710| 55 57 54 5f 54 45 4b 34 | 30 31 30 09 33 09 2f 2a |UWT_TEK4|010.3./*|
|00003720| 20 54 65 6b 74 72 6f 6e | 69 78 20 34 30 31 30 20 | Tektron|ix 4010 |
|00003730| 67 72 61 70 68 69 63 73 | 20 74 65 72 6d 69 6e 61 |graphics| termina|
|00003740| 6c 20 2a 2f 0a 23 64 65 | 66 69 6e 65 09 55 57 54 |l */.#de|fine.UWT|
|00003750| 5f 46 54 50 09 34 09 2f | 2a 20 46 69 6c 65 20 74 |_FTP.4./|* File t|
|00003760| 72 61 6e 73 66 65 72 20 | 2a 2f 0a 23 64 65 66 69 |ransfer |*/.#defi|
|00003770| 6e 65 09 55 57 54 5f 50 | 52 49 4e 54 09 35 09 2f |ne.UWT_P|RINT.5./|
|00003780| 2a 20 4f 75 74 70 75 74 | 20 74 6f 20 4d 61 63 69 |* Output| to Maci|
|00003790| 6e 74 6f 73 68 20 70 72 | 69 6e 74 65 72 20 2a 2f |ntosh pr|inter */|
|000037a0| 0a 2e 44 45 0a 2e 49 50 | 20 75 77 6f 70 74 5f 74 |..DE..IP| uwopt_t|
|000037b0| 0a 57 69 6e 64 6f 77 20 | 6f 70 74 69 6f 6e 73 20 |.Window |options |
|000037c0| 61 72 65 20 61 73 73 69 | 67 6e 65 64 20 6e 75 6d |are assi|gned num|
|000037d0| 62 65 72 73 20 77 68 6f | 73 65 20 74 79 70 65 20 |bers who|se type |
|000037e0| 69 73 20 60 60 75 77 6f | 70 74 5f 74 27 27 2e 0a |is ``uwo|pt_t''..|
|000037f0| 54 68 65 20 6e 61 6d 65 | 73 20 6f 66 20 74 68 65 |The name|s of the|
|00003800| 20 6f 70 74 69 6f 6e 73 | 20 61 72 65 3a 0a 2e 44 | options| are:..D|
|00003810| 53 0a 2e 74 61 20 38 6e | 20 32 38 6e 20 33 32 6e |S..ta 8n| 28n 32n|
|00003820| 0a 23 64 65 66 69 6e 65 | 09 55 57 4f 50 5f 56 49 |.#define|.UWOP_VI|
|00003830| 53 09 31 09 2f 2a 20 76 | 69 73 69 62 69 6c 69 74 |S.1./* v|isibilit|
|00003840| 79 20 2a 2f 0a 23 64 65 | 66 69 6e 65 09 55 57 4f |y */.#de|fine.UWO|
|00003850| 50 5f 54 59 50 45 09 32 | 09 2f 2a 20 77 69 6e 64 |P_TYPE.2|./* wind|
|00003860| 6f 77 20 74 79 70 65 20 | 2a 2f 0a 23 64 65 66 69 |ow type |*/.#defi|
|00003870| 6e 65 09 55 57 4f 50 5f | 50 4f 53 09 33 09 2f 2a |ne.UWOP_|POS.3./*|
|00003880| 20 77 69 6e 64 6f 77 20 | 70 6f 73 69 74 69 6f 6e | window |position|
|00003890| 20 2a 2f 0a 23 64 65 66 | 69 6e 65 09 55 57 4f 50 | */.#def|ine.UWOP|
|000038a0| 5f 54 49 54 4c 45 09 34 | 09 2f 2a 20 77 69 6e 64 |_TITLE.4|./* wind|
|000038b0| 6f 77 20 74 69 74 6c 65 | 20 2a 2f 0a 23 64 65 66 |ow title| */.#def|
|000038c0| 69 6e 65 09 55 57 4f 50 | 5f 57 53 49 5a 45 09 35 |ine.UWOP|_WSIZE.5|
|000038d0| 09 2f 2a 20 77 69 6e 64 | 6f 77 20 73 69 7a 65 20 |./* wind|ow size |
|000038e0| 28 69 6e 20 62 69 74 73 | 29 20 2a 2f 0a 23 64 65 |(in bits|) */.#de|
|000038f0| 66 69 6e 65 09 55 57 4f | 50 5f 54 53 49 5a 45 09 |fine.UWO|P_TSIZE.|
|00003900| 38 09 2f 2a 20 74 65 72 | 6d 69 6e 61 6c 20 73 69 |8./* ter|minal si|
|00003910| 7a 65 20 28 72 6f 77 2c | 63 6f 6c 29 20 2a 2f 0a |ze (row,|col) */.|
|00003920| 23 64 65 66 69 6e 65 09 | 55 57 4f 50 5f 54 46 4f |#define.|UWOP_TFO|
|00003930| 4e 54 53 5a 09 39 09 2f | 2a 20 73 6d 61 6c 6c 2f |NTSZ.9./|* small/|
|00003940| 6c 61 72 67 65 20 66 6f | 6e 74 20 73 69 7a 65 20 |large fo|nt size |
|00003950| 2a 2f 0a 23 64 65 66 69 | 6e 65 09 55 57 4f 50 5f |*/.#defi|ne.UWOP_|
|00003960| 54 43 4c 49 50 42 09 31 | 30 09 2f 2a 20 63 6c 69 |TCLIPB.1|0./* cli|
|00003970| 70 62 6f 61 72 64 2f 6d | 6f 75 73 65 20 65 6e 63 |pboard/m|ouse enc|
|00003980| 6f 64 69 6e 67 20 2a 2f | 0a 23 64 65 66 69 6e 65 |oding */|.#define|
|00003990| 09 55 57 4f 50 5f 54 42 | 45 4c 4c 09 31 31 09 2f |.UWOP_TB|ELL.11./|
|000039a0| 2a 20 61 75 64 69 62 6c | 65 2c 20 76 69 73 75 61 |* audibl|e, visua|
|000039b0| 6c 20 62 65 6c 6c 20 2a | 2f 0a 23 64 65 66 69 6e |l bell *|/.#defin|
|000039c0| 65 09 55 57 4f 50 5f 54 | 43 55 52 53 09 31 32 09 |e.UWOP_T|CURS.12.|
|000039d0| 2f 2a 20 63 75 72 73 6f | 72 20 73 68 61 70 65 20 |/* curso|r shape |
|000039e0| 2a 2f 0a 2e 44 45 0a 2e | 49 50 20 75 77 6f 70 74 |*/..DE..|IP uwopt|
|000039f0| 63 6d 64 5f 74 0a 54 68 | 65 20 77 69 6e 64 6f 77 |cmd_t.Th|e window|
|00003a00| 20 6f 70 74 69 6f 6e 20 | 63 6f 6d 6d 61 6e 64 73 | option |commands|
|00003a10| 0a 77 68 69 63 68 20 61 | 72 65 20 70 61 73 73 65 |.which a|re passe|
|00003a20| 64 20 62 65 74 77 65 65 | 6e 20 74 68 65 20 4d 61 |d betwee|n the Ma|
|00003a30| 63 69 6e 74 6f 73 68 20 | 61 6e 64 20 74 68 65 20 |cintosh |and the |
|00003a40| 68 6f 73 74 0a 68 61 76 | 65 20 74 79 70 65 20 60 |host.hav|e type `|
|00003a50| 60 75 77 6f 70 74 63 6d | 64 5f 74 27 27 2e 0a 54 |`uwoptcm|d_t''..T|
|00003a60| 68 65 73 65 20 63 6f 6d | 6d 61 6e 64 73 20 61 72 |hese com|mands ar|
|00003a70| 65 3a 0a 2e 44 53 0a 2e | 74 61 20 38 6e 20 32 34 |e:..DS..|ta 8n 24|
|00003a80| 6e 20 33 32 6e 0a 23 64 | 65 66 69 6e 65 09 55 57 |n 32n.#d|efine.UW|
|00003a90| 4f 43 5f 53 45 54 09 30 | 09 09 2f 2a 20 73 65 74 |OC_SET.0|../* set|
|00003aa0| 20 76 61 6c 75 65 20 6f | 66 20 6f 70 74 69 6f 6e | value o|f option|
|00003ab0| 20 2a 2f 0a 23 64 65 66 | 69 6e 65 09 55 57 4f 43 | */.#def|ine.UWOC|
|00003ac0| 5f 41 53 4b 09 32 09 09 | 2f 2a 20 61 73 6b 20 66 |_ASK.2..|/* ask f|
|00003ad0| 6f 72 20 76 61 6c 75 65 | 20 6f 66 20 6f 70 74 69 |or value| of opti|
|00003ae0| 6f 6e 20 2a 2f 0a 23 64 | 65 66 69 6e 65 09 55 57 |on */.#d|efine.UW|
|00003af0| 4f 43 5f 44 4f 09 34 09 | 09 2f 2a 20 72 65 70 6f |OC_DO.4.|./* repo|
|00003b00| 72 74 20 63 68 61 6e 67 | 65 73 20 69 6e 20 76 61 |rt chang|es in va|
|00003b10| 6c 75 65 20 2a 2f 0a 23 | 64 65 66 69 6e 65 09 55 |lue */.#|define.U|
|00003b20| 57 4f 43 5f 44 4f 4e 54 | 09 35 09 09 2f 2a 20 64 |WOC_DONT|.5../* d|
|00003b30| 6f 6e 27 74 20 72 65 70 | 6f 72 74 20 63 68 61 6e |on't rep|ort chan|
|00003b40| 67 65 73 20 2a 2f 0a 23 | 64 65 66 69 6e 65 09 55 |ges */.#|define.U|
|00003b50| 57 4f 43 5f 57 49 4c 4c | 09 36 09 09 2f 2a 20 77 |WOC_WILL|.6../* w|
|00003b60| 69 6c 6c 20 72 65 70 6f | 72 74 20 63 68 61 6e 67 |ill repo|rt chang|
|00003b70| 65 73 20 2a 2f 0a 23 64 | 65 66 69 6e 65 09 55 57 |es */.#d|efine.UW|
|00003b80| 4f 43 5f 57 4f 4e 54 09 | 37 09 09 2f 2a 20 77 6f |OC_WONT.|7../* wo|
|00003b90| 6e 27 74 20 72 65 70 6f | 72 74 20 63 68 61 6e 67 |n't repo|rt chang|
|00003ba0| 65 73 20 2a 2f 0a 2e 44 | 45 0a 2e 49 50 20 22 75 |es */..D|E..IP "u|
|00003bb0| 6e 69 6f 6e 20 75 77 6f | 70 74 76 61 6c 22 0a 57 |nion uwo|ptval".W|
|00003bc0| 68 65 6e 20 61 20 66 75 | 6e 63 74 69 6f 6e 20 72 |hen a fu|nction r|
|00003bd0| 65 71 75 69 72 65 73 20 | 61 20 77 69 6e 64 6f 77 |equires |a window|
|00003be0| 20 6f 70 74 69 6f 6e 20 | 76 61 6c 75 65 20 61 73 | option |value as|
|00003bf0| 20 61 6e 20 61 72 67 75 | 6d 65 6e 74 2c 0a 74 68 | an argu|ment,.th|
|00003c00| 65 20 76 61 6c 75 65 20 | 6f 66 20 74 68 65 20 77 |e value |of the w|
|00003c10| 69 6e 64 6f 77 20 6f 70 | 74 69 6f 6e 20 69 73 20 |indow op|tion is |
|00003c20| 70 6c 61 63 65 64 20 69 | 6e 74 6f 20 61 0a 75 6e |placed i|nto a.un|
|00003c30| 69 6f 6e 20 64 65 63 6c | 61 72 65 64 20 61 73 20 |ion decl|ared as |
|00003c40| 60 60 75 6e 69 6f 6e 20 | 75 77 6f 70 74 76 61 6c |``union |uwoptval|
|00003c50| 27 27 2e 0a 54 68 65 20 | 61 64 64 72 65 73 73 20 |''..The |address |
|00003c60| 6f 66 20 74 68 69 73 20 | 75 6e 69 6f 6e 20 69 73 |of this |union is|
|00003c70| 20 70 61 73 73 65 64 20 | 74 6f 20 74 68 65 20 66 | passed |to the f|
|00003c80| 75 6e 63 74 69 6f 6e 2e | 0a 54 68 69 73 20 75 6e |unction.|.This un|
|00003c90| 69 6f 6e 20 69 73 20 64 | 65 63 6c 61 72 65 64 20 |ion is d|eclared |
|00003ca0| 61 73 20 66 6f 6c 6c 6f | 77 73 3a 0a 2e 44 53 0a |as follo|ws:..DS.|
|00003cb0| 2e 74 61 20 38 6e 20 31 | 36 6e 20 32 34 6e 0a 75 |.ta 8n 1|6n 24n.u|
|00003cc0| 6e 69 6f 6e 20 75 77 6f | 70 74 76 61 6c 20 7b 0a |nion uwo|ptval {.|
|00003cd0| 09 75 6e 73 69 67 6e 65 | 64 20 63 68 61 72 09 75 |.unsigne|d char.u|
|00003ce0| 77 6f 76 5f 31 62 69 74 | 3b 0a 09 75 6e 73 69 67 |wov_1bit|;..unsig|
|00003cf0| 6e 65 64 20 63 68 61 72 | 09 75 77 6f 76 5f 32 62 |ned char|.uwov_2b|
|00003d00| 69 74 3b 0a 09 75 6e 73 | 69 67 6e 65 64 20 63 68 |it;..uns|igned ch|
|00003d10| 61 72 09 75 77 6f 76 5f | 36 62 69 74 3b 0a 09 75 |ar.uwov_|6bit;..u|
|00003d20| 6e 73 69 67 6e 65 64 20 | 73 68 6f 72 74 09 75 77 |nsigned |short.uw|
|00003d30| 6f 76 5f 31 32 62 69 74 | 3b 0a 09 73 74 72 75 63 |ov_12bit|;..struc|
|00003d40| 74 20 7b 0a 09 09 75 6e | 73 69 67 6e 65 64 20 73 |t {...un|signed s|
|00003d50| 68 6f 72 74 20 76 2c 68 | 3b 0a 09 7d 09 09 75 77 |hort v,h|;..}..uw|
|00003d60| 6f 76 5f 70 6f 69 6e 74 | 3b 0a 09 63 68 61 72 09 |ov_point|;..char.|
|00003d70| 09 75 77 6f 76 5f 73 74 | 72 69 6e 67 5b 32 35 36 |.uwov_st|ring[256|
|00003d80| 5d 3b 0a 7d 3b 0a 2e 44 | 45 0a 54 68 65 20 75 6e |];.};..D|E.The un|
|00003d90| 69 6f 6e 20 6d 65 6d 62 | 65 72 20 75 73 65 64 20 |ion memb|er used |
|00003da0| 66 6f 72 20 61 20 70 61 | 72 74 69 63 75 6c 61 72 |for a pa|rticular|
|00003db0| 20 6f 70 74 69 6f 6e 0a | 64 65 70 65 6e 64 73 20 | option.|depends |
|00003dc0| 75 70 6f 6e 20 74 68 65 | 20 6f 70 74 69 6f 6e 20 |upon the| option |
|00003dd0| 6e 75 6d 62 65 72 2e 0a | 41 74 20 70 72 65 73 65 |number..|At prese|
|00003de0| 6e 74 2c 0a 74 68 65 20 | 74 79 70 65 73 20 6f 66 |nt,.the |types of|
|00003df0| 20 74 68 65 20 77 69 6e | 64 6f 77 20 6f 70 74 69 | the win|dow opti|
|00003e00| 6f 6e 73 20 61 6e 64 0a | 63 6f 72 72 65 73 70 6f |ons and.|correspo|
|00003e10| 6e 64 69 6e 67 20 75 6e | 69 6f 6e 20 6d 65 6d 62 |nding un|ion memb|
|00003e20| 65 72 73 20 61 72 65 3a | 0a 2e 44 53 0a 2e 74 61 |ers are:|..DS..ta|
|00003e30| 20 31 69 0a 76 69 73 69 | 62 69 6c 69 74 79 09 75 | 1i.visi|bility.u|
|00003e40| 77 6f 76 5f 31 62 69 74 | 0a 74 79 70 65 09 75 77 |wov_1bit|.type.uw|
|00003e50| 6f 76 5f 36 62 69 74 0a | 70 6f 73 69 74 69 6f 6e |ov_6bit.|position|
|00003e60| 09 75 77 6f 76 5f 70 6f | 69 6e 74 0a 74 69 74 6c |.uwov_po|int.titl|
|00003e70| 65 09 09 75 77 6f 76 5f | 73 74 72 69 6e 67 20 28 |e..uwov_|string (|
|00003e80| 6e 75 6c 6c 20 74 65 72 | 6d 69 6e 61 74 65 64 29 |null ter|minated)|
|00003e90| 0a 62 69 74 20 73 69 7a | 65 09 75 77 6f 76 5f 70 |.bit siz|e.uwov_p|
|00003ea0| 6f 69 6e 74 0a 74 74 79 | 20 73 69 7a 65 09 75 77 |oint.tty| size.uw|
|00003eb0| 6f 76 5f 70 6f 69 6e 74 | 0a 66 6f 6e 74 20 73 69 |ov_point|.font si|
|00003ec0| 7a 65 09 75 77 6f 76 5f | 31 62 69 74 0a 63 6c 69 |ze.uwov_|1bit.cli|
|00003ed0| 70 62 6f 61 72 64 09 75 | 77 6f 76 5f 31 62 69 74 |pboard.u|wov_1bit|
|00003ee0| 0a 62 65 6c 6c 09 09 75 | 77 6f 76 5f 32 62 69 74 |.bell..u|wov_2bit|
|00003ef0| 0a 63 75 72 73 6f 72 20 | 74 79 70 65 09 75 77 6f |.cursor |type.uwo|
|00003f00| 76 5f 31 62 69 74 0a 2e | 44 45 0a 2e 49 50 20 22 |v_1bit..|DE..IP "|
|00003f10| 75 77 65 72 72 5f 74 22 | 0a 57 68 65 6e 20 61 20 |uwerr_t"|.When a |
|00003f20| 6c 69 62 72 61 72 79 20 | 72 6f 75 74 69 6e 65 20 |library |routine |
|00003f30| 72 65 74 75 72 6e 73 20 | 61 6e 20 65 72 72 6f 72 |returns |an error|
|00003f40| 20 69 6e 64 69 63 61 74 | 69 6f 6e 2c 0a 66 75 72 | indicat|ion,.fur|
|00003f50| 74 68 65 72 20 69 6e 66 | 6f 72 6d 61 74 69 6f 6e |ther inf|ormation|
|00003f60| 20 61 62 6f 75 74 20 74 | 68 65 20 74 79 70 65 20 | about t|he type |
|00003f70| 6f 66 20 65 72 72 6f 72 | 20 63 61 6e 20 62 65 0a |of error| can be.|
|00003f80| 6f 62 74 61 69 6e 65 64 | 20 66 72 6f 6d 20 74 68 |obtained| from th|
|00003f90| 65 20 67 6c 6f 62 61 6c | 20 76 61 72 69 61 62 6c |e global| variabl|
|00003fa0| 65 20 60 60 75 77 65 72 | 72 6e 6f 27 27 2e 0a 28 |e ``uwer|rno''..(|
|00003fb0| 44 65 70 65 6e 64 69 6e | 67 20 75 70 6f 6e 20 74 |Dependin|g upon t|
|00003fc0| 68 65 20 74 79 70 65 20 | 6f 66 20 65 72 72 6f 72 |he type |of error|
|00003fd0| 2c 0a 74 68 65 20 65 78 | 74 65 72 6e 61 6c 20 76 |,.the ex|ternal v|
|00003fe0| 61 72 69 61 62 6c 65 20 | 60 60 65 72 72 6e 6f 27 |ariable |``errno'|
|00003ff0| 27 20 6d 61 79 20 61 6c | 73 6f 20 63 6f 6e 74 61 |' may al|so conta|
|00004000| 69 6e 0a 70 65 72 74 69 | 6e 65 6e 74 20 69 6e 66 |in.perti|nent inf|
|00004010| 6f 72 6d 61 74 69 6f 6e | 2e 29 0a 5c 2a 28 75 77 |ormation|.).\*(uw|
|00004020| 20 65 72 72 6f 72 20 6e | 75 6d 62 65 72 73 20 68 | error n|umbers h|
|00004030| 61 76 65 20 74 79 70 65 | 20 60 60 75 77 65 72 72 |ave type| ``uwerr|
|00004040| 5f 74 27 27 2c 0a 61 6e | 64 20 61 72 65 20 64 65 |_t'',.an|d are de|
|00004050| 66 69 6e 65 64 20 61 73 | 20 66 6f 6c 6c 6f 77 73 |fined as| follows|
|00004060| 3a 0a 2e 44 53 0a 2e 74 | 61 20 38 6e 20 32 34 6e |:..DS..t|a 8n 24n|
|00004070| 20 33 32 6e 0a 23 64 65 | 66 69 6e 65 09 55 57 45 | 32n.#de|fine.UWE|
|00004080| 5f 4e 4f 4e 45 09 30 09 | 2f 2a 20 6e 6f 20 65 72 |_NONE.0.|/* no er|
|00004090| 72 6f 72 20 2a 2f 0a 23 | 64 65 66 69 6e 65 09 55 |ror */.#|define.U|
|000040a0| 57 45 5f 45 52 52 4e 4f | 09 31 09 2f 2a 20 73 79 |WE_ERRNO|.1./* sy|
|000040b0| 73 74 65 6d 20 63 61 6c | 6c 20 65 72 72 6f 72 2c |stem cal|l error,|
|000040c0| 20 63 6f 6e 73 75 6c 74 | 20 65 72 72 6e 6f 20 2a | consult| errno *|
|000040d0| 2f 0a 23 64 65 66 69 6e | 65 09 55 57 45 5f 4e 58 |/.#defin|e.UWE_NX|
|000040e0| 54 59 50 45 09 32 09 2f | 2a 20 6e 6f 6e 65 78 69 |TYPE.2./|* nonexi|
|000040f0| 73 74 65 6e 74 20 77 69 | 6e 64 6f 77 20 74 79 70 |stent wi|ndow typ|
|00004100| 65 20 2a 2f 0a 23 64 65 | 66 69 6e 65 09 55 57 45 |e */.#de|fine.UWE|
|00004110| 5f 44 55 50 49 44 09 33 | 09 2f 2a 20 77 69 6e 64 |_DUPID.3|./* wind|
|00004120| 6f 77 20 49 44 20 64 75 | 70 6c 69 63 61 74 65 64 |ow ID du|plicated|
|00004130| 20 28 69 6e 20 75 73 65 | 29 20 2a 2f 0a 23 64 65 | (in use|) */.#de|
|00004140| 66 69 6e 65 09 55 57 45 | 5f 4e 4f 54 49 4d 50 4c |fine.UWE|_NOTIMPL|
|00004150| 09 34 09 2f 2a 20 6f 70 | 65 72 61 74 69 6f 6e 20 |.4./* op|eration |
|00004160| 6e 6f 74 20 69 6d 70 6c | 65 6d 65 6e 74 65 64 20 |not impl|emented |
|00004170| 79 65 74 20 2a 2f 0a 23 | 64 65 66 69 6e 65 09 55 |yet */.#|define.U|
|00004180| 57 45 5f 4e 58 53 45 52 | 56 09 35 09 2f 2a 20 6e |WE_NXSER|V.5./* n|
|00004190| 6f 6e 2d 65 78 69 73 74 | 65 6e 74 20 73 65 72 76 |on-exist|ent serv|
|000041a0| 65 72 20 2a 2f 0a 23 64 | 65 66 69 6e 65 09 55 57 |er */.#d|efine.UW|
|000041b0| 45 5f 4e 4f 4d 45 4d 09 | 36 09 2f 2a 20 75 6e 61 |E_NOMEM.|6./* una|
|000041c0| 62 6c 65 20 74 6f 20 61 | 6c 6c 6f 63 61 74 65 20 |ble to a|llocate |
|000041d0| 72 65 71 75 69 72 65 64 | 20 6d 65 6d 6f 72 79 20 |required| memory |
|000041e0| 2a 2f 0a 23 64 65 66 69 | 6e 65 09 55 57 45 5f 49 |*/.#defi|ne.UWE_I|
|000041f0| 4e 56 41 4c 09 37 09 2f | 2a 20 69 6e 76 61 6c 69 |NVAL.7./|* invali|
|00004200| 64 20 61 72 67 75 6d 65 | 6e 74 20 74 6f 20 66 75 |d argume|nt to fu|
|00004210| 6e 63 74 69 6f 6e 20 2a | 2f 0a 23 64 65 66 69 6e |nction *|/.#defin|
|00004220| 65 09 55 57 45 5f 4e 4f | 43 54 4c 09 38 09 2f 2a |e.UWE_NO|CTL.8./*|
|00004230| 20 6e 6f 20 63 6f 6e 74 | 72 6f 6c 20 66 69 6c 65 | no cont|rol file|
|00004240| 20 64 65 73 63 72 69 70 | 74 6f 72 20 2a 2f 0a 2e | descrip|tor */..|
|00004250| 44 45 0a 2e 53 48 0a 49 | 6e 74 65 72 6e 61 6c 20 |DE..SH.I|nternal |
|00004260| 57 69 6e 64 6f 77 20 49 | 6e 74 65 72 66 61 63 65 |Window I|nterface|
|00004270| 0a 2e 50 50 0a 57 68 65 | 6e 20 61 6e 20 69 6e 74 |..PP.Whe|n an int|
|00004280| 65 72 6e 61 6c 20 77 69 | 6e 64 6f 77 20 69 73 20 |ernal wi|ndow is |
|00004290| 63 72 65 61 74 65 64 20 | 62 79 20 61 6e 20 65 78 |created |by an ex|
|000042a0| 74 65 72 6e 61 6c 20 70 | 72 6f 63 65 73 73 2c 0a |ternal p|rocess,.|
|000042b0| 61 20 55 4e 49 58 2d 64 | 6f 6d 61 69 6e 20 64 61 |a UNIX-d|omain da|
|000042c0| 74 61 67 72 61 6d 20 69 | 73 20 73 65 6e 74 20 74 |tagram i|s sent t|
|000042d0| 6f 20 74 68 65 20 73 65 | 72 76 65 72 2e 0a 54 68 |o the se|rver..Th|
|000042e0| 69 73 20 64 61 74 61 67 | 72 61 6d 20 63 6f 6e 74 |is datag|ram cont|
|000042f0| 61 69 6e 73 0a 28 61 73 | 20 60 60 61 63 63 65 73 |ains.(as| ``acces|
|00004300| 73 20 72 69 67 68 74 73 | 27 27 29 0a 61 20 66 69 |s rights|'').a fi|
|00004310| 6c 65 20 64 65 73 63 72 | 69 70 74 6f 72 20 66 6f |le descr|iptor fo|
|00004320| 72 20 74 68 65 20 60 60 | 6d 61 73 74 65 72 27 27 |r the ``|master''|
|00004330| 20 73 69 64 65 20 6f 66 | 20 61 20 70 73 65 75 64 | side of| a pseud|
|00004340| 6f 2d 74 65 72 6d 69 6e | 61 6c 2e 0a 54 68 65 20 |o-termin|al..The |
|00004350| 73 65 72 76 65 72 20 61 | 73 73 75 6d 65 73 20 74 |server a|ssumes t|
|00004360| 68 61 74 20 74 68 65 20 | 65 78 74 65 72 6e 61 6c |hat the |external|
|00004370| 20 70 72 6f 63 65 73 73 | 0a 68 61 73 20 73 74 61 | process|.has sta|
|00004380| 72 74 65 64 20 73 6f 6d | 65 20 70 72 6f 67 72 61 |rted som|e progra|
|00004390| 6d 20 6f 6e 20 74 68 65 | 20 60 60 73 6c 61 76 65 |m on the| ``slave|
|000043a0| 27 27 20 73 69 64 65 20 | 6f 66 20 74 68 65 20 70 |'' side |of the p|
|000043b0| 73 65 75 64 6f 2d 74 65 | 72 6d 69 6e 61 6c 2e 0a |seudo-te|rminal..|
|000043c0| 41 66 74 65 72 20 73 65 | 6e 64 69 6e 67 20 74 68 |After se|nding th|
|000043d0| 65 20 64 61 74 61 67 72 | 61 6d 2c 0a 74 68 65 20 |e datagr|am,.the |
|000043e0| 73 65 6e 64 65 72 20 68 | 61 73 20 6e 6f 20 64 69 |sender h|as no di|
|000043f0| 72 65 63 74 20 68 61 6e | 64 6c 65 20 74 6f 20 6d |rect han|dle to m|
|00004400| 61 6e 69 70 75 6c 61 74 | 65 0a 74 68 65 20 77 69 |anipulat|e.the wi|
|00004410| 6e 64 6f 77 2e 0a 49 74 | 20 68 61 73 2c 0a 69 6e |ndow..It| has,.in|
|00004420| 20 65 66 66 65 63 74 2c | 0a 72 65 6c 69 6e 71 75 | effect,|.relinqu|
|00004430| 69 73 68 65 64 20 61 6c | 6c 20 63 6f 6e 74 72 6f |ished al|l contro|
|00004440| 6c 2e 0a 28 49 74 20 73 | 68 6f 75 6c 64 20 63 6c |l..(It s|hould cl|
|00004450| 6f 73 65 20 74 68 65 20 | 6d 61 73 74 65 72 20 73 |ose the |master s|
|00004460| 69 64 65 20 6f 66 20 74 | 68 65 20 70 73 65 75 64 |ide of t|he pseud|
|00004470| 6f 2d 74 65 72 6d 69 6e | 61 6c 0a 61 66 74 65 72 |o-termin|al.after|
|00004480| 20 73 65 6e 64 69 6e 67 | 20 74 68 65 20 64 61 74 | sending| the dat|
|00004490| 61 67 72 61 6d 2e 29 0a | 54 6f 20 70 72 6f 76 69 |agram.).|To provi|
|000044a0| 64 65 20 73 6f 6d 65 20 | 61 64 64 69 74 69 6f 6e |de some |addition|
|000044b0| 61 6c 20 66 6c 65 78 69 | 62 69 6c 69 74 79 2c 0a |al flexi|bility,.|
|000044c0| 69 74 20 69 73 20 70 6f | 73 73 69 62 6c 65 20 74 |it is po|ssible t|
|000044d0| 6f 20 63 68 61 6e 67 65 | 20 74 68 65 20 76 61 6c |o change| the val|
|000044e0| 75 65 20 6f 66 20 61 20 | 77 69 6e 64 6f 77 20 6f |ue of a |window o|
|000044f0| 70 74 69 6f 6e 0a 66 6f | 72 20 61 6e 79 20 77 69 |ption.fo|r any wi|
|00004500| 6e 64 6f 77 0a 28 65 76 | 65 6e 20 60 60 65 78 74 |ndow.(ev|en ``ext|
|00004510| 65 72 6e 61 6c 27 27 20 | 77 69 6e 64 6f 77 73 29 |ernal'' |windows)|
|00004520| 0a 69 66 20 74 68 65 20 | 77 69 6e 64 6f 77 27 73 |.if the |window's|
|00004530| 20 75 6e 69 71 75 65 20 | 49 44 20 69 73 20 6b 6e | unique |ID is kn|
|00004540| 6f 77 6e 2e 0a 54 68 65 | 20 63 72 65 61 74 6f 72 |own..The| creator|
|00004550| 20 6f 66 20 74 68 65 20 | 77 69 6e 64 6f 77 20 68 | of the |window h|
|00004560| 61 73 20 6e 6f 20 73 70 | 65 63 69 61 6c 20 70 72 |as no sp|ecial pr|
|00004570| 69 76 69 6c 65 67 65 73 | 0a 69 6e 20 74 68 69 73 |ivileges|.in this|
|00004580| 20 72 65 67 61 72 64 2e | 0a 2e 4c 50 0a 5b 4f 6e | regard.|..LP.[On|
|00004590| 65 20 74 68 69 6e 67 20 | 77 68 69 63 68 20 74 68 |e thing |which th|
|000045a0| 65 20 69 6e 74 65 72 6e | 61 6c 20 77 69 6e 64 6f |e intern|al windo|
|000045b0| 77 20 72 6f 75 74 69 6e | 65 73 0a 69 6e 20 74 68 |w routin|es.in th|
|000045c0| 65 20 5c 2a 28 75 77 20 | 6c 69 62 72 61 72 79 20 |e \*(uw |library |
|000045d0| 63 6f 6d 70 6c 65 74 65 | 6c 79 20 69 67 6e 6f 72 |complete|ly ignor|
|000045e0| 65 0a 69 73 20 74 68 65 | 20 66 61 63 74 20 74 68 |e.is the| fact th|
|000045f0| 61 74 20 64 61 74 61 67 | 72 61 6d 73 20 61 72 65 |at datag|rams are|
|00004600| 20 6e 6f 74 20 67 75 61 | 72 61 6e 74 65 65 64 20 | not gua|ranteed |
|00004610| 74 6f 20 62 65 20 72 65 | 6c 69 61 62 6c 65 2e 0a |to be re|liable..|
|00004620| 55 4e 49 58 2d 64 6f 6d | 61 69 6e 20 64 61 74 61 |UNIX-dom|ain data|
|00004630| 67 72 61 6d 73 20 61 6c | 6d 6f 73 74 20 61 6c 77 |grams al|most alw|
|00004640| 61 79 73 20 73 65 65 6d | 20 74 6f 20 77 6f 72 6b |ays seem| to work|
|00004650| 2c 0a 62 75 74 20 74 68 | 65 79 20 63 61 6e 20 66 |,.but th|ey can f|
|00004660| 61 69 6c 2e 0a 49 6e 20 | 74 68 65 20 61 75 74 68 |ail..In |the auth|
|00004670| 6f 72 27 73 20 65 78 70 | 65 72 69 65 6e 63 65 20 |or's exp|erience |
|00004680| 74 68 69 73 20 68 61 73 | 20 6e 65 76 65 72 20 62 |this has| never b|
|00004690| 65 65 6e 20 61 20 70 72 | 6f 62 6c 65 6d 2c 0a 62 |een a pr|oblem,.b|
|000046a0| 75 74 20 6c 65 74 20 74 | 68 65 20 75 73 65 72 20 |ut let t|he user |
|000046b0| 62 65 77 61 72 65 2e 5d | 0a 2e 4c 50 0a 54 68 65 |beware.]|..LP.The|
|000046c0| 20 66 6f 6c 6c 6f 77 69 | 6e 67 20 72 6f 75 74 69 | followi|ng routi|
|000046d0| 6e 65 73 20 61 72 65 20 | 61 76 61 69 6c 61 62 6c |nes are |availabl|
|000046e0| 65 3a 0a 2e 49 50 20 75 | 77 5f 66 6f 72 6b 20 31 |e:..IP u|w_fork 1|
|000046f0| 69 0a 54 68 69 73 20 72 | 6f 75 74 69 6e 65 20 69 |i.This r|outine i|
|00004700| 73 20 73 69 6d 69 6c 61 | 72 20 69 6e 20 63 6f 6e |s simila|r in con|
|00004710| 63 65 70 74 20 74 6f 20 | 74 68 65 20 73 79 73 74 |cept to |the syst|
|00004720| 65 6d 20 63 61 6c 6c 20 | 60 60 66 6f 72 6b 27 27 |em call |``fork''|
|00004730| 2e 0a 49 74 20 63 72 65 | 61 74 65 73 20 61 20 6e |..It cre|ates a n|
|00004740| 65 77 20 70 72 6f 63 65 | 73 73 0a 61 6e 64 20 72 |ew proce|ss.and r|
|00004750| 65 74 75 72 6e 73 20 74 | 77 69 63 65 20 5c 28 65 |eturns t|wice \(e|
|00004760| 6d 0a 6f 6e 63 65 20 69 | 6e 20 74 68 65 20 70 61 |m.once i|n the pa|
|00004770| 72 65 6e 74 20 61 6e 64 | 20 6f 6e 63 65 20 69 6e |rent and| once in|
|00004780| 20 74 68 65 20 63 68 69 | 6c 64 2e 0a 49 6e 20 61 | the chi|ld..In a|
|00004790| 64 64 69 74 69 6f 6e 20 | 74 6f 20 63 72 65 61 74 |ddition |to creat|
|000047a0| 69 6e 67 20 61 20 6e 65 | 77 20 70 72 6f 63 65 73 |ing a ne|w proces|
|000047b0| 73 2c 0a 60 60 75 77 5f | 66 6f 72 6b 27 27 20 61 |s,.``uw_|fork'' a|
|000047c0| 6c 73 6f 20 61 72 72 61 | 6e 67 65 73 20 66 6f 72 |lso arra|nges for|
|000047d0| 20 74 68 65 20 6e 65 77 | 20 70 72 6f 63 65 73 73 | the new| process|
|000047e0| 20 74 6f 20 62 65 0a 61 | 73 73 6f 63 69 61 74 65 | to be.a|ssociate|
|000047f0| 64 20 77 69 74 68 20 61 | 6e 20 69 6e 74 65 72 6e |d with a|n intern|
|00004800| 61 6c 20 77 69 6e 64 6f | 77 2e 0a 49 74 20 6f 70 |al windo|w..It op|
|00004810| 65 6e 73 20 61 20 70 73 | 65 75 64 6f 2d 74 65 72 |ens a ps|eudo-ter|
|00004820| 6d 69 6e 61 6c 2c 0a 72 | 65 64 69 72 65 63 74 73 |minal,.r|edirects|
|00004830| 20 74 68 65 20 63 68 69 | 6c 64 27 73 20 73 74 61 | the chi|ld's sta|
|00004840| 6e 64 61 72 64 20 69 6e | 70 75 74 2c 0a 73 74 61 |ndard in|put,.sta|
|00004850| 6e 64 61 72 64 20 6f 75 | 74 70 75 74 2c 0a 61 6e |ndard ou|tput,.an|
|00004860| 64 20 73 74 61 6e 64 61 | 72 64 20 65 72 72 6f 72 |d standa|rd error|
|00004870| 2c 0a 61 6e 64 20 73 65 | 6e 64 73 20 61 20 55 4e |,.and se|nds a UN|
|00004880| 49 58 2d 64 6f 6d 61 69 | 6e 20 64 61 74 61 67 72 |IX-domai|n datagr|
|00004890| 61 6d 20 74 6f 20 74 68 | 65 20 5c 2a 28 75 77 20 |am to th|e \*(uw |
|000048a0| 73 65 72 76 65 72 2e 0a | 49 74 20 72 65 74 75 72 |server..|It retur|
|000048b0| 6e 73 20 74 68 65 20 75 | 6e 69 71 75 65 20 49 44 |ns the u|nique ID|
|000048c0| 20 61 73 73 6f 63 69 61 | 74 65 64 20 77 69 74 68 | associa|ted with|
|000048d0| 20 74 68 65 20 77 69 6e | 64 6f 77 0a 69 6e 20 74 | the win|dow.in t|
|000048e0| 68 65 20 70 61 72 65 6e | 74 2c 0a 61 6e 64 20 72 |he paren|t,.and r|
|000048f0| 65 74 75 72 6e 73 20 30 | 20 69 6e 20 74 68 65 20 |eturns 0| in the |
|00004900| 63 68 69 6c 64 2e 0a 28 | 5c 28 6d 69 31 20 69 73 |child..(|\(mi1 is|
|00004910| 20 72 65 74 75 72 6e 65 | 64 20 69 66 20 74 68 65 | returne|d if the|
|00004920| 20 72 6f 75 74 69 6e 65 | 20 66 61 69 6c 73 2e 29 | routine| fails.)|
|00004930| 0a 2e 44 53 0a 75 77 69 | 64 5f 74 20 75 77 5f 66 |..DS.uwi|d_t uw_f|
|00004940| 6f 72 6b 28 75 77 74 79 | 70 65 5f 74 20 77 74 79 |ork(uwty|pe_t wty|
|00004950| 70 65 2c 20 69 6e 74 20 | 2a 70 69 64 70 29 3b 0a |pe, int |*pidp);.|
|00004960| 2e 44 45 0a 54 68 65 20 | 66 69 72 73 74 20 61 72 |.DE.The |first ar|
|00004970| 67 75 6d 65 6e 74 20 73 | 70 65 63 69 66 69 65 73 |gument s|pecifies|
|00004980| 20 74 68 65 20 74 79 70 | 65 20 6f 66 20 74 68 65 | the typ|e of the|
|00004990| 20 6e 65 77 20 77 69 6e | 64 6f 77 2e 0a 49 66 20 | new win|dow..If |
|000049a0| 74 68 65 20 73 65 63 6f | 6e 64 20 61 72 67 75 6d |the seco|nd argum|
|000049b0| 65 6e 74 20 74 6f 20 60 | 60 75 77 5f 66 6f 72 6b |ent to `|`uw_fork|
|000049c0| 27 27 20 69 73 20 61 20 | 6e 6f 6e 2d 4e 55 4c 4c |'' is a |non-NULL|
|000049d0| 20 70 6f 69 6e 74 65 72 | 2c 0a 74 68 65 20 70 72 | pointer|,.the pr|
|000049e0| 6f 63 65 73 73 2d 49 44 | 20 6f 66 20 74 68 65 20 |ocess-ID| of the |
|000049f0| 63 68 69 6c 64 20 77 69 | 6c 6c 20 62 65 20 73 74 |child wi|ll be st|
|00004a00| 6f 72 65 64 20 61 74 20 | 74 68 61 74 20 61 64 64 |ored at |that add|
|00004a10| 72 65 73 73 0a 69 6e 20 | 74 68 65 20 70 61 72 65 |ress.in |the pare|
|00004a20| 6e 74 20 70 72 6f 63 65 | 73 73 2e 0a 28 49 6e 20 |nt proce|ss..(In |
|00004a30| 74 68 65 20 63 68 69 6c | 64 2c 20 60 60 2a 70 69 |the chil|d, ``*pi|
|00004a40| 64 70 27 27 20 77 69 6c | 6c 20 62 65 20 7a 65 72 |dp'' wil|l be zer|
|00004a50| 6f 2e 29 0a 2e 49 50 20 | 75 77 5f 63 6d 64 0a 54 |o.)..IP |uw_cmd.T|
|00004a60| 68 69 73 20 72 6f 75 74 | 69 6e 65 20 62 75 69 6c |his rout|ine buil|
|00004a70| 64 73 20 75 70 6f 6e 20 | 74 68 65 20 66 75 6e 63 |ds upon |the func|
|00004a80| 74 69 6f 6e 61 6c 69 74 | 79 20 6f 66 20 74 68 65 |tionalit|y of the|
|00004a90| 20 60 60 75 77 5f 66 6f | 72 6b 27 27 20 72 6f 75 | ``uw_fo|rk'' rou|
|00004aa0| 74 69 6e 65 2e 0a 49 74 | 20 63 72 65 61 74 65 73 |tine..It| creates|
|00004ab0| 20 61 20 6e 65 77 20 77 | 69 6e 64 6f 77 20 77 69 | a new w|indow wi|
|00004ac0| 74 68 20 60 60 75 77 5f | 66 6f 72 6b 27 27 0a 61 |th ``uw_|fork''.a|
|00004ad0| 6e 64 20 74 68 65 6e 20 | 65 78 65 63 75 74 65 73 |nd then |executes|
|00004ae0| 20 61 20 73 70 65 63 69 | 66 69 65 64 20 63 6f 6d | a speci|fied com|
|00004af0| 6d 61 6e 64 2e 0a 49 74 | 20 74 61 6b 65 73 20 74 |mand..It| takes t|
|00004b00| 68 65 20 77 69 6e 64 6f | 77 20 74 79 70 65 2c 0a |he windo|w type,.|
|00004b10| 74 68 65 20 6e 61 6d 65 | 20 6f 66 20 61 6e 20 65 |the name| of an e|
|00004b20| 78 65 63 75 74 61 62 6c | 65 20 66 69 6c 65 2c 0a |xecutabl|e file,.|
|00004b30| 61 6e 64 20 61 6e 20 61 | 72 67 75 6d 65 6e 74 20 |and an a|rgument |
|00004b40| 6c 69 73 74 0a 61 73 20 | 70 61 72 61 6d 65 74 65 |list.as |paramete|
|00004b50| 72 73 3b 0a 69 74 20 75 | 73 65 73 20 74 68 65 73 |rs;.it u|ses thes|
|00004b60| 65 20 61 73 20 61 72 67 | 75 6d 65 6e 74 73 20 74 |e as arg|uments t|
|00004b70| 6f 20 60 60 75 77 5f 66 | 6f 72 6b 27 27 0a 61 6e |o ``uw_f|ork''.an|
|00004b80| 64 20 74 68 65 20 43 20 | 6c 69 62 72 61 72 79 20 |d the C |library |
|00004b90| 72 6f 75 74 69 6e 65 20 | 60 60 65 78 65 63 76 70 |routine |``execvp|
|00004ba0| 27 27 2e 0a 49 74 20 72 | 65 74 75 72 6e 73 20 74 |''..It r|eturns t|
|00004bb0| 68 65 20 77 69 6e 64 6f | 77 20 49 44 20 6e 75 6d |he windo|w ID num|
|00004bc0| 62 65 72 20 74 6f 20 69 | 74 73 20 63 61 6c 6c 65 |ber to i|ts calle|
|00004bd0| 72 3a 0a 2e 44 53 0a 75 | 77 69 64 5f 74 20 75 77 |r:..DS.u|wid_t uw|
|00004be0| 5f 63 6d 64 28 75 77 74 | 79 70 65 5f 74 20 77 74 |_cmd(uwt|ype_t wt|
|00004bf0| 79 70 65 2c 20 63 68 61 | 72 20 2a 66 69 6c 65 2c |ype, cha|r *file,|
|00004c00| 20 63 68 61 72 20 2a 2a | 61 72 67 76 29 3b 0a 2e | char **|argv);..|
|00004c10| 44 45 0a 28 5c 28 6d 69 | 31 20 69 73 20 72 65 74 |DE.(\(mi|1 is ret|
|00004c20| 75 72 6e 65 64 20 69 66 | 20 74 68 65 20 72 6f 75 |urned if| the rou|
|00004c30| 74 69 6e 65 20 66 61 69 | 6c 73 2e 29 0a 2e 49 50 |tine fai|ls.)..IP|
|00004c40| 20 75 77 5f 73 68 65 6c | 6c 0a 60 60 75 77 5f 73 | uw_shel|l.``uw_s|
|00004c50| 68 65 6c 6c 27 27 20 69 | 73 20 73 69 6d 69 6c 61 |hell'' i|s simila|
|00004c60| 72 20 74 6f 20 60 60 75 | 77 5f 63 6d 64 27 27 20 |r to ``u|w_cmd'' |
|00004c70| 65 78 63 65 70 74 20 74 | 68 61 74 20 69 74 0a 65 |except t|hat it.e|
|00004c80| 78 65 63 75 74 65 73 20 | 61 6e 20 61 72 62 69 74 |xecutes |an arbit|
|00004c90| 72 61 72 79 20 73 68 65 | 6c 6c 20 63 6f 6d 6d 61 |rary she|ll comma|
|00004ca0| 6e 64 3a 0a 2e 44 53 0a | 75 77 69 64 5f 74 20 75 |nd:..DS.|uwid_t u|
|00004cb0| 77 5f 73 68 65 6c 6c 28 | 75 77 74 79 70 65 5f 74 |w_shell(|uwtype_t|
|00004cc0| 20 77 74 79 70 65 2c 20 | 63 68 61 72 20 2a 63 6d | wtype, |char *cm|
|00004cd0| 64 29 3b 0a 2e 44 45 0a | 28 5c 28 6d 69 31 20 69 |d);..DE.|(\(mi1 i|
|00004ce0| 73 20 72 65 74 75 72 6e | 65 64 20 69 66 20 74 68 |s return|ed if th|
|00004cf0| 65 20 72 6f 75 74 69 6e | 65 20 66 61 69 6c 73 2e |e routin|e fails.|
|00004d00| 29 0a 42 79 20 64 65 66 | 61 75 6c 74 20 74 68 65 |).By def|ault the|
|00004d10| 20 42 6f 75 72 6e 65 20 | 73 68 65 6c 6c 20 69 73 | Bourne |shell is|
|00004d20| 20 75 73 65 64 3b 0a 68 | 6f 77 65 76 65 72 2c 0a | used;.h|owever,.|
|00004d30| 74 68 65 20 73 68 65 6c | 6c 20 6d 61 79 20 62 65 |the shel|l may be|
|00004d40| 20 63 68 61 6e 67 65 64 | 20 62 79 20 70 61 74 63 | changed| by patc|
|00004d50| 68 69 6e 67 20 74 68 65 | 20 67 6c 6f 62 61 6c 20 |hing the| global |
|00004d60| 76 61 72 69 61 62 6c 65 | 20 60 60 75 77 73 68 65 |variable| ``uwshe|
|00004d70| 6c 6c 6e 61 6d 65 27 27 | 2e 0a 2e 44 53 0a 63 68 |llname''|...DS.ch|
|00004d80| 61 72 20 2a 75 77 73 68 | 65 6c 6c 6e 61 6d 65 20 |ar *uwsh|ellname |
|00004d90| 3d 20 22 2f 62 69 6e 2f | 73 68 22 3b 0a 2e 44 45 |= "/bin/|sh";..DE|
|00004da0| 0a 2e 49 50 20 75 77 5f | 72 73 65 74 6f 70 74 0a |..IP uw_|rsetopt.|
|00004db0| 54 68 69 73 20 72 6f 75 | 74 69 6e 65 20 63 68 61 |This rou|tine cha|
|00004dc0| 6e 67 65 73 20 74 68 65 | 20 76 61 6c 75 65 20 6f |nges the| value o|
|00004dd0| 66 20 61 20 77 69 6e 64 | 6f 77 20 6f 70 74 69 6f |f a wind|ow optio|
|00004de0| 6e 0a 66 6f 72 20 61 6e | 20 65 78 69 73 74 69 6e |n.for an| existin|
|00004df0| 67 20 77 69 6e 64 6f 77 | 0a 28 6e 61 6d 65 64 20 |g window|.(named |
|00004e00| 61 73 20 61 20 77 69 6e | 64 6f 77 20 49 44 29 2e |as a win|dow ID).|
|00004e10| 0a 54 68 65 20 77 69 6e | 64 6f 77 20 6d 61 79 20 |.The win|dow may |
|00004e20| 62 65 20 65 69 74 68 65 | 72 20 69 6e 74 65 72 6e |be eithe|r intern|
|00004e30| 61 6c 20 6f 72 20 65 78 | 74 65 72 6e 61 6c 2e 0a |al or ex|ternal..|
|00004e40| 54 68 65 20 73 70 65 63 | 69 66 69 65 64 20 77 69 |The spec|ified wi|
|00004e50| 6e 64 6f 77 20 6f 70 74 | 69 6f 6e 20 69 73 20 73 |ndow opt|ion is s|
|00004e60| 65 74 20 74 6f 20 61 20 | 64 65 73 69 72 65 64 20 |et to a |desired |
|00004e70| 76 61 6c 75 65 2e 0a 5a | 65 72 6f 20 69 73 20 72 |value..Z|ero is r|
|00004e80| 65 74 75 72 6e 65 64 20 | 69 66 20 74 68 65 20 61 |eturned |if the a|
|00004e90| 70 70 72 6f 70 72 69 61 | 74 65 20 55 4e 49 58 2d |ppropria|te UNIX-|
|00004ea0| 64 6f 6d 61 69 6e 20 6d | 65 73 73 61 67 65 0a 77 |domain m|essage.w|
|00004eb0| 61 73 20 73 75 63 63 65 | 73 73 66 75 6c 6c 79 20 |as succe|ssfully |
|00004ec0| 73 65 6e 74 3b 0a 5c 28 | 6d 69 31 20 69 73 20 72 |sent;.\(|mi1 is r|
|00004ed0| 65 74 75 72 6e 65 64 20 | 69 66 20 74 68 65 20 6f |eturned |if the o|
|00004ee0| 70 65 72 61 74 69 6f 6e | 20 66 61 69 6c 65 64 2e |peration| failed.|
|00004ef0| 0a 28 53 69 6e 63 65 20 | 60 60 75 77 5f 72 73 65 |.(Since |``uw_rse|
|00004f00| 74 6f 70 74 27 27 20 64 | 6f 65 73 20 6e 6f 74 20 |topt'' d|oes not |
|00004f10| 72 65 63 65 69 76 65 20 | 61 20 72 65 70 6c 79 20 |receive |a reply |
|00004f20| 66 72 6f 6d 20 74 68 65 | 20 73 65 72 76 65 72 2c |from the| server,|
|00004f30| 0a 69 74 20 69 73 20 75 | 6e 61 62 6c 65 20 74 6f |.it is u|nable to|
|00004f40| 20 64 65 74 65 72 6d 69 | 6e 65 20 77 68 65 74 68 | determi|ne wheth|
|00004f50| 65 72 20 6f 72 20 6e 6f | 74 20 74 68 65 20 63 6f |er or no|t the co|
|00004f60| 6d 6d 61 6e 64 20 60 60 | 73 75 63 63 65 65 64 65 |mmand ``|succeede|
|00004f70| 64 27 27 2e 0a 52 61 74 | 68 65 72 2c 0a 69 74 20 |d''..Rat|her,.it |
|00004f80| 72 65 74 75 72 6e 73 20 | 7a 65 72 6f 20 69 66 20 |returns |zero if |
|00004f90| 74 68 65 20 63 6f 6d 6d | 61 6e 64 20 77 61 73 20 |the comm|and was |
|00004fa0| 73 75 63 63 65 73 73 66 | 75 6c 6c 79 20 74 72 61 |successf|ully tra|
|00004fb0| 6e 73 6d 69 74 74 65 64 | 2e 29 0a 2e 44 53 0a 69 |nsmitted|.)..DS.i|
|00004fc0| 6e 74 20 75 77 5f 72 73 | 65 74 6f 70 74 28 75 77 |nt uw_rs|etopt(uw|
|00004fd0| 69 64 5f 74 20 75 77 69 | 64 2c 20 75 77 6f 70 74 |id_t uwi|d, uwopt|
|00004fe0| 5f 74 20 6f 70 74 6e 75 | 6d 2c 20 75 6e 69 6f 6e |_t optnu|m, union|
|00004ff0| 20 75 77 6f 70 74 76 61 | 6c 20 2a 6f 70 74 76 61 | uwoptva|l *optva|
|00005000| 6c 29 3b 0a 2e 44 45 0a | 60 60 6f 70 74 76 61 6c |l);..DE.|``optval|
|00005010| 27 27 20 70 6f 69 6e 74 | 73 20 74 6f 20 61 20 60 |'' point|s to a `|
|00005020| 60 75 6e 69 6f 6e 20 75 | 77 6f 70 74 76 61 6c 27 |`union u|woptval'|
|00005030| 27 20 73 74 72 75 63 74 | 75 72 65 0a 28 64 65 73 |' struct|ure.(des|
|00005040| 63 72 69 62 65 64 20 61 | 62 6f 76 65 29 0a 69 6e |cribed a|bove).in|
|00005050| 20 77 68 69 63 68 20 74 | 68 65 20 6d 65 6d 62 65 | which t|he membe|
|00005060| 72 20 63 6f 72 72 65 73 | 70 6f 6e 64 69 6e 67 20 |r corres|ponding |
|00005070| 74 6f 20 60 60 6f 70 74 | 6e 75 6d 27 27 0a 68 61 |to ``opt|num''.ha|
|00005080| 73 20 62 65 65 6e 20 69 | 6e 69 74 69 61 6c 69 7a |s been i|nitializ|
|00005090| 65 64 2e 0a 2e 49 50 20 | 22 75 77 5f 70 65 72 72 |ed...IP |"uw_perr|
|000050a0| 6f 72 22 0a 57 68 65 6e | 20 61 6e 20 65 72 72 6f |or".When| an erro|
|000050b0| 72 20 69 73 20 72 65 70 | 6f 72 74 65 64 20 62 79 |r is rep|orted by|
|000050c0| 20 61 20 5c 2a 28 75 77 | 20 6c 69 62 72 61 72 79 | a \*(uw| library|
|000050d0| 20 72 6f 75 74 69 6e 65 | 2c 0a 74 68 65 20 63 61 | routine|,.the ca|
|000050e0| 75 73 65 20 6f 66 20 74 | 68 65 20 65 72 72 6f 72 |use of t|he error|
|000050f0| 20 69 73 20 73 61 76 65 | 64 20 69 6e 20 74 68 65 | is save|d in the|
|00005100| 20 65 78 74 65 72 6e 61 | 6c 20 76 61 72 69 61 62 | externa|l variab|
|00005110| 6c 65 0a 60 60 75 77 65 | 72 72 6e 6f 27 27 2e 0a |le.``uwe|rrno''..|
|00005120| 49 66 20 74 68 65 20 65 | 72 72 6f 72 20 77 61 73 |If the e|rror was|
|00005130| 20 55 57 45 5f 45 52 52 | 4e 4f 2c 0a 74 68 65 20 | UWE_ERR|NO,.the |
|00005140| 73 74 61 6e 64 61 72 64 | 20 65 78 74 65 72 6e 61 |standard| externa|
|00005150| 6c 20 76 61 72 69 61 62 | 6c 65 20 60 60 65 72 72 |l variab|le ``err|
|00005160| 6e 6f 27 27 0a 77 69 6c | 6c 20 61 6c 73 6f 20 62 |no''.wil|l also b|
|00005170| 65 20 6d 65 61 6e 69 6e | 67 66 75 6c 2e 0a 28 54 |e meanin|gful..(T|
|00005180| 68 65 20 72 6f 75 74 69 | 6e 65 73 20 77 68 69 63 |he routi|nes whic|
|00005190| 68 20 6f 70 65 72 61 74 | 65 20 75 70 6f 6e 20 65 |h operat|e upon e|
|000051a0| 78 74 65 72 6e 61 6c 20 | 77 69 6e 64 6f 77 73 2c |xternal |windows,|
|000051b0| 0a 64 65 73 63 72 69 62 | 65 64 20 69 6e 20 74 68 |.describ|ed in th|
|000051c0| 65 20 66 6f 6c 6c 6f 77 | 69 6e 67 20 73 65 63 74 |e follow|ing sect|
|000051d0| 69 6f 6e 2c 0a 61 6c 73 | 6f 20 73 61 76 65 20 74 |ion,.als|o save t|
|000051e0| 68 69 73 20 69 6e 66 6f | 72 6d 61 74 69 6f 6e 20 |his info|rmation |
|000051f0| 69 6e 20 74 68 65 20 77 | 69 6e 64 6f 77 20 64 65 |in the w|indow de|
|00005200| 73 63 72 69 70 74 6f 72 | 2e 29 0a 54 68 65 20 72 |scriptor|.).The r|
|00005210| 6f 75 74 69 6e 65 20 60 | 60 75 77 5f 70 65 72 72 |outine `|`uw_perr|
|00005220| 6f 72 27 27 20 6d 61 79 | 20 62 65 20 75 73 65 64 |or'' may| be used|
|00005230| 20 74 6f 20 64 65 63 6f | 64 65 20 61 6e 64 20 70 | to deco|de and p|
|00005240| 72 69 6e 74 0a 65 72 72 | 6f 72 20 6d 65 73 73 61 |rint.err|or messa|
|00005250| 67 65 73 3a 0a 2e 44 53 | 0a 76 6f 69 64 20 75 77 |ges:..DS|.void uw|
|00005260| 5f 70 65 72 72 6f 72 28 | 63 68 61 72 20 2a 75 73 |_perror(|char *us|
|00005270| 65 72 6d 65 73 67 2c 20 | 75 77 65 72 72 5f 74 20 |ermesg, |uwerr_t |
|00005280| 75 77 65 72 72 2c 20 69 | 6e 74 20 65 72 72 29 0a |uwerr, i|nt err).|
|00005290| 2e 44 45 0a 77 68 65 72 | 65 20 60 60 75 73 65 72 |.DE.wher|e ``user|
|000052a0| 6d 65 73 67 27 27 20 69 | 73 20 61 20 70 6f 69 6e |mesg'' i|s a poin|
|000052b0| 74 65 72 20 74 6f 20 61 | 20 75 73 65 72 2d 73 70 |ter to a| user-sp|
|000052c0| 65 63 69 66 69 65 64 20 | 73 74 72 69 6e 67 2c 0a |ecified |string,.|
|000052d0| 60 60 75 77 65 72 72 27 | 27 20 69 73 20 74 68 65 |``uwerr'|' is the|
|000052e0| 20 5c 2a 28 75 77 20 65 | 72 72 6f 72 20 63 6f 64 | \*(uw e|rror cod|
|000052f0| 65 0a 28 75 73 75 61 6c | 6c 79 20 60 60 75 77 65 |e.(usual|ly ``uwe|
|00005300| 72 72 6e 6f 27 27 29 2c | 0a 61 6e 64 20 60 60 65 |rrno''),|.and ``e|
|00005310| 72 72 27 27 20 69 73 20 | 74 68 65 20 73 79 73 74 |rr'' is |the syst|
|00005320| 65 6d 20 63 61 6c 6c 20 | 65 72 72 6f 72 20 63 6f |em call |error co|
|00005330| 64 65 0a 28 75 73 75 61 | 6c 6c 79 20 60 60 65 72 |de.(usua|lly ``er|
|00005340| 72 6e 6f 27 27 29 2e 0a | 5b 53 79 73 74 65 6d 20 |rno'')..|[System |
|00005350| 63 61 6c 6c 20 65 72 72 | 6f 72 20 6e 75 6d 62 65 |call err|or numbe|
|00005360| 72 73 20 61 72 65 20 64 | 65 66 69 6e 65 64 20 69 |rs are d|efined i|
|00005370| 6e 20 60 60 2f 75 73 72 | 2f 69 6e 63 6c 75 64 65 |n ``/usr|/include|
|00005380| 2f 65 72 72 6e 6f 2e 68 | 27 27 2e 5d 0a 2e 73 70 |/errno.h|''.]..sp|
|00005390| 0a 54 68 65 20 5c 2a 28 | 75 77 20 65 72 72 6f 72 |.The \*(|uw error|
|000053a0| 20 6d 65 73 73 61 67 65 | 73 20 6d 61 79 20 61 6c | message|s may al|
|000053b0| 73 6f 20 62 65 20 61 63 | 63 65 73 73 65 64 20 64 |so be ac|cessed d|
|000053c0| 69 72 65 63 74 6c 79 2e | 0a 54 77 6f 20 65 78 74 |irectly.|.Two ext|
|000053d0| 65 72 6e 61 6c 20 76 61 | 72 69 61 62 6c 65 73 20 |ernal va|riables |
|000053e0| 61 69 64 20 69 6e 20 75 | 73 65 72 2d 66 6f 72 6d |aid in u|ser-form|
|000053f0| 61 74 74 65 64 20 65 72 | 72 6f 72 20 6d 65 73 73 |atted er|ror mess|
|00005400| 61 67 65 73 3a 0a 2e 44 | 53 0a 65 78 74 65 72 6e |ages:..D|S.extern|
|00005410| 20 63 68 61 72 20 2a 75 | 77 65 72 72 6c 69 73 74 | char *u|werrlist|
|00005420| 5b 5d 3b 0a 65 78 74 65 | 72 6e 20 75 6e 73 69 67 |[];.exte|rn unsig|
|00005430| 6e 65 64 20 75 77 6e 65 | 72 72 3b 0a 2e 44 45 0a |ned uwne|rr;..DE.|
|00005440| 49 66 20 74 68 65 20 65 | 72 72 6f 72 20 6e 75 6d |If the e|rror num|
|00005450| 62 65 72 20 69 73 20 67 | 72 65 61 74 65 72 20 74 |ber is g|reater t|
|00005460| 68 61 6e 20 6f 72 20 65 | 71 75 61 6c 20 74 6f 20 |han or e|qual to |
|00005470| 60 60 75 77 6e 65 72 72 | 27 27 2c 0a 6e 6f 20 65 |``uwnerr|'',.no e|
|00005480| 72 72 6f 72 20 6d 65 73 | 73 61 67 65 20 73 74 72 |rror mes|sage str|
|00005490| 69 6e 67 20 65 78 69 73 | 74 73 2e 0a 28 54 68 69 |ing exis|ts..(Thi|
|000054a0| 73 20 60 60 63 61 6e 6e | 6f 74 20 68 61 70 70 65 |s ``cann|ot happe|
|000054b0| 6e 2e 27 27 29 0a 4f 74 | 68 65 72 77 69 73 65 2c |n.'').Ot|herwise,|
|000054c0| 0a 74 68 65 20 65 72 72 | 6f 72 20 6d 65 73 73 61 |.the err|or messa|
|000054d0| 67 65 20 73 74 72 69 6e | 67 20 69 73 20 6f 62 74 |ge strin|g is obt|
|000054e0| 61 69 6e 65 64 20 62 79 | 20 69 6e 64 65 78 69 6e |ained by| indexin|
|000054f0| 67 20 69 6e 74 6f 0a 60 | 60 75 77 65 72 72 6c 69 |g into.`|`uwerrli|
|00005500| 73 74 27 27 2e 0a 2e 50 | 50 0a 54 68 65 20 70 72 |st''...P|P.The pr|
|00005510| 65 63 65 65 64 69 6e 67 | 20 72 6f 75 74 69 6e 65 |eceeding| routine|
|00005520| 73 20 61 72 65 20 73 75 | 66 66 69 63 69 65 6e 74 |s are su|fficient|
|00005530| 20 74 6f 20 69 6d 70 6c | 65 6d 65 6e 74 0a 61 20 | to impl|ement.a |
|00005540| 28 73 69 6d 70 6c 69 66 | 69 65 64 29 20 76 65 72 |(simplif|ied) ver|
|00005550| 73 69 6f 6e 20 6f 66 20 | 74 68 65 20 60 60 75 77 |sion of |the ``uw|
|00005560| 74 6f 6f 6c 27 27 20 70 | 72 6f 67 72 61 6d 2c 0a |tool'' p|rogram,.|
|00005570| 77 68 69 63 68 20 63 72 | 65 61 74 65 73 20 61 20 |which cr|eates a |
|00005580| 6e 65 77 0a 28 69 6e 74 | 65 72 6e 61 6c 29 0a 77 |new.(int|ernal).w|
|00005590| 69 6e 64 6f 77 20 72 75 | 6e 6e 69 6e 67 20 61 20 |indow ru|nning a |
|000055a0| 73 70 65 63 69 66 69 65 | 64 20 63 6f 6d 6d 61 6e |specifie|d comman|
|000055b0| 64 3a 0a 2e 44 53 0a 2e | 74 61 20 38 6e 20 31 36 |d:..DS..|ta 8n 16|
|000055c0| 6e 20 32 34 6e 20 33 32 | 6e 20 34 30 6e 20 34 38 |n 24n 32|n 40n 48|
|000055d0| 6e 20 35 36 6e 20 36 34 | 6e 20 37 32 6e 0a 2f 2a |n 56n 64|n 72n./*|
|000055e0| 0a 20 2a 20 20 20 20 20 | 20 75 77 74 6f 6f 6c 0a |. * | uwtool.|
|000055f0| 20 2a 0a 20 2a 20 43 6f | 70 79 72 69 67 68 74 20 | *. * Co|pyright |
|00005600| 31 39 38 36 20 62 79 20 | 4a 6f 68 6e 20 44 2e 20 |1986 by |John D. |
|00005610| 42 72 75 6e 65 72 2e 20 | 20 41 6c 6c 20 72 69 67 |Bruner. | All rig|
|00005620| 68 74 73 20 72 65 73 65 | 72 76 65 64 2e 20 20 50 |hts rese|rved. P|
|00005630| 65 72 6d 69 73 73 69 6f | 6e 20 74 6f 0a 20 2a 20 |ermissio|n to. * |
|00005640| 63 6f 70 79 20 74 68 69 | 73 20 70 72 6f 67 72 61 |copy thi|s progra|
|00005650| 6d 20 69 73 20 67 69 76 | 65 6e 20 70 72 6f 76 69 |m is giv|en provi|
|00005660| 64 65 64 20 74 68 61 74 | 20 74 68 65 20 63 6f 70 |ded that| the cop|
|00005670| 79 20 69 73 20 6e 6f 74 | 20 73 6f 6c 64 20 61 6e |y is not| sold an|
|00005680| 64 20 74 68 61 74 0a 20 | 2a 20 74 68 69 73 20 63 |d that. |* this c|
|00005690| 6f 70 79 72 69 67 68 74 | 20 6e 6f 74 69 63 65 20 |opyright| notice |
|000056a0| 69 73 20 69 6e 63 6c 75 | 64 65 64 2e 0a 20 2a 2f |is inclu|ded.. */|
|000056b0| 0a 23 69 6e 63 6c 75 64 | 65 20 3c 73 74 72 69 6e |.#includ|e <strin|
|000056c0| 67 73 2e 68 3e 0a 23 69 | 6e 63 6c 75 64 65 20 22 |gs.h>.#i|nclude "|
|000056d0| 75 77 6c 69 62 2e 68 22 | 0a 0a 6d 61 69 6e 28 61 |uwlib.h"|..main(a|
|000056e0| 72 67 63 2c 20 61 72 67 | 76 29 0a 69 6e 74 20 61 |rgc, arg|v).int a|
|000056f0| 72 67 63 3b 0a 63 68 61 | 72 20 2a 2a 61 72 67 76 |rgc;.cha|r **argv|
|00005700| 3b 0a 7b 0a 20 20 20 20 | 20 20 20 20 72 65 67 69 |;.{. | regi|
|00005710| 73 74 65 72 20 75 77 69 | 64 5f 74 20 75 77 69 64 |ster uwi|d_t uwid|
|00005720| 3b 0a 20 20 20 20 20 20 | 20 20 72 65 67 69 73 74 |;. | regist|
|00005730| 65 72 20 63 68 61 72 20 | 2a 66 6e 61 6d 65 2c 20 |er char |*fname, |
|00005740| 2a 74 65 72 6d 3b 0a 09 | 72 65 67 69 73 74 65 72 |*term;..|register|
|00005750| 20 77 74 79 70 65 5f 74 | 20 77 74 79 70 65 3b 0a | wtype_t| wtype;.|
|00005760| 20 20 20 20 20 20 20 20 | 63 68 61 72 20 2a 61 76 | |char *av|
|00005770| 5b 32 5d 3b 0a 20 20 20 | 20 20 20 20 20 75 6e 69 |[2];. | uni|
|00005780| 6f 6e 20 75 77 6f 70 74 | 76 61 6c 20 6f 70 74 76 |on uwopt|val optv|
|00005790| 61 6c 3b 0a 20 20 20 20 | 20 20 20 20 65 78 74 65 |al;. | exte|
|000057a0| 72 6e 20 69 6e 74 20 65 | 72 72 6e 6f 3b 0a 20 20 |rn int e|rrno;. |
|000057b0| 20 20 20 20 20 20 65 78 | 74 65 72 6e 20 63 68 61 | ex|tern cha|
|000057c0| 72 20 2a 67 65 74 65 6e | 76 28 29 3b 0a 0a 20 20 |r *geten|v();.. |
|000057d0| 20 20 20 20 20 20 2f 2a | 0a 20 20 20 20 20 20 20 | /*|. |
|000057e0| 20 20 2a 20 49 66 20 63 | 61 6c 6c 65 64 20 77 69 | * If c|alled wi|
|000057f0| 74 68 20 6e 6f 20 61 72 | 67 75 6d 65 6e 74 73 2c |th no ar|guments,|
|00005800| 20 63 72 65 61 74 65 20 | 61 20 6e 65 77 20 77 69 | create |a new wi|
|00005810| 6e 64 6f 77 20 75 73 69 | 6e 67 20 74 68 65 0a 20 |ndow usi|ng the. |
|00005820| 20 20 20 20 20 20 20 20 | 2a 20 63 75 72 72 65 6e | |* curren|
|00005830| 74 20 73 68 65 6c 6c 20 | 61 63 63 6f 72 64 69 6e |t shell |accordin|
|00005840| 67 20 74 6f 20 74 68 65 | 20 53 48 45 4c 4c 20 65 |g to the| SHELL e|
|00005850| 6e 76 69 72 6f 6e 6d 65 | 6e 74 20 76 61 72 69 61 |nvironme|nt varia|
|00005860| 62 6c 65 0a 20 20 20 20 | 20 20 20 20 20 2a 20 28 |ble. | * (|
|00005870| 6f 72 20 22 2f 62 69 6e | 2f 73 68 22 20 69 66 20 |or "/bin|/sh" if |
|00005880| 74 68 61 74 20 64 6f 65 | 73 6e 27 74 20 65 78 69 |that doe|sn't exi|
|00005890| 73 74 29 2e 20 20 49 66 | 20 63 61 6c 6c 65 64 20 |st). If| called |
|000058a0| 77 69 74 68 0a 20 20 20 | 20 20 20 20 20 20 2a 20 |with. | * |
|000058b0| 61 72 67 75 6d 65 6e 74 | 73 2c 20 61 72 67 76 5b |argument|s, argv[|
|000058c0| 31 5d 20 74 68 72 6f 75 | 67 68 20 61 72 67 76 5b |1] throu|gh argv[|
|000058d0| 61 72 67 63 5c 2d 31 5d | 20 61 72 65 20 74 68 65 |argc\-1]| are the|
|000058e0| 20 61 72 67 75 6d 65 6e | 74 73 0a 20 20 20 20 20 | argumen|ts. |
|000058f0| 20 20 20 20 2a 20 74 6f | 20 74 68 65 20 63 6f 6d | * to| the com|
|00005900| 6d 61 6e 64 2e 0a 20 20 | 20 20 20 20 20 20 20 2a |mand.. | *|
|00005910| 2f 0a 20 20 20 20 20 20 | 20 20 69 66 20 28 61 72 |/. | if (ar|
|00005920| 67 63 20 3d 3d 20 31 29 | 20 7b 0a 20 20 20 20 20 |gc == 1)| {. |
|00005930| 20 20 20 20 20 20 20 20 | 20 20 20 69 66 20 28 28 | | if ((|
|00005940| 66 6e 61 6d 65 20 3d 20 | 67 65 74 65 6e 76 28 22 |fname = |getenv("|
|00005950| 53 48 45 4c 4c 22 29 29 | 20 3d 3d 20 28 63 68 61 |SHELL"))| == (cha|
|00005960| 72 20 2a 29 30 29 0a 20 | 20 20 20 20 20 20 20 20 |r *)0). | |
|00005970| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 66 | | f|
|00005980| 6e 61 6d 65 20 3d 20 22 | 2f 62 69 6e 2f 73 68 22 |name = "|/bin/sh"|
|00005990| 3b 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |;. | |
|000059a0| 20 20 61 76 5b 30 5d 20 | 3d 20 66 6e 61 6d 65 3b | av[0] |= fname;|
|000059b0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|000059c0| 20 61 76 5b 31 5d 20 3d | 20 28 63 68 61 72 20 2a | av[1] =| (char *|
|000059d0| 29 30 3b 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |)0;. | |
|000059e0| 20 20 20 20 61 72 67 76 | 20 3d 20 61 76 3b 0a 20 | argv| = av;. |
|000059f0| 20 20 20 20 20 20 20 7d | 20 65 6c 73 65 0a 20 20 | }| else. |
|00005a00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 66 6e | | fn|
|00005a10| 61 6d 65 20 3d 20 2a 2b | 2b 61 72 67 76 3b 0a 09 |ame = *+|+argv;..|
|00005a20| 0a 09 69 66 20 28 28 74 | 65 72 6d 3d 67 65 74 65 |..if ((t|erm=gete|
|00005a30| 6e 76 28 22 54 45 52 4d | 22 29 29 20 21 3d 20 28 |nv("TERM|")) != (|
|00005a40| 63 68 61 72 20 2a 29 30 | 29 0a 09 09 77 74 79 70 |char *)0|)...wtyp|
|00005a50| 65 20 3d 20 75 77 5f 74 | 74 79 70 65 28 74 65 72 |e = uw_t|type(ter|
|00005a60| 6d 29 3b 0a 09 65 6c 73 | 65 0a 09 09 77 74 79 70 |m);..els|e...wtyp|
|00005a70| 65 20 3d 20 55 57 54 5f | 41 44 4d 33 31 3b 0a 20 |e = UWT_|ADM31;. |
|00005a80| 20 20 20 20 20 20 20 0a | 20 20 20 20 20 20 20 20 | .| |
|00005a90| 69 66 20 28 28 75 77 69 | 64 20 3d 20 75 77 5f 63 |if ((uwi|d = uw_c|
|00005aa0| 6d 64 28 77 74 79 70 65 | 2c 20 66 6e 61 6d 65 2c |md(wtype|, fname,|
|00005ab0| 20 61 72 67 76 29 29 20 | 3c 20 30 29 20 7b 0a 20 | argv)) |< 0) {. |
|00005ac0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 28 | | (|
|00005ad0| 76 6f 69 64 29 73 74 72 | 6e 63 70 79 28 6f 70 74 |void)str|ncpy(opt|
|00005ae0| 76 61 6c 2e 75 77 6f 76 | 5f 73 74 72 69 6e 67 2c |val.uwov|_string,|
|00005af0| 20 66 6e 61 6d 65 2c 0a | 20 20 20 20 20 20 20 20 | fname,.| |
|00005b00| 20 20 20 20 20 20 20 20 | 20 20 20 20 73 69 7a 65 | | size|
|00005b10| 6f 66 20 6f 70 74 76 61 | 6c 2e 75 77 6f 76 5f 73 |of optva|l.uwov_s|
|00005b20| 74 72 69 6e 67 29 3b 0a | 20 20 20 20 20 20 20 20 |tring);.| |
|00005b30| 20 20 20 20 20 20 20 20 | 28 76 6f 69 64 29 75 77 | |(void)uw|
|00005b40| 5f 72 73 65 74 6f 70 74 | 28 75 77 69 64 2c 20 55 |_rsetopt|(uwid, U|
|00005b50| 57 4f 50 5f 54 49 54 4c | 45 2c 20 26 6f 70 74 76 |WOP_TITL|E, &optv|
|00005b60| 61 6c 29 3b 0a 20 20 20 | 20 20 20 20 20 20 20 20 |al);. | |
|00005b70| 20 20 20 20 20 72 65 74 | 75 72 6e 28 30 29 3b 0a | ret|urn(0);.|
|00005b80| 20 20 20 20 20 20 20 20 | 7d 20 65 6c 73 65 20 7b | |} else {|
|00005b90| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00005ba0| 20 75 77 5f 70 65 72 72 | 6f 72 28 22 75 77 74 6f | uw_perr|or("uwto|
|00005bb0| 6f 6c 22 2c 20 75 77 65 | 72 72 6e 6f 2c 20 65 72 |ol", uwe|rrno, er|
|00005bc0| 72 6e 6f 29 3b 0a 20 20 | 20 20 20 20 20 20 20 20 |rno);. | |
|00005bd0| 20 20 20 20 20 20 72 65 | 74 75 72 6e 28 31 29 3b | re|turn(1);|
|00005be0| 0a 20 20 20 20 20 20 20 | 20 7d 0a 7d 0a 2e 44 45 |. | }.}..DE|
|00005bf0| 0a 41 66 74 65 72 20 74 | 68 65 20 66 69 72 73 74 |.After t|he first|
|00005c00| 20 70 61 72 74 20 6f 66 | 20 74 68 65 20 66 75 6e | part of| the fun|
|00005c10| 63 74 69 6f 6e 20 68 61 | 73 20 6d 61 73 73 61 67 |ction ha|s massag|
|00005c20| 65 64 20 74 68 65 20 61 | 72 67 75 6d 65 6e 74 20 |ed the a|rgument |
|00005c30| 6c 69 73 74 2c 0a 74 68 | 65 20 60 60 75 77 5f 63 |list,.th|e ``uw_c|
|00005c40| 6d 64 27 27 20 72 6f 75 | 74 69 6e 65 20 63 72 65 |md'' rou|tine cre|
|00005c50| 61 74 65 73 20 61 20 6e | 65 77 20 77 69 6e 64 6f |ates a n|ew windo|
|00005c60| 77 0a 72 75 6e 6e 69 6e | 67 20 74 68 65 20 63 6f |w.runnin|g the co|
|00005c70| 6d 6d 61 6e 64 20 60 60 | 66 6e 61 6d 65 27 27 20 |mmand ``|fname'' |
|00005c80| 77 69 74 68 20 61 72 67 | 75 6d 65 6e 74 20 6c 69 |with arg|ument li|
|00005c90| 73 74 20 60 60 61 72 67 | 76 27 27 2e 0a 49 66 20 |st ``arg|v''..If |
|00005ca0| 74 68 65 20 77 69 6e 64 | 6f 77 20 49 44 20 69 73 |the wind|ow ID is|
|00005cb0| 20 70 6f 73 69 74 69 76 | 65 2c 0a 74 68 65 20 77 | positiv|e,.the w|
|00005cc0| 69 6e 64 6f 77 20 63 72 | 65 61 74 69 6f 6e 20 73 |indow cr|eation s|
|00005cd0| 75 63 63 65 65 64 65 64 | 2e 0a 41 66 74 65 72 20 |ucceeded|..After |
|00005ce0| 63 6f 70 79 69 6e 67 20 | 74 68 65 20 6e 61 6d 65 |copying |the name|
|00005cf0| 20 6f 66 20 74 68 65 20 | 70 72 6f 67 72 61 6d 20 | of the |program |
|00005d00| 69 6e 74 6f 20 61 20 60 | 60 75 6e 69 6f 6e 20 75 |into a `|`union u|
|00005d10| 77 6f 70 74 76 61 6c 27 | 27 2c 0a 74 68 65 20 70 |woptval'|',.the p|
|00005d20| 72 6f 67 72 61 6d 20 63 | 61 6c 6c 73 20 60 60 75 |rogram c|alls ``u|
|00005d30| 77 5f 72 73 65 74 6f 70 | 74 27 27 20 74 6f 20 73 |w_rsetop|t'' to s|
|00005d40| 65 74 20 74 68 65 20 77 | 69 6e 64 6f 77 20 74 69 |et the w|indow ti|
|00005d50| 74 6c 65 0a 74 6f 20 74 | 68 61 74 20 73 74 72 69 |tle.to t|hat stri|
|00005d60| 6e 67 2e 0a 49 66 20 74 | 68 65 20 77 69 6e 64 6f |ng..If t|he windo|
|00005d70| 77 20 49 44 20 72 65 74 | 75 72 6e 65 64 20 62 79 |w ID ret|urned by|
|00005d80| 20 60 60 75 77 5f 63 6d | 64 27 27 20 77 61 73 20 | ``uw_cm|d'' was |
|00005d90| 5c 28 6d 69 31 2c 0a 74 | 68 65 20 77 69 6e 64 6f |\(mi1,.t|he windo|
|00005da0| 77 20 63 72 65 61 74 69 | 6f 6e 20 66 61 69 6c 65 |w creati|on faile|
|00005db0| 64 2e 0a 49 6e 20 74 68 | 69 73 20 63 61 73 65 2c |d..In th|is case,|
|00005dc0| 0a 74 68 65 20 70 72 6f | 67 72 61 6d 20 63 61 6c |.the pro|gram cal|
|00005dd0| 6c 73 20 60 60 75 77 5f | 70 65 72 72 6f 72 27 27 |ls ``uw_|perror''|
|00005de0| 20 74 6f 20 72 65 70 6f | 72 74 20 74 68 65 20 65 | to repo|rt the e|
|00005df0| 72 72 6f 72 2e 0a 2e 53 | 48 0a 45 78 74 65 72 6e |rror...S|H.Extern|
|00005e00| 61 6c 20 57 69 6e 64 6f | 77 20 49 6e 74 65 72 66 |al Windo|w Interf|
|00005e10| 61 63 65 0a 2e 4c 50 0a | 54 68 65 20 72 65 6d 61 |ace..LP.|The rema|
|00005e20| 69 6e 64 65 72 20 6f 66 | 20 74 68 65 20 5c 2a 28 |inder of| the \*(|
|00005e30| 75 77 20 6c 69 62 72 61 | 72 79 20 72 6f 75 74 69 |uw libra|ry routi|
|00005e40| 6e 65 73 20 70 72 6f 76 | 69 64 65 20 61 63 63 65 |nes prov|ide acce|
|00005e50| 73 73 20 74 6f 0a 65 78 | 74 65 72 6e 61 6c 20 77 |ss to.ex|ternal w|
|00005e60| 69 6e 64 6f 77 73 2e 0a | 49 6e 20 63 6f 6e 74 72 |indows..|In contr|
|00005e70| 61 73 74 20 74 6f 20 69 | 6e 74 65 72 6e 61 6c 20 |ast to i|nternal |
|00005e80| 77 69 6e 64 6f 77 73 2c | 0a 61 20 63 6c 69 65 6e |windows,|.a clien|
|00005e90| 74 20 70 72 6f 63 65 73 | 73 20 63 72 65 61 74 65 |t proces|s create|
|00005ea0| 73 20 61 6e 20 65 78 74 | 65 72 6e 61 6c 20 77 69 |s an ext|ernal wi|
|00005eb0| 6e 64 6f 77 0a 62 79 20 | 65 73 74 61 62 6c 69 73 |ndow.by |establis|
|00005ec0| 68 69 6e 67 20 61 6e 20 | 49 6e 74 65 72 6e 65 74 |hing an |Internet|
|00005ed0| 2d 64 6f 6d 61 69 6e 20 | 73 74 72 65 61 6d 20 63 |-domain |stream c|
|00005ee0| 6f 6e 6e 65 63 74 69 6f | 6e 0a 74 6f 20 74 68 65 |onnectio|n.to the|
|00005ef0| 20 73 65 72 76 65 72 20 | 61 6e 64 20 73 65 6e 64 | server |and send|
|00005f00| 69 6e 67 20 74 68 65 20 | 73 65 72 76 65 72 20 61 |ing the |server a|
|00005f10| 20 60 60 63 72 65 61 74 | 65 20 77 69 6e 64 6f 77 | ``creat|e window|
|00005f20| 27 27 20 63 6f 6d 6d 61 | 6e 64 2e 0a 54 68 65 20 |'' comma|nd..The |
|00005f30| 73 65 72 76 65 72 20 77 | 69 6c 6c 20 65 73 74 61 |server w|ill esta|
|00005f40| 62 6c 69 73 68 20 61 20 | 73 65 63 6f 6e 64 20 73 |blish a |second s|
|00005f50| 74 72 65 61 6d 20 63 6f | 6e 6e 65 63 74 69 6f 6e |tream co|nnection|
|00005f60| 0a 62 61 63 6b 20 74 6f | 20 74 68 65 20 63 6c 69 |.back to| the cli|
|00005f70| 65 6e 74 2e 0a 44 61 74 | 61 20 69 73 20 70 61 73 |ent..Dat|a is pas|
|00005f80| 73 65 64 20 62 65 74 77 | 65 65 6e 20 74 68 65 20 |sed betw|een the |
|00005f90| 63 6c 69 65 6e 74 20 61 | 6e 64 20 74 68 65 20 73 |client a|nd the s|
|00005fa0| 65 72 76 65 72 20 6f 6e | 20 74 68 65 20 66 69 72 |erver on| the fir|
|00005fb0| 73 74 20 63 6f 6e 6e 65 | 63 74 69 6f 6e 2c 0a 77 |st conne|ction,.w|
|00005fc0| 68 69 6c 65 20 63 6f 6e | 74 72 6f 6c 20 69 6e 66 |hile con|trol inf|
|00005fd0| 6f 72 6d 61 74 69 6f 6e | 20 69 73 20 70 61 73 73 |ormation| is pass|
|00005fe0| 65 64 20 74 68 72 6f 75 | 67 68 20 74 68 65 20 73 |ed throu|gh the s|
|00005ff0| 65 63 6f 6e 64 2e 0a 5b | 42 65 63 61 75 73 65 20 |econd..[|Because |
|00006000| 74 68 65 20 73 65 72 76 | 65 72 20 61 6e 64 20 63 |the serv|er and c|
|00006010| 6c 69 65 6e 74 20 63 6f | 6d 6d 75 6e 69 63 61 74 |lient co|mmunicat|
|00006020| 65 20 74 68 72 6f 75 67 | 68 20 6f 6e 65 20 6f 72 |e throug|h one or|
|00006030| 0a 74 77 6f 20 73 74 72 | 65 61 6d 20 63 6f 6e 6e |.two str|eam conn|
|00006040| 65 63 74 69 6f 6e 28 73 | 29 0a 69 6e 73 74 65 61 |ection(s|).instea|
|00006050| 64 20 6f 66 20 62 79 20 | 73 65 6e 64 69 6e 67 20 |d of by |sending |
|00006060| 64 61 74 61 67 72 61 6d | 73 2c 0a 74 68 65 20 75 |datagram|s,.the u|
|00006070| 6e 72 65 6c 69 61 62 69 | 6c 69 74 79 20 70 72 6f |nreliabi|lity pro|
|00006080| 62 6c 65 6d 73 20 6e 6f | 74 65 64 20 61 62 6f 76 |blems no|ted abov|
|00006090| 65 20 66 6f 72 20 69 6e | 74 65 72 6e 61 6c 20 77 |e for in|ternal w|
|000060a0| 69 6e 64 6f 77 73 0a 64 | 6f 20 6e 6f 74 20 61 70 |indows.d|o not ap|
|000060b0| 70 6c 79 20 74 6f 20 65 | 78 74 65 72 6e 61 6c 20 |ply to e|xternal |
|000060c0| 77 69 6e 64 6f 77 73 2e | 5d 0a 2e 4c 50 0a 54 68 |windows.|]..LP.Th|
|000060d0| 65 20 5c 2a 28 75 77 20 | 6c 69 62 72 61 72 79 20 |e \*(uw |library |
|000060e0| 70 72 6f 76 69 64 65 73 | 20 6d 65 63 68 61 6e 69 |provides| mechani|
|000060f0| 73 6d 73 20 66 6f 72 20 | 63 72 65 61 74 69 6e 67 |sms for |creating|
|00006100| 20 65 78 74 65 72 6e 61 | 6c 20 77 69 6e 64 6f 77 | externa|l window|
|00006110| 73 2c 0a 6b 69 6c 6c 69 | 6e 67 20 74 68 65 6d 2c |s,.killi|ng them,|
|00006120| 0a 61 6e 64 20 6d 61 6e | 69 70 75 6c 61 74 69 6e |.and man|ipulatin|
|00006130| 67 20 77 69 6e 64 6f 77 | 20 6f 70 74 69 6f 6e 73 |g window| options|
|00006140| 2e 0a 57 68 65 6e 20 61 | 20 77 69 6e 64 6f 77 20 |..When a| window |
|00006150| 69 73 20 63 72 65 61 74 | 65 64 20 61 20 77 69 6e |is creat|ed a win|
|00006160| 64 6f 77 20 64 65 73 63 | 72 69 70 74 6f 72 0a 28 |dow desc|riptor.(|
|00006170| 69 74 65 6d 20 6f 66 20 | 74 79 70 65 20 55 57 49 |item of |type UWI|
|00006180| 4e 29 0a 69 73 20 72 65 | 74 75 72 6e 65 64 3b 0a |N).is re|turned;.|
|00006190| 74 68 69 73 20 69 73 20 | 75 73 65 64 20 61 73 20 |this is |used as |
|000061a0| 61 6e 20 61 72 67 75 6d | 65 6e 74 20 74 6f 20 61 |an argum|ent to a|
|000061b0| 6c 6c 20 6f 74 68 65 72 | 20 65 78 74 65 72 6e 61 |ll other| externa|
|000061c0| 6c 2d 77 69 6e 64 6f 77 | 20 72 6f 75 74 69 6e 65 |l-window| routine|
|000061d0| 73 2e 0a 2e 4c 50 0a 54 | 68 65 20 66 6f 6c 6c 6f |s...LP.T|he follo|
|000061e0| 77 69 6e 67 20 72 6f 75 | 74 69 6e 65 73 20 61 72 |wing rou|tines ar|
|000061f0| 65 20 70 72 6f 76 69 64 | 65 64 3a 0a 2e 49 50 20 |e provid|ed:..IP |
|00006200| 22 75 77 5f 6e 65 77 22 | 20 31 69 0a 54 68 69 73 |"uw_new"| 1i.This|
|00006210| 20 66 75 6e 63 74 69 6f | 6e 20 63 72 65 61 74 65 | functio|n create|
|00006220| 73 20 61 20 6e 65 77 20 | 65 78 74 65 72 6e 61 6c |s a new |external|
|00006230| 20 77 69 6e 64 6f 77 20 | 6f 66 20 74 68 65 20 73 | window |of the s|
|00006240| 70 65 63 69 66 69 65 64 | 20 74 79 70 65 2e 0a 54 |pecified| type..T|
|00006250| 68 65 20 63 61 6c 6c 69 | 6e 67 20 73 65 71 75 65 |he calli|ng seque|
|00006260| 6e 63 65 20 69 73 3a 0a | 2e 44 53 0a 55 57 49 4e |nce is:.|.DS.UWIN|
|00006270| 20 75 77 5f 6e 65 77 28 | 75 77 74 79 70 65 5f 74 | uw_new(|uwtype_t|
|00006280| 20 75 77 74 79 70 65 2c | 20 73 74 72 75 63 74 20 | uwtype,| struct |
|00006290| 73 6f 63 6b 61 64 64 72 | 5f 69 6e 20 2a 73 65 72 |sockaddr|_in *ser|
|000062a0| 76 65 72 29 0a 2e 44 45 | 0a 77 68 65 72 65 20 60 |ver)..DE|.where `|
|000062b0| 60 75 77 74 79 70 65 27 | 27 20 69 73 20 74 68 65 |`uwtype'|' is the|
|000062c0| 20 77 69 6e 64 6f 77 20 | 74 79 70 65 0a 61 6e 64 | window |type.and|
|000062d0| 20 60 60 73 65 72 76 65 | 72 27 27 20 69 73 20 61 | ``serve|r'' is a|
|000062e0| 20 70 6f 69 6e 74 65 72 | 20 74 6f 20 61 20 73 74 | pointer| to a st|
|000062f0| 72 75 63 74 75 72 65 20 | 73 70 65 63 69 66 79 69 |ructure |specifyi|
|00006300| 6e 67 0a 74 68 65 20 49 | 6e 74 65 72 6e 65 74 20 |ng.the I|nternet |
|00006310| 61 64 64 72 65 73 73 20 | 6f 66 20 74 68 65 20 73 |address |of the s|
|00006320| 65 72 76 65 72 2e 0a 28 | 49 66 20 60 60 73 65 72 |erver..(|If ``ser|
|00006330| 76 65 72 27 27 20 69 73 | 20 61 20 4e 55 4c 4c 20 |ver'' is| a NULL |
|00006340| 70 6f 69 6e 74 65 72 2c | 0a 74 68 65 20 73 65 72 |pointer,|.the ser|
|00006350| 76 65 72 20 77 69 6c 6c | 20 62 65 20 64 65 74 65 |ver will| be dete|
|00006360| 72 6d 69 6e 65 64 20 62 | 79 20 65 78 61 6d 69 6e |rmined b|y examin|
|00006370| 69 6e 67 20 74 68 65 0a | 65 6e 76 69 72 6f 6e 6d |ing the.|environm|
|00006380| 65 6e 74 20 76 61 72 69 | 61 62 6c 65 20 60 60 55 |ent vari|able ``U|
|00006390| 57 5f 49 4e 45 54 27 27 | 2e 29 0a 49 66 20 74 68 |W_INET''|.).If th|
|000063a0| 65 20 77 69 6e 64 6f 77 | 20 63 72 65 61 74 69 6f |e window| creatio|
|000063b0| 6e 20 73 75 63 63 65 65 | 64 65 64 2c 0a 60 60 75 |n succee|ded,.``u|
|000063c0| 77 5f 6e 65 77 27 27 20 | 77 69 6c 6c 20 72 65 74 |w_new'' |will ret|
|000063d0| 75 72 6e 20 61 20 6e 6f | 6e 2d 4e 55 4c 4c 20 77 |urn a no|n-NULL w|
|000063e0| 69 6e 64 6f 77 20 64 65 | 73 63 72 69 70 74 6f 72 |indow de|scriptor|
|000063f0| 3b 0a 6f 74 68 65 72 77 | 69 73 65 2c 0a 69 74 20 |;.otherw|ise,.it |
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.