home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 1 / 1740 < prev    next >
SHell self-extracting ARchive  |  1990-12-28  |  45.6 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: SHell self-extracting ARchive (archive/shar).

You can browse this item here: 1740

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Newsgroup Content (archive/news) magic Supported
100% dexvert SHell self-extracting ARchive (archive/shar) magic Supported
100% dexvert Internet Message Format (text/imf) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file news or mail, ASCII text default
100% TrID E-Mail message (Var. 2) default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/329 Shell Archive Format default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime message/rfc822 default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 46 72 6f 6d 3a 20 70 63 | 67 40 63 73 2e 61 62 65 |From: pc|g@cs.abe|
|00000010| 72 2e 61 63 2e 75 6b 20 | 28 50 69 65 72 63 61 72 |r.ac.uk |(Piercar|
|00000020| 6c 6f 20 47 72 61 6e 64 | 69 29 0a 4e 65 77 73 67 |lo Grand|i).Newsg|
|00000030| 72 6f 75 70 73 3a 20 63 | 6f 6d 70 2e 75 6e 69 78 |roups: c|omp.unix|
|00000040| 2e 69 33 38 36 2c 61 6c | 74 2e 73 6f 75 72 63 65 |.i386,al|t.source|
|00000050| 73 0a 53 75 62 6a 65 63 | 74 3a 20 43 4c 45 44 20 |s.Subjec|t: CLED |
|00000060| 32 2e 35 20 53 79 73 56 | 2f 33 38 36 20 70 61 72 |2.5 SysV|/386 par|
|00000070| 74 20 30 31 2f 30 33 0a | 4d 65 73 73 61 67 65 2d |t 01/03.|Message-|
|00000080| 49 44 3a 20 3c 50 43 47 | 2e 39 30 41 75 67 32 38 |ID: <PCG|.90Aug28|
|00000090| 31 37 32 38 35 37 40 61 | 74 68 65 6e 65 2e 63 73 |172857@a|thene.cs|
|000000a0| 2e 61 62 65 72 2e 61 63 | 2e 75 6b 3e 0a 44 61 74 |.aber.ac|.uk>.Dat|
|000000b0| 65 3a 20 32 38 20 41 75 | 67 20 39 30 20 31 36 3a |e: 28 Au|g 90 16:|
|000000c0| 32 38 3a 35 37 20 47 4d | 54 0a 0a 0a 54 68 69 73 |28:57 GM|T...This|
|000000d0| 20 69 73 20 74 68 65 20 | 69 6d 70 6c 65 6d 65 6e | is the |implemen|
|000000e0| 74 61 74 69 6f 6e 20 6f | 66 20 43 4c 45 44 2c 20 |tation o|f CLED, |
|000000f0| 61 20 6c 69 6e 65 20 64 | 69 63 69 70 6c 69 6e 65 |a line d|icipline|
|00000100| 20 66 6f 72 20 53 79 73 | 74 65 6d 20 56 2f 33 38 | for Sys|tem V/38|
|00000110| 36 0a 33 2e 32 20 74 68 | 61 74 20 69 6d 70 6c 65 |6.3.2 th|at imple|
|00000120| 6d 65 6e 74 73 20 63 6f | 6d 6d 61 6e 64 20 68 69 |ments co|mmand hi|
|00000130| 73 74 6f 72 79 20 69 6e | 20 74 68 65 20 6b 65 72 |story in| the ker|
|00000140| 6e 65 6c 2e 20 49 74 20 | 6f 72 69 67 69 6e 61 6c |nel. It |original|
|00000150| 6c 79 20 63 61 6d 65 0a | 66 72 6f 6d 20 41 74 61 |ly came.|from Ata|
|00000160| 72 69 20 43 6f 72 70 2e | 20 66 6f 72 20 58 65 6e |ri Corp.| for Xen|
|00000170| 69 78 3b 20 49 20 68 61 | 76 65 20 77 6f 72 6b 65 |ix; I ha|ve worke|
|00000180| 64 20 6f 6e 20 69 74 20 | 61 20 6c 6f 74 20 74 6f |d on it |a lot to|
|00000190| 20 73 69 6d 70 6c 69 66 | 79 20 61 6e 64 0a 63 6c | simplif|y and.cl|
|000001a0| 65 61 6e 20 69 74 2c 20 | 61 6e 64 20 74 6f 20 6d |ean it, |and to m|
|000001b0| 61 6b 65 20 69 74 20 6d | 6f 72 65 20 63 6f 6e 66 |ake it m|ore conf|
|000001c0| 6f 72 6d 69 6e 67 20 74 | 6f 20 74 68 65 20 49 6e |orming t|o the In|
|000001d0| 73 74 61 6c 6c 61 62 6c | 65 20 44 72 69 76 65 72 |stallabl|e Driver|
|000001e0| 0a 73 63 68 65 6d 65 20 | 6f 66 20 53 79 73 74 65 |.scheme |of Syste|
|000001f0| 6d 20 56 2f 33 38 36 2e | 20 49 20 75 73 65 20 69 |m V/386.| I use i|
|00000200| 74 20 61 6c 6c 20 74 68 | 65 20 74 69 6d 65 2c 20 |t all th|e time, |
|00000210| 65 76 65 6e 20 69 66 20 | 69 74 20 69 73 20 6e 6f |even if |it is no|
|00000220| 74 20 74 68 65 0a 6d 73 | 6f 74 20 65 6c 65 67 61 |t the.ms|ot elega|
|00000230| 6e 74 20 74 68 69 6e 67 | 20 69 6e 20 74 68 65 20 |nt thing| in the |
|00000240| 77 6f 72 6c 64 20 3a 2d | 29 2e 20 57 65 6c 6c 2c |world :-|). Well,|
|00000250| 20 69 74 20 69 73 20 73 | 75 72 65 6c 79 20 6d 6f | it is s|urely mo|
|00000260| 72 65 20 63 6f 6e 76 65 | 6e 69 65 6e 74 0a 61 6e |re conve|nient.an|
|00000270| 64 20 65 66 66 69 63 69 | 65 6e 74 20 74 68 61 6e |d effici|ent than|
|00000280| 20 63 6f 6d 6d 61 6e 64 | 20 6c 69 6e 65 20 65 64 | command| line ed|
|00000290| 69 74 69 6e 67 20 6c 69 | 62 72 61 72 69 65 73 20 |iting li|braries |
|000002a0| 61 74 74 61 63 68 65 64 | 20 74 6f 20 73 68 65 6c |attached| to shel|
|000002b0| 6c 73 20 61 6e 64 0a 6f | 74 68 65 72 20 70 72 6f |ls and.o|ther pro|
|000002c0| 67 72 61 6d 73 2e 0a 0a | 49 74 20 73 68 6f 75 6c |grams...|It shoul|
|000002d0| 64 20 62 65 20 65 61 73 | 69 6c 79 20 6d 6f 64 69 |d be eas|ily modi|
|000002e0| 66 69 65 64 20 66 6f 72 | 20 58 65 6e 69 78 20 61 |fied for| Xenix a|
|000002f0| 6e 64 20 53 43 4f 20 55 | 6e 69 78 3b 20 49 20 72 |nd SCO U|nix; I r|
|00000300| 75 6e 20 69 74 20 75 6e | 64 65 72 20 45 4e 49 58 |un it un|der ENIX|
|00000310| 0a 72 65 76 2e 20 41 2c | 20 77 68 69 63 68 20 69 |.rev. A,| which i|
|00000320| 73 20 61 20 66 61 69 72 | 6c 79 20 73 74 61 6e 64 |s a fair|ly stand|
|00000330| 61 72 64 20 76 65 72 73 | 69 6f 6e 20 6f 66 20 41 |ard vers|ion of A|
|00000340| 54 26 54 20 53 79 73 74 | 6d 20 56 2f 33 38 36 2e |T&T Syst|m V/386.|
|00000350| 0a 0a 09 55 73 75 61 6c | 20 64 69 73 63 6c 61 69 |...Usual| disclai|
|00000360| 6d 65 72 3a 20 74 68 69 | 73 20 68 61 73 20 6e 6f |mer: thi|s has no|
|00000370| 74 68 69 6e 67 20 74 6f | 20 64 6f 20 77 69 74 68 |thing to| do with|
|00000380| 20 74 68 65 20 55 6e 69 | 76 65 72 73 69 74 79 0a | the Uni|versity.|
|00000390| 09 43 6f 6c 6c 65 67 65 | 20 6f 66 20 57 61 6c 65 |.College| of Wale|
|000003a0| 73 2c 20 77 68 69 63 68 | 20 68 61 73 20 6e 6f 74 |s, which| has not|
|000003b0| 20 61 69 64 65 64 20 6f | 72 20 66 75 6e 64 65 64 | aided o|r funded|
|000003c0| 20 69 6e 20 61 6e 79 20 | 77 61 79 20 74 68 65 0a | in any |way the.|
|000003d0| 09 77 6f 72 6b 20 6f 6e | 20 74 68 69 73 20 73 6f |.work on| this so|
|000003e0| 66 74 77 61 72 65 2e 20 | 49 74 20 69 73 20 65 6e |ftware. |It is en|
|000003f0| 74 69 72 65 6c 79 20 70 | 61 72 74 20 6f 66 20 6d |tirely p|art of m|
|00000400| 79 20 6f 77 6e 20 72 65 | 73 65 61 72 63 68 0a 09 |y own re|search..|
|00000410| 61 63 74 69 76 69 74 79 | 2c 20 73 75 70 70 6f 72 |activity|, suppor|
|00000420| 74 65 64 20 61 6e 64 20 | 66 75 6e 64 65 64 20 65 |ted and |funded e|
|00000430| 6e 74 69 72 65 6c 79 20 | 62 79 20 6d 79 73 65 6c |ntirely |by mysel|
|00000440| 66 2e 20 49 20 67 69 76 | 65 20 6d 61 6e 79 0a 09 |f. I giv|e many..|
|00000450| 74 68 61 6e 6b 73 20 74 | 6f 20 74 68 65 20 43 6f |thanks t|o the Co|
|00000460| 6c 6c 65 67 65 20 68 6f | 77 65 76 65 72 20 66 6f |llege ho|wever fo|
|00000470| 72 20 70 72 6f 76 69 64 | 69 6e 67 20 6d 65 20 77 |r provid|ing me w|
|00000480| 69 74 68 20 6e 65 77 73 | 20 61 63 63 65 73 73 2c |ith news| access,|
|00000490| 0a 09 77 68 69 63 68 20 | 6d 61 6b 65 73 20 74 68 |..which |makes th|
|000004a0| 69 73 20 70 6f 73 74 69 | 6e 67 20 70 6f 73 73 69 |is posti|ng possi|
|000004b0| 62 6c 65 2e 0a 0a 4d 61 | 6e 79 20 74 68 61 6e 6b |ble...Ma|ny thank|
|000004c0| 73 20 61 67 61 69 6e 20 | 74 6f 20 74 68 65 20 70 |s again |to the p|
|000004d0| 65 6f 70 6c 65 20 61 74 | 20 41 74 61 72 69 20 43 |eople at| Atari C|
|000004e0| 6f 72 70 2e 20 74 68 61 | 74 20 77 72 6f 74 65 20 |orp. tha|t wrote |
|000004f0| 61 6e 64 20 70 6f 73 74 | 65 64 0a 74 68 65 20 6f |and post|ed.the o|
|00000500| 72 69 67 69 6e 61 6c 20 | 76 65 72 73 69 6f 6e 2e |riginal |version.|
|00000510| 0a 0a 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |..------|--------|
|00000520| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 63 75 74 20 68 |--------|---cut h|
|00000530| 65 72 65 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |ere-----|--------|
|00000540| 2d 2d 2d 2d 2d 2d 2d 2d | 0a 23 21 20 2f 62 69 6e |--------|.#! /bin|
|00000550| 2f 73 68 0a 23 20 54 68 | 69 73 20 69 73 20 61 20 |/sh.# Th|is is a |
|00000560| 73 68 65 6c 6c 20 61 72 | 63 68 69 76 65 2e 20 20 |shell ar|chive. |
|00000570| 52 65 6d 6f 76 65 20 61 | 6e 79 74 68 69 6e 67 20 |Remove a|nything |
|00000580| 62 65 66 6f 72 65 20 74 | 68 69 73 20 6c 69 6e 65 |before t|his line|
|00000590| 2c 20 74 68 65 6e 20 75 | 6e 70 61 63 6b 0a 23 20 |, then u|npack.# |
|000005a0| 69 74 20 62 79 20 73 61 | 76 69 6e 67 20 69 74 20 |it by sa|ving it |
|000005b0| 69 6e 74 6f 20 61 20 66 | 69 6c 65 20 61 6e 64 20 |into a f|ile and |
|000005c0| 74 79 70 69 6e 67 20 22 | 73 68 20 66 69 6c 65 22 |typing "|sh file"|
|000005d0| 2e 20 20 54 6f 20 6f 76 | 65 72 77 72 69 74 65 20 |. To ov|erwrite |
|000005e0| 65 78 69 73 74 69 6e 67 | 0a 23 20 66 69 6c 65 73 |existing|.# files|
|000005f0| 2c 20 74 79 70 65 20 22 | 73 68 20 66 69 6c 65 20 |, type "|sh file |
|00000600| 2d 63 22 2e 20 20 59 6f | 75 20 63 61 6e 20 61 6c |-c". Yo|u can al|
|00000610| 73 6f 20 66 65 65 64 20 | 74 68 69 73 20 61 73 20 |so feed |this as |
|00000620| 73 74 61 6e 64 61 72 64 | 20 69 6e 70 75 74 20 76 |standard| input v|
|00000630| 69 61 0a 23 20 75 6e 73 | 68 61 72 2c 20 6f 72 20 |ia.# uns|har, or |
|00000640| 62 79 20 74 79 70 69 6e | 67 20 22 73 68 20 3c 66 |by typin|g "sh <f|
|00000650| 69 6c 65 22 2c 20 65 2e | 67 2e 2e 20 20 49 66 20 |ile", e.|g.. If |
|00000660| 74 68 69 73 20 61 72 63 | 68 69 76 65 20 69 73 20 |this arc|hive is |
|00000670| 63 6f 6d 70 6c 65 74 65 | 2c 20 79 6f 75 0a 23 20 |complete|, you.# |
|00000680| 77 69 6c 6c 20 73 65 65 | 20 74 68 65 20 66 6f 6c |will see| the fol|
|00000690| 6c 6f 77 69 6e 67 20 6d | 65 73 73 61 67 65 20 61 |lowing m|essage a|
|000006a0| 74 20 74 68 65 20 65 6e | 64 3a 0a 23 09 09 22 45 |t the en|d:.#.."E|
|000006b0| 6e 64 20 6f 66 20 61 72 | 63 68 69 76 65 20 31 20 |nd of ar|chive 1 |
|000006c0| 28 6f 66 20 33 29 2e 22 | 0a 23 20 43 6f 6e 74 65 |(of 3)."|.# Conte|
|000006d0| 6e 74 73 3a 20 20 4d 61 | 6b 65 66 69 6c 65 20 4d |nts: Ma|kefile M|
|000006e0| 61 73 74 65 72 20 4e 6f | 64 65 20 52 45 41 44 4d |aster No|de READM|
|000006f0| 45 20 53 79 73 74 65 6d | 20 63 6c 65 64 2e 68 20 |E System| cled.h |
|00000700| 63 6c 65 64 69 6f 2e 68 | 0a 23 20 20 20 63 6f 6e |cledio.h|.# con|
|00000710| 66 69 67 2e 68 20 6b 65 | 72 6e 65 6c 5f 73 70 61 |fig.h ke|rnel_spa|
|00000720| 63 65 2e 63 20 70 61 74 | 63 68 6c 65 76 65 6c 2e |ce.c pat|chlevel.|
|00000730| 68 20 73 63 6c 65 64 2e | 63 20 73 70 61 63 65 2e |h scled.|c space.|
|00000740| 63 0a 23 20 57 72 61 70 | 70 65 64 20 62 79 20 73 |c.# Wrap|ped by s|
|00000750| 77 40 61 77 61 72 65 20 | 6f 6e 20 54 75 65 20 41 |w@aware |on Tue A|
|00000760| 75 67 20 32 38 20 31 33 | 3a 33 36 3a 30 39 20 31 |ug 28 13|:36:09 1|
|00000770| 39 39 30 0a 50 41 54 48 | 3d 2f 62 69 6e 3a 2f 75 |990.PATH|=/bin:/u|
|00000780| 73 72 2f 62 69 6e 3a 2f | 75 73 72 2f 75 63 62 20 |sr/bin:/|usr/ucb |
|00000790| 3b 20 65 78 70 6f 72 74 | 20 50 41 54 48 0a 69 66 |; export| PATH.if|
|000007a0| 20 74 65 73 74 20 2d 66 | 20 27 4d 61 6b 65 66 69 | test -f| 'Makefi|
|000007b0| 6c 65 27 20 2d 61 20 22 | 24 7b 31 7d 22 20 21 3d |le' -a "|${1}" !=|
|000007c0| 20 22 2d 63 22 20 3b 20 | 74 68 65 6e 20 0a 20 20 | "-c" ; |then . |
|000007d0| 65 63 68 6f 20 73 68 61 | 72 3a 20 57 69 6c 6c 20 |echo sha|r: Will |
|000007e0| 6e 6f 74 20 63 6c 6f 62 | 62 65 72 20 65 78 69 73 |not clob|ber exis|
|000007f0| 74 69 6e 67 20 66 69 6c | 65 20 5c 22 27 4d 61 6b |ting fil|e \"'Mak|
|00000800| 65 66 69 6c 65 27 5c 22 | 0a 65 6c 73 65 0a 65 63 |efile'\"|.else.ec|
|00000810| 68 6f 20 73 68 61 72 3a | 20 45 78 74 72 61 63 74 |ho shar:| Extract|
|00000820| 69 6e 67 20 5c 22 27 4d | 61 6b 65 66 69 6c 65 27 |ing \"'M|akefile'|
|00000830| 5c 22 20 5c 28 31 33 35 | 36 20 63 68 61 72 61 63 |\" \(135|6 charac|
|00000840| 74 65 72 73 5c 29 0a 73 | 65 64 20 22 73 2f 5e 58 |ters\).s|ed "s/^X|
|00000850| 2f 2f 22 20 3e 27 4d 61 | 6b 65 66 69 6c 65 27 20 |//" >'Ma|kefile' |
|00000860| 3c 3c 27 45 4e 44 5f 4f | 46 5f 46 49 4c 45 27 0a |<<'END_O|F_FILE'.|
|00000870| 58 23 20 24 49 64 3a 20 | 4d 61 6b 65 66 69 6c 65 |X# $Id: |Makefile|
|00000880| 2c 76 20 32 2e 35 20 39 | 30 2f 30 38 2f 32 38 20 |,v 2.5 9|0/08/28 |
|00000890| 31 33 3a 33 35 3a 30 36 | 20 73 77 20 45 78 70 20 |13:35:06| sw Exp |
|000008a0| 24 0a 58 0a 58 44 45 56 | 09 09 3d 63 6c 65 64 0a |$.X.XDEV|..=cled.|
|000008b0| 58 53 59 53 09 09 3d 2f | 75 73 72 2f 69 6e 63 6c |XSYS..=/|usr/incl|
|000008c0| 75 64 65 2f 73 79 73 0a | 58 4c 53 59 53 09 09 3d |ude/sys.|XLSYS..=|
|000008d0| 2f 75 73 72 2f 6c 6f 63 | 61 6c 2f 69 6e 63 6c 75 |/usr/loc|al/inclu|
|000008e0| 64 65 2f 73 79 73 0a 58 | 50 41 43 4b 09 09 3d 2f |de/sys.X|PACK..=/|
|000008f0| 65 74 63 2f 63 6f 6e 66 | 2f 70 61 63 6b 2e 64 0a |etc/conf|/pack.d.|
|00000900| 58 4b 46 4c 41 47 53 09 | 09 3d 2d 44 49 4e 4b 45 |XKFLAGS.|.=-DINKE|
|00000910| 52 4e 45 4c 0a 58 43 46 | 4c 41 47 53 20 20 20 09 |RNEL.XCF|LAGS .|
|00000920| 3d 2d 4f 20 2d 5a 70 34 | 20 2d 49 24 28 4c 53 59 |=-O -Zp4| -I$(LSY|
|00000930| 53 29 0a 58 4c 49 42 53 | 09 09 3d 24 24 4c 44 50 |S).XLIBS|..=$$LDP|
|00000940| 41 54 48 20 2d 6c 6d 69 | 73 63 20 2d 6c 6d 61 6c |ATH -lmi|sc -lmal|
|00000950| 6c 6f 63 20 2d 6c 63 5f | 73 0a 58 0a 58 43 43 20 |loc -lc_|s.X.XCC |
|00000960| 09 09 3d 63 63 0a 58 0a | 58 61 6c 6c 3a 09 09 73 |..=cc.X.|Xall:..s|
|00000970| 24 28 44 45 56 29 20 44 | 72 69 76 65 72 2e 6f 20 |$(DEV) D|river.o |
|00000980| 24 28 44 45 56 29 20 23 | 24 28 44 45 56 29 64 75 |$(DEV) #|$(DEV)du|
|00000990| 6d 70 0a 58 0a 58 44 72 | 69 76 65 72 2e 6f 3a 09 |mp.X.XDr|iver.o:.|
|000009a0| 24 28 44 45 56 29 2e 6f | 3b 09 09 6c 6e 20 24 3f |$(DEV).o|;..ln $?|
|000009b0| 20 24 40 0a 58 53 70 61 | 63 65 2e 63 3a 09 73 70 | $@.XSpa|ce.c:.sp|
|000009c0| 61 63 65 2e 63 3b 09 09 | 6c 6e 20 24 3f 20 24 40 |ace.c;..|ln $? $@|
|000009d0| 0a 58 0a 58 24 28 44 45 | 56 29 2e 6f 3a 20 09 24 |.X.X$(DE|V).o: .$|
|000009e0| 28 44 45 56 29 2e 63 20 | 24 28 4c 53 59 53 29 2f |(DEV).c |$(LSYS)/|
|000009f0| 24 28 44 45 56 29 2e 68 | 20 24 28 4c 53 59 53 29 |$(DEV).h| $(LSYS)|
|00000a00| 2f 24 28 44 45 56 29 69 | 6f 2e 68 0a 58 09 24 28 |/$(DEV)i|o.h.X.$(|
|00000a10| 43 43 29 20 24 28 43 46 | 4c 41 47 53 29 20 24 28 |CC) $(CF|LAGS) $(|
|00000a20| 4b 46 4c 41 47 53 29 20 | 2d 63 20 24 28 44 45 56 |KFLAGS) |-c $(DEV|
|00000a30| 29 2e 63 0a 58 0a 58 73 | 24 28 44 45 56 29 3a 20 |).c.X.Xs|$(DEV): |
|00000a40| 09 73 24 28 44 45 56 29 | 2e 63 20 24 28 4c 53 59 |.s$(DEV)|.c $(LSY|
|00000a50| 53 29 2f 24 28 44 45 56 | 29 69 6f 2e 68 0a 58 09 |S)/$(DEV|)io.h.X.|
|00000a60| 24 28 43 43 29 20 24 28 | 43 46 4c 41 47 53 29 20 |$(CC) $(|CFLAGS) |
|00000a70| 2d 6f 20 73 24 28 44 45 | 56 29 20 73 24 28 44 45 |-o s$(DE|V) s$(DE|
|00000a80| 56 29 2e 63 20 24 28 4c | 49 42 53 29 0a 58 0a 58 |V).c $(L|IBS).X.X|
|00000a90| 24 28 44 45 56 29 3a 09 | 09 24 28 44 45 56 29 2e |$(DEV):.|.$(DEV).|
|00000aa0| 63 20 73 70 61 63 65 2e | 6f 20 24 28 4c 53 59 53 |c space.|o $(LSYS|
|00000ab0| 29 2f 24 28 44 45 56 29 | 2e 68 20 24 28 4c 53 59 |)/$(DEV)|.h $(LSY|
|00000ac0| 53 29 2f 24 28 44 45 56 | 29 69 6f 2e 68 20 63 6f |S)/$(DEV|)io.h co|
|00000ad0| 6e 66 69 67 2e 68 0a 58 | 09 24 28 43 43 29 20 24 |nfig.h.X|.$(CC) $|
|00000ae0| 28 43 46 4c 41 47 53 29 | 20 2d 6f 20 24 28 44 45 |(CFLAGS)| -o $(DE|
|00000af0| 56 29 20 24 28 44 45 56 | 29 2e 63 20 73 70 61 63 |V) $(DEV|).c spac|
|00000b00| 65 2e 6f 0a 58 09 72 6d | 20 2d 66 20 24 28 44 45 |e.o.X.rm| -f $(DE|
|00000b10| 56 29 2e 6f 20 73 70 61 | 63 65 2e 6f 0a 58 0a 58 |V).o spa|ce.o.X.X|
|00000b20| 73 70 61 63 65 2e 6f 3a | 20 09 73 70 61 63 65 2e |space.o:| .space.|
|00000b30| 6f 20 24 28 4c 53 59 53 | 29 2f 24 28 44 45 56 29 |o $(LSYS|)/$(DEV)|
|00000b40| 2e 68 20 24 28 4c 53 59 | 53 29 2f 24 28 44 45 56 |.h $(LSY|S)/$(DEV|
|00000b50| 29 69 6f 2e 68 20 63 6f | 6e 66 69 67 2e 68 0a 58 |)io.h co|nfig.h.X|
|00000b60| 09 24 28 43 43 29 20 24 | 28 43 46 4c 41 47 53 29 |.$(CC) $|(CFLAGS)|
|00000b70| 20 24 28 4b 46 4c 41 47 | 53 29 20 2d 63 20 73 70 | $(KFLAG|S) -c sp|
|00000b80| 61 63 65 2e 63 0a 58 09 | 0a 58 23 24 28 44 45 56 |ace.c.X.|.X#$(DEV|
|00000b90| 29 64 75 6d 70 3a 20 09 | 24 28 44 45 56 29 64 75 |)dump: .|$(DEV)du|
|00000ba0| 6d 70 2e 63 20 24 28 4c | 53 59 53 29 2f 24 28 44 |mp.c $(L|SYS)/$(D|
|00000bb0| 45 56 29 69 6f 2e 68 20 | 24 28 4c 53 59 53 29 2f |EV)io.h |$(LSYS)/|
|00000bc0| 24 28 44 45 56 29 2e 68 | 0a 58 23 09 24 28 43 43 |$(DEV).h|.X#.$(CC|
|00000bd0| 29 20 24 28 43 46 4c 41 | 47 53 29 20 24 28 4b 46 |) $(CFLA|GS) $(KF|
|00000be0| 4c 41 47 53 29 20 2d 6f | 20 24 28 44 45 56 29 64 |LAGS) -o| $(DEV)d|
|00000bf0| 75 6d 70 20 24 28 44 45 | 56 29 64 75 6d 70 2e 63 |ump $(DE|V)dump.c|
|00000c00| 20 24 28 4c 49 42 53 29 | 0a 58 0a 58 24 28 53 59 | $(LIBS)|.X.X$(SY|
|00000c10| 53 29 2f 24 28 44 45 56 | 29 2e 68 3a 09 24 28 4c |S)/$(DEV|).h:.$(L|
|00000c20| 53 59 53 29 2f 24 28 44 | 45 56 29 2e 68 3b 09 6c |SYS)/$(D|EV).h;.l|
|00000c30| 6e 20 24 3f 20 24 40 0a | 58 24 28 53 59 53 29 2f |n $? $@.|X$(SYS)/|
|00000c40| 24 28 44 45 56 29 69 6f | 2e 68 3a 09 24 28 4c 53 |$(DEV)io|.h:.$(LS|
|00000c50| 59 53 29 2f 24 28 44 45 | 56 29 69 6f 2e 68 3b 09 |YS)/$(DE|V)io.h;.|
|00000c60| 6c 6e 20 24 3f 20 24 40 | 0a 58 24 28 4c 53 59 53 |ln $? $@|.X$(LSYS|
|00000c70| 29 2f 24 28 44 45 56 29 | 2e 68 3a 09 24 28 44 45 |)/$(DEV)|.h:.$(DE|
|00000c80| 56 29 2e 68 3b 09 09 63 | 70 20 24 3f 20 24 40 0a |V).h;..c|p $? $@.|
|00000c90| 58 24 28 4c 53 59 53 29 | 2f 24 28 44 45 56 29 69 |X$(LSYS)|/$(DEV)i|
|00000ca0| 6f 2e 68 3a 09 24 28 44 | 45 56 29 69 6f 2e 68 3b |o.h:.$(D|EV)io.h;|
|00000cb0| 09 09 63 70 20 24 3f 20 | 24 40 0a 58 0a 58 69 6e |..cp $? |$@.X.Xin|
|00000cc0| 73 74 61 6c 6c 3a 09 24 | 28 50 41 43 4b 29 2f 6b |stall:.$|(PACK)/k|
|00000cd0| 65 72 6e 65 6c 2f 73 70 | 61 63 65 2e 63 0a 58 69 |ernel/sp|ace.c.Xi|
|00000ce0| 6e 73 74 61 6c 6c 3a 09 | 24 28 53 59 53 29 2f 24 |nstall:.|$(SYS)/$|
|00000cf0| 28 44 45 56 29 2e 68 20 | 24 28 53 59 53 29 2f 24 |(DEV).h |$(SYS)/$|
|00000d00| 28 44 45 56 29 69 6f 2e | 68 0a 58 69 6e 73 74 61 |(DEV)io.|h.Xinsta|
|00000d10| 6c 6c 3a 09 4d 61 73 74 | 65 72 20 53 79 73 74 65 |ll:.Mast|er Syste|
|00000d20| 6d 20 44 72 69 76 65 72 | 2e 6f 20 53 70 61 63 65 |m Driver|.o Space|
|00000d30| 2e 63 20 4e 6f 64 65 20 | 4e 61 6d 65 0a 58 09 24 |.c Node |Name.X.$|
|00000d40| 28 43 4f 4e 46 29 69 64 | 69 6e 73 74 61 6c 6c 20 |(CONF)id|install |
|00000d50| 2d 6b 65 61 20 2d 6d 73 | 6f 70 6e 20 24 28 44 45 |-kea -ms|opn $(DE|
|00000d60| 56 29 0a 58 09 24 28 43 | 4f 4e 46 29 69 64 6d 6b |V).X.$(C|ONF)idmk|
|00000d70| 6e 6f 64 20 2d 73 3b 20 | 63 68 6d 6f 64 20 61 3d |nod -s; |chmod a=|
|00000d80| 72 77 20 2f 64 65 76 2f | 24 28 44 45 56 29 0a 58 |rw /dev/|$(DEV).X|
|00000d90| 0a 58 24 28 50 41 43 4b | 29 2f 6b 65 72 6e 65 6c |.X$(PACK|)/kernel|
|00000da0| 2f 73 70 61 63 65 2e 63 | 3a 20 6b 65 72 6e 65 6c |/space.c|: kernel|
|00000db0| 5f 73 70 61 63 65 2e 63 | 0a 58 09 40 65 63 68 6f |_space.c|.X.@echo|
|00000dc0| 20 59 6f 75 20 6d 75 73 | 74 20 73 74 69 6c 6c 20 | You mus|t still |
|00000dd0| 63 68 61 6e 67 65 20 24 | 40 20 61 63 63 6f 72 64 |change $|@ accord|
|00000de0| 69 6e 67 20 74 6f 20 24 | 3f 0a 45 4e 44 5f 4f 46 |ing to $|?.END_OF|
|00000df0| 5f 46 49 4c 45 0a 69 66 | 20 74 65 73 74 20 31 33 |_FILE.if| test 13|
|00000e00| 35 36 20 2d 6e 65 20 60 | 77 63 20 2d 63 20 3c 27 |56 -ne `|wc -c <'|
|00000e10| 4d 61 6b 65 66 69 6c 65 | 27 60 3b 20 74 68 65 6e |Makefile|'`; then|
|00000e20| 0a 20 20 20 20 65 63 68 | 6f 20 73 68 61 72 3a 20 |. ech|o shar: |
|00000e30| 5c 22 27 4d 61 6b 65 66 | 69 6c 65 27 5c 22 20 75 |\"'Makef|ile'\" u|
|00000e40| 6e 70 61 63 6b 65 64 20 | 77 69 74 68 20 77 72 6f |npacked |with wro|
|00000e50| 6e 67 20 73 69 7a 65 21 | 0a 66 69 0a 23 20 65 6e |ng size!|.fi.# en|
|00000e60| 64 20 6f 66 20 27 4d 61 | 6b 65 66 69 6c 65 27 0a |d of 'Ma|kefile'.|
|00000e70| 66 69 0a 69 66 20 74 65 | 73 74 20 2d 66 20 27 4d |fi.if te|st -f 'M|
|00000e80| 61 73 74 65 72 27 20 2d | 61 20 22 24 7b 31 7d 22 |aster' -|a "${1}"|
|00000e90| 20 21 3d 20 22 2d 63 22 | 20 3b 20 74 68 65 6e 20 | != "-c"| ; then |
|00000ea0| 0a 20 20 65 63 68 6f 20 | 73 68 61 72 3a 20 57 69 |. echo |shar: Wi|
|00000eb0| 6c 6c 20 6e 6f 74 20 63 | 6c 6f 62 62 65 72 20 65 |ll not c|lobber e|
|00000ec0| 78 69 73 74 69 6e 67 20 | 66 69 6c 65 20 5c 22 27 |xisting |file \"'|
|00000ed0| 4d 61 73 74 65 72 27 5c | 22 0a 65 6c 73 65 0a 65 |Master'\|".else.e|
|00000ee0| 63 68 6f 20 73 68 61 72 | 3a 20 45 78 74 72 61 63 |cho shar|: Extrac|
|00000ef0| 74 69 6e 67 20 5c 22 27 | 4d 61 73 74 65 72 27 5c |ting \"'|Master'\|
|00000f00| 22 20 5c 28 32 39 20 63 | 68 61 72 61 63 74 65 72 |" \(29 c|haracter|
|00000f10| 73 5c 29 0a 73 65 64 20 | 22 73 2f 5e 58 2f 2f 22 |s\).sed |"s/^X//"|
|00000f20| 20 3e 27 4d 61 73 74 65 | 72 27 20 3c 3c 27 45 4e | >'Maste|r' <<'EN|
|00000f30| 44 5f 4f 46 5f 46 49 4c | 45 27 0a 58 63 6c 65 64 |D_OF_FIL|E'.Xcled|
|00000f40| 09 49 69 09 69 63 6f 09 | 63 6c 65 64 09 30 09 30 |.Ii.ico.|cled.0.0|
|00000f50| 09 31 09 33 32 09 2d 31 | 0a 45 4e 44 5f 4f 46 5f |.1.32.-1|.END_OF_|
|00000f60| 46 49 4c 45 0a 69 66 20 | 74 65 73 74 20 32 39 20 |FILE.if |test 29 |
|00000f70| 2d 6e 65 20 60 77 63 20 | 2d 63 20 3c 27 4d 61 73 |-ne `wc |-c <'Mas|
|00000f80| 74 65 72 27 60 3b 20 74 | 68 65 6e 0a 20 20 20 20 |ter'`; t|hen. |
|00000f90| 65 63 68 6f 20 73 68 61 | 72 3a 20 5c 22 27 4d 61 |echo sha|r: \"'Ma|
|00000fa0| 73 74 65 72 27 5c 22 20 | 75 6e 70 61 63 6b 65 64 |ster'\" |unpacked|
|00000fb0| 20 77 69 74 68 20 77 72 | 6f 6e 67 20 73 69 7a 65 | with wr|ong size|
|00000fc0| 21 0a 66 69 0a 63 68 6d | 6f 64 20 2b 78 20 27 4d |!.fi.chm|od +x 'M|
|00000fd0| 61 73 74 65 72 27 0a 23 | 20 65 6e 64 20 6f 66 20 |aster'.#| end of |
|00000fe0| 27 4d 61 73 74 65 72 27 | 0a 66 69 0a 69 66 20 74 |'Master'|.fi.if t|
|00000ff0| 65 73 74 20 2d 66 20 27 | 4e 6f 64 65 27 20 2d 61 |est -f '|Node' -a|
|00001000| 20 22 24 7b 31 7d 22 20 | 21 3d 20 22 2d 63 22 20 | "${1}" |!= "-c" |
|00001010| 3b 20 74 68 65 6e 20 0a | 20 20 65 63 68 6f 20 73 |; then .| echo s|
|00001020| 68 61 72 3a 20 57 69 6c | 6c 20 6e 6f 74 20 63 6c |har: Wil|l not cl|
|00001030| 6f 62 62 65 72 20 65 78 | 69 73 74 69 6e 67 20 66 |obber ex|isting f|
|00001040| 69 6c 65 20 5c 22 27 4e | 6f 64 65 27 5c 22 0a 65 |ile \"'N|ode'\".e|
|00001050| 6c 73 65 0a 65 63 68 6f | 20 73 68 61 72 3a 20 45 |lse.echo| shar: E|
|00001060| 78 74 72 61 63 74 69 6e | 67 20 5c 22 27 4e 6f 64 |xtractin|g \"'Nod|
|00001070| 65 27 5c 22 20 5c 28 31 | 34 20 63 68 61 72 61 63 |e'\" \(1|4 charac|
|00001080| 74 65 72 73 5c 29 0a 73 | 65 64 20 22 73 2f 5e 58 |ters\).s|ed "s/^X|
|00001090| 2f 2f 22 20 3e 27 4e 6f | 64 65 27 20 3c 3c 27 45 |//" >'No|de' <<'E|
|000010a0| 4e 44 5f 4f 46 5f 46 49 | 4c 45 27 0a 58 63 6c 65 |ND_OF_FI|LE'.Xcle|
|000010b0| 64 09 63 6c 65 64 09 63 | 09 30 0a 45 4e 44 5f 4f |d.cled.c|.0.END_O|
|000010c0| 46 5f 46 49 4c 45 0a 69 | 66 20 74 65 73 74 20 31 |F_FILE.i|f test 1|
|000010d0| 34 20 2d 6e 65 20 60 77 | 63 20 2d 63 20 3c 27 4e |4 -ne `w|c -c <'N|
|000010e0| 6f 64 65 27 60 3b 20 74 | 68 65 6e 0a 20 20 20 20 |ode'`; t|hen. |
|000010f0| 65 63 68 6f 20 73 68 61 | 72 3a 20 5c 22 27 4e 6f |echo sha|r: \"'No|
|00001100| 64 65 27 5c 22 20 75 6e | 70 61 63 6b 65 64 20 77 |de'\" un|packed w|
|00001110| 69 74 68 20 77 72 6f 6e | 67 20 73 69 7a 65 21 0a |ith wron|g size!.|
|00001120| 66 69 0a 63 68 6d 6f 64 | 20 2b 78 20 27 4e 6f 64 |fi.chmod| +x 'Nod|
|00001130| 65 27 0a 23 20 65 6e 64 | 20 6f 66 20 27 4e 6f 64 |e'.# end| of 'Nod|
|00001140| 65 27 0a 66 69 0a 69 66 | 20 74 65 73 74 20 2d 66 |e'.fi.if| test -f|
|00001150| 20 27 52 45 41 44 4d 45 | 27 20 2d 61 20 22 24 7b | 'README|' -a "${|
|00001160| 31 7d 22 20 21 3d 20 22 | 2d 63 22 20 3b 20 74 68 |1}" != "|-c" ; th|
|00001170| 65 6e 20 0a 20 20 65 63 | 68 6f 20 73 68 61 72 3a |en . ec|ho shar:|
|00001180| 20 57 69 6c 6c 20 6e 6f | 74 20 63 6c 6f 62 62 65 | Will no|t clobbe|
|00001190| 72 20 65 78 69 73 74 69 | 6e 67 20 66 69 6c 65 20 |r existi|ng file |
|000011a0| 5c 22 27 52 45 41 44 4d | 45 27 5c 22 0a 65 6c 73 |\"'READM|E'\".els|
|000011b0| 65 0a 65 63 68 6f 20 73 | 68 61 72 3a 20 45 78 74 |e.echo s|har: Ext|
|000011c0| 72 61 63 74 69 6e 67 20 | 5c 22 27 52 45 41 44 4d |racting |\"'READM|
|000011d0| 45 27 5c 22 20 5c 28 34 | 32 34 36 20 63 68 61 72 |E'\" \(4|246 char|
|000011e0| 61 63 74 65 72 73 5c 29 | 0a 73 65 64 20 22 73 2f |acters\)|.sed "s/|
|000011f0| 5e 58 2f 2f 22 20 3e 27 | 52 45 41 44 4d 45 27 20 |^X//" >'|README' |
|00001200| 3c 3c 27 45 4e 44 5f 4f | 46 5f 46 49 4c 45 27 0a |<<'END_O|F_FILE'.|
|00001210| 58 24 49 64 3a 20 52 45 | 41 44 4d 45 2c 76 20 32 |X$Id: RE|ADME,v 2|
|00001220| 2e 35 20 39 30 2f 30 38 | 2f 32 36 20 31 31 3a 33 |.5 90/08|/26 11:3|
|00001230| 31 3a 34 36 20 73 77 20 | 45 78 70 20 24 0a 58 0a |1:46 sw |Exp $.X.|
|00001240| 58 54 68 69 73 20 69 73 | 20 61 20 6c 69 6e 65 20 |XThis is| a line |
|00001250| 64 69 73 63 69 70 6c 69 | 6e 65 20 74 68 61 74 20 |discipli|ne that |
|00001260| 69 6d 70 6c 65 6d 65 6e | 74 73 20 69 6e 70 75 74 |implemen|ts input|
|00001270| 20 68 69 73 74 6f 72 79 | 20 6d 61 6e 61 67 65 6d | history| managem|
|00001280| 65 6e 74 2e 20 20 49 74 | 0a 58 77 61 73 20 77 72 |ent. It|.Xwas wr|
|00001290| 69 74 74 65 6e 20 6f 72 | 69 67 69 6e 61 6c 6c 79 |itten or|iginally|
|000012a0| 20 62 79 20 4c 79 6c 65 | 20 52 61 69 6e 73 20 6f | by Lyle| Rains o|
|000012b0| 66 20 41 74 61 72 69 20 | 66 6f 72 20 52 54 2d 31 |f Atari |for RT-1|
|000012c0| 31 2c 20 70 6f 72 74 65 | 64 20 62 79 20 44 61 76 |1, porte|d by Dav|
|000012d0| 65 0a 58 53 68 65 70 70 | 61 72 64 20 6f 66 20 41 |e.XShepp|ard of A|
|000012e0| 74 61 72 69 20 74 6f 20 | 58 65 6e 69 78 2f 33 38 |tari to |Xenix/38|
|000012f0| 36 2c 20 61 6e 64 20 70 | 6f 72 74 65 64 20 62 79 |6, and p|orted by|
|00001300| 20 50 69 65 72 63 61 72 | 6c 6f 20 47 72 61 6e 64 | Piercar|lo Grand|
|00001310| 69 20 74 6f 20 53 79 73 | 74 65 6d 0a 58 56 2f 33 |i to Sys|tem.XV/3|
|00001320| 38 36 20 33 2e 32 2c 20 | 61 73 20 77 65 6c 6c 20 |86 3.2, |as well |
|00001330| 61 73 20 5f 6d 75 63 68 | 5f 20 63 6c 65 61 6e 65 |as _much|_ cleane|
|00001340| 64 20 75 70 20 61 6e 64 | 20 6d 6f 64 69 66 69 65 |d up and| modifie|
|00001350| 64 2e 0a 58 0a 58 54 68 | 69 73 20 52 45 41 44 4d |d..X.XTh|is READM|
|00001360| 45 20 66 69 6c 65 20 68 | 61 73 20 62 65 65 6e 20 |E file h|as been |
|00001370| 77 72 69 74 74 65 6e 20 | 65 6e 74 69 72 65 6c 79 |written |entirely|
|00001380| 20 62 79 20 50 69 65 72 | 63 61 72 6c 6f 20 47 72 | by Pier|carlo Gr|
|00001390| 61 6e 64 69 2c 20 61 6e | 64 20 73 6f 0a 58 61 72 |andi, an|d so.Xar|
|000013a0| 65 20 61 6c 6c 20 74 68 | 65 20 63 6f 6d 6d 65 6e |e all th|e commen|
|000013b0| 74 73 20 68 65 72 65 69 | 6e 2e 0a 58 0a 58 46 69 |ts herei|n..X.XFi|
|000013c0| 72 73 74 20 6f 66 20 61 | 6c 6c 2c 20 77 68 69 6c |rst of a|ll, whil|
|000013d0| 65 20 49 20 74 68 69 6e | 6b 20 74 68 69 73 20 69 |e I thin|k this i|
|000013e0| 73 20 61 20 76 65 72 79 | 20 75 73 65 66 75 6c 20 |s a very| useful |
|000013f0| 64 72 69 76 65 72 2c 20 | 61 6e 64 20 74 68 6f 75 |driver, |and thou|
|00001400| 67 68 20 49 0a 58 68 61 | 76 65 20 73 74 72 75 67 |gh I.Xha|ve strug|
|00001410| 67 6c 65 64 20 61 20 6c | 6f 74 20 74 6f 20 6d 61 |gled a l|ot to ma|
|00001420| 6b 65 20 69 74 20 6d 6f | 72 65 20 6c 69 6b 65 20 |ke it mo|re like |
|00001430| 49 20 77 6f 75 6c 64 20 | 68 61 76 65 20 64 6f 6e |I would |have don|
|00001440| 65 20 69 74 2c 20 49 20 | 68 61 76 65 0a 58 6e 6f |e it, I |have.Xno|
|00001450| 74 20 73 75 62 73 74 61 | 6e 74 69 61 6c 6c 79 20 |t substa|ntially |
|00001460| 63 68 61 6e 67 65 64 20 | 69 74 2c 20 65 76 65 6e |changed |it, even|
|00001470| 20 69 66 20 74 68 65 72 | 65 20 61 72 65 20 61 20 | if ther|e are a |
|00001480| 73 65 72 69 65 73 20 6f | 66 20 74 68 69 6e 67 73 |series o|f things|
|00001490| 20 74 68 61 74 0a 58 49 | 20 77 6f 75 6c 64 20 68 | that.XI| would h|
|000014a0| 61 76 65 20 64 6f 6e 65 | 20 76 65 72 79 20 64 69 |ave done| very di|
|000014b0| 66 66 65 72 65 6e 74 6c | 79 2e 0a 58 0a 58 54 68 |fferentl|y..X.XTh|
|000014c0| 65 20 63 75 72 72 65 6e | 74 20 61 64 76 61 6e 74 |e curren|t advant|
|000014d0| 61 67 65 73 20 6f 66 20 | 43 4c 45 44 20 61 72 65 |ages of |CLED are|
|000014e0| 3a 0a 58 0a 58 20 20 20 | 20 2a 20 49 74 20 69 73 |:.X.X | * It is|
|000014f0| 20 66 75 6c 6c 79 20 6b | 65 72 6e 65 6c 20 72 65 | fully k|ernel re|
|00001500| 73 69 64 65 6e 74 2c 20 | 61 6e 64 20 77 69 6c 6c |sident, |and will|
|00001510| 20 6b 65 65 70 20 69 6e | 20 74 68 65 20 68 69 73 | keep in| the his|
|00001520| 74 6f 72 79 20 62 75 66 | 66 65 72 0a 58 20 20 20 |tory buf|fer.X |
|00001530| 20 61 6c 6c 20 69 6e 70 | 75 74 2c 20 62 79 20 77 | all inp|ut, by w|
|00001540| 68 61 74 65 76 65 72 20 | 70 72 6f 67 72 61 6d 2e |hatever |program.|
|00001550| 20 20 54 68 65 72 65 20 | 69 73 20 6e 6f 20 6e 65 | There |is no ne|
|00001560| 65 64 20 74 6f 20 61 64 | 64 20 61 6e 0a 58 20 20 |ed to ad|d an.X |
|00001570| 20 20 69 6e 65 66 66 69 | 63 69 65 6e 74 20 72 61 | ineffi|cient ra|
|00001580| 77 20 6f 72 20 63 62 72 | 65 61 6b 20 6d 6f 64 65 |w or cbr|eak mode|
|00001590| 20 6c 69 62 72 61 72 79 | 20 74 6f 20 65 61 63 68 | library| to each|
|000015a0| 20 70 72 6f 67 72 61 6d | 20 6f 72 20 74 6f 20 68 | program| or to h|
|000015b0| 61 63 6b 0a 58 20 20 20 | 20 77 69 74 68 20 70 74 |ack.X | with pt|
|000015c0| 79 73 20 74 6f 20 68 61 | 76 65 20 68 69 73 74 6f |ys to ha|ve histo|
|000015d0| 72 79 20 70 72 6f 63 65 | 73 73 69 6e 67 2e 0a 58 |ry proce|ssing..X|
|000015e0| 0a 58 20 20 20 20 2a 20 | 49 74 20 69 73 20 71 75 |.X * |It is qu|
|000015f0| 69 74 65 20 66 61 73 74 | 2c 20 61 6e 64 20 73 75 |ite fast|, and su|
|00001600| 72 65 6c 79 20 68 61 73 | 20 6c 65 73 73 20 6f 76 |rely has| less ov|
|00001610| 65 72 68 65 61 64 20 74 | 68 61 6e 20 6f 74 68 65 |erhead t|han othe|
|00001620| 72 20 69 6e 70 75 74 0a | 58 20 20 20 20 68 69 73 |r input.|X his|
|00001630| 74 6f 72 79 20 6d 65 63 | 68 61 6e 69 73 6d 73 2e |tory mec|hanisms.|
|00001640| 0a 58 0a 58 20 20 20 20 | 2a 20 49 74 20 63 61 6e |.X.X |* It can|
|00001650| 20 62 65 20 65 61 73 69 | 6c 79 20 70 6f 72 74 65 | be easi|ly porte|
|00001660| 64 20 74 6f 20 64 69 66 | 66 65 72 65 6e 74 20 74 |d to dif|ferent t|
|00001670| 79 70 65 73 20 6f 66 20 | 55 4e 49 58 2c 20 61 6e |ypes of |UNIX, an|
|00001680| 64 20 77 69 6c 6c 20 77 | 6f 72 6b 0a 58 20 20 20 |d will w|ork.X |
|00001690| 20 76 69 72 74 75 61 6c | 6c 79 20 75 6e 63 68 61 | virtual|ly uncha|
|000016a0| 6e 67 65 64 20 6f 6e 20 | 61 6e 79 20 53 79 73 74 |nged on |any Syst|
|000016b0| 65 6d 20 56 20 28 6f 72 | 20 56 37 29 20 64 65 72 |em V (or| V7) der|
|000016c0| 69 76 61 74 69 76 65 2e | 0a 58 0a 58 20 20 20 20 |ivative.|.X.X |
|000016d0| 2a 20 49 74 20 77 69 6c | 6c 20 67 65 74 20 6f 75 |* It wil|l get ou|
|000016e0| 74 20 6f 66 20 74 68 65 | 20 77 61 79 20 77 68 65 |t of the| way whe|
|000016f0| 6e 20 6e 6f 74 20 6e 65 | 65 64 65 64 2c 20 65 2e |n not ne|eded, e.|
|00001700| 67 2e 20 20 66 6f 72 20 | 72 61 77 20 6f 72 0a 58 |g. for |raw or.X|
|00001710| 20 20 20 20 63 62 72 65 | 61 6b 20 69 6e 70 75 74 | cbre|ak input|
|00001720| 2e 0a 58 0a 58 20 20 20 | 20 2a 20 49 74 20 69 73 |..X.X | * It is|
|00001730| 20 66 72 65 65 2e 0a 58 | 0a 58 54 68 65 20 64 69 | free..X|.XThe di|
|00001740| 73 61 64 76 61 6e 74 61 | 67 65 73 20 61 72 65 3a |sadvanta|ges are:|
|00001750| 0a 58 0a 58 20 20 20 20 | 2a 20 54 68 65 20 68 69 |.X.X |* The hi|
|00001760| 73 74 6f 72 79 20 6d 65 | 63 68 61 6e 69 73 6d 20 |story me|chanism |
|00001770| 69 73 20 70 72 65 74 74 | 79 20 73 69 6d 70 6c 65 |is prett|y simple|
|00001780| 3b 20 74 68 65 72 65 20 | 61 72 65 20 6e 6f 20 70 |; there |are no p|
|00001790| 61 74 74 65 72 6e 0a 58 | 20 20 20 20 73 65 61 72 |attern.X| sear|
|000017a0| 63 68 65 73 2c 20 66 6f | 72 20 65 78 61 6d 70 6c |ches, fo|r exampl|
|000017b0| 65 2e 20 20 54 68 69 73 | 20 69 73 20 70 72 6f 62 |e. This| is prob|
|000017c0| 61 62 6c 79 20 61 20 66 | 65 61 74 75 72 65 2e 0a |ably a f|eature..|
|000017d0| 58 0a 58 20 20 20 20 2a | 20 49 74 20 6f 63 63 75 |X.X *| It occu|
|000017e0| 70 69 65 73 20 77 69 72 | 65 64 20 64 6f 77 6e 20 |pies wir|ed down |
|000017f0| 6b 65 72 6e 65 6c 20 73 | 70 61 63 65 2e 20 20 54 |kernel s|pace. T|
|00001800| 68 69 73 20 69 73 20 70 | 72 6f 62 61 62 6c 79 20 |his is p|robably |
|00001810| 61 20 66 65 61 74 75 72 | 65 2c 0a 58 20 20 20 20 |a featur|e,.X |
|00001820| 62 65 63 61 75 73 65 20 | 61 6e 79 20 6f 74 68 65 |because |any othe|
|00001830| 72 20 69 6e 74 65 72 61 | 63 74 69 76 65 20 68 69 |r intera|ctive hi|
|00001840| 73 74 6f 72 79 20 6d 65 | 63 68 61 6e 69 73 6d 20 |story me|chanism |
|00001850| 77 6f 75 6c 64 20 70 72 | 6f 62 61 62 6c 79 20 63 |would pr|obably c|
|00001860| 6f 73 74 0a 58 20 20 20 | 20 76 61 73 74 6c 79 20 |ost.X | vastly |
|00001870| 6d 6f 72 65 20 69 6e 20 | 62 6f 74 68 20 73 70 61 |more in |both spa|
|00001880| 63 65 20 61 6e 64 20 74 | 69 6d 65 20 6f 76 65 72 |ce and t|ime over|
|00001890| 68 65 61 64 73 2e 0a 58 | 0a 58 20 20 20 20 2a 20 |heads..X|.X * |
|000018a0| 49 74 20 69 73 20 6e 6f | 74 20 65 61 73 69 6c 79 |It is no|t easily|
|000018b0| 20 65 78 74 65 6e 73 69 | 62 6c 65 2c 20 61 73 20 | extensi|ble, as |
|000018c0| 69 74 20 69 73 20 6c 69 | 6e 6b 65 64 20 77 69 74 |it is li|nked wit|
|000018d0| 68 20 74 68 65 20 6b 65 | 72 6e 65 6c 2e 0a 58 20 |h the ke|rnel..X |
|000018e0| 20 20 20 41 67 61 69 6e | 2c 20 74 68 69 73 20 69 | Again|, this i|
|000018f0| 73 20 70 72 6f 62 61 62 | 6c 79 20 61 20 66 65 61 |s probab|ly a fea|
|00001900| 74 75 72 65 2e 0a 58 0a | 58 20 20 20 20 2a 20 54 |ture..X.|X * T|
|00001910| 68 65 72 65 20 69 73 20 | 6e 6f 20 63 6f 6d 6d 61 |here is |no comma|
|00001920| 6e 64 20 6f 72 20 66 69 | 6c 65 20 6e 61 6d 65 20 |nd or fi|le name |
|00001930| 63 6f 6d 70 6c 65 74 69 | 6f 6e 2e 20 20 54 68 69 |completi|on. Thi|
|00001940| 73 20 63 61 6e 20 62 65 | 0a 58 20 20 20 20 65 66 |s can be|.X ef|
|00001950| 66 69 63 69 65 6e 74 6c | 79 20 69 6d 70 6c 65 6d |ficientl|y implem|
|00001960| 65 6e 74 65 64 20 62 79 | 20 61 6e 79 20 69 6e 74 |ented by| any int|
|00001970| 65 72 65 73 74 65 64 20 | 70 72 6f 67 72 61 6d 20 |erested |program |
|00001980| 6f 6e 20 74 6f 70 20 6f | 66 20 43 4c 45 44 20 62 |on top o|f CLED b|
|00001990| 79 0a 58 20 20 20 20 75 | 73 69 6e 67 20 74 68 65 |y.X u|sing the|
|000019a0| 20 56 45 4f 4c 32 20 63 | 68 61 72 61 63 74 65 72 | VEOL2 c|haracter|
|000019b0| 20 61 73 20 74 72 69 67 | 67 65 72 2e 0a 58 0a 58 | as trig|ger..X.X|
|000019c0| 54 68 65 72 65 20 61 72 | 65 20 73 6f 6d 65 20 74 |There ar|e some t|
|000019d0| 68 69 6e 67 73 20 74 68 | 61 74 20 49 20 77 6f 75 |hings th|at I wou|
|000019e0| 6c 64 20 68 61 76 65 20 | 64 6f 6e 65 20 64 69 66 |ld have |done dif|
|000019f0| 66 65 72 65 6e 74 6c 79 | 3a 0a 58 0a 58 20 20 20 |ferently|:.X.X |
|00001a00| 20 2a 20 44 65 73 69 67 | 6e 20 61 6e 64 20 63 6f | * Desig|n and co|
|00001a10| 64 69 6e 67 20 61 72 65 | 20 6f 66 74 65 6e 20 71 |ding are| often q|
|00001a20| 75 69 74 65 20 6f 70 61 | 71 75 65 2c 20 61 6e 64 |uite opa|que, and|
|00001a30| 20 73 6f 75 72 63 65 20 | 61 6e 64 20 6f 62 6a 65 | source |and obje|
|00001a40| 63 74 0a 58 20 20 20 20 | 73 69 7a 65 73 20 74 6f |ct.X |sizes to|
|00001a50| 6f 20 6c 61 72 67 65 20 | 28 34 30 30 30 20 6c 69 |o large |(4000 li|
|00001a60| 6e 65 73 21 29 2e 20 20 | 43 6c 65 76 65 72 65 72 |nes!). |Cleverer|
|00001a70| 20 64 65 73 69 67 6e 20 | 61 6e 64 20 63 6f 64 69 | design |and codi|
|00001a80| 6e 67 20 77 6f 75 6c 64 | 0a 58 20 20 20 20 70 72 |ng would|.X pr|
|00001a90| 6f 62 61 62 6c 79 20 73 | 68 72 69 6e 6b 20 62 6f |obably s|hrink bo|
|00001aa0| 74 68 20 73 75 62 73 74 | 61 6e 74 69 61 6c 6c 79 |th subst|antially|
|00001ab0| 2e 0a 58 0a 58 20 20 20 | 20 2a 20 43 4c 45 44 20 |..X.X | * CLED |
|00001ac0| 69 73 20 70 69 67 67 79 | 62 61 63 6b 65 64 20 6f |is piggy|backed o|
|00001ad0| 6e 74 6f 20 6c 69 6e 65 | 20 64 69 73 63 69 70 6c |nto line| discipl|
|00001ae0| 69 6e 65 20 30 3b 20 69 | 74 20 73 68 6f 75 6c 64 |ine 0; i|t should|
|00001af0| 20 62 65 0a 58 20 20 20 | 20 73 74 61 6e 64 61 6c | be.X | standal|
|00001b00| 6f 6e 65 2c 20 74 6f 20 | 61 6c 6c 6f 77 20 66 6f |one, to |allow fo|
|00001b10| 72 20 67 65 74 74 69 6e | 67 20 72 69 64 20 6f 66 |r gettin|g rid of|
|00001b20| 20 74 68 65 20 73 74 61 | 6e 64 61 72 64 20 6c 69 | the sta|ndard li|
|00001b30| 6e 65 20 64 69 73 63 69 | 70 6c 69 6e 65 0a 58 20 |ne disci|pline.X |
|00001b40| 20 20 20 63 6f 6d 70 6c | 65 74 65 6c 79 2e 0a 58 | compl|etely..X|
|00001b50| 0a 58 20 20 20 20 2a 20 | 42 75 66 66 65 72 73 20 |.X * |Buffers |
|00001b60| 73 68 6f 75 6c 64 20 68 | 61 76 65 20 62 65 65 6e |should h|ave been|
|00001b70| 20 73 74 6f 6c 65 6e 20 | 66 72 6f 6d 20 74 68 65 | stolen |from the|
|00001b80| 20 62 75 66 66 65 72 20 | 63 61 63 68 65 2c 20 69 | buffer |cache, i|
|00001b90| 6e 73 74 65 61 64 20 6f | 66 0a 58 20 20 20 20 73 |nstead o|f.X s|
|00001ba0| 74 61 74 69 63 61 6c 6c | 79 20 61 6c 6c 6f 63 61 |taticall|y alloca|
|00001bb0| 74 65 64 20 28 73 70 74 | 61 6c 6c 6f 63 28 29 20 |ted (spt|alloc() |
|00001bc0| 69 73 20 6e 6f 20 68 65 | 6c 70 20 62 65 63 61 75 |is no he|lp becau|
|00001bd0| 73 65 20 6f 66 20 69 74 | 73 0a 58 20 20 20 20 69 |se of it|s.X i|
|00001be0| 6d 70 6f 73 73 69 62 6c | 79 20 6c 61 72 67 65 20 |mpossibl|y large |
|00001bf0| 67 72 61 6e 75 6c 61 72 | 69 74 79 29 2e 0a 58 0a |granular|ity)..X.|
|00001c00| 58 20 20 20 20 2a 20 43 | 75 72 72 65 6e 74 6c 79 |X * C|urrently|
|00001c10| 20 77 68 65 6e 20 74 68 | 65 20 75 73 65 72 20 6c | when th|e user l|
|00001c20| 6f 67 73 20 6f 75 74 20 | 74 68 65 20 68 69 73 74 |ogs out |the hist|
|00001c30| 6f 72 79 20 69 73 20 6e | 6f 74 20 63 6c 65 61 72 |ory is n|ot clear|
|00001c40| 65 64 2c 0a 58 20 20 20 | 20 62 65 63 61 75 73 65 |ed,.X | because|
|00001c50| 20 74 65 63 68 6e 69 63 | 61 6c 6c 79 20 74 68 65 | technic|ally the|
|00001c60| 20 74 74 79 20 64 65 76 | 69 63 65 20 69 73 20 6e | tty dev|ice is n|
|00001c70| 6f 74 20 63 6c 6f 73 65 | 64 2e 20 20 54 68 69 73 |ot close|d. This|
|00001c80| 20 69 73 20 61 0a 58 20 | 20 20 20 73 65 63 75 72 | is a.X | secur|
|00001c90| 69 74 79 20 68 61 7a 61 | 72 64 2c 20 65 76 65 6e |ity haza|rd, even|
|00001ca0| 20 69 66 20 6e 6f 74 20 | 61 73 20 62 61 64 20 61 | if not |as bad a|
|00001cb0| 73 20 69 74 20 6c 6f 6f | 6b 73 2c 20 62 65 63 61 |s it loo|ks, beca|
|00001cc0| 75 73 65 20 43 4c 45 44 | 0a 58 20 20 20 20 64 69 |use CLED|.X di|
|00001cd0| 73 61 62 6c 65 73 20 69 | 74 73 65 6c 66 20 64 75 |sables i|tself du|
|00001ce0| 72 69 6e 67 20 6e 6f 74 | 20 65 63 68 6f 65 64 20 |ring not| echoed |
|00001cf0| 6f 72 20 72 61 77 20 69 | 6e 70 75 74 2c 20 73 6f |or raw i|nput, so|
|00001d00| 20 74 68 61 74 20 70 61 | 73 73 77 6f 72 64 73 0a | that pa|sswords.|
|00001d10| 58 20 20 20 20 61 72 65 | 20 6e 6f 74 20 72 65 63 |X are| not rec|
|00001d20| 6f 72 64 65 64 20 28 70 | 61 73 73 77 6f 72 64 73 |orded (p|asswords|
|00001d30| 20 70 61 73 73 65 64 20 | 61 73 20 61 72 67 75 6d | passed |as argum|
|00001d40| 65 6e 74 73 20 74 6f 20 | 61 20 63 6f 6d 6d 61 6e |ents to |a comman|
|00001d50| 64 20 61 72 65 20 61 0a | 58 20 20 20 20 73 65 63 |d are a.|X sec|
|00001d60| 75 72 69 74 79 20 68 61 | 7a 61 72 64 20 61 6e 79 |urity ha|zard any|
|00001d70| 68 6f 77 29 2e 0a 58 0a | 58 20 20 20 20 2a 20 53 |how)..X.|X * S|
|00001d80| 61 76 69 6e 67 2c 20 72 | 65 73 65 74 74 69 6e 67 |aving, r|esetting|
|00001d90| 2c 20 61 6e 64 20 72 65 | 73 74 6f 72 69 6e 67 20 |, and re|storing |
|00001da0| 74 68 65 20 63 75 72 72 | 65 6e 74 20 68 69 73 74 |the curr|ent hist|
|00001db0| 6f 72 79 20 62 75 66 66 | 65 72 20 73 68 6f 75 6c |ory buff|er shoul|
|00001dc0| 64 0a 58 20 20 20 20 74 | 68 65 72 65 66 6f 72 65 |d.X t|herefore|
|00001dd0| 20 62 65 63 6f 6d 65 20 | 62 65 74 74 65 72 20 73 | become |better s|
|00001de0| 75 70 70 6f 72 74 65 64 | 2e 0a 58 0a 58 20 20 20 |upported|..X.X |
|00001df0| 20 2a 20 54 68 65 20 69 | 6f 63 74 6c 28 32 29 20 | * The i|octl(2) |
|00001e00| 63 6f 64 65 73 20 73 68 | 6f 75 6c 64 20 61 6c 6c |codes sh|ould all|
|00001e10| 6f 77 20 73 65 74 74 69 | 6e 67 20 6b 65 79 20 62 |ow setti|ng key b|
|00001e20| 69 6e 64 69 6e 67 73 20 | 61 6e 64 20 74 65 72 6d |indings |and term|
|00001e30| 69 6e 61 6c 0a 58 20 20 | 20 20 63 61 70 61 62 69 |inal.X | capabi|
|00001e40| 6c 69 74 69 65 73 20 69 | 6e 64 65 70 65 6e 64 65 |lities i|ndepende|
|00001e50| 6e 74 6c 79 2e 20 20 49 | 6e 20 67 65 6e 65 72 61 |ntly. I|n genera|
|00001e60| 6c 20 74 68 65 20 69 6f | 63 74 6c 28 32 29 20 69 |l the io|ctl(2) i|
|00001e70| 6e 74 65 72 66 61 63 65 | 20 69 73 0a 58 20 20 20 |nterface| is.X |
|00001e80| 20 71 75 69 74 65 20 63 | 6c 75 6d 73 79 2e 0a 58 | quite c|lumsy..X|
|00001e90| 0a 58 20 20 20 20 2a 20 | 54 68 65 20 73 63 6c 65 |.X * |The scle|
|00001ea0| 64 28 31 29 20 63 6f 6d | 6d 61 6e 64 20 73 68 6f |d(1) com|mand sho|
|00001eb0| 75 6c 64 20 62 65 20 63 | 6f 6d 70 6c 65 74 65 6c |uld be c|ompletel|
|00001ec0| 79 20 72 65 77 72 69 74 | 74 65 6e 2e 0a 58 0a 58 |y rewrit|ten..X.X|
|00001ed0| 54 68 65 72 65 20 61 72 | 65 20 61 6c 73 6f 20 61 |There ar|e also a|
|00001ee0| 20 66 65 77 20 6b 6e 6f | 77 6e 20 70 72 6f 62 6c | few kno|wn probl|
|00001ef0| 65 6d 73 2c 20 62 75 74 | 20 74 68 65 79 20 61 72 |ems, but| they ar|
|00001f00| 65 20 75 73 75 61 6c 6c | 79 20 6e 6f 74 20 6d 69 |e usuall|y not mi|
|00001f10| 73 74 61 6b 65 73 0a 58 | 62 75 74 20 72 61 74 68 |stakes.X|but rath|
|00001f20| 65 72 20 63 6f 6d 70 72 | 6f 6d 69 73 65 73 20 28 |er compr|omises (|
|00001f30| 65 2e 67 2e 20 20 77 68 | 65 6e 20 69 6e 73 65 72 |e.g. wh|en inser|
|00001f40| 74 69 6e 67 20 74 61 62 | 73 20 69 6e 20 74 68 65 |ting tab|s in the|
|00001f50| 20 6d 69 64 64 6c 65 20 | 6f 66 20 74 68 65 0a 58 | middle |of the.X|
|00001f60| 6c 69 6e 65 2c 20 74 68 | 65 20 63 68 65 63 6b 20 |line, th|e check |
|00001f70| 6f 6e 20 6c 69 6e 65 20 | 6c 65 6e 67 74 68 20 69 |on line |length i|
|00001f80| 73 20 63 69 72 63 75 6d | 76 65 6e 74 65 64 29 2e |s circum|vented).|
|00001f90| 20 20 53 75 72 65 6c 79 | 20 74 68 65 72 65 20 61 | Surely| there a|
|00001fa0| 72 65 20 61 6c 73 6f 0a | 58 6c 6f 74 73 20 6f 66 |re also.|Xlots of|
|00001fb0| 20 72 65 61 6c 20 62 75 | 67 73 2e 0a 58 0a 58 54 | real bu|gs..X.XT|
|00001fc0| 6f 20 69 6e 73 74 61 6c | 6c 20 43 4c 45 44 2c 20 |o instal|l CLED, |
|00001fd0| 68 61 76 65 20 61 20 6c | 6f 6f 6b 20 61 74 20 74 |have a l|ook at t|
|00001fe0| 68 65 20 22 4d 61 6b 65 | 66 69 6c 65 22 20 28 73 |he "Make|file" (s|
|00001ff0| 68 6f 75 6c 64 20 62 65 | 20 6f 6b 20 6f 6e 20 6d |hould be| ok on m|
|00002000| 6f 73 74 20 61 6e 79 0a | 58 55 4e 49 58 29 2c 20 |ost any.|XUNIX), |
|00002010| 61 6e 64 20 61 74 20 66 | 69 6c 65 73 20 22 63 6c |and at f|iles "cl|
|00002020| 65 64 2e 68 22 20 61 6e | 64 20 22 73 70 61 63 65 |ed.h" an|d "space|
|00002030| 2e 63 22 2e 20 20 49 74 | 20 69 73 20 73 75 67 67 |.c". It| is sugg|
|00002040| 65 73 74 65 64 20 74 68 | 61 74 20 79 6f 75 20 64 |ested th|at you d|
|00002050| 6f 0a 58 6e 6f 74 20 63 | 68 61 6e 67 65 20 74 68 |o.Xnot c|hange th|
|00002060| 65 20 63 6f 6e 66 69 67 | 75 72 61 74 69 6f 6e 20 |e config|uration |
|00002070| 6f 70 74 69 6f 6e 73 20 | 61 74 20 74 68 65 20 74 |options |at the t|
|00002080| 6f 70 20 6f 66 20 22 63 | 6c 65 64 2e 68 22 3b 20 |op of "c|led.h"; |
|00002090| 6e 6f 74 20 6f 6e 6c 79 | 20 49 0a 58 68 61 76 65 |not only| I.Xhave|
|000020a0| 20 6e 6f 74 20 74 65 73 | 74 65 64 20 6f 74 68 65 | not tes|ted othe|
|000020b0| 72 20 63 6f 6e 66 69 67 | 75 72 61 74 69 6f 6e 73 |r config|urations|
|000020c0| 2c 20 62 75 74 20 65 6e | 61 62 6c 69 6e 67 20 74 |, but en|abling t|
|000020d0| 68 65 20 6d 6f 73 74 0a | 58 73 6f 70 68 69 73 74 |he most.|Xsophist|
|000020e0| 69 63 61 74 65 64 20 6f | 70 74 69 6f 6e 73 20 6f |icated o|ptions o|
|000020f0| 66 20 43 4c 45 44 20 73 | 75 62 73 74 61 6e 74 69 |f CLED s|ubstanti|
|00002100| 61 6c 6c 79 20 65 6e 6c | 61 72 67 65 73 20 69 74 |ally enl|arges it|
|00002110| 2e 20 20 49 6e 20 70 61 | 72 74 69 63 75 6c 61 72 |. In pa|rticular|
|00002120| 2c 0a 58 75 6e 6c 65 73 | 73 20 79 6f 75 20 6b 6e |,.Xunles|s you kn|
|00002130| 6f 77 20 62 65 74 74 65 | 72 2c 20 64 6f 20 6e 6f |ow bette|r, do no|
|00002140| 74 20 65 6e 61 62 6c 65 | 20 53 50 54 41 4c 4c 4f |t enable| SPTALLO|
|00002150| 43 2e 0a 58 0a 58 41 73 | 20 74 6f 20 74 68 65 20 |C..X.XAs| to the |
|00002160| 62 75 66 66 65 72 20 73 | 69 7a 65 73 2c 20 49 20 |buffer s|izes, I |
|00002170| 74 68 69 6e 6b 20 74 68 | 65 20 6f 6e 65 73 20 67 |think th|e ones g|
|00002180| 69 76 65 6e 20 61 72 65 | 20 4f 4b 20 66 6f 72 20 |iven are| OK for |
|00002190| 6d 6f 73 74 20 61 6e 79 | 62 6f 64 79 3b 0a 58 6e |most any|body;.Xn|
|000021a0| 6f 74 65 20 74 68 61 74 | 20 43 4c 45 44 20 77 69 |ote that| CLED wi|
|000021b0| 6c 6c 20 6e 6f 74 20 61 | 6c 6c 6f 77 20 79 6f 75 |ll not a|llow you|
|000021c0| 20 74 6f 20 74 79 70 65 | 20 61 20 6c 69 6e 65 20 | to type| a line |
|000021d0| 6c 6f 6e 67 65 72 20 74 | 68 61 6e 20 74 68 65 20 |longer t|han the |
|000021e0| 63 75 72 72 65 6e 74 0a | 58 73 63 72 65 65 6e 20 |current.|Xscreen |
|000021f0| 73 69 7a 65 2c 20 73 6f | 20 74 68 65 20 4d 41 58 |size, so| the MAX|
|00002200| 4c 49 4e 45 20 70 61 72 | 61 6d 65 74 65 72 20 69 |LINE par|ameter i|
|00002210| 73 20 72 65 61 6c 6c 79 | 20 74 68 65 20 6d 61 78 |s really| the max|
|00002220| 69 6d 75 6d 20 6e 75 6d | 62 65 72 20 6f 66 0a 58 |imum num|ber of.X|
|00002230| 63 6f 6c 75 6d 6e 73 20 | 6f 6e 20 61 20 74 65 72 |columns |on a ter|
|00002240| 6d 69 6e 61 6c 2c 20 61 | 6e 64 20 31 33 32 20 69 |minal, a|nd 132 i|
|00002250| 73 20 74 68 65 72 65 66 | 6f 72 65 20 73 75 66 66 |s theref|ore suff|
|00002260| 69 63 69 65 6e 74 2e 20 | 20 41 73 20 74 6f 0a 58 |icient. | As to.X|
|00002270| 4d 41 58 50 52 4f 4d 50 | 54 2c 20 49 20 68 6f 70 |MAXPROMP|T, I hop|
|00002280| 65 20 79 6f 75 20 64 6f | 20 6e 6f 74 20 75 73 65 |e you do| not use|
|00002290| 20 67 61 72 69 73 68 20 | 6c 6f 6e 67 20 70 72 6f | garish |long pro|
|000022a0| 6d 70 74 73 2e 2e 2e 20 | 20 49 6e 20 61 6e 79 20 |mpts... | In any |
|000022b0| 63 61 73 65 0a 58 74 68 | 69 73 20 69 73 20 74 68 |case.Xth|is is th|
|000022c0| 65 20 6e 75 6d 62 65 72 | 20 6f 66 20 63 68 61 72 |e number| of char|
|000022d0| 61 63 74 65 72 73 20 72 | 65 6d 65 6d 62 65 72 65 |acters r|emembere|
|000022e0| 64 20 69 6e 20 74 68 65 | 20 70 72 6f 6d 70 74 2c |d in the| prompt,|
|000022f0| 20 6e 6f 74 20 69 74 73 | 0a 58 6d 61 78 69 6d 75 | not its|.Xmaximu|
|00002300| 6d 20 73 69 7a 65 2e 0a | 45 4e 44 5f 4f 46 5f 46 |m size..|END_OF_F|
|00002310| 49 4c 45 0a 69 66 20 74 | 65 73 74 20 34 32 34 36 |ILE.if t|est 4246|
|00002320| 20 2d 6e 65 20 60 77 63 | 20 2d 63 20 3c 27 52 45 | -ne `wc| -c <'RE|
|00002330| 41 44 4d 45 27 60 3b 20 | 74 68 65 6e 0a 20 20 20 |ADME'`; |then. |
|00002340| 20 65 63 68 6f 20 73 68 | 61 72 3a 20 5c 22 27 52 | echo sh|ar: \"'R|
|00002350| 45 41 44 4d 45 27 5c 22 | 20 75 6e 70 61 63 6b 65 |EADME'\"| unpacke|
|00002360| 64 20 77 69 74 68 20 77 | 72 6f 6e 67 20 73 69 7a |d with w|rong siz|
|00002370| 65 21 0a 66 69 0a 63 68 | 6d 6f 64 20 2b 78 20 27 |e!.fi.ch|mod +x '|
|00002380| 52 45 41 44 4d 45 27 0a | 23 20 65 6e 64 20 6f 66 |README'.|# end of|
|00002390| 20 27 52 45 41 44 4d 45 | 27 0a 66 69 0a 69 66 20 | 'README|'.fi.if |
|000023a0| 74 65 73 74 20 2d 66 20 | 27 53 79 73 74 65 6d 27 |test -f |'System'|
|000023b0| 20 2d 61 20 22 24 7b 31 | 7d 22 20 21 3d 20 22 2d | -a "${1|}" != "-|
|000023c0| 63 22 20 3b 20 74 68 65 | 6e 20 0a 20 20 65 63 68 |c" ; the|n . ech|
|000023d0| 6f 20 73 68 61 72 3a 20 | 57 69 6c 6c 20 6e 6f 74 |o shar: |Will not|
|000023e0| 20 63 6c 6f 62 62 65 72 | 20 65 78 69 73 74 69 6e | clobber| existin|
|000023f0| 67 20 66 69 6c 65 20 5c | 22 27 53 79 73 74 65 6d |g file \|"'System|
|00002400| 27 5c 22 0a 65 6c 73 65 | 0a 65 63 68 6f 20 73 68 |'\".else|.echo sh|
|00002410| 61 72 3a 20 45 78 74 72 | 61 63 74 69 6e 67 20 5c |ar: Extr|acting \|
|00002420| 22 27 53 79 73 74 65 6d | 27 5c 22 20 5c 28 32 33 |"'System|'\" \(23|
|00002430| 20 63 68 61 72 61 63 74 | 65 72 73 5c 29 0a 73 65 | charact|ers\).se|
|00002440| 64 20 22 73 2f 5e 58 2f | 2f 22 20 3e 27 53 79 73 |d "s/^X/|/" >'Sys|
|00002450| 74 65 6d 27 20 3c 3c 27 | 45 4e 44 5f 4f 46 5f 46 |tem' <<'|END_OF_F|
|00002460| 49 4c 45 27 0a 58 63 6c | 65 64 09 59 09 36 09 30 |ILE'.Xcl|ed.Y.6.0|
|00002470| 09 30 09 30 09 30 09 30 | 09 30 09 30 0a 45 4e 44 |.0.0.0.0|.0.0.END|
|00002480| 5f 4f 46 5f 46 49 4c 45 | 0a 69 66 20 74 65 73 74 |_OF_FILE|.if test|
|00002490| 20 32 33 20 2d 6e 65 20 | 60 77 63 20 2d 63 20 3c | 23 -ne |`wc -c <|
|000024a0| 27 53 79 73 74 65 6d 27 | 60 3b 20 74 68 65 6e 0a |'System'|`; then.|
|000024b0| 20 20 20 20 65 63 68 6f | 20 73 68 61 72 3a 20 5c | echo| shar: \|
|000024c0| 22 27 53 79 73 74 65 6d | 27 5c 22 20 75 6e 70 61 |"'System|'\" unpa|
|000024d0| 63 6b 65 64 20 77 69 74 | 68 20 77 72 6f 6e 67 20 |cked wit|h wrong |
|000024e0| 73 69 7a 65 21 0a 66 69 | 0a 63 68 6d 6f 64 20 2b |size!.fi|.chmod +|
|000024f0| 78 20 27 53 79 73 74 65 | 6d 27 0a 23 20 65 6e 64 |x 'Syste|m'.# end|
|00002500| 20 6f 66 20 27 53 79 73 | 74 65 6d 27 0a 66 69 0a | of 'Sys|tem'.fi.|
|00002510| 69 66 20 74 65 73 74 20 | 2d 66 20 27 63 6c 65 64 |if test |-f 'cled|
|00002520| 2e 68 27 20 2d 61 20 22 | 24 7b 31 7d 22 20 21 3d |.h' -a "|${1}" !=|
|00002530| 20 22 2d 63 22 20 3b 20 | 74 68 65 6e 20 0a 20 20 | "-c" ; |then . |
|00002540| 65 63 68 6f 20 73 68 61 | 72 3a 20 57 69 6c 6c 20 |echo sha|r: Will |
|00002550| 6e 6f 74 20 63 6c 6f 62 | 62 65 72 20 65 78 69 73 |not clob|ber exis|
|00002560| 74 69 6e 67 20 66 69 6c | 65 20 5c 22 27 63 6c 65 |ting fil|e \"'cle|
|00002570| 64 2e 68 27 5c 22 0a 65 | 6c 73 65 0a 65 63 68 6f |d.h'\".e|lse.echo|
|00002580| 20 73 68 61 72 3a 20 45 | 78 74 72 61 63 74 69 6e | shar: E|xtractin|
|00002590| 67 20 5c 22 27 63 6c 65 | 64 2e 68 27 5c 22 20 5c |g \"'cle|d.h'\" \|
|000025a0| 28 36 30 32 39 20 63 68 | 61 72 61 63 74 65 72 73 |(6029 ch|aracters|
|000025b0| 5c 29 0a 73 65 64 20 22 | 73 2f 5e 58 2f 2f 22 20 |\).sed "|s/^X//" |
|000025c0| 3e 27 63 6c 65 64 2e 68 | 27 20 3c 3c 27 45 4e 44 |>'cled.h|' <<'END|
|000025d0| 5f 4f 46 5f 46 49 4c 45 | 27 0a 58 2f 2a 0a 58 20 |_OF_FILE|'.X/*.X |
|000025e0| 20 20 20 24 49 64 3a 20 | 63 6c 65 64 2e 68 2c 76 | $Id: |cled.h,v|
|000025f0| 20 32 2e 35 20 39 30 2f | 30 38 2f 32 36 20 31 31 | 2.5 90/|08/26 11|
|00002600| 3a 33 33 3a 35 36 20 73 | 77 20 45 78 70 20 24 0a |:33:56 s|w Exp $.|
|00002610| 58 2a 2f 0a 58 2f 2a 0a | 58 20 20 20 20 54 68 69 |X*/.X/*.|X Thi|
|00002620| 73 20 73 68 6f 75 6c 64 | 20 62 65 20 73 65 74 2c |s should| be set,|
|00002630| 20 69 66 20 63 6f 6d 70 | 69 6c 69 6e 67 20 61 73 | if comp|iling as|
|00002640| 20 6c 69 6e 65 20 64 69 | 73 63 69 70 6c 69 6e 65 | line di|scipline|
|00002650| 2c 20 69 6e 20 74 68 65 | 20 63 6f 6d 6d 61 6e 64 |, in the| command|
|00002660| 20 6c 69 6e 65 0a 58 2a | 2f 0a 58 0a 58 23 69 66 | line.X*|/.X.X#if|
|00002670| 6e 64 65 66 20 4d 5f 4b | 45 52 4e 45 4c 0a 58 23 |ndef M_K|ERNEL.X#|
|00002680| 20 20 20 64 65 66 69 6e | 65 20 4d 5f 4b 45 52 4e | defin|e M_KERN|
|00002690| 45 4c 09 30 0a 58 23 65 | 6e 64 69 66 0a 58 0a 58 |EL.0.X#e|ndif.X.X|
|000026a0| 2f 2a 0a 58 20 20 20 20 | 54 68 65 73 65 20 61 72 |/*.X |These ar|
|000026b0| 65 20 62 6f 6f 6c 65 61 | 6e 73 20 61 6e 64 20 64 |e boolea|ns and d|
|000026c0| 65 73 63 72 69 62 65 20 | 74 68 65 20 65 6e 76 69 |escribe |the envi|
|000026d0| 72 6f 6e 6d 65 6e 74 20 | 69 6e 20 77 68 69 63 68 |ronment |in which|
|000026e0| 20 43 4c 45 44 0a 58 20 | 20 20 20 69 73 20 63 6f | CLED.X | is co|
|000026f0| 6d 70 69 6c 65 64 20 61 | 6e 64 20 72 75 6e 2e 20 |mpiled a|nd run. |
|00002700| 45 76 65 6e 20 69 66 20 | 79 6f 75 20 61 72 65 20 |Even if |you are |
|00002710| 6f 6e 20 61 20 33 38 36 | 20 77 69 74 68 20 61 20 |on a 386| with a |
|00002720| 55 6e 69 78 20 74 68 61 | 74 0a 58 20 20 20 20 68 |Unix tha|t.X h|
|00002730| 61 73 20 73 70 74 61 6c | 6c 6f 63 28 29 2f 73 70 |as sptal|loc()/sp|
|00002740| 74 66 72 65 65 28 29 20 | 79 6f 75 20 77 69 6c 6c |tfree() |you will|
|00002750| 20 6e 6f 72 6d 61 6c 6c | 79 20 6e 6f 74 20 77 61 | normall|y not wa|
|00002760| 6e 74 20 74 6f 20 75 73 | 65 20 69 74 2c 0a 58 20 |nt to us|e it,.X |
|00002770| 20 20 20 62 65 63 61 75 | 73 65 20 69 74 20 61 6c | becau|se it al|
|00002780| 6c 6f 63 61 74 65 73 20 | 6d 65 6d 6f 72 79 20 69 |locates |memory i|
|00002790| 6e 20 70 61 67 65 20 28 | 34 30 39 36 20 62 79 74 |n page (|4096 byt|
|000027a0| 65 73 29 20 63 68 75 6e | 6b 73 2e 0a 58 2a 2f 0a |es) chun|ks..X*/.|
|000027b0| 58 0a 58 23 64 65 66 69 | 6e 65 20 4d 5f 49 33 38 |X.X#defi|ne M_I38|
|000027c0| 36 09 09 31 09 2f 2a 20 | 52 75 6e 6e 69 6e 67 20 |6..1./* |Running |
|000027d0| 6f 6e 20 61 20 33 38 36 | 20 3f 09 09 09 2a 2f 0a |on a 386| ?...*/.|
|000027e0| 58 23 64 65 66 69 6e 65 | 20 4d 5f 55 4e 49 58 09 |X#define| M_UNIX.|
|000027f0| 09 31 09 2f 2a 20 53 79 | 73 74 65 6d 20 56 2f 53 |.1./* Sy|stem V/S|
|00002800| 43 4f 20 55 6e 69 78 20 | 3f 20 28 6f 72 20 58 65 |CO Unix |? (or Xe|
|00002810| 6e 69 78 3f 29 09 2a 2f | 0a 58 23 64 65 66 69 6e |nix?).*/|.X#defin|
|00002820| 65 20 4d 5f 41 54 54 09 | 09 31 09 2f 2a 20 41 54 |e M_ATT.|.1./* AT|
|00002830| 26 54 20 66 6c 61 76 6f | 75 72 20 6f 66 20 53 79 |&T flavo|ur of Sy|
|00002840| 73 74 65 6d 20 56 20 3f | 09 09 2a 2f 0a 58 23 64 |stem V ?|..*/.X#d|
|00002850| 65 66 69 6e 65 20 4d 5f | 53 50 54 41 4c 4c 4f 43 |efine M_|SPTALLOC|
|00002860| 09 30 09 2f 2a 20 4b 65 | 72 6e 65 6c 20 68 61 73 |.0./* Ke|rnel has|
|00002870| 2c 20 61 6e 64 20 77 65 | 20 73 68 6f 75 6c 64 20 |, and we| should |
|00002880| 75 73 65 2c 20 69 74 09 | 2a 2f 0a 58 0a 58 2f 2a |use, it.|*/.X.X/*|
|00002890| 0a 58 20 20 20 20 54 68 | 65 73 65 20 61 72 65 20 |.X Th|ese are |
|000028a0| 62 6f 6f 6c 65 61 6e 20 | 6f 70 74 69 6f 6e 73 2e |boolean |options.|
|000028b0| 20 20 44 45 42 55 47 20 | 73 68 6f 75 6c 64 20 6e | DEBUG |should n|
|000028c0| 6f 72 6d 61 6c 6c 79 20 | 62 65 20 30 2e 20 20 54 |ormally |be 0. T|
|000028d0| 68 65 20 63 6f 64 65 0a | 58 20 20 20 20 63 6f 6d |he code.|X com|
|000028e0| 70 69 6c 65 64 20 69 6e | 20 69 66 20 43 4c 45 44 |piled in| if CLED|
|000028f0| 49 4f 20 69 73 20 74 72 | 75 65 20 69 73 20 6c 61 |IO is tr|ue is la|
|00002900| 72 67 65 3b 20 69 66 20 | 79 6f 75 20 64 6f 6e 27 |rge; if |you don'|
|00002910| 74 20 6e 65 65 64 20 74 | 6f 20 63 68 61 6e 67 65 |t need t|o change|
|00002920| 0a 58 20 20 20 20 74 68 | 65 20 64 65 66 61 75 6c |.X th|e defaul|
|00002930| 74 20 74 65 72 6d 69 6e | 61 6c 20 63 61 70 61 62 |t termin|al capab|
|00002940| 69 6c 69 74 69 65 73 20 | 61 6e 64 20 6b 65 79 20 |ilities |and key |
|00002950| 62 69 6e 64 69 6e 67 73 | 2c 20 73 65 74 20 69 74 |bindings|, set it|
|00002960| 20 74 6f 20 30 2e 0a 58 | 20 20 20 20 42 52 45 41 | to 0..X| BREA|
|00002970| 4b 54 48 52 55 20 63 6f | 6d 70 69 6c 65 73 20 69 |KTHRU co|mpiles i|
|00002980| 6e 20 61 20 6e 6f 74 68 | 65 72 20 6c 61 72 67 65 |n a noth|er large|
|00002990| 20 63 68 75 6e 6b 20 6f | 66 20 63 6f 64 65 20 74 | chunk o|f code t|
|000029a0| 68 61 74 20 77 69 6c 6c | 0a 58 20 20 20 20 61 75 |hat will|.X au|
|000029b0| 74 6f 6d 61 74 69 63 61 | 6c 6c 79 20 72 65 70 72 |tomatica|lly repr|
|000029c0| 69 6e 74 20 74 68 65 20 | 63 75 72 72 65 6e 74 20 |int the |current |
|000029d0| 6c 69 6e 65 20 69 66 20 | 61 20 77 72 69 74 65 20 |line if |a write |
|000029e0| 74 6f 20 74 68 65 20 74 | 74 79 20 67 61 72 62 6c |to the t|ty garbl|
|000029f0| 65 73 0a 58 20 20 20 20 | 69 74 2e 20 20 59 6f 75 |es.X |it. You|
|00002a00| 20 73 68 6f 75 6c 64 20 | 6e 6f 72 6d 61 6c 6c 79 | should |normally|
|00002a10| 20 73 65 74 20 74 68 69 | 73 20 74 6f 20 30 20 61 | set thi|s to 0 a|
|00002a20| 6e 64 20 6a 75 73 74 20 | 65 78 70 6c 69 63 69 74 |nd just |explicit|
|00002a30| 6c 79 20 72 65 71 75 65 | 73 74 20 61 0a 58 20 20 |ly reque|st a.X |
|00002a40| 20 20 72 65 64 72 61 77 | 20 69 6e 20 74 68 65 20 | redraw| in the |
|00002a50| 72 61 72 65 20 65 76 65 | 6e 74 20 74 68 69 73 20 |rare eve|nt this |
|00002a60| 68 61 70 70 65 6e 73 2e | 20 20 4d 55 4c 54 49 4c |happens.| MULTIL|
|00002a70| 42 20 77 69 6c 6c 20 64 | 79 6e 61 6d 69 63 61 6c |B will d|ynamical|
|00002a80| 6c 79 0a 58 20 20 20 20 | 61 6c 6c 6f 63 61 74 65 |ly.X |allocate|
|00002a90| 20 61 20 73 65 70 61 72 | 61 74 65 20 68 69 73 74 | a separ|ate hist|
|00002aa0| 6f 72 79 20 62 75 66 66 | 65 72 20 70 65 72 20 70 |ory buff|er per p|
|00002ab0| 72 6f 63 65 73 73 2c 20 | 6e 6f 74 20 6a 75 73 74 |rocess, |not just|
|00002ac0| 20 6f 6e 65 20 70 65 72 | 0a 58 20 20 20 20 74 74 | one per|.X tt|
|00002ad0| 79 2e 20 20 54 68 69 73 | 20 69 73 20 75 73 75 61 |y. This| is usua|
|00002ae0| 6c 6c 79 20 6e 6f 74 20 | 77 68 61 74 20 79 6f 75 |lly not |what you|
|00002af0| 20 77 61 6e 74 2c 20 61 | 6e 64 20 6d 61 6b 65 73 | want, a|nd makes|
|00002b00| 20 63 6f 64 65 20 61 6e | 64 20 64 61 74 61 0a 58 | code an|d data.X|
|00002b10| 20 20 20 20 73 70 61 63 | 65 20 67 72 6f 77 2e 0a | spac|e grow..|
|00002b20| 58 2a 2f 0a 58 0a 58 23 | 64 65 66 69 6e 65 20 44 |X*/.X.X#|define D|
|00002b30| 45 42 55 47 09 09 30 09 | 2f 2a 20 43 6f 6d 70 69 |EBUG..0.|/* Compi|
|00002b40| 6c 65 20 69 6e 20 64 65 | 62 75 67 67 69 6e 67 20 |le in de|bugging |
|00002b50| 68 65 6c 70 73 09 09 2a | 2f 0a 58 0a 58 23 64 65 |helps..*|/.X.X#de|
|00002b60| 66 69 6e 65 20 43 4c 45 | 44 49 4f 09 09 31 09 2f |fine CLE|DIO..1./|
|00002b70| 2a 20 49 6e 63 6c 75 64 | 65 20 69 6f 63 74 6c 73 |* Includ|e ioctls|
|00002b80| 20 74 6f 20 63 68 61 6e | 67 65 20 64 65 66 61 75 | to chan|ge defau|
|00002b90| 6c 74 73 20 3f 09 2a 2f | 0a 58 23 64 65 66 69 6e |lts ?.*/|.X#defin|
|00002ba0| 65 20 42 52 45 41 4b 54 | 48 52 55 09 30 09 2f 2a |e BREAKT|HRU.0./*|
|00002bb0| 20 41 75 74 6f 20 72 65 | 70 72 69 6e 74 20 6f 6e | Auto re|print on|
|00002bc0| 20 62 72 6f 61 64 63 61 | 73 74 73 20 3f 09 09 2a | broadca|sts ?..*|
|00002bd0| 2f 0a 58 23 64 65 66 69 | 6e 65 20 4d 55 4c 54 49 |/.X#defi|ne MULTI|
|00002be0| 4c 42 09 09 30 09 2f 2a | 20 53 65 70 61 72 61 74 |LB..0./*| Separat|
|00002bf0| 65 20 68 69 73 74 6f 72 | 79 20 70 65 72 20 70 72 |e histor|y per pr|
|00002c00| 6f 63 65 73 73 20 3f 09 | 2a 2f 0a 58 23 64 65 66 |ocess ?.|*/.X#def|
|00002c10| 69 6e 65 20 56 45 52 42 | 4f 53 45 09 09 30 09 2f |ine VERB|OSE..0./|
|00002c20| 2a 20 50 72 69 6e 74 20 | 61 20 6d 73 67 20 65 61 |* Print |a msg ea|
|00002c30| 63 68 20 74 69 6d 65 20 | 43 4c 45 44 20 6f 70 65 |ch time |CLED ope|
|00002c40| 6e 73 09 2a 2f 0a 58 0a | 58 23 64 65 66 69 6e 65 |ns.*/.X.|X#define|
|00002c50| 20 43 4f 4c 55 4d 4e 53 | 09 09 38 30 09 2f 2a 20 | COLUMNS|..80./* |
|00002c60| 44 65 66 61 75 6c 74 20 | 6e 75 6d 62 65 72 20 6f |Default |number o|
|00002c70| 66 20 63 6f 6c 75 6d 6e | 73 09 09 2a 2f 0a 58 0a |f column|s..*/.X.|
|00002c80| 58 2f 2a 0a 58 20 20 20 | 20 54 68 65 73 65 20 73 |X/*.X | These s|
|00002c90| 65 74 20 73 69 7a 65 73 | 20 6f 66 20 76 61 72 69 |et sizes| of vari|
|00002ca0| 6f 75 73 20 62 75 66 66 | 65 72 73 2e 20 53 75 69 |ous buff|ers. Sui|
|00002cb0| 74 61 62 6c 65 20 76 61 | 6c 75 65 73 20 64 65 70 |table va|lues dep|
|00002cc0| 65 6e 64 20 6f 6e 20 74 | 68 65 0a 58 20 20 20 20 |end on t|he.X |
|00002cd0| 61 6d 6f 75 6e 74 20 6f | 66 20 6d 65 6d 6f 72 79 |amount o|f memory|
|00002ce0| 20 79 6f 75 20 77 61 6e | 74 20 74 6f 20 64 65 76 | you wan|t to dev|
|00002cf0| 6f 74 65 20 74 6f 20 43 | 4c 45 44 2c 20 61 6e 64 |ote to C|LED, and|
|00002d00| 20 69 74 73 20 61 76 61 | 69 6c 61 62 69 6c 69 74 | its ava|ilabilit|
|00002d10| 79 2e 0a 58 20 20 20 20 | 46 6f 72 20 61 20 33 38 |y..X |For a 38|
|00002d20| 36 20 79 6f 75 20 6d 61 | 79 20 77 61 6e 74 20 74 |6 you ma|y want t|
|00002d30| 68 65 73 65 20 74 6f 20 | 62 65 20 31 30 32 34 2c |hese to |be 1024,|
|00002d40| 33 32 2c 31 33 34 2c 36 | 34 2c 20 61 6e 64 20 66 |32,134,6|4, and f|
|00002d50| 6f 72 20 61 20 32 38 36 | 0a 58 20 20 20 20 74 68 |or a 286|.X th|
|00002d60| 65 79 20 6d 61 79 20 62 | 65 20 32 35 36 2c 31 36 |ey may b|e 256,16|
|00002d70| 2c 38 32 2c 36 34 2e 0a | 58 2a 2f 0a 58 0a 58 23 |,82,64..|X*/.X.X#|
|00002d80| 64 65 66 69 6e 65 20 4d | 41 58 50 52 4f 4d 50 54 |define M|AXPROMPT|
|00002d90| 09 31 36 09 2f 2a 20 53 | 69 7a 65 20 6f 66 20 70 |.16./* S|ize of p|
|00002da0| 72 6f 6d 70 74 20 62 75 | 66 66 65 72 09 09 2a 2f |rompt bu|ffer..*/|
|00002db0| 0a 58 23 64 65 66 69 6e | 65 20 4d 41 58 4c 49 4e |.X#defin|e MAXLIN|
|00002dc0| 45 09 09 31 33 32 09 2f | 2a 20 53 69 7a 65 20 6f |E..132./|* Size o|
|00002dd0| 66 20 63 6f 6d 6d 61 6e | 64 20 6c 69 6e 65 20 62 |f comman|d line b|
|00002de0| 75 66 66 65 72 09 09 2a | 2f 0a 58 23 64 65 66 69 |uffer..*|/.X#defi|
|00002df0| 6e 65 20 4d 41 58 48 49 | 53 54 4f 52 59 09 31 30 |ne MAXHI|STORY.10|
|00002e00| 32 34 09 2f 2a 20 53 69 | 7a 65 20 6f 66 20 68 69 |24./* Si|ze of hi|
|00002e10| 73 74 6f 72 79 20 62 75 | 66 66 65 72 09 09 2a 2f |story bu|ffer..*/|
|00002e20| 0a 58 23 69 66 20 21 4d | 5f 53 50 54 41 4c 4c 4f |.X#if !M|_SPTALLO|
|00002e30| 43 0a 58 23 20 20 20 64 | 65 66 69 6e 65 20 54 43 |C.X# d|efine TC|
|00002e40| 41 50 5f 53 49 5a 45 09 | 36 34 09 2f 2a 20 6d 61 |AP_SIZE.|64./* ma|
|00002e50| 78 20 6c 65 6e 67 74 68 | 20 6f 66 20 61 6c 6c 20 |x length| of all |
|00002e60| 74 65 72 6d 69 6e 61 6c | 20 65 73 63 61 70 65 73 |terminal| escapes|
|00002e70| 09 2a 2f 0a 58 23 65 6e | 64 69 66 0a 58 0a 58 2f |.*/.X#en|dif.X.X/|
|00002e80| 2a 20 45 6e 64 20 6f 66 | 20 75 73 65 72 20 61 64 |* End of| user ad|
|00002e90| 6a 75 73 74 61 62 6c 65 | 20 70 61 72 61 6d 65 74 |justable| paramet|
|00002ea0| 65 72 73 20 2a 2f 0a 58 | 0a 58 2f 2a 0a 58 20 20 |ers */.X|.X/*.X |
|00002eb0| 20 20 55 6e 64 65 72 20 | 77 68 69 63 68 20 74 65 | Under |which te|
|00002ec0| 72 6d 69 6f 20 63 6f 6e | 64 69 74 69 6f 6e 73 20 |rmio con|ditions |
|00002ed0| 43 4c 45 44 20 77 69 6c | 6c 20 6f 70 65 72 61 74 |CLED wil|l operat|
|00002ee0| 65 0a 58 2a 2f 0a 58 0a | 58 23 64 65 66 69 6e 65 |e.X*/.X.|X#define|
|00002ef0| 20 43 4c 45 44 4f 46 46 | 28 66 6c 61 67 73 29 09 | CLEDOFF|(flags).|
|00002f00| 28 28 28 66 6c 61 67 73 | 29 20 26 20 43 4c 45 44 |(((flags|) & CLED|
|00002f10| 46 4c 41 47 53 29 20 21 | 3d 20 43 4c 45 44 46 4c |FLAGS) !|= CLEDFL|
|00002f20| 41 47 53 29 0a 58 0a 58 | 23 69 66 20 30 0a 58 23 |AGS).X.X|#if 0.X#|
|00002f30| 69 66 20 4d 5f 4b 45 52 | 4e 45 4c 0a 58 23 20 20 |if M_KER|NEL.X# |
|00002f40| 20 75 6e 64 65 66 20 4d | 55 4c 54 49 4c 42 0a 58 | undef M|ULTILB.X|
|00002f50| 23 20 20 20 75 6e 64 65 | 66 20 4d 5f 53 50 54 41 |# unde|f M_SPTA|
|00002f60| 4c 4c 4f 43 0a 58 23 20 | 20 20 64 65 66 69 6e 65 |LLOC.X# | define|
|00002f70| 20 4d 5f 53 50 54 41 4c | 4c 4f 43 09 30 0a 58 23 | M_SPTAL|LOC.0.X#|
|00002f80| 20 20 20 64 65 66 69 6e | 65 20 4d 55 4c 54 49 4c | defin|e MULTIL|
|00002f90| 42 09 30 0a 58 23 20 20 | 20 69 66 20 21 64 65 66 |B.0.X# | if !def|
|00002fa0| 69 6e 65 64 28 54 43 41 | 50 5f 53 49 5a 45 29 0a |ined(TCA|P_SIZE).|
|00002fb0| 58 23 09 64 65 66 69 6e | 65 20 54 43 41 50 5f 53 |X#.defin|e TCAP_S|
|00002fc0| 49 5a 45 09 36 34 0a 58 | 23 20 20 20 65 6e 64 69 |IZE.64.X|# endi|
|00002fd0| 66 0a 58 23 65 6e 64 69 | 66 0a 58 23 65 6e 64 69 |f.X#endi|f.X#endi|
|00002fe0| 66 0a 58 0a 58 23 64 65 | 66 69 6e 65 20 4c 44 5f |f.X.X#de|fine LD_|
|00002ff0| 44 4f 4e 45 09 20 20 20 | 20 30 78 30 30 30 31 09 |DONE. | 0x0001.|
|00003000| 2f 2a 20 66 6c 61 67 20 | 69 6e 64 69 63 61 74 69 |/* flag |indicati|
|00003010| 6e 67 20 72 65 61 64 20 | 63 6f 6d 70 6c 65 74 65 |ng read |complete|
|00003020| 09 2a 2f 0a 58 23 64 65 | 66 69 6e 65 20 4c 44 5f |.*/.X#de|fine LD_|
|00003030| 51 55 49 54 09 20 20 20 | 20 30 78 30 30 30 32 09 |QUIT. | 0x0002.|
|00003040| 2f 2a 20 63 6f 6d 70 6c | 65 74 65 64 20 75 6e 64 |/* compl|eted und|
|00003050| 65 72 20 51 55 49 54 20 | 63 68 61 72 09 09 2a 2f |er QUIT |char..*/|
|00003060| 0a 58 23 64 65 66 69 6e | 65 20 4c 44 5f 49 4e 54 |.X#defin|e LD_INT|
|00003070| 52 20 20 20 20 20 30 78 | 30 30 30 34 09 2f 2a 20 |R 0x|0004./* |
|00003080| 63 6f 6d 70 6c 65 74 65 | 64 20 75 6e 64 65 72 20 |complete|d under |
|00003090| 49 4e 54 52 20 63 68 61 | 72 09 09 2a 2f 0a 58 23 |INTR cha|r..*/.X#|
|000030a0| 64 65 66 69 6e 65 20 4c | 44 5f 45 4f 46 09 20 20 |define L|D_EOF. |
|000030b0| 20 20 30 78 30 30 30 38 | 09 2f 2a 20 63 6f 6d 70 | 0x0008|./* comp|
|000030c0| 6c 65 74 65 64 20 75 6e | 64 65 72 20 45 4f 46 09 |leted un|der EOF.|
|000030d0| 09 09 2a 2f 0a 58 23 64 | 65 66 69 6e 65 20 4c 44 |..*/.X#d|efine LD|
|000030e0| 5f 44 49 52 54 59 20 20 | 20 20 30 78 30 30 31 30 |_DIRTY | 0x0010|
|000030f0| 09 2f 2a 20 63 6f 6d 6d | 61 6e 64 20 62 75 66 66 |./* comm|and buff|
|00003100| 65 72 20 68 61 73 20 62 | 65 65 6e 20 63 68 61 6e |er has b|een chan|
|00003110| 67 65 64 09 2a 2f 0a 58 | 23 64 65 66 69 6e 65 20 |ged.*/.X|#define |
|00003120| 4c 44 5f 49 4e 53 45 52 | 54 20 20 20 30 78 30 30 |LD_INSER|T 0x00|
|00003130| 32 30 09 2f 2a 20 69 6e | 73 65 72 74 20 6d 6f 64 |20./* in|sert mod|
|00003140| 65 09 09 09 09 2a 2f 0a | 58 0a 58 23 64 65 66 69 |e....*/.|X.X#defi|
|00003150| 6e 65 20 54 42 5f 4e 4f | 4c 49 4e 45 20 20 20 30 |ne TB_NO|LINE 0|
|00003160| 78 30 30 30 31 09 2f 2a | 20 6e 6f 74 20 75 73 69 |x0001./*| not usi|
|00003170| 6e 67 20 74 68 69 73 20 | 64 69 73 63 69 70 6c 69 |ng this |discipli|
|00003180| 6e 65 09 09 2a 2f 0a 58 | 23 64 65 66 69 6e 65 20 |ne..*/.X|#define |
|00003190| 54 42 5f 4f 50 45 4e 09 | 20 20 20 20 30 78 30 30 |TB_OPEN.| 0x00|
|000031a0| 30 32 09 2f 2a 20 74 74 | 79 20 62 75 66 66 20 69 |02./* tt|y buff i|
|000031b0| 73 20 6f 70 65 6e 09 09 | 09 2a 2f 0a 58 23 64 65 |s open..|.*/.X#de|
|000031c0| 66 69 6e 65 20 54 42 5f | 52 45 41 44 49 4e 47 20 |fine TB_|READING |
|000031d0| 20 30 78 30 30 30 34 09 | 2f 2a 20 72 65 61 64 20 | 0x0004.|/* read |
|000031e0| 63 75 72 72 65 6e 74 6c | 79 20 69 6e 20 70 72 6f |currentl|y in pro|
|000031f0| 67 72 65 73 73 09 09 2a | 2f 0a 58 23 64 65 66 69 |gress..*|/.X#defi|
|00003200| 6e 65 20 54 42 5f 57 52 | 49 54 49 4e 47 20 20 30 |ne TB_WR|ITING 0|
|00003210| 78 30 30 30 38 09 2f 2a | 20 77 72 69 74 65 20 63 |x0008./*| write c|
|00003220| 75 72 72 65 6e 74 6c 79 | 20 69 6e 20 70 72 6f 67 |urrently| in prog|
|00003230| 72 65 73 73 09 09 2a 2f | 0a 58 23 64 65 66 69 6e |ress..*/|.X#defin|
|00003240| 65 20 54 42 5f 49 4e 53 | 45 52 54 20 20 20 30 78 |e TB_INS|ERT 0x|
|00003250| 30 30 31 30 09 2f 2a 20 | 69 6e 73 65 72 74 20 6d |0010./* |insert m|
|00003260| 6f 64 65 09 09 09 09 2a | 2f 0a 58 23 64 65 66 69 |ode....*|/.X#defi|
|00003270| 6e 65 20 54 42 5f 4f 56 | 45 52 55 4e 20 20 20 30 |ne TB_OV|ERUN 0|
|00003280| 78 30 30 32 30 09 2f 2a | 20 69 6e 70 75 74 20 62 |x0020./*| input b|
|00003290| 75 66 66 65 72 20 6f 76 | 65 72 72 75 6e 09 09 09 |uffer ov|errun...|
|000032a0| 2a 2f 0a 58 23 64 65 66 | 69 6e 65 20 54 42 5f 4f |*/.X#def|ine TB_O|
|000032b0| 50 45 4e 49 4e 47 20 20 | 30 78 30 30 34 30 09 2f |PENING |0x0040./|
|000032c0| 2a 20 74 74 79 20 62 75 | 66 20 69 73 20 6f 70 65 |* tty bu|f is ope|
|000032d0| 6e 69 6e 67 09 09 09 2a | 2f 0a 58 23 64 65 66 69 |ning...*|/.X#defi|
|000032e0| 6e 65 20 54 42 5f 46 4c | 55 53 48 49 54 20 20 30 |ne TB_FL|USHIT 0|
|000032f0| 78 30 30 38 30 09 2f 2a | 20 66 6c 75 73 68 20 74 |x0080./*| flush t|
|00003300| 68 65 20 69 6e 70 75 74 | 20 71 75 65 09 09 09 2a |he input| que...*|
|00003310| 2f 0a 58 0a 58 2f 2a 0a | 58 20 20 20 20 69 66 20 |/.X.X/*.|X if |
|00003320| 6c 61 73 74 20 66 6c 61 | 67 20 69 73 20 67 72 65 |last fla|g is gre|
|00003330| 61 74 65 72 20 74 68 61 | 6e 20 30 78 38 30 30 30 |ater tha|n 0x8000|
|00003340| 2c 20 63 68 61 6e 67 65 | 20 66 6c 61 67 73 20 66 |, change| flags f|
|00003350| 72 6f 6d 20 73 68 6f 72 | 74 20 74 6f 20 6c 6f 6e |rom shor|t to lon|
|00003360| 67 0a 58 2a 2f 0a 58 0a | 58 23 69 66 64 65 66 20 |g.X*/.X.|X#ifdef |
|00003370| 4d 5f 49 33 38 36 0a 58 | 23 20 20 20 70 72 61 67 |M_I386.X|# prag|
|00003380| 6d 61 20 70 61 63 6b 28 | 31 29 0a 58 23 65 6e 64 |ma pack(|1).X#end|
|00003390| 69 66 0a 58 0a 58 73 74 | 72 75 63 74 20 6c 65 64 |if.X.Xst|ruct led|
|000033a0| 5f 62 75 66 0a 58 7b 0a | 58 23 69 66 20 4d 55 4c |_buf.X{.|X#if MUL|
|000033b0| 54 49 4c 42 0a 58 20 20 | 20 20 73 74 72 75 63 74 |TILB.X | struct|
|000033c0| 20 6c 65 64 5f 62 75 66 | 20 20 20 20 20 20 20 20 | led_buf| |
|000033d0| 20 20 2a 6e 65 78 74 3b | 0a 58 20 20 20 20 73 74 | *next;|.X st|
|000033e0| 72 75 63 74 20 6c 65 64 | 5f 62 75 66 20 20 20 20 |ruct led|_buf |
|000033f0| 20 20 20 20 20 20 2a 6c | 61 73 74 3b 0a 58 20 20 | *l|ast;.X |
|00003400| 20 20 73 74 72 75 63 74 | 20 70 72 6f 63 20 20 20 | struct| proc |
|00003410| 20 20 20 20 20 20 20 20 | 20 20 2a 70 72 6f 63 3b | | *proc;|
|00003420| 0a 58 23 65 6e 64 69 66 | 0a 58 0a 58 20 20 20 20 |.X#endif|.X.X |
|00003430| 73 74 72 75 63 74 20 74 | 74 79 5f 62 75 66 20 20 |struct t|ty_buf |
|00003440| 20 20 20 20 20 20 20 20 | 2a 74 62 70 3b 09 2f 2a | |*tbp;./*|
|00003450| 20 54 74 79 20 62 75 66 | 20 74 68 61 74 20 6f 77 | Tty buf| that ow|
|00003460| 6e 73 20 75 73 09 09 2a | 2f 0a 58 0a 58 20 20 20 |ns us..*|/.X.X |
|00003470| 20 75 6e 63 68 61 72 20 | 20 20 20 20 20 20 20 20 | unchar | |
|00003480| 20 20 20 20 20 20 20 20 | 20 70 72 6f 6d 70 74 5b | | prompt[|
|00003490| 4d 41 58 50 52 4f 4d 50 | 54 2b 31 5d 3b 20 2f 2a |MAXPROMP|T+1]; /*|
|000034a0| 20 2b 31 3a 20 46 69 6e | 61 6c 20 27 5c 30 27 09 | +1: Fin|al '\0'.|
|000034b0| 2a 2f 0a 58 20 20 20 20 | 75 6e 63 68 61 72 20 20 |*/.X |unchar |
|000034c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000034d0| 70 72 6f 6d 70 74 6c 65 | 6e 3b 09 2f 2a 20 43 75 |promptle|n;./* Cu|
|000034e0| 72 72 65 6e 74 20 6c 65 | 6e 67 74 68 20 6f 66 20 |rrent le|ngth of |
|000034f0| 70 72 6f 6d 70 74 09 2a | 2f 0a 58 0a 58 20 20 20 |prompt.*|/.X.X |
|00003500| 20 75 6e 63 68 61 72 09 | 09 20 20 20 20 6c 69 6e | unchar.|. lin|
|00003510| 65 5b 4d 41 58 4c 49 4e | 45 2b 32 5d 3b 20 2f 2a |e[MAXLIN|E+2]; /*|
|00003520| 20 2b 32 3a 20 4c 65 66 | 74 26 72 69 67 68 74 20 | +2: Lef|t&right |
|00003530| 6d 61 72 6b 09 2a 2f 0a | 58 20 20 20 20 75 6e 63 |mark.*/.|X unc|
|00003540| 68 61 72 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |har | |
|00003550| 20 20 20 20 20 2a 6c 69 | 6e 65 65 6e 64 3b 09 2f | *li|neend;./|
|00003560| 2a 20 45 6e 64 20 6f 66 | 20 6c 69 6e 65 20 69 6e |* End of| line in|
|00003570| 20 62 75 66 09 09 2a 2f | 0a 58 20 20 20 20 75 6e | buf..*/|.X un|
|00003580| 63 68 61 72 20 20 20 20 | 20 20 20 20 20 20 20 20 |char | |
|00003590| 20 20 20 20 20 20 2a 6c | 63 75 72 73 3b 09 2f 2a | *l|curs;./*|
|000035a0| 20 53 74 61 72 74 20 6f | 66 20 67 61 70 20 69 6e | Start o|f gap in|
|000035b0| 20 62 75 66 09 09 2a 2f | 0a 58 20 20 20 20 75 6e | buf..*/|.X un|
|000035c0| 63 68 61 72 20 20 20 20 | 20 20 20 20 20 20 20 20 |char | |
|000035d0| 20 20 20 20 20 20 2a 72 | 63 75 72 73 3b 09 2f 2a | *r|curs;./*|
|000035e0| 20 45 6e 64 20 6f 66 20 | 67 61 70 20 69 6e 20 62 | End of |gap in b|
|000035f0| 75 66 09 09 2a 2f 0a 58 | 20 20 20 20 75 6e 63 68 |uf..*/.X| unch|
|00003600| 61 72 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ar | |
|00003610| 20 20 20 20 2a 6f 77 65 | 64 3b 09 2f 2a 20 50 61 | *owe|d;./* Pa|
|00003620| 72 74 20 6f 66 20 6c 69 | 6e 65 20 6c 65 66 74 20 |rt of li|ne left |
|00003630| 6f 76 65 72 09 2a 2f 0a | 58 0a 58 20 20 20 20 69 |over.*/.|X.X i|
|00003640| 6e 74 09 09 09 20 20 20 | 20 63 75 72 72 65 6e 74 |nt... | current|
|00003650| 3b 09 2f 2a 20 43 75 72 | 73 6f 72 20 70 6f 73 69 |;./* Cur|sor posi|
|00003660| 74 69 6f 6e 09 09 2a 2f | 0a 58 20 20 20 20 69 6e |tion..*/|.X in|
|00003670| 74 09 09 09 20 20 20 20 | 6c 61 73 74 63 68 61 72 |t... |lastchar|
|00003680| 3b 09 2f 2a 20 4c 61 73 | 74 20 63 68 61 72 20 69 |;./* Las|t char i|
|00003690| 6e 20 6c 69 6e 65 20 62 | 75 66 09 2a 2f 0a 58 0a |n line b|uf.*/.X.|
|000036a0| 58 20 20 20 20 75 6e 63 | 68 61 72 20 20 20 20 20 |X unc|har |
|000036b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 68 69 73 | | his|
|000036c0| 74 6f 72 79 5b 4d 41 58 | 48 49 53 54 4f 52 59 2b |tory[MAX|HISTORY+|
|000036d0| 31 5d 3b 20 2f 2a 20 2b | 31 3a 20 46 69 6e 61 6c |1]; /* +|1: Final|
|000036e0| 20 27 5c 30 27 09 2a 2f | 0a 58 20 20 20 20 75 6e | '\0'.*/|.X un|
|000036f0| 63 68 61 72 20 20 20 20 | 20 20 20 20 20 20 20 20 |char | |
|00003700| 20 20 20 20 20 20 2a 68 | 69 73 74 6f 72 79 65 6e | *h|istoryen|
|00003710| 64 3b 2f 2a 20 45 6e 64 | 20 6f 66 20 68 69 73 74 |d;/* End| of hist|
|00003720| 6f 72 79 20 62 75 66 66 | 65 72 09 2a 2f 0a 58 20 |ory buff|er.*/.X |
|00003730| 20 20 20 69 6e 74 20 20 | 20 20 20 20 20 20 20 20 | int | |
|00003740| 20 20 20 20 20 20 20 20 | 20 20 20 6c 61 73 74 6c | | lastl|
|00003750| 69 6e 65 3b 09 2f 2a 20 | 4c 61 73 74 20 6c 69 6e |ine;./* |Last lin|
|00003760| 65 20 69 6e 20 68 69 73 | 74 6f 72 79 20 62 75 66 |e in his|tory buf|
|00003770| 09 2a 2f 0a 58 20 20 20 | 20 69 6e 74 20 20 20 20 |.*/.X | int |
|00003780| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003790| 20 6d 61 74 63 68 6c 65 | 6e 3b 09 2f 2a 20 4c 65 | matchle|n;./* Le|
|000037a0| 6e 67 74 68 20 6f 66 20 | 6d 61 74 63 68 20 73 74 |ngth of |match st|
|000037b0| 72 69 6e 67 09 2a 2f 0a | 58 0a 58 20 20 20 20 75 |ring.*/.|X.X u|
|000037c0| 6e 73 69 67 6e 65 64 09 | 09 20 20 20 20 66 6c 61 |nsigned.|. fla|
|000037d0| 67 73 3b 0a 58 20 20 20 | 20 75 6e 73 69 67 6e 65 |gs;.X | unsigne|
|000037e0| 64 09 09 20 20 20 20 73 | 74 61 74 65 3b 0a 58 0a |d.. s|tate;.X.|
|000037f0| 58 20 20 20 20 75 6e 63 | 68 61 72 20 20 20 20 20 |X unc|har |
|00003800| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 63 3b 09 | | c;.|
|00003810| 09 2f 2a 20 43 68 61 72 | 61 63 74 65 72 20 62 65 |./* Char|acter be|
|00003820| 69 6e 67 20 69 6e 70 75 | 74 09 2a 2f 0a 58 0a 58 |ing inpu|t.*/.X.X|
|00003830| 23 69 66 20 4d 55 4c 54 | 49 4c 42 0a 58 20 20 20 |#if MULT|ILB.X |
|00003840| 20 69 6e 74 09 09 09 20 | 20 20 20 70 69 64 3b 0a | int... | pid;.|
|00003850| 58 20 20 20 20 69 6e 74 | 09 09 09 20 20 20 20 70 |X int|... p|
|00003860| 70 69 64 3b 0a 58 23 65 | 6e 64 69 66 0a 58 7d 3b |pid;.X#e|ndif.X};|
|00003870| 0a 58 0a 58 23 69 66 64 | 65 66 20 4d 5f 49 33 38 |.X.X#ifd|ef M_I38|
|00003880| 36 0a 58 23 20 20 20 70 | 72 61 67 6d 61 20 70 61 |6.X# p|ragma pa|
|00003890| 63 6b 28 29 0a 58 23 65 | 6e 64 69 66 0a 58 0a 58 |ck().X#e|ndif.X.X|
|000038a0| 73 74 72 75 63 74 20 74 | 74 79 5f 62 75 66 0a 58 |struct t|ty_buf.X|
|000038b0| 7b 0a 58 20 20 20 20 73 | 74 72 75 63 74 20 74 74 |{.X s|truct tt|
|000038c0| 79 5f 62 75 66 20 20 20 | 20 20 20 20 20 20 20 2a |y_buf | *|
|000038d0| 6e 65 78 74 3b 0a 58 20 | 20 20 20 73 74 72 75 63 |next;.X | struc|
|000038e0| 74 20 74 74 79 5f 62 75 | 66 20 20 20 20 20 20 20 |t tty_bu|f |
|000038f0| 20 20 20 2a 6c 61 73 74 | 3b 0a 58 0a 58 20 20 20 | *last|;.X.X |
|00003900| 20 73 74 72 75 63 74 20 | 6c 65 64 5f 62 75 66 20 | struct |led_buf |
|00003910| 20 20 20 20 20 20 20 20 | 20 2a 6c 62 70 3b 09 2f | | *lbp;./|
|00003920| 2a 20 50 6f 69 6e 74 65 | 72 20 74 6f 20 6c 69 6e |* Pointe|r to lin|
|00003930| 65 20 62 75 66 66 65 72 | 09 2a 2f 0a 58 20 20 20 |e buffer|.*/.X |
|00003940| 20 73 74 72 75 63 74 20 | 74 74 79 20 20 20 20 20 | struct |tty |
|00003950| 20 20 20 20 20 20 20 20 | 20 2a 74 74 79 70 3b 09 | | *ttyp;.|
|00003960| 2f 2a 20 54 68 65 20 74 | 74 79 20 77 65 20 61 72 |/* The t|ty we ar|
|00003970| 65 20 73 65 72 76 69 6e | 67 09 2a 2f 0a 58 0a 58 |e servin|g.*/.X.X|
|00003980| 20 20 20 20 69 6e 74 09 | 09 09 20 20 20 20 63 6f | int.|.. co|
|00003990| 6c 73 3b 09 2f 2a 20 54 | 65 72 6d 69 6e 61 6c 20 |ls;./* T|erminal |
|000039a0| 6c 69 6e 65 20 77 69 64 | 74 68 09 09 2a 2f 0a 58 |line wid|th..*/.X|
|000039b0| 0a 58 20 20 20 20 75 6e | 73 69 67 6e 65 64 09 09 |.X un|signed..|
|000039c0| 20 20 20 20 69 66 6c 61 | 67 3b 0a 58 20 20 20 20 | ifla|g;.X |
|000039d0| 75 6e 73 69 67 6e 65 64 | 09 09 20 20 20 20 6f 66 |unsigned|.. of|
|000039e0| 6c 61 67 3b 0a 58 20 20 | 20 20 75 6e 73 69 67 6e |lag;.X | unsign|
|000039f0| 65 64 09 09 20 20 20 20 | 6c 66 6c 61 67 3b 0a 58 |ed.. |lflag;.X|
|00003a00| 20 20 20 20 75 6e 73 69 | 67 6e 65 64 09 09 20 20 | unsi|gned.. |
|00003a10| 20 20 63 66 6c 61 67 3b | 0a 58 20 20 20 20 63 68 | cflag;|.X ch|
|00003a20| 61 72 09 09 20 20 20 20 | 63 63 5b 4e 43 43 20 2b |ar.. |cc[NCC +|
|00003a30| 20 32 5d 3b 0a 58 0a 58 | 20 20 20 20 75 6e 73 69 | 2];.X.X| unsi|
|00003a40| 67 6e 65 64 09 09 20 20 | 20 20 66 6c 61 67 73 3b |gned.. | flags;|
|00003a50| 0a 58 20 20 20 20 63 68 | 61 72 09 09 20 20 20 20 |.X ch|ar.. |
|00003a60| 64 6f 72 65 66 72 65 73 | 68 3b 09 2f 2a 20 52 65 |dorefres|h;./* Re|
|00003a70| 66 72 65 73 68 20 63 75 | 72 72 65 6e 74 20 6c 69 |fresh cu|rrent li|
|00003a80| 6e 65 20 73 6f 6f 6e 09 | 2a 2f 0a 58 20 20 20 20 |ne soon.|*/.X |
|00003a90| 63 68 61 72 09 09 20 20 | 20 20 72 65 61 64 73 6c |char.. | readsl|
|00003aa0| 65 65 70 3b 09 2f 2a 20 | 53 6c 65 65 70 69 6e 67 |eep;./* |Sleeping|
|00003ab0| 20 77 68 69 6c 65 20 72 | 65 61 64 69 6e 67 09 2a | while r|eading.*|
|00003ac0| 2f 0a 58 0a 58 20 20 20 | 20 73 74 72 75 63 74 20 |/.X.X | struct |
|00003ad0| 63 6c 69 73 74 09 20 20 | 20 20 62 72 6f 61 64 63 |clist. | broadc|
|00003ae0| 61 73 74 3b 0a 58 0a 58 | 20 20 20 20 2f 2a 0a 58 |ast;.X.X| /*.X|
|00003af0| 09 4b 65 79 62 6f 61 72 | 64 20 6d 61 70 2c 20 61 |.Keyboar|d map, a|
|00003b00| 6e 64 20 74 65 72 6d 69 | 6e 61 6c 20 63 61 70 61 |nd termi|nal capa|
|00003b10| 62 69 6c 69 74 79 20 69 | 6e 64 65 78 20 61 6e 64 |bility i|ndex and|
|00003b20| 20 74 61 62 6c 65 0a 58 | 09 66 6f 72 20 74 68 69 | table.X|.for thi|
|00003b30| 73 20 74 74 79 2e 0a 58 | 20 20 20 20 2a 2f 0a 58 |s tty..X| */.X|
|00003b40| 20 20 20 20 75 6e 63 68 | 61 72 09 09 20 20 20 20 | unch|ar.. |
|00003b50| 6b 65 79 6d 61 70 5b 43 | 4c 45 4b 45 59 5f 4d 41 |keymap[C|LEKEY_MA|
|00003b60| 58 5d 3b 0a 58 0a 58 20 | 20 20 20 63 68 61 72 09 |X];.X.X | char.|
|00003b70| 09 20 20 20 20 2a 74 63 | 61 70 5b 54 43 41 50 5f |. *tc|ap[TCAP_|
|00003b80| 43 4f 55 4e 54 5d 3b 0a | 58 0a 58 20 20 20 20 69 |COUNT];.|X.X i|
|00003b90| 6e 74 09 09 09 20 20 20 | 20 74 63 6c 65 6e 3b 0a |nt... | tclen;.|
|00003ba0| 58 23 69 66 20 4d 5f 53 | 50 54 41 4c 4c 4f 43 0a |X#if M_S|PTALLOC.|
|00003bb0| 58 20 20 20 20 75 6e 63 | 68 61 72 09 09 20 20 20 |X unc|har.. |
|00003bc0| 20 2a 74 63 73 74 72 69 | 6e 67 73 3b 0a 58 23 65 | *tcstri|ngs;.X#e|
|00003bd0| 6c 73 65 0a 58 20 20 20 | 20 75 6e 63 68 61 72 09 |lse.X | unchar.|
|00003be0| 09 20 20 20 20 74 63 73 | 74 72 69 6e 67 73 5b 54 |. tcs|trings[T|
|00003bf0| 43 41 50 5f 53 49 5a 45 | 5d 3b 0a 58 23 65 6e 64 |CAP_SIZE|];.X#end|
|00003c00| 69 66 0a 58 7d 3b 0a 58 | 0a 58 23 69 66 20 4d 5f |if.X};.X|.X#if M_|
|00003c10| 53 50 54 41 4c 4c 4f 43 | 20 26 26 20 4d 5f 4b 45 |SPTALLOC| && M_KE|
|00003c20| 52 4e 45 4c 0a 58 23 20 | 20 20 69 66 20 4d 5f 55 |RNEL.X# | if M_U|
|00003c30| 4e 49 58 0a 58 09 65 78 | 74 65 72 6e 20 63 61 64 |NIX.X.ex|tern cad|
|00003c40| 64 72 5f 74 09 2a 73 70 | 74 61 6c 6c 6f 63 28 2f |dr_t.*sp|talloc(/|
|00003c50| 2a 20 69 6e 74 20 70 61 | 67 65 73 2c 69 6e 74 20 |* int pa|ges,int |
|00003c60| 6d 6f 64 65 2c 69 6e 74 | 20 62 61 73 65 2c 69 6e |mode,int| base,in|
|00003c70| 74 20 66 6c 61 67 20 2a | 2f 29 3b 0a 58 09 65 78 |t flag *|/);.X.ex|
|00003c80| 74 65 72 6e 20 76 6f 69 | 64 09 73 70 74 66 72 65 |tern voi|d.sptfre|
|00003c90| 65 28 2f 2a 20 63 68 61 | 72 20 2a 76 61 2c 69 6e |e(/* cha|r *va,in|
|00003ca0| 74 20 6e 70 61 67 65 73 | 2c 69 6e 74 20 66 72 65 |t npages|,int fre|
|00003cb0| 65 66 6c 61 67 20 2a 2f | 29 3b 0a 58 0a 58 23 09 |eflag */|);.X.X#.|
|00003cc0| 64 65 66 69 6e 65 20 53 | 70 74 61 6c 6c 6f 63 28 |define S|ptalloc(|
|00003cd0| 62 79 74 65 73 29 09 20 | 20 20 20 73 70 74 61 6c |bytes). | sptal|
|00003ce0| 6c 6f 63 28 62 74 6f 70 | 74 28 62 79 74 65 73 29 |loc(btop|t(bytes)|
|00003cf0| 2c 50 47 5f 50 2c 30 2c | 30 29 0a 58 23 09 64 65 |,PG_P,0,|0).X#.de|
|00003d00| 66 69 6e 65 20 53 70 74 | 66 72 65 65 28 61 64 64 |fine Spt|free(add|
|00003d10| 72 2c 62 79 74 65 73 29 | 20 20 73 70 74 66 72 65 |r,bytes)| sptfre|
|00003d20| 65 28 61 64 64 72 2c 62 | 74 6f 70 74 28 62 79 74 |e(addr,b|topt(byt|
|00003d30| 65 73 29 2c 31 29 0a 58 | 23 20 20 20 65 6c 73 65 |es),1).X|# else|
|00003d40| 0a 58 23 09 64 65 66 69 | 6e 65 20 53 70 74 61 6c |.X#.defi|ne Sptal|
|00003d50| 6c 6f 63 28 62 79 74 65 | 73 29 09 20 20 20 20 73 |loc(byte|s). s|
|00003d60| 70 74 61 6c 6c 6f 63 28 | 62 79 74 65 73 29 0a 58 |ptalloc(|bytes).X|
|00003d70| 23 09 64 65 66 69 6e 65 | 20 53 70 74 66 72 65 65 |#.define| Sptfree|
|00003d80| 28 61 64 64 72 2c 62 79 | 74 65 73 29 20 20 73 70 |(addr,by|tes) sp|
|00003d90| 74 66 72 65 65 28 61 64 | 64 72 2c 62 79 74 65 73 |tfree(ad|dr,bytes|
|00003da0| 2c 31 29 0a 58 23 20 20 | 20 65 6e 64 69 66 0a 58 |,1).X# | endif.X|
|00003db0| 23 65 6c 73 65 0a 58 23 | 20 20 20 69 66 20 21 4d |#else.X#| if !M|
|00003dc0| 5f 4b 45 52 4e 45 4c 0a | 58 23 09 64 65 66 69 6e |_KERNEL.|X#.defin|
|00003dd0| 65 20 53 70 74 61 6c 6c | 6f 63 28 73 69 7a 65 29 |e Sptall|oc(size)|
|00003de0| 09 20 20 20 20 6d 61 6c | 6c 6f 63 28 73 69 7a 65 |. mal|loc(size|
|00003df0| 29 0a 58 23 09 64 65 66 | 69 6e 65 20 53 70 74 66 |).X#.def|ine Sptf|
|00003e00| 72 65 65 28 61 64 64 72 | 2c 73 69 7a 65 29 20 20 |ree(addr|,size) |
|00003e10| 20 66 72 65 65 28 61 64 | 64 72 29 0a 58 23 20 20 | free(ad|dr).X# |
|00003e20| 20 65 6e 64 69 66 0a 58 | 23 65 6e 64 69 66 0a 45 | endif.X|#endif.E|
|00003e30| 4e 44 5f 4f 46 5f 46 49 | 4c 45 0a 69 66 20 74 65 |ND_OF_FI|LE.if te|
|00003e40| 73 74 20 36 30 32 39 20 | 2d 6e 65 20 60 77 63 20 |st 6029 |-ne `wc |
|00003e50| 2d 63 20 3c 27 63 6c 65 | 64 2e 68 27 60 3b 20 74 |-c <'cle|d.h'`; t|
|00003e60| 68 65 6e 0a 20 20 20 20 | 65 63 68 6f 20 73 68 61 |hen. |echo sha|
|00003e70| 72 3a 20 5c 22 27 63 6c | 65 64 2e 68 27 5c 22 20 |r: \"'cl|ed.h'\" |
|00003e80| 75 6e 70 61 63 6b 65 64 | 20 77 69 74 68 20 77 72 |unpacked| with wr|
|00003e90| 6f 6e 67 20 73 69 7a 65 | 21 0a 66 69 0a 63 68 6d |ong size|!.fi.chm|
|00003ea0| 6f 64 20 2b 78 20 27 63 | 6c 65 64 2e 68 27 0a 23 |od +x 'c|led.h'.#|
|00003eb0| 20 65 6e 64 20 6f 66 20 | 27 63 6c 65 64 2e 68 27 | end of |'cled.h'|
|00003ec0| 0a 66 69 0a 69 66 20 74 | 65 73 74 20 2d 66 20 27 |.fi.if t|est -f '|
|00003ed0| 63 6c 65 64 69 6f 2e 68 | 27 20 2d 61 20 22 24 7b |cledio.h|' -a "${|
|00003ee0| 31 7d 22 20 21 3d 20 22 | 2d 63 22 20 3b 20 74 68 |1}" != "|-c" ; th|
|00003ef0| 65 6e 20 0a 20 20 65 63 | 68 6f 20 73 68 61 72 3a |en . ec|ho shar:|
|00003f00| 20 57 69 6c 6c 20 6e 6f | 74 20 63 6c 6f 62 62 65 | Will no|t clobbe|
|00003f10| 72 20 65 78 69 73 74 69 | 6e 67 20 66 69 6c 65 20 |r existi|ng file |
|00003f20| 5c 22 27 63 6c 65 64 69 | 6f 2e 68 27 5c 22 0a 65 |\"'cledi|o.h'\".e|
|00003f30| 6c 73 65 0a 65 63 68 6f | 20 73 68 61 72 3a 20 45 |lse.echo| shar: E|
|00003f40| 78 74 72 61 63 74 69 6e | 67 20 5c 22 27 63 6c 65 |xtractin|g \"'cle|
|00003f50| 64 69 6f 2e 68 27 5c 22 | 20 5c 28 36 38 39 38 20 |dio.h'\"| \(6898 |
|00003f60| 63 68 61 72 61 63 74 65 | 72 73 5c 29 0a 73 65 64 |characte|rs\).sed|
|00003f70| 20 22 73 2f 5e 58 2f 2f | 22 20 3e 27 63 6c 65 64 | "s/^X//|" >'cled|
|00003f80| 69 6f 2e 68 27 20 3c 3c | 27 45 4e 44 5f 4f 46 5f |io.h' <<|'END_OF_|
|00003f90| 46 49 4c 45 27 0a 58 2f | 2a 0a 58 20 20 20 20 24 |FILE'.X/|*.X $|
|00003fa0| 49 64 3a 20 63 6c 65 64 | 69 6f 2e 68 2c 76 20 32 |Id: cled|io.h,v 2|
|00003fb0| 2e 35 20 39 30 2f 30 38 | 2f 32 36 20 31 31 3a 33 |.5 90/08|/26 11:3|
|00003fc0| 35 3a 30 30 20 73 77 20 | 45 78 70 20 24 0a 58 2a |5:00 sw |Exp $.X*|
|00003fd0| 2f 0a 58 0a 58 2f 2a 0a | 58 20 20 20 20 43 4c 45 |/.X.X/*.|X CLE|
|00003fe0| 44 20 77 69 6c 6c 20 62 | 65 20 61 63 74 69 76 65 |D will b|e active|
|00003ff0| 20 6f 6e 6c 79 20 69 66 | 20 74 68 69 73 20 6f 70 | only if| this op|
|00004000| 74 69 6f 6e 73 20 61 72 | 65 20 73 65 74 0a 58 2a |tions ar|e set.X*|
|00004010| 2f 0a 58 0a 58 23 64 65 | 66 69 6e 65 20 43 4c 45 |/.X.X#de|fine CLE|
|00004020| 44 46 4c 41 47 53 09 28 | 49 43 41 4e 4f 4e 7c 45 |DFLAGS.(|ICANON|E|
|00004030| 43 48 4f 7c 45 43 48 4f | 45 7c 45 43 48 4f 4b 29 |CHO|ECHO|E|ECHOK)|
|00004040| 0a 58 0a 58 2f 2a 0a 58 | 20 20 20 20 54 65 72 6d |.X.X/*.X| Term|
|00004050| 69 6e 61 6c 20 63 61 70 | 61 62 69 6c 69 74 69 65 |inal cap|abilitie|
|00004060| 73 20 72 65 6d 65 6d 62 | 65 72 65 64 20 62 79 20 |s rememb|ered by |
|00004070| 43 4c 45 44 0a 58 2a 2f | 0a 58 0a 58 23 64 65 66 |CLED.X*/|.X.X#def|
|00004080| 69 6e 65 20 54 43 41 50 | 5f 43 4c 52 45 4f 4c 5f |ine TCAP|_CLREOL_|
|00004090| 53 54 52 09 09 22 5c 30 | 33 33 5b 4b 22 09 2f 2a |STR.."\0|33[K"./*|
|000040a0| 20 63 6c 65 61 72 20 74 | 6f 20 65 6f 6c 09 09 2a | clear t|o eol..*|
|000040b0| 2f 0a 58 23 64 65 66 69 | 6e 65 20 54 43 41 50 5f |/.X#defi|ne TCAP_|
|000040c0| 53 45 54 49 4e 56 5f 53 | 54 52 09 09 22 5c 30 33 |SETINV_S|TR.."\03|
|000040d0| 33 5b 37 6d 22 09 2f 2a | 20 73 65 74 20 69 6e 76 |3[7m"./*| set inv|
|000040e0| 65 72 73 65 20 76 69 64 | 65 6f 09 2a 2f 0a 58 23 |erse vid|eo.*/.X#|
|000040f0| 64 65 66 69 6e 65 20 54 | 43 41 50 5f 53 45 54 4e |define T|CAP_SETN|
|00004100| 4f 52 4d 5f 53 54 52 09 | 22 5c 30 33 33 5b 6d 22 |ORM_STR.|"\033[m"|
|00004110| 09 2f 2a 20 73 65 74 20 | 6e 6f 72 6d 61 6c 20 76 |./* set |normal v|
|00004120| 69 64 65 6f 09 2a 2f 0a | 58 23 64 65 66 69 6e 65 |ideo.*/.|X#define|
|00004130| 20 54 43 41 50 5f 53 41 | 56 45 5f 53 54 52 09 09 | TCAP_SA|VE_STR..|
|00004140| 22 5c 30 33 33 37 22 09 | 09 2f 2a 20 73 61 76 65 |"\0337".|./* save|
|00004150| 20 63 75 72 73 6f 72 20 | 70 6f 73 20 61 6e 64 20 | cursor |pos and |
|00004160| 61 74 74 72 20 2a 2f 0a | 58 23 64 65 66 69 6e 65 |attr */.|X#define|
|00004170| 20 54 43 41 50 5f 52 45 | 53 54 4f 52 45 5f 53 54 | TCAP_RE|STORE_ST|
|00004180| 52 09 22 5c 30 33 33 38 | 22 09 09 2f 2a 20 72 65 |R."\0338|"../* re|
|00004190| 73 74 6f 72 65 20 70 6f | 73 20 61 6e 64 20 61 74 |store po|s and at|
|000041a0| 74 72 09 2a 2f 0a 58 23 | 64 65 66 69 6e 65 20 54 |tr.*/.X#|define T|
|000041b0| 43 41 50 5f 46 4c 41 53 | 48 5f 53 54 52 09 09 22 |CAP_FLAS|H_STR.."|
|000041c0| 5c 30 30 37 22 09 09 2f | 2a 20 72 69 6e 67 20 62 |\007"../|* ring b|
|000041d0| 65 6c 6c 20 6f 72 20 73 | 69 6d 69 6c 61 72 09 2a |ell or s|imilar.*|
|000041e0| 2f 0a 58 0a 58 23 64 65 | 66 69 6e 65 20 54 43 41 |/.X.X#de|fine TCA|
|000041f0| 50 5f 43 4c 52 45 4f 4c | 09 30 0a 58 23 64 65 66 |P_CLREOL|.0.X#def|
|00004200| 69 6e 65 20 54 43 41 50 | 5f 53 45 54 49 4e 56 09 |ine TCAP|_SETINV.|
|00004210| 31 0a 58 23 64 65 66 69 | 6e 65 20 54 43 41 50 5f |1.X#defi|ne TCAP_|
|00004220| 53 45 54 4e 4f 52 4d 09 | 32 0a 58 23 64 65 66 69 |SETNORM.|2.X#defi|
|00004230| 6e 65 20 54 43 41 50 5f | 53 41 56 45 09 33 0a 58 |ne TCAP_|SAVE.3.X|
|00004240| 23 64 65 66 69 6e 65 20 | 54 43 41 50 5f 52 45 53 |#define |TCAP_RES|
|00004250| 54 4f 52 45 09 34 0a 58 | 23 64 65 66 69 6e 65 20 |TORE.4.X|#define |
|00004260| 54 43 41 50 5f 46 4c 41 | 53 48 09 35 0a 58 23 64 |TCAP_FLA|SH.5.X#d|
|00004270| 65 66 69 6e 65 20 54 43 | 41 50 5f 43 4f 55 4e 54 |efine TC|AP_COUNT|
|00004280| 09 36 09 09 09 2f 2a 20 | 6c 61 73 74 20 6f 6e 65 |.6.../* |last one|
|00004290| 20 69 6e 64 69 63 61 74 | 65 73 20 74 6f 74 61 6c | indicat|es total|
|000042a0| 20 2a 2f 0a 58 0a 58 2f | 2a 0a 58 20 20 20 20 69 | */.X.X/|*.X i|
|000042b0| 6f 63 74 6c 20 63 6f 64 | 65 73 20 61 76 61 69 6c |octl cod|es avail|
|000042c0| 61 62 6c 65 0a 58 2a 2f | 0a 58 0a 58 23 64 65 66 |able.X*/|.X.X#def|
|000042d0| 69 6e 65 20 4c 44 49 4f | 43 09 20 20 20 20 28 27 |ine LDIO|C. ('|
|000042e0| 44 27 3c 3c 38 29 0a 58 | 0a 58 2f 2a 0a 58 20 20 |D'<<8).X|.X/*.X |
|000042f0| 20 20 49 6f 63 74 6c 73 | 20 6f 6e 20 74 68 65 20 | Ioctls| on the |
|00004300| 6c 69 6e 65 20 64 69 73 | 63 69 70 6c 69 6e 65 20 |line dis|cipline |
|00004310| 69 74 73 65 6c 66 0a 58 | 2a 2f 0a 58 0a 58 23 64 |itself.X|*/.X.X#d|
|00004320| 65 66 69 6e 65 20 4c 44 | 47 45 54 43 4f 4c 53 20 |efine LD|GETCOLS |
|00004330| 20 20 28 4c 44 49 4f 43 | 7c 31 34 29 09 20 20 20 | (LDIOC||14). |
|00004340| 20 2f 2a 20 47 65 74 20 | 74 65 72 6d 69 6e 61 6c | /* Get |terminal|
|00004350| 20 6c 69 6e 65 20 6c 65 | 6e 67 74 68 09 09 2a 2f | line le|ngth..*/|
|00004360| 0a 58 23 64 65 66 69 6e | 65 20 4c 44 53 45 54 43 |.X#defin|e LDSETC|
|00004370| 4f 4c 53 20 20 20 28 4c | 44 49 4f 43 7c 31 35 29 |OLS (L|DIOC|15)|
|00004380| 09 20 20 20 20 2f 2a 20 | 53 65 74 20 74 65 72 6d |. /* |Set term|
|00004390| 69 6e 61 6c 20 6c 69 6e | 65 20 6c 65 6e 67 74 68 |inal lin|e length|
|000043a0| 09 09 2a 2f 0a 58 0a 58 | 23 64 65 66 69 6e 65 20 |..*/.X.X|#define |
|000043b0| 4c 44 47 45 54 42 46 09 | 20 20 20 20 28 4c 44 49 |LDGETBF.| (LDI|
|000043c0| 4f 43 7c 31 36 29 09 20 | 20 20 20 2f 2a 20 67 65 |OC|16). | /* ge|
|000043d0| 74 20 62 69 6e 64 69 6e | 67 73 20 26 20 63 61 70 |t bindin|gs & cap|
|000043e0| 61 62 69 6c 69 74 69 65 | 73 09 2a 2f 0a 58 23 64 |abilitie|s.*/.X#d|
|000043f0| 65 66 69 6e 65 20 4c 44 | 53 45 54 42 46 09 20 20 |efine LD|SETBF. |
|00004400| 20 20 28 4c 44 49 4f 43 | 7c 31 37 29 09 20 20 20 | (LDIOC||17). |
|00004410| 20 2f 2a 20 73 65 74 20 | 62 69 6e 64 69 6e 67 73 | /* set |bindings|
|00004420| 20 26 20 63 61 70 61 62 | 69 6c 69 74 69 65 73 09 | & capab|ilities.|
|00004430| 2a 2f 0a 58 0a 58 23 64 | 65 66 69 6e 65 20 4c 44 |*/.X.X#d|efine LD|
|00004440| 47 45 54 48 42 09 20 20 | 20 20 28 4c 44 49 4f 43 |GETHB. | (LDIOC|
|00004450| 7c 31 38 29 09 20 20 20 | 20 2f 2a 20 67 65 74 20 ||18). | /* get |
|00004460| 68 69 73 74 6f 72 79 20 | 62 75 66 66 65 72 09 09 |history |buffer..|
|00004470| 2a 2f 0a 58 23 64 65 66 | 69 6e 65 20 4c 44 53 45 |*/.X#def|ine LDSE|
|00004480| 54 48 42 09 20 20 20 20 | 28 4c 44 49 4f 43 7c 31 |THB. |(LDIOC|1|
|00004490| 39 29 09 20 20 20 20 2f | 2a 20 73 65 74 20 68 69 |9). /|* set hi|
|000044a0| 73 74 6f 72 79 20 62 75 | 66 66 65 72 09 09 2a 2f |story bu|ffer..*/|
|000044b0| 0a 58 0a 58 2f 2a 0a 58 | 20 20 20 20 49 6f 63 74 |.X.X/*.X| Ioct|
|000044c0| 6c 73 20 6f 6e 20 74 68 | 65 20 43 4c 45 44 20 64 |ls on th|e CLED d|
|000044d0| 72 69 76 65 72 20 69 6e | 20 67 65 6e 65 72 61 6c |river in| general|
|000044e0| 0a 58 2a 2f 0a 58 0a 58 | 23 64 65 66 69 6e 65 20 |.X*/.X.X|#define |
|000044f0| 4c 44 47 45 54 53 09 20 | 20 20 20 28 4c 44 49 4f |LDGETS. | (LDIO|
|00004500| 43 7c 32 30 29 09 20 20 | 20 20 2f 2a 20 67 65 74 |C|20). | /* get|
|00004510| 20 63 6c 65 64 20 73 74 | 61 74 73 09 09 09 2a 2f | cled st|ats...*/|
|00004520| 0a 58 0a 58 23 64 65 66 | 69 6e 65 20 4c 44 47 45 |.X.X#def|ine LDGE|
|00004530| 54 42 09 20 20 20 20 28 | 4c 44 49 4f 43 7c 32 31 |TB. (|LDIOC|21|
|00004540| 29 09 20 20 20 20 2f 2a | 20 64 75 6d 70 20 69 74 |). /*| dump it|
|00004550| 73 20 67 75 74 73 20 28 | 64 65 62 75 67 20 6d 6f |s guts (|debug mo|
|00004560| 64 65 20 6f 6e 6c 79 29 | 09 2a 2f 0a 58 23 64 65 |de only)|.*/.X#de|
|00004570| 66 69 6e 65 20 4c 44 47 | 45 54 54 54 59 20 20 20 |fine LDG|ETTTY |
|00004580| 20 28 4c 44 49 4f 43 7c | 32 32 29 09 20 20 20 20 | (LDIOC||22). |
|00004590| 2f 2a 20 64 75 6d 70 20 | 61 20 74 74 79 20 73 74 |/* dump |a tty st|
|000045a0| 72 75 63 74 20 28 64 65 | 62 75 67 20 6d 6f 64 65 |ruct (de|bug mode|
|000045b0| 20 6f 6e 6c 79 29 20 2a | 2f 0a 58 23 64 65 66 69 | only) *|/.X#defi|
|000045c0| 6e 65 20 4c 44 47 45 54 | 43 09 20 20 20 20 28 4c |ne LDGET|C. (L|
|000045d0| 44 49 4f 43 7c 32 33 29 | 09 20 20 20 20 2f 2a 20 |DIOC|23)|. /* |
|000045e0| 64 75 6d 70 20 63 6f 6e | 74 65 6e 74 73 20 6f 66 |dump con|tents of|
|000045f0| 20 61 20 63 6c 69 73 74 | 20 28 64 65 62 75 67 20 | a clist| (debug |
|00004600| 6f 6e 6c 79 29 20 2a 2f | 0a 58 0a 58 2f 2a 0a 58 |only) */|.X.X/*.X|
|00004610| 20 20 20 20 45 72 72 6f | 72 20 63 6f 64 65 73 20 | Erro|r codes |
|00004620| 72 65 74 75 72 6e 65 64 | 20 66 72 6f 6d 20 69 6f |returned| from io|
|00004630| 63 74 6c 20 66 75 6e 63 | 74 69 6f 6e 73 0a 58 2a |ctl func|tions.X*|
|00004640| 2f 0a 58 0a 58 23 64 65 | 66 69 6e 65 20 45 52 52 |/.X.X#de|fine ERR|
|00004650| 5f 4e 4f 54 54 59 42 55 | 46 09 31 32 09 20 20 20 |_NOTTYBU|F.12. |
|00004660| 20 2f 2a 20 45 4e 4f 4d | 45 4d 20 6e 6f 20 6d 6f | /* ENOM|EM no mo|
|00004670| 72 65 20 74 74 79 62 75 | 66 73 20 61 76 61 69 6c |re ttybu|fs avail|
|00004680| 61 62 6c 65 20 2a 2f 0a | 58 23 64 65 66 69 6e 65 |able */.|X#define|
|00004690| 20 45 52 52 5f 4e 4f 4c | 45 44 42 55 46 09 31 31 | ERR_NOL|EDBUF.11|
|000046a0| 09 20 20 20 20 2f 2a 20 | 45 41 47 41 49 4e 20 6e |. /* |EAGAIN n|
|000046b0| 6f 20 6d 6f 72 65 20 6c | 65 64 62 75 66 73 20 61 |o more l|edbufs a|
|000046c0| 76 61 69 6c 61 62 6c 65 | 20 2a 2f 0a 58 23 64 65 |vailable| */.X#de|
|000046d0| 66 69 6e 65 20 45 52 52 | 5f 4e 4f 4c 42 41 53 53 |fine ERR|_NOLBASS|
|000046e0| 09 31 39 09 20 20 20 20 | 2f 2a 20 45 4e 4f 44 45 |.19. |/* ENODE|
|000046f0| 56 20 6e 6f 20 6c 65 64 | 20 62 75 66 20 61 73 73 |V no led| buf ass|
|00004700| 69 67 6e 65 64 20 74 6f | 20 70 72 6f 63 65 73 73 |igned to| process|
|00004710| 20 2a 2f 0a 58 23 64 65 | 66 69 6e 65 20 45 52 52 | */.X#de|fine ERR|
|00004720| 5f 42 41 44 50 41 52 41 | 4d 09 32 32 09 20 20 20 |_BADPARA|M.22. |
|00004730| 20 2f 2a 20 45 49 4e 56 | 41 4c 20 62 61 64 20 70 | /* EINV|AL bad p|
|00004740| 61 72 61 6d 61 74 65 72 | 20 76 61 6c 75 65 20 2a |aramater| value *|
|00004750| 2f 0a 58 23 64 65 66 69 | 6e 65 20 45 52 52 5f 42 |/.X#defi|ne ERR_B|
|00004760| 41 44 49 4f 43 54 4c 09 | 33 33 09 20 20 20 20 2f |ADIOCTL.|33. /|
|00004770| 2a 20 45 44 4f 4d 20 62 | 61 64 20 69 6f 63 74 6c |* EDOM b|ad ioctl|
|00004780| 20 66 75 6e 63 74 69 6f | 6e 20 2a 2f 0a 58 0a 58 | functio|n */.X.X|
|00004790| 2f 2a 0a 58 20 20 20 20 | 50 61 73 73 20 74 68 65 |/*.X |Pass the|
|000047a0| 20 61 64 64 72 65 73 73 | 20 6f 66 20 74 68 69 73 | address| of this|
|000047b0| 20 73 74 72 75 63 74 20 | 74 6f 20 4c 44 47 45 54 | struct |to LDGET|
|000047c0| 53 0a 58 2a 2f 0a 58 0a | 58 73 74 72 75 63 74 20 |S.X*/.X.|Xstruct |
|000047d0| 63 6c 65 5f 73 74 61 74 | 73 0a 58 7b 0a 58 20 20 |cle_stat|s.X{.X |
|000047e0| 20 20 69 6e 74 09 09 20 | 20 20 20 6c 65 64 62 75 | int.. | ledbu|
|000047f0| 66 73 3b 09 20 20 20 20 | 2f 2a 20 6d 61 78 20 6e |fs;. |/* max n|
|00004800| 75 6d 62 65 72 20 6f 66 | 20 6c 65 64 5f 62 75 66 |umber of| led_buf|
|00004810| 66 65 72 73 09 2a 2f 0a | 58 20 20 20 20 69 6e 74 |fers.*/.|X int|
|00004820| 09 09 20 20 20 20 74 74 | 79 62 75 66 73 3b 09 20 |.. tt|ybufs;. |
|00004830| 20 20 20 2f 2a 20 6d 61 | 78 20 6e 75 6d 62 65 72 | /* ma|x number|
|00004840| 20 6f 66 20 74 74 79 5f | 62 75 66 66 65 72 73 09 | of tty_|buffers.|
|00004850| 2a 2f 0a 58 20 20 20 20 | 69 6e 74 09 09 20 20 20 |*/.X |int.. |
|00004860| 20 70 72 6f 6d 70 74 73 | 69 7a 65 3b 09 20 20 20 | prompts|ize;. |
|00004870| 20 2f 2a 20 73 69 7a 65 | 20 6f 66 20 70 72 6f 6d | /* size| of prom|
|00004880| 70 74 20 62 75 66 66 65 | 72 09 09 2a 2f 0a 58 20 |pt buffe|r..*/.X |
|00004890| 20 20 20 69 6e 74 09 09 | 20 20 20 20 6c 69 6e 65 | int..| line|
|000048a0| 73 69 7a 65 3b 09 20 20 | 20 20 2f 2a 20 73 69 7a |size;. | /* siz|
|000048b0| 65 20 6f 66 20 63 6f 6d | 6d 61 6e 64 20 62 75 66 |e of com|mand buf|
|000048c0| 66 65 72 09 09 2a 2f 0a | 58 20 20 20 20 69 6e 74 |fer..*/.|X int|
|000048d0| 09 09 20 20 20 20 68 69 | 73 74 73 69 7a 65 3b 09 |.. hi|stsize;.|
|000048e0| 20 20 20 20 2f 2a 20 73 | 69 7a 65 20 6f 66 20 68 | /* s|ize of h|
|000048f0| 69 73 74 6f 72 79 20 62 | 75 66 66 65 72 09 09 2a |istory b|uffer..*|
|00004900| 2f 0a 58 20 20 20 20 69 | 6e 74 09 09 20 20 20 20 |/.X i|nt.. |
|00004910| 6d 75 6c 74 69 5f 6c 62 | 3b 09 20 20 20 20 2f 2a |multi_lb|;. /*|
|00004920| 20 74 2f 66 20 66 6c 61 | 67 20 69 6e 64 69 63 61 | t/f fla|g indica|
|00004930| 74 69 6e 67 20 6d 75 6c | 74 69 2d 6c 62 20 6d 6f |ting mul|ti-lb mo|
|00004940| 64 65 20 2a 2f 0a 58 20 | 20 20 20 69 6e 74 09 09 |de */.X | int..|
|00004950| 20 20 20 20 73 70 74 3b | 09 20 20 20 20 2f 2a 20 | spt;|. /* |
|00004960| 74 2f 66 20 66 6c 61 67 | 20 69 6e 64 69 63 61 74 |t/f flag| indicat|
|00004970| 69 6e 67 20 75 73 69 6e | 67 20 73 70 74 61 6c 6c |ing usin|g sptall|
|00004980| 6f 63 20 2a 2f 0a 58 20 | 20 20 20 69 6e 74 09 09 |oc */.X | int..|
|00004990| 20 20 20 20 74 63 61 70 | 73 69 7a 65 3b 09 20 20 | tcap|size;. |
|000049a0| 20 20 2f 2a 20 6d 61 78 | 20 6c 65 6e 67 74 68 20 | /* max| length |
|000049b0| 6f 66 20 61 6c 6c 20 61 | 73 63 69 69 20 73 74 72 |of all a|scii str|
|000049c0| 69 6e 67 73 09 2a 2f 0a | 58 20 20 20 20 69 6e 74 |ings.*/.|X int|
|000049d0| 09 09 20 20 20 20 6c 65 | 64 62 75 66 73 5f 75 73 |.. le|dbufs_us|
|000049e0| 65 64 3b 20 20 20 2f 2a | 20 6e 75 6d 62 65 72 20 |ed; /*| number |
|000049f0| 6f 66 20 6c 65 64 5f 62 | 75 66 27 73 20 69 6e 20 |of led_b|uf's in |
|00004a00| 75 73 65 09 2a 2f 0a 58 | 20 20 20 20 69 6e 74 09 |use.*/.X| int.|
|00004a10| 09 20 20 20 20 74 74 79 | 62 75 66 73 5f 75 73 65 |. tty|bufs_use|
|00004a20| 64 3b 20 20 20 2f 2a 20 | 6e 75 6d 62 65 72 20 6f |d; /* |number o|
|00004a30| 66 20 74 74 79 5f 62 75 | 66 27 73 20 69 6e 20 75 |f tty_bu|f's in u|
|00004a40| 73 65 09 2a 2f 0a 58 20 | 20 20 20 69 6e 74 09 09 |se.*/.X | int..|
|00004a50| 20 20 20 20 6c 69 6e 65 | 3b 09 20 20 20 20 2f 2a | line|;. /*|
|00004a60| 20 63 6c 65 64 27 73 20 | 6c 69 6e 65 20 64 69 73 | cled's |line dis|
|00004a70| 63 69 70 6c 69 6e 65 20 | 6e 75 6d 62 65 72 09 2a |cipline |number.*|
|00004a80| 2f 0a 58 20 20 20 20 63 | 68 61 72 09 20 20 20 20 |/.X c|har. |
|00004a90| 76 65 72 73 5b 34 5d 3b | 09 20 20 20 20 2f 2a 20 |vers[4];|. /* |
|00004aa0| 76 65 72 73 69 6f 6e 20 | 23 09 09 09 2a 2f 0a 58 |version |#...*/.X|
|00004ab0| 7d 3b 0a 58 0a 58 2f 2a | 0a 58 20 20 20 20 50 61 |};.X.X/*|.X Pa|
|00004ac0| 73 73 20 74 68 65 20 61 | 64 64 72 65 73 73 20 6f |ss the a|ddress o|
|00004ad0| 66 20 74 68 69 73 20 73 | 74 72 75 63 74 20 74 6f |f this s|truct to|
|00004ae0| 20 4c 44 47 45 54 42 2f | 4c 44 53 45 54 42 0a 58 | LDGETB/|LDSETB.X|
|00004af0| 2a 2f 0a 58 0a 58 73 74 | 72 75 63 74 20 63 6c 65 |*/.X.Xst|ruct cle|
|00004b00| 5f 62 75 66 0a 58 7b 0a | 58 20 20 20 20 69 6e 74 |_buf.X{.|X int|
|00004b10| 09 09 20 20 20 20 6c 62 | 73 69 7a 65 3b 0a 58 20 |.. lb|size;.X |
|00004b20| 20 20 20 69 6e 74 09 09 | 20 20 20 20 74 62 73 69 | int..| tbsi|
|00004b30| 7a 65 3b 0a 58 20 20 20 | 20 73 74 72 75 63 74 20 |ze;.X | struct |
|00004b40| 6c 65 64 5f 62 75 66 20 | 20 2a 6c 62 62 61 73 65 |led_buf | *lbbase|
|00004b50| 3b 0a 58 20 20 20 20 73 | 74 72 75 63 74 20 6c 65 |;.X s|truct le|
|00004b60| 64 5f 62 75 66 20 20 2a | 6c 62 66 72 65 65 3b 0a |d_buf *|lbfree;.|
|00004b70| 58 20 20 20 20 73 74 72 | 75 63 74 20 74 74 79 5f |X str|uct tty_|
|00004b80| 62 75 66 20 20 2a 74 62 | 62 61 73 65 3b 0a 58 20 |buf *tb|base;.X |
|00004b90| 20 20 20 73 74 72 75 63 | 74 20 74 74 79 5f 62 75 | struc|t tty_bu|
|00004ba0| 66 20 20 2a 74 62 75 73 | 65 64 3b 0a 58 20 20 20 |f *tbus|ed;.X |
|00004bb0| 20 73 74 72 75 63 74 20 | 74 74 79 5f 62 75 66 20 | struct |tty_buf |
|00004bc0| 20 2a 74 62 66 72 65 65 | 3b 0a 58 20 20 20 20 73 | *tbfree|;.X s|
|00004bd0| 74 72 75 63 74 20 70 72 | 6f 63 09 20 20 20 20 2a |truct pr|oc. *|
|00004be0| 70 72 6f 63 62 61 73 65 | 3b 0a 58 7d 3b 0a 58 0a |procbase|;.X};.X.|
|00004bf0| 58 2f 2a 0a 58 20 20 20 | 20 50 61 73 73 20 74 68 |X/*.X | Pass th|
|00004c00| 69 73 20 73 74 72 75 63 | 74 20 66 6f 72 20 4c 44 |is struc|t for LD|
|00004c10| 47 45 54 46 2f 4c 44 53 | 45 54 46 2e 0a 58 0a 58 |GETF/LDS|ETF..X.X|
|00004c20| 20 20 20 20 54 68 65 20 | 66 6f 6c 6c 6f 77 69 6e | The |followin|
|00004c30| 67 20 73 74 72 75 63 74 | 75 72 65 20 69 73 20 70 |g struct|ure is p|
|00004c40| 61 73 73 65 64 20 74 6f | 20 74 68 65 20 69 6f 63 |assed to| the ioc|
|00004c50| 74 6c 20 72 6f 75 74 69 | 6e 65 20 74 6f 0a 58 20 |tl routi|ne to.X |
|00004c60| 20 20 20 2f 64 65 76 2f | 63 6c 65 64 20 74 6f 20 | /dev/|cled to |
|00004c70| 61 73 73 69 67 6e 20 74 | 68 65 20 6b 65 79 20 62 |assign t|he key b|
|00004c80| 69 6e 64 69 6e 67 73 20 | 61 6e 64 20 74 68 65 20 |indings |and the |
|00004c90| 54 43 41 50 20 73 65 71 | 75 65 6e 63 65 73 0a 58 |TCAP seq|uences.X|
|00004ca0| 20 20 20 20 28 61 6e 64 | 20 6f 74 68 65 72 20 73 | (and| other s|
|00004cb0| 74 72 69 6e 67 73 29 20 | 64 65 73 69 72 65 64 20 |trings) |desired |
|00004cc0| 66 6f 72 20 76 61 72 69 | 6f 75 73 20 66 75 6e 63 |for vari|ous func|
|00004cd0| 74 69 6f 6e 73 2e 0a 58 | 0a 58 20 20 20 20 49 66 |tions..X|.X If|
|00004ce0| 20 74 68 65 20 69 6f 63 | 74 6c 20 63 6f 6d 70 6c | the ioc|tl compl|
|00004cf0| 65 74 65 73 20 77 69 74 | 68 20 61 6e 20 65 72 72 |etes wit|h an err|
|00004d00| 6f 72 2c 20 74 68 65 6e | 20 74 68 65 20 6c 65 6e |or, then| the len|
|00004d10| 20 66 69 65 6c 64 73 20 | 6f 66 0a 58 20 20 20 20 | fields |of.X |
|00004d20| 74 68 65 20 73 74 72 75 | 63 74 20 77 69 6c 6c 20 |the stru|ct will |
|00004d30| 68 61 76 65 20 62 65 65 | 6e 20 63 68 61 6e 67 65 |have bee|n change|
|00004d40| 64 20 74 6f 20 61 6e 20 | 69 6e 64 65 78 20 69 6e |d to an |index in|
|00004d50| 74 6f 20 74 68 65 0a 58 | 20 20 20 20 72 65 73 70 |to the.X| resp|
|00004d60| 65 63 74 69 76 65 20 62 | 75 66 66 65 72 20 61 74 |ective b|uffer at|
|00004d70| 20 77 68 69 63 68 20 74 | 68 65 20 65 72 72 6f 72 | which t|he error|
|00004d80| 20 6f 63 63 75 72 65 64 | 20 28 74 68 65 20 64 72 | occured| (the dr|
|00004d90| 69 76 65 72 20 73 65 74 | 73 0a 58 20 20 20 20 74 |iver set|s.X t|
|00004da0| 68 65 20 76 61 6c 75 65 | 29 2e 0a 58 0a 58 20 20 |he value|)..X.X |
|00004db0| 20 20 54 68 65 20 6b 65 | 79 20 62 75 66 66 65 72 | The ke|y buffer|
|00004dc0| 20 69 6d 6d 65 64 69 61 | 74 65 6c 79 20 66 6f 6c | immedia|tely fol|
|00004dd0| 6c 6f 77 73 20 74 68 65 | 20 73 65 74 5f 6b 65 79 |lows the| set_key|
|00004de0| 20 73 74 72 75 63 74 20 | 61 6e 64 20 74 68 65 0a | struct |and the.|
|00004df0| 58 20 20 20 20 54 43 41 | 50 20 62 75 66 66 65 72 |X TCA|P buffer|
|00004e00| 20 69 6d 6d 65 64 69 61 | 74 65 6c 79 20 66 6f 6c | immedia|tely fol|
|00004e10| 6c 6f 77 73 20 74 68 65 | 20 6b 65 79 20 62 75 66 |lows the| key buf|
|00004e20| 66 65 72 2e 0a 58 0a 58 | 20 20 20 20 54 68 65 20 |fer..X.X| The |
|00004e30| 6b 65 79 20 62 75 66 66 | 65 72 20 63 6f 6e 74 61 |key buff|er conta|
|00004e40| 69 6e 73 20 70 61 69 72 | 73 20 6f 66 20 63 68 61 |ins pair|s of cha|
|00004e50| 72 73 3b 20 74 68 65 20 | 66 69 72 73 74 20 69 73 |rs; the |first is|
|00004e60| 20 74 68 65 20 6b 65 79 | 0a 58 20 20 20 20 6e 75 | the key|.X nu|
|00004e70| 6d 62 65 72 20 61 6e 64 | 20 74 68 65 20 73 65 63 |mber and| the sec|
|00004e80| 6f 6e 64 20 69 73 20 74 | 68 65 20 66 75 6e 63 74 |ond is t|he funct|
|00004e90| 69 6f 6e 20 6e 75 6d 62 | 65 72 2e 20 20 54 68 65 |ion numb|er. The|
|00004ea0| 20 6b 64 62 75 66 5f 6c | 65 6e 0a 58 20 20 20 20 | kdbuf_l|en.X |
|00004eb0| 65 6e 74 72 79 20 69 6e | 20 74 68 65 20 73 65 74 |entry in| the set|
|00004ec0| 5f 6b 65 79 20 73 74 72 | 75 63 74 20 63 6f 6e 74 |_key str|uct cont|
|00004ed0| 61 69 6e 73 20 74 68 65 | 20 74 6f 74 61 6c 20 6e |ains the| total n|
|00004ee0| 75 6d 62 65 72 20 6f 66 | 20 74 68 65 73 65 0a 58 |umber of| these.X|
|00004ef0| 20 20 20 20 70 61 69 72 | 73 20 6f 66 20 63 68 61 | pair|s of cha|
|00004f00| 72 73 2e 20 20 41 6e 79 | 20 6f 66 20 74 68 65 20 |rs. Any| of the |
|00004f10| 63 6f 6e 74 72 6f 6c 20 | 6b 65 79 73 20 61 6e 64 |control |keys and|
|00004f20| 2f 6f 72 20 6b 65 79 70 | 61 64 20 6b 65 79 73 20 |/or keyp|ad keys |
|00004f30| 63 61 6e 0a 58 20 20 20 | 20 62 65 20 73 65 74 20 |can.X | be set |
|00004f40| 74 6f 20 61 6e 79 20 66 | 75 6e 63 74 69 6f 6e 20 |to any f|unction |
|00004f50| 61 74 20 61 6e 79 20 74 | 69 6d 65 2e 20 20 4e 65 |at any t|ime. Ne|
|00004f60| 77 20 64 65 66 69 6e 69 | 74 69 6f 6e 73 20 72 65 |w defini|tions re|
|00004f70| 70 6c 61 63 65 0a 58 20 | 20 20 20 70 72 65 76 69 |place.X | previ|
|00004f80| 6f 75 73 20 64 65 66 69 | 6e 69 74 69 6f 6e 73 2e |ous defi|nitions.|
|00004f90| 20 20 4b 65 79 73 20 6e | 6f 74 20 65 78 70 6c 69 | Keys n|ot expli|
|00004fa0| 63 69 74 6c 79 20 64 65 | 66 69 6e 65 64 20 69 6e |citly de|fined in|
|00004fb0| 20 74 68 65 0a 58 20 20 | 20 20 62 75 66 66 65 72 | the.X | buffer|
|00004fc0| 20 61 72 65 20 6c 65 66 | 74 20 64 65 66 69 6e 65 | are lef|t define|
|00004fd0| 64 20 74 6f 20 77 68 61 | 74 65 76 65 72 20 74 68 |d to wha|tever th|
|00004fe0| 65 79 20 77 65 72 65 2e | 0a 58 0a 58 20 20 20 20 |ey were.|.X.X |
|00004ff0| 54 68 65 20 54 43 41 50 | 20 62 75 66 66 65 72 20 |The TCAP| buffer |
|00005000| 63 6f 6e 73 69 73 74 73 | 20 6f 66 20 61 20 73 74 |consists| of a st|
|00005010| 72 65 61 6d 20 6f 66 20 | 6e 75 6c 6c 20 74 65 72 |ream of |null ter|
|00005020| 6d 69 6e 61 74 65 64 20 | 73 74 72 69 6e 67 73 0a |minated |strings.|
|00005030| 58 20 20 20 20 70 72 65 | 63 65 65 64 65 64 20 62 |X pre|ceeded b|
|00005040| 79 20 74 68 65 20 6e 75 | 6d 62 65 72 20 6f 66 20 |y the nu|mber of |
|00005050| 74 68 65 20 73 65 71 75 | 65 6e 63 65 20 74 6f 20 |the sequ|ence to |
|00005060| 77 68 69 63 68 20 74 68 | 65 20 73 74 72 69 6e 67 |which th|e string|
|00005070| 0a 58 20 20 20 20 62 65 | 6c 6f 6e 67 73 2e 20 20 |.X be|longs. |
|00005080| 49 66 20 61 6e 79 20 54 | 43 41 50 20 73 65 71 75 |If any T|CAP sequ|
|00005090| 65 6e 63 65 20 69 73 20 | 64 65 66 69 6e 65 64 2c |ence is |defined,|
|000050a0| 20 74 68 65 6e 20 41 4c | 4c 20 74 68 65 0a 58 20 | then AL|L the.X |
|000050b0| 20 20 20 73 65 71 75 65 | 6e 63 65 73 20 61 72 65 | seque|nces are|
|000050c0| 20 66 69 72 73 74 20 72 | 65 73 65 74 20 74 6f 20 | first r|eset to |
|000050d0| 74 68 65 69 72 20 64 65 | 66 61 75 6c 74 73 20 61 |their de|faults a|
|000050e0| 6e 64 20 74 68 65 6e 20 | 72 65 70 6c 61 63 65 64 |nd then |replaced|
|000050f0| 0a 58 20 20 20 20 77 69 | 74 68 20 74 68 65 20 6e |.X wi|th the n|
|00005100| 65 77 20 64 65 66 69 6e | 69 74 69 6f 6e 73 2e 20 |ew defin|itions. |
|00005110| 20 54 68 61 74 20 69 73 | 2c 20 79 6f 75 20 63 61 | That is|, you ca|
|00005120| 6e 20 63 68 61 6e 67 65 | 20 6f 6e 65 20 6f 72 20 |n change| one or |
|00005130| 61 6c 6c 2c 0a 58 20 20 | 20 20 62 75 74 20 75 6e |all,.X | but un|
|00005140| 6c 69 6b 65 20 74 68 65 | 20 6b 65 79 20 64 65 66 |like the| key def|
|00005150| 69 6e 69 74 69 6f 6e 73 | 2c 20 79 6f 75 20 63 61 |initions|, you ca|
|00005160| 6e 6e 6f 74 20 63 68 61 | 6e 67 65 20 6a 75 73 74 |nnot cha|nge just|
|00005170| 20 6f 6e 65 0a 58 20 20 | 20 20 77 69 74 68 6f 75 | one.X | withou|
|00005180| 74 20 61 66 66 65 63 74 | 69 6e 67 20 61 6c 6c 20 |t affect|ing all |
|00005190| 74 68 65 20 6f 74 68 65 | 72 73 2e 0a 58 2a 2f 0a |the othe|rs..X*/.|
|000051a0| 58 0a 58 73 74 72 75 63 | 74 20 73 65 74 5f 6b 65 |X.Xstruc|t set_ke|
|000051b0| 79 0a 58 7b 0a 58 20 20 | 20 20 69 6e 74 20 20 20 |y.X{.X | int |
|000051c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000051d0| 20 20 6d 6f 64 65 73 3b | 09 20 20 20 20 2f 2a 20 | modes;|. /* |
|000051e0| 64 65 66 61 75 6c 74 20 | 6d 6f 64 65 20 62 69 74 |default |mode bit|
|000051f0| 73 09 20 20 20 20 2a 2f | 0a 58 20 20 20 20 69 6e |s. */|.X in|
|00005200| 74 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |t | |
|00005210| 20 20 20 20 20 20 6b 64 | 62 75 66 5f 6c 65 6e 3b | kd|buf_len;|
|00005220| 09 20 20 20 20 2f 2a 20 | 6b 65 79 20 62 75 66 66 |. /* |key buff|
|00005230| 65 72 20 6c 65 6e 67 74 | 68 20 28 69 6e 20 69 74 |er lengt|h (in it|
|00005240| 65 6d 73 29 20 2a 2f 0a | 58 20 20 20 20 69 6e 74 |ems) */.|X int|
|00005250| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005260| 20 20 20 20 20 74 63 61 | 70 62 75 66 5f 6c 65 6e | tca|pbuf_len|
|00005270| 3b 20 20 20 20 2f 2a 20 | 6c 65 6e 67 74 68 20 6f |; /* |length o|
|00005280| 66 20 65 73 63 61 70 65 | 73 20 28 69 6e 20 63 68 |f escape|s (in ch|
|00005290| 61 72 73 29 20 2a 2f 0a | 58 7d 3b 0a 58 0a 58 2f |ars) */.|X};.X.X/|
|000052a0| 2a 0a 58 20 20 20 20 57 | 65 20 69 6d 70 6c 65 6d |*.X W|e implem|
|000052b0| 65 6e 74 20 61 20 76 65 | 72 79 20 63 6f 6e 74 72 |ent a ve|ry contr|
|000052c0| 69 76 65 64 20 73 65 74 | 20 6f 66 20 6b 65 79 20 |ived set| of key |
|000052d0| 62 69 6e 64 69 6e 67 73 | 3b 20 77 65 20 68 61 76 |bindings|; we hav|
|000052e0| 65 0a 58 20 20 20 20 74 | 68 65 20 33 32 20 63 6f |e.X t|he 32 co|
|000052f0| 6e 74 72 6f 6c 20 63 68 | 61 72 61 63 74 65 72 73 |ntrol ch|aracters|
|00005300| 2c 20 74 68 65 6e 20 39 | 36 20 6d 65 74 61 20 63 |, then 9|6 meta c|
|00005310| 68 61 72 61 63 74 65 72 | 73 2c 20 74 68 65 6e 0a |haracter|s, then.|
|00005320| 58 20 20 20 20 44 45 4c | 2e 20 57 65 20 64 6f 6e |X DEL|. We don|
|00005330| 27 74 20 70 72 6f 76 69 | 64 65 20 66 6f 72 20 62 |'t provi|de for b|
|00005340| 69 6e 64 69 6e 74 20 74 | 6f 20 78 20 6f 72 20 4d |indint t|o x or M|
|00005350| 2d 43 2d 78 2c 20 6f 6e | 6c 79 0a 58 20 20 20 20 |-C-x, on|ly.X |
|00005360| 65 69 74 68 65 72 20 43 | 2d 78 20 6f 72 20 4d 2d |either C|-x or M-|
|00005370| 78 2e 0a 58 0a 58 20 20 | 20 20 54 6f 20 62 69 6e |x..X.X | To bin|
|00005380| 64 20 74 6f 20 4d 2d 78 | 2c 20 75 73 65 20 43 4c |d to M-x|, use CL|
|00005390| 45 4b 45 59 5f 45 53 43 | 28 78 29 2c 20 74 6f 20 |EKEY_ESC|(x), to |
|000053a0| 62 69 6e 64 20 74 6f 20 | 43 2d 78 2c 20 75 73 65 |bind to |C-x, use|
|000053b0| 20 43 4c 45 4b 45 59 5f | 43 54 4c 28 78 29 2e 0a | CLEKEY_|CTL(x)..|
|000053c0| 58 2a 2f 0a 58 0a 58 23 | 64 65 66 69 6e 65 20 43 |X*/.X.X#|define C|
|000053d0| 4c 45 4b 45 59 5f 43 48 | 41 52 28 63 29 09 28 28 |LEKEY_CH|AR(c).((|
|000053e0| 63 29 20 3e 3d 20 27 20 | 27 20 26 26 20 28 63 29 |c) >= ' |' && (c)|
|000053f0| 20 3c 3d 20 27 7e 27 29 | 0a 58 0a 58 23 64 65 66 | <= '~')|.X.X#def|
|00005400| 69 6e 65 20 43 4c 45 4b | 45 59 5f 43 4d 44 28 63 |ine CLEK|EY_CMD(c|
|00005410| 29 09 28 28 63 29 26 30 | 78 37 46 29 0a 58 23 64 |).((c)&0|x7F).X#d|
|00005420| 65 66 69 6e 65 20 43 4c | 45 4b 45 59 5f 45 53 43 |efine CL|EKEY_ESC|
|00005430| 28 63 29 09 28 28 63 29 | 26 30 78 37 46 29 0a 58 |(c).((c)|&0x7F).X|
|00005440| 23 64 65 66 69 6e 65 20 | 43 4c 45 4b 45 59 5f 43 |#define |CLEKEY_C|
|00005450| 54 4c 28 63 29 09 28 28 | 63 29 26 30 78 31 46 29 |TL(c).((|c)&0x1F)|
|00005460| 0a 58 23 64 65 66 69 6e | 65 20 43 4c 45 4b 45 59 |.X#defin|e CLEKEY|
|00005470| 5f 44 45 4c 09 30 78 37 | 46 0a 58 0a 58 23 64 65 |_DEL.0x7|F.X.X#de|
|00005480| 66 69 6e 65 20 43 4c 45 | 4b 45 59 5f 4d 41 58 09 |fine CLE|KEY_MAX.|
|00005490| 30 78 38 30 0a 58 0a 58 | 2f 2a 0a 58 20 20 20 20 |0x80.X.X|/*.X |
|000054a0| 64 65 66 61 75 6c 74 20 | 6d 6f 64 65 73 0a 58 2a |default |modes.X*|
|000054b0| 2f 0a 58 0a 58 23 64 65 | 66 69 6e 65 20 43 4c 45 |/.X.X#de|fine CLE|
|000054c0| 4d 4f 44 45 5f 49 4e 53 | 45 52 54 09 30 78 30 31 |MODE_INS|ERT.0x01|
|000054d0| 09 2f 2a 20 69 6e 73 65 | 72 74 20 6d 6f 64 65 20 |./* inse|rt mode |
|000054e0| 2a 2f 0a 58 23 64 65 66 | 69 6e 65 20 43 4c 45 4d |*/.X#def|ine CLEM|
|000054f0| 4f 44 45 5f 4f 56 45 52 | 20 20 20 20 30 78 30 32 |ODE_OVER| 0x02|
|00005500| 09 2f 2a 20 6f 76 65 72 | 73 74 72 69 6b 65 20 6d |./* over|strike m|
|00005510| 6f 64 65 20 2a 2f 0a 58 | 0a 58 2f 2a 0a 58 20 20 |ode */.X|.X/*.X |
|00005520| 20 20 45 64 69 74 6f 72 | 20 66 75 6e 63 74 69 6f | Editor| functio|
|00005530| 6e 73 3a 20 28 64 6f 6e | 27 74 20 63 68 61 6e 67 |ns: (don|'t chang|
|00005540| 65 20 74 68 65 20 6f 72 | 64 65 72 20 6f 66 20 74 |e the or|der of t|
|00005550| 68 65 73 65 29 0a 58 2a | 2f 0a 58 0a 58 23 64 65 |hese).X*|/.X.X#de|
|00005560| 66 69 6e 65 20 43 4c 45 | 46 55 4e 5f 43 48 41 52 |fine CLE|FUN_CHAR|
|00005570| 09 30 78 30 30 09 2f 2a | 20 69 6e 73 65 72 74 20 |.0x00./*| insert |
|00005580| 63 68 61 72 61 63 74 65 | 72 20 69 6e 74 6f 20 62 |characte|r into b|
|00005590| 75 66 66 65 72 09 09 2a | 2f 0a 58 23 64 65 66 69 |uffer..*|/.X#defi|
|000055a0| 6e 65 20 43 4c 45 46 55 | 4e 5f 49 4e 53 45 52 54 |ne CLEFU|N_INSERT|
|000055b0| 09 30 78 30 31 09 2f 2a | 20 74 6f 67 67 6c 65 20 |.0x01./*| toggle |
|000055c0| 69 6e 73 65 72 74 2f 6f | 76 65 72 73 74 72 69 6b |insert/o|verstrik|
|000055d0| 65 20 6d 6f 64 65 09 2a | 2f 0a 58 23 64 65 66 69 |e mode.*|/.X#defi|
|000055e0| 6e 65 20 43 4c 45 46 55 | 4e 5f 47 4f 54 4f 42 4f |ne CLEFU|N_GOTOBO|
|000055f0| 4c 09 30 78 30 32 09 2f | 2a 20 67 6f 74 6f 20 62 |L.0x02./|* goto b|
|00005600| 65 67 69 6e 6e 69 6e 67 | 20 6f 66 20 6c 69 6e 65 |eginning| of line|
|00005610| 09 09 2a 2f 0a 58 23 64 | 65 66 69 6e 65 20 43 4c |..*/.X#d|efine CL|
|00005620| 45 46 55 4e 5f 47 4f 54 | 4f 45 4f 4c 09 30 78 30 |EFUN_GOT|OEOL.0x0|
|00005630| 33 09 2f 2a 20 67 6f 74 | 6f 20 65 6e 64 20 6f 66 |3./* got|o end of|
|00005640| 20 6c 69 6e 65 09 09 09 | 2a 2f 0a 58 23 64 65 66 | line...|*/.X#def|
|00005650| 69 6e 65 20 43 4c 45 46 | 55 4e 5f 44 45 4c 57 4c |ine CLEF|UN_DELWL|
|00005660| 46 54 09 30 78 30 34 09 | 2f 2a 20 64 65 6c 65 74 |FT.0x04.|/* delet|
|00005670| 65 20 77 6f 72 64 20 74 | 6f 20 6c 65 66 74 20 6f |e word t|o left o|
|00005680| 66 20 63 75 72 73 6f 72 | 09 2a 2f 0a 58 23 64 65 |f cursor|.*/.X#de|
|00005690| 66 69 6e 65 20 43 4c 45 | 46 55 4e 5f 44 45 4c 57 |fine CLE|FUN_DELW|
|000056a0| 52 49 54 09 30 78 30 35 | 09 2f 2a 20 64 65 6c 65 |RIT.0x05|./* dele|
|000056b0| 74 65 20 77 6f 72 64 20 | 74 6f 20 72 69 67 68 74 |te word |to right|
|000056c0| 20 6f 66 20 63 75 72 73 | 6f 72 09 2a 2f 0a 58 23 | of curs|or.*/.X#|
|000056d0| 64 65 66 69 6e 65 20 43 | 4c 45 46 55 4e 5f 44 45 |define C|LEFUN_DE|
|000056e0| 4c 42 4f 4c 09 30 78 30 | 36 09 2f 2a 20 64 65 6c |LBOL.0x0|6./* del|
|000056f0| 65 74 65 20 66 72 6f 6d | 20 63 75 72 73 6f 72 20 |ete from| cursor |
|00005700| 74 6f 20 62 65 67 69 6e | 6e 69 6e 67 20 6f 66 20 |to begin|ning of |
|00005710| 6c 69 6e 65 20 2a 2f 0a | 58 23 64 65 66 69 6e 65 |line */.|X#define|
|00005720| 20 43 4c 45 46 55 4e 5f | 44 45 4c 45 4f 4c 09 30 | CLEFUN_|DELEOL.0|
|00005730| 78 30 37 09 2f 2a 20 64 | 65 6c 65 74 65 20 66 72 |x07./* d|elete fr|
|00005740| 6f 6d 20 63 75 72 73 6f | 72 20 74 6f 20 65 6e 64 |om curso|r to end|
|00005750| 20 6f 66 20 6c 69 6e 65 | 09 2a 2f 0a 58 23 64 65 | of line|.*/.X#de|
|00005760| 66 69 6e 65 20 43 4c 45 | 46 55 4e 5f 43 55 52 53 |fine CLE|FUN_CURS|
|00005770| 4c 09 30 78 30 38 09 2f | 2a 20 6d 6f 76 65 20 63 |L.0x08./|* move c|
|00005780| 75 72 73 6f 72 20 6c 65 | 66 74 20 31 20 70 6f 73 |ursor le|ft 1 pos|
|00005790| 69 74 69 6f 6e 09 09 2a | 2f 0a 58 23 64 65 66 69 |ition..*|/.X#defi|
|000057a0| 6e 65 20 43 4c 45 46 55 | 4e 5f 43 55 52 53 52 09 |ne CLEFU|N_CURSR.|
|000057b0| 30 78 30 39 09 2f 2a 20 | 6d 6f 76 65 20 63 75 72 |0x09./* |move cur|
|000057c0| 73 6f 72 20 72 69 67 68 | 74 20 31 20 70 6f 73 69 |sor righ|t 1 posi|
|000057d0| 74 69 6f 6e 09 09 2a 2f | 0a 58 23 64 65 66 69 6e |tion..*/|.X#defin|
|000057e0| 65 20 43 4c 45 46 55 4e | 5f 44 45 4c 43 4c 46 54 |e CLEFUN|_DELCLFT|
|000057f0| 09 30 78 30 41 09 2f 2a | 20 64 65 6c 65 74 65 20 |.0x0A./*| delete |
|00005800| 63 68 61 72 20 6c 65 66 | 74 20 6f 66 20 63 75 72 |char lef|t of cur|
|00005810| 73 6f 72 09 09 2a 2f 0a | 58 23 64 65 66 69 6e 65 |sor..*/.|X#define|
|00005820| 20 43 4c 45 46 55 4e 5f | 44 45 4c 43 52 49 54 09 | CLEFUN_|DELCRIT.|
|00005830| 30 78 30 42 09 2f 2a 20 | 64 65 6c 65 74 65 20 63 |0x0B./* |delete c|
|00005840| 68 61 72 20 75 6e 64 65 | 72 20 63 75 72 73 6f 72 |har unde|r cursor|
|00005850| 09 09 2a 2f 0a 58 23 64 | 65 66 69 6e 65 20 43 4c |..*/.X#d|efine CL|
|00005860| 45 46 55 4e 5f 52 45 46 | 52 45 53 48 09 30 78 30 |EFUN_REF|RESH.0x0|
|00005870| 43 09 2f 2a 20 72 65 70 | 72 69 6e 74 20 74 68 65 |C./* rep|rint the|
|00005880| 20 63 75 72 72 65 6e 74 | 20 6c 69 6e 65 09 09 2a | current| line..*|
|00005890| 2f 0a 58 23 64 65 66 69 | 6e 65 20 43 4c 45 46 55 |/.X#defi|ne CLEFU|
|000058a0| 4e 5f 50 52 45 56 49 4f | 55 53 09 30 78 30 44 09 |N_PREVIO|US.0x0D.|
|000058b0| 2f 2a 20 72 65 63 61 6c | 6c 20 70 72 65 76 69 6f |/* recal|l previo|
|000058c0| 75 73 20 63 6f 6d 6d 61 | 6e 64 09 09 2a 2f 0a 58 |us comma|nd..*/.X|
|000058d0| 23 64 65 66 69 6e 65 20 | 43 4c 45 46 55 4e 5f 4e |#define |CLEFUN_N|
|000058e0| 45 58 54 09 30 78 30 45 | 09 2f 2a 20 72 65 63 61 |EXT.0x0E|./* reca|
|000058f0| 6c 6c 20 6e 65 78 74 20 | 63 6f 6d 6d 61 6e 64 09 |ll next |command.|
|00005900| 09 09 2a 2f 0a 58 23 64 | 65 66 69 6e 65 20 43 4c |..*/.X#d|efine CL|
|00005910| 45 46 55 4e 5f 46 49 4e | 44 09 30 78 30 46 09 2f |EFUN_FIN|D.0x0F./|
|00005920| 2a 20 66 69 6e 64 20 6d | 61 74 63 68 69 6e 67 20 |* find m|atching |
|00005930| 73 74 72 69 6e 67 09 09 | 09 2a 2f 0a 58 23 64 65 |string..|.*/.X#de|
|00005940| 66 69 6e 65 20 43 4c 45 | 46 55 4e 5f 4e 45 57 4c |fine CLE|FUN_NEWL|
|00005950| 49 4e 45 09 30 78 31 30 | 09 2f 2a 20 65 6e 64 20 |INE.0x10|./* end |
|00005960| 6f 66 20 6c 69 6e 65 09 | 09 09 09 2a 2f 0a 58 23 |of line.|...*/.X#|
|00005970| 64 65 66 69 6e 65 20 43 | 4c 45 46 55 4e 5f 45 53 |define C|LEFUN_ES|
|00005980| 43 41 50 45 09 30 78 31 | 31 09 2f 2a 20 22 65 73 |CAPE.0x1|1./* "es|
|00005990| 63 61 70 65 22 20 74 68 | 65 20 6e 65 78 74 20 63 |cape" th|e next c|
|000059a0| 68 61 72 61 63 74 65 72 | 09 09 2a 2f 0a 58 23 64 |haracter|..*/.X#d|
|000059b0| 65 66 69 6e 65 20 43 4c | 45 46 55 4e 5f 4e 4f 50 |efine CL|EFUN_NOP|
|000059c0| 09 30 78 31 32 09 2f 2a | 20 6e 6f 70 09 09 09 09 |.0x12./*| nop....|
|000059d0| 09 2a 2f 0a 58 23 64 65 | 66 69 6e 65 20 43 4c 45 |.*/.X#de|fine CLE|
|000059e0| 46 55 4e 5f 42 45 4c 4c | 09 30 78 31 33 09 2f 2a |FUN_BELL|.0x13./*|
|000059f0| 20 72 69 6e 67 20 62 65 | 6c 6c 09 09 09 09 2a 2f | ring be|ll....*/|
|00005a00| 0a 58 23 64 65 66 69 6e | 65 20 43 4c 45 46 55 4e |.X#defin|e CLEFUN|
|00005a10| 5f 53 4b 49 50 57 4c 09 | 30 78 31 34 09 2f 2a 20 |_SKIPWL.|0x14./* |
|00005a20| 73 6b 69 70 20 77 6f 72 | 64 20 6c 65 66 74 09 09 |skip wor|d left..|
|00005a30| 09 2a 2f 0a 58 23 64 65 | 66 69 6e 65 20 43 4c 45 |.*/.X#de|fine CLE|
|00005a40| 46 55 4e 5f 53 4b 49 50 | 57 52 09 30 78 31 35 09 |FUN_SKIP|WR.0x15.|
|00005a50| 2f 2a 20 73 6b 69 70 20 | 77 6f 72 64 20 72 69 67 |/* skip |word rig|
|00005a60| 68 74 09 09 09 2a 2f 0a | 58 23 64 65 66 69 6e 65 |ht...*/.|X#define|
|00005a70| 20 43 4c 45 46 55 4e 5f | 50 55 52 47 45 09 30 78 | CLEFUN_|PURGE.0x|
|00005a80| 31 36 09 2f 2a 20 70 75 | 72 67 65 20 61 6c 6c 20 |16./* pu|rge all |
|00005a90| 74 79 70 65 61 68 65 61 | 64 09 09 09 2a 2f 0a 58 |typeahea|d...*/.X|
|00005aa0| 23 64 65 66 69 6e 65 20 | 43 4c 45 46 55 4e 5f 4d |#define |CLEFUN_M|
|00005ab0| 45 54 41 09 30 78 31 37 | 09 2f 2a 20 61 63 63 65 |ETA.0x17|./* acce|
|00005ac0| 73 73 20 63 68 61 72 73 | 20 77 69 74 68 20 38 74 |ss chars| with 8t|
|00005ad0| 68 20 62 69 74 20 6f 6e | 09 09 2a 2f 0a 58 23 64 |h bit on|..*/.X#d|
|00005ae0| 65 66 69 6e 65 20 43 4c | 45 46 55 4e 5f 41 4e 53 |efine CL|EFUN_ANS|
|00005af0| 49 09 30 78 31 38 09 2f | 2a 20 70 61 72 73 65 20 |I.0x18./|* parse |
|00005b00| 61 6e 73 69 20 63 75 72 | 73 6f 72 20 73 65 71 75 |ansi cur|sor sequ|
|00005b10| 65 6e 63 65 09 09 2a 2f | 0a 58 23 64 65 66 69 6e |ence..*/|.X#defin|
|00005b20| 65 20 43 4c 45 46 55 4e | 5f 4d 41 58 09 30 78 31 |e CLEFUN|_MAX.0x1|
|00005b30| 39 09 2f 2a 20 6e 75 6d | 62 65 72 20 6f 66 20 66 |9./* num|ber of f|
|00005b40| 75 6e 63 74 69 6f 6e 73 | 09 09 09 2a 2f 0a 45 4e |unctions|...*/.EN|
|00005b50| 44 5f 4f 46 5f 46 49 4c | 45 0a 69 66 20 74 65 73 |D_OF_FIL|E.if tes|
|00005b60| 74 20 36 38 39 38 20 2d | 6e 65 20 60 77 63 20 2d |t 6898 -|ne `wc -|
|00005b70| 63 20 3c 27 63 6c 65 64 | 69 6f 2e 68 27 60 3b 20 |c <'cled|io.h'`; |
|00005b80| 74 68 65 6e 0a 20 20 20 | 20 65 63 68 6f 20 73 68 |then. | echo sh|
|00005b90| 61 72 3a 20 5c 22 27 63 | 6c 65 64 69 6f 2e 68 27 |ar: \"'c|ledio.h'|
|00005ba0| 5c 22 20 75 6e 70 61 63 | 6b 65 64 20 77 69 74 68 |\" unpac|ked with|
|00005bb0| 20 77 72 6f 6e 67 20 73 | 69 7a 65 21 0a 66 69 0a | wrong s|ize!.fi.|
|00005bc0| 63 68 6d 6f 64 20 2b 78 | 20 27 63 6c 65 64 69 6f |chmod +x| 'cledio|
|00005bd0| 2e 68 27 0a 23 20 65 6e | 64 20 6f 66 20 27 63 6c |.h'.# en|d of 'cl|
|00005be0| 65 64 69 6f 2e 68 27 0a | 66 69 0a 69 66 20 74 65 |edio.h'.|fi.if te|
|00005bf0| 73 74 20 2d 66 20 27 63 | 6f 6e 66 69 67 2e 68 27 |st -f 'c|onfig.h'|
|00005c00| 20 2d 61 20 22 24 7b 31 | 7d 22 20 21 3d 20 22 2d | -a "${1|}" != "-|
|00005c10| 63 22 20 3b 20 74 68 65 | 6e 20 0a 20 20 65 63 68 |c" ; the|n . ech|
|00005c20| 6f 20 73 68 61 72 3a 20 | 57 69 6c 6c 20 6e 6f 74 |o shar: |Will not|
|00005c30| 20 63 6c 6f 62 62 65 72 | 20 65 78 69 73 74 69 6e | clobber| existin|
|00005c40| 67 20 66 69 6c 65 20 5c | 22 27 63 6f 6e 66 69 67 |g file \|"'config|
|00005c50| 2e 68 27 5c 22 0a 65 6c | 73 65 0a 65 63 68 6f 20 |.h'\".el|se.echo |
|00005c60| 73 68 61 72 3a 20 45 78 | 74 72 61 63 74 69 6e 67 |shar: Ex|tracting|
|00005c70| 20 5c 22 27 63 6f 6e 66 | 69 67 2e 68 27 5c 22 20 | \"'conf|ig.h'\" |
|00005c80| 5c 28 33 30 31 20 63 68 | 61 72 61 63 74 65 72 73 |\(301 ch|aracters|
|00005c90| 5c 29 0a 73 65 64 20 22 | 73 2f 5e 58 2f 2f 22 20 |\).sed "|s/^X//" |
|00005ca0| 3e 27 63 6f 6e 66 69 67 | 2e 68 27 20 3c 3c 27 45 |>'config|.h' <<'E|
|00005cb0| 4e 44 5f 4f 46 5f 46 49 | 4c 45 27 0a 58 2f 2a 20 |ND_OF_FI|LE'.X/* |
|00005cc0| 66 61 6b 65 20 63 6f 6e | 66 69 67 2e 68 20 75 73 |fake con|fig.h us|
|00005cd0| 65 64 20 74 6f 20 74 65 | 73 74 20 63 6f 6d 70 69 |ed to te|st compi|
|00005ce0| 6c 69 6e 67 20 73 70 61 | 63 65 2e 63 20 2a 2f 0a |ling spa|ce.c */.|
|00005cf0| 58 0a 58 23 64 65 66 69 | 6e 65 09 43 4c 45 44 09 |X.X#defi|ne.CLED.|
|00005d00| 09 31 0a 58 23 64 65 66 | 69 6e 65 09 43 4c 45 44 |.1.X#def|ine.CLED|
|00005d10| 5f 43 4e 54 4c 53 09 31 | 0a 58 23 64 65 66 69 6e |_CNTLS.1|.X#defin|
|00005d20| 65 09 43 4c 45 44 5f 55 | 4e 49 54 53 09 36 0a 58 |e.CLED_U|NITS.6.X|
|00005d30| 23 64 65 66 69 6e 65 09 | 43 4c 45 44 5f 43 48 41 |#define.|CLED_CHA|
|00005d40| 4e 09 2d 31 0a 58 23 64 | 65 66 69 6e 65 09 43 4c |N.-1.X#d|efine.CL|
|00005d50| 45 44 5f 54 59 50 45 09 | 30 0a 58 0a 58 23 64 65 |ED_TYPE.|0.X.X#de|
|00005d60| 66 69 6e 65 09 43 4c 45 | 44 5f 30 09 09 36 0a 58 |fine.CLE|D_0..6.X|
|00005d70| 23 64 65 66 69 6e 65 09 | 43 4c 45 44 5f 30 5f 56 |#define.|CLED_0_V|
|00005d80| 45 43 54 09 30 0a 58 23 | 64 65 66 69 6e 65 09 43 |ECT.0.X#|define.C|
|00005d90| 4c 45 44 5f 30 5f 53 49 | 4f 41 09 30 0a 58 23 64 |LED_0_SI|OA.0.X#d|
|00005da0| 65 66 69 6e 65 09 43 4c | 45 44 5f 30 5f 45 49 4f |efine.CL|ED_0_EIO|
|00005db0| 41 09 30 0a 58 23 64 65 | 66 69 6e 65 09 43 4c 45 |A.0.X#de|fine.CLE|
|00005dc0| 44 5f 30 5f 53 43 4d 41 | 09 30 0a 58 23 64 65 66 |D_0_SCMA|.0.X#def|
|00005dd0| 69 6e 65 09 43 4c 45 44 | 5f 30 5f 45 43 4d 41 09 |ine.CLED|_0_ECMA.|
|00005de0| 30 0a 58 0a 58 23 64 65 | 66 69 6e 65 09 4e 43 4c |0.X.X#de|fine.NCL|
|00005df0| 45 50 52 4f 43 53 09 31 | 0a 45 4e 44 5f 4f 46 5f |EPROCS.1|.END_OF_|
|00005e00| 46 49 4c 45 0a 69 66 20 | 74 65 73 74 20 33 30 31 |FILE.if |test 301|
|00005e10| 20 2d 6e 65 20 60 77 63 | 20 2d 63 20 3c 27 63 6f | -ne `wc| -c <'co|
|00005e20| 6e 66 69 67 2e 68 27 60 | 3b 20 74 68 65 6e 0a 20 |nfig.h'`|; then. |
|00005e30| 20 20 20 65 63 68 6f 20 | 73 68 61 72 3a 20 5c 22 | echo |shar: \"|
|00005e40| 27 63 6f 6e 66 69 67 2e | 68 27 5c 22 20 75 6e 70 |'config.|h'\" unp|
|00005e50| 61 63 6b 65 64 20 77 69 | 74 68 20 77 72 6f 6e 67 |acked wi|th wrong|
|00005e60| 20 73 69 7a 65 21 0a 66 | 69 0a 63 68 6d 6f 64 20 | size!.f|i.chmod |
|00005e70| 2b 78 20 27 63 6f 6e 66 | 69 67 2e 68 27 0a 23 20 |+x 'conf|ig.h'.# |
|00005e80| 65 6e 64 20 6f 66 20 27 | 63 6f 6e 66 69 67 2e 68 |end of '|config.h|
|00005e90| 27 0a 66 69 0a 69 66 20 | 74 65 73 74 20 2d 66 20 |'.fi.if |test -f |
|00005ea0| 27 6b 65 72 6e 65 6c 5f | 73 70 61 63 65 2e 63 27 |'kernel_|space.c'|
|00005eb0| 20 2d 61 20 22 24 7b 31 | 7d 22 20 21 3d 20 22 2d | -a "${1|}" != "-|
|00005ec0| 63 22 20 3b 20 74 68 65 | 6e 20 0a 20 20 65 63 68 |c" ; the|n . ech|
|00005ed0| 6f 20 73 68 61 72 3a 20 | 57 69 6c 6c 20 6e 6f 74 |o shar: |Will not|
|00005ee0| 20 63 6c 6f 62 62 65 72 | 20 65 78 69 73 74 69 6e | clobber| existin|
|00005ef0| 67 20 66 69 6c 65 20 5c | 22 27 6b 65 72 6e 65 6c |g file \|"'kernel|
|00005f00| 5f 73 70 61 63 65 2e 63 | 27 5c 22 0a 65 6c 73 65 |_space.c|'\".else|
|00005f10| 0a 65 63 68 6f 20 73 68 | 61 72 3a 20 45 78 74 72 |.echo sh|ar: Extr|
|00005f20| 61 63 74 69 6e 67 20 5c | 22 27 6b 65 72 6e 65 6c |acting \|"'kernel|
|00005f30| 5f 73 70 61 63 65 2e 63 | 27 5c 22 20 5c 28 33 32 |_space.c|'\" \(32|
|00005f40| 34 20 63 68 61 72 61 63 | 74 65 72 73 5c 29 0a 73 |4 charac|ters\).s|
|00005f50| 65 64 20 22 73 2f 5e 58 | 2f 2f 22 20 3e 27 6b 65 |ed "s/^X|//" >'ke|
|00005f60| 72 6e 65 6c 5f 73 70 61 | 63 65 2e 63 27 20 3c 3c |rnel_spa|ce.c' <<|
|00005f70| 27 45 4e 44 5f 4f 46 5f | 46 49 4c 45 27 0a 58 2f |'END_OF_|FILE'.X/|
|00005f80| 2a 0a 58 20 20 20 20 41 | 70 70 65 6e 64 20 74 68 |*.X A|ppend th|
|00005f90| 65 20 66 6f 6c 6c 6f 77 | 69 6e 67 20 6c 69 6e 65 |e follow|ing line|
|00005fa0| 73 20 61 74 20 74 68 65 | 20 61 70 70 72 6f 70 72 |s at the| appropr|
|00005fb0| 69 61 74 65 20 70 6c 61 | 63 65 20 69 6e 0a 58 20 |iate pla|ce in.X |
|00005fc0| 20 20 20 2f 65 74 63 2f | 63 6f 6e 66 2f 70 61 63 | /etc/|conf/pac|
|00005fd0| 6b 2e 64 2f 6b 65 72 6e | 65 6c 2f 73 70 61 63 65 |k.d/kern|el/space|
|00005fe0| 2e 63 0a 58 2a 2f 0a 58 | 0a 58 23 69 66 64 65 66 |.c.X*/.X|.X#ifdef|
|00005ff0| 20 43 4c 45 44 0a 58 2f | 2a 20 09 63 6c 65 64 20 | CLED.X/|* .cled |
|00006000| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 20 2a 2f |--------|----- */|
|00006010| 0a 58 09 09 09 20 63 6c | 65 6f 70 65 6e 2c 0a 58 |.X... cl|eopen,.X|
|00006020| 09 09 09 20 63 6c 65 63 | 6c 6f 73 65 2c 0a 58 09 |... clec|lose,.X.|
|00006030| 09 09 20 63 6c 65 72 65 | 61 64 2c 0a 58 09 09 09 |.. clere|ad,.X...|
|00006040| 20 63 6c 65 77 72 69 74 | 65 2c 0a 58 09 09 09 20 | clewrit|e,.X... |
|00006050| 63 6c 65 69 6f 63 74 6c | 2c 0a 58 09 09 09 20 63 |cleioctl|,.X... c|
|00006060| 6c 65 69 6e 70 75 74 2c | 0a 58 09 09 09 20 63 6c |leinput,|.X... cl|
|00006070| 65 6f 75 74 70 75 74 2c | 0a 58 09 09 09 20 6e 75 |eoutput,|.X... nu|
|00006080| 6c 6c 64 65 76 2c 0a 58 | 23 65 6e 64 69 66 0a 58 |lldev,.X|#endif.X|
|00006090| 7d 3b 0a 58 0a 58 23 69 | 66 64 65 66 20 43 4c 45 |};.X.X#i|fdef CLE|
|000060a0| 44 0a 58 69 6e 74 20 20 | 20 20 20 6c 69 6e 65 63 |D.Xint | linec|
|000060b0| 6e 74 20 3d 20 34 3b 0a | 58 23 65 6c 73 65 0a 58 |nt = 4;.|X#else.X|
|000060c0| 69 6e 74 09 6c 69 6e 65 | 63 6e 74 20 3d 20 33 3b |int.line|cnt = 3;|
|000060d0| 0a 58 23 65 6e 64 69 66 | 0a 45 4e 44 5f 4f 46 5f |.X#endif|.END_OF_|
|000060e0| 46 49 4c 45 0a 69 66 20 | 74 65 73 74 20 33 32 34 |FILE.if |test 324|
|000060f0| 20 2d 6e 65 20 60 77 63 | 20 2d 63 20 3c 27 6b 65 | -ne `wc| -c <'ke|
|00006100| 72 6e 65 6c 5f 73 70 61 | 63 65 2e 63 27 60 3b 20 |rnel_spa|ce.c'`; |
|00006110| 74 68 65 6e 0a 20 20 20 | 20 65 63 68 6f 20 73 68 |then. | echo sh|
|00006120| 61 72 3a 20 5c 22 27 6b | 65 72 6e 65 6c 5f 73 70 |ar: \"'k|ernel_sp|
|00006130| 61 63 65 2e 63 27 5c 22 | 20 75 6e 70 61 63 6b 65 |ace.c'\"| unpacke|
|00006140| 64 20 77 69 74 68 20 77 | 72 6f 6e 67 20 73 69 7a |d with w|rong siz|
|00006150| 65 21 0a 66 69 0a 63 68 | 6d 6f 64 20 2b 78 20 27 |e!.fi.ch|mod +x '|
|00006160| 6b 65 72 6e 65 6c 5f 73 | 70 61 63 65 2e 63 27 0a |kernel_s|pace.c'.|
|00006170| 23 20 65 6e 64 20 6f 66 | 20 27 6b 65 72 6e 65 6c |# end of| 'kernel|
|00006180| 5f 73 70 61 63 65 2e 63 | 27 0a 66 69 0a 69 66 20 |_space.c|'.fi.if |
|00006190| 74 65 73 74 20 2d 66 20 | 27 70 61 74 63 68 6c 65 |test -f |'patchle|
|000061a0| 76 65 6c 2e 68 27 20 2d | 61 20 22 24 7b 31 7d 22 |vel.h' -|a "${1}"|
|000061b0| 20 21 3d 20 22 2d 63 22 | 20 3b 20 74 68 65 6e 20 | != "-c"| ; then |
|000061c0| 0a 20 20 65 63 68 6f 20 | 73 68 61 72 3a 20 57 69 |. echo |shar: Wi|
|000061d0| 6c 6c 20 6e 6f 74 20 63 | 6c 6f 62 62 65 72 20 65 |ll not c|lobber e|
|000061e0| 78 69 73 74 69 6e 67 20 | 66 69 6c 65 20 5c 22 27 |xisting |file \"'|
|000061f0| 70 61 74 63 68 6c 65 76 | 65 6c 2e 68 27 5c 22 0a |patchlev|el.h'\".|
|00006200| 65 6c 73 65 0a 65 63 68 | 6f 20 73 68 61 72 3a 20 |else.ech|o shar: |
|00006210| 45 78 74 72 61 63 74 69 | 6e 67 20 5c 22 27 70 61 |Extracti|ng \"'pa|
|00006220| 74 63 68 6c 65 76 65 6c | 2e 68 27 5c 22 20 5c 28 |tchlevel|.h'\" \(|
|00006230| 34 31 20 63 68 61 72 61 | 63 74 65 72 73 5c 29 0a |41 chara|cters\).|
|00006240| 73 65 64 20 22 73 2f 5e | 58 2f 2f 22 20 3e 27 70 |sed "s/^|X//" >'p|
|00006250| 61 74 63 68 6c 65 76 65 | 6c 2e 68 27 20 3c 3c 27 |atchleve|l.h' <<'|
|00006260| 45 4e 44 5f 4f 46 5f 46 | 49 4c 45 27 0a 58 23 64 |END_OF_F|ILE'.X#d|
|00006270| 65 66 69 6e 65 20 56 45 | 52 53 49 4f 4e 20 22 32 |efine VE|RSION "2|
|00006280| 22 0a 58 23 64 65 66 69 | 6e 65 20 50 41 54 43 48 |".X#defi|ne PATCH|
|00006290| 4c 45 56 45 4c 20 35 0a | 45 4e 44 5f 4f 46 5f 46 |LEVEL 5.|END_OF_F|
|000062a0| 49 4c 45 0a 69 66 20 74 | 65 73 74 20 34 31 20 2d |ILE.if t|est 41 -|
|000062b0| 6e 65 20 60 77 63 20 2d | 63 20 3c 27 70 61 74 63 |ne `wc -|c <'patc|
|000062c0| 68 6c 65 76 65 6c 2e 68 | 27 60 3b 20 74 68 65 6e |hlevel.h|'`; then|
|000062d0| 0a 20 20 20 20 65 63 68 | 6f 20 73 68 61 72 3a 20 |. ech|o shar: |
|000062e0| 5c 22 27 70 61 74 63 68 | 6c 65 76 65 6c 2e 68 27 |\"'patch|level.h'|
|000062f0| 5c 22 20 75 6e 70 61 63 | 6b 65 64 20 77 69 74 68 |\" unpac|ked with|
|00006300| 20 77 72 6f 6e 67 20 73 | 69 7a 65 21 0a 66 69 0a | wrong s|ize!.fi.|
|00006310| 63 68 6d 6f 64 20 2b 78 | 20 27 70 61 74 63 68 6c |chmod +x| 'patchl|
|00006320| 65 76 65 6c 2e 68 27 0a | 23 20 65 6e 64 20 6f 66 |evel.h'.|# end of|
|00006330| 20 27 70 61 74 63 68 6c | 65 76 65 6c 2e 68 27 0a | 'patchl|evel.h'.|
|00006340| 66 69 0a 69 66 20 74 65 | 73 74 20 2d 66 20 27 73 |fi.if te|st -f 's|
|00006350| 63 6c 65 64 2e 63 27 20 | 2d 61 20 22 24 7b 31 7d |cled.c' |-a "${1}|
|00006360| 22 20 21 3d 20 22 2d 63 | 22 20 3b 20 74 68 65 6e |" != "-c|" ; then|
|00006370| 20 0a 20 20 65 63 68 6f | 20 73 68 61 72 3a 20 57 | . echo| shar: W|
|00006380| 69 6c 6c 20 6e 6f 74 20 | 63 6c 6f 62 62 65 72 20 |ill not |clobber |
|00006390| 65 78 69 73 74 69 6e 67 | 20 66 69 6c 65 20 5c 22 |existing| file \"|
|000063a0| 27 73 63 6c 65 64 2e 63 | 27 5c 22 0a 65 6c 73 65 |'scled.c|'\".else|
|000063b0| 0a 65 63 68 6f 20 73 68 | 61 72 3a 20 45 78 74 72 |.echo sh|ar: Extr|
|000063c0| 61 63 74 69 6e 67 20 5c | 22 27 73 63 6c 65 64 2e |acting \|"'scled.|
|000063d0| 63 27 5c 22 20 5c 28 31 | 38 33 34 39 20 63 68 61 |c'\" \(1|8349 cha|
|000063e0| 72 61 63 74 65 72 73 5c | 29 0a 73 65 64 20 22 73 |racters\|).sed "s|
|000063f0| 2f 5e 58 2f 2f 22 20 3e | 27 73 63 6c 65 64 2e 63 |/^X//" >|'scled.c|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.