home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume10 / pccurses14 / part02 < prev    next >
SHell self-extracting ARchive  |  1990-01-19  |  51.6 KB

view JSON data     |     view as text     |     open on a Mac     |     open on a PC

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

You can browse this item here: part02

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



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 4e 65 77 73 67 72 6f 75 | 70 73 3a 20 63 6f 6d 70 |Newsgrou|ps: comp|
|00000010| 2e 73 6f 75 72 63 65 73 | 2e 6d 69 73 63 0a 73 75 |.sources|.misc.su|
|00000020| 62 6a 65 63 74 3a 20 76 | 31 30 69 30 31 36 3a 20 |bject: v|10i016: |
|00000030| 50 43 63 75 72 73 65 73 | 20 76 2e 31 2e 34 20 70 |PCcurses| v.1.4 p|
|00000040| 61 72 74 20 32 20 6f 66 | 20 37 0a 66 72 6f 6d 3a |art 2 of| 7.from:|
|00000050| 20 62 6c 40 69 6e 66 6f | 76 6f 78 2e 73 65 20 28 | bl@info|vox.se (|
|00000060| 42 6a 7c 72 6e 20 4c 61 | 72 73 73 6f 6e 29 0a 53 |Bj|rn La|rsson).S|
|00000070| 65 6e 64 65 72 3a 20 61 | 6c 6c 62 65 72 79 40 75 |ender: a|llbery@u|
|00000080| 75 6e 65 74 2e 55 55 2e | 4e 45 54 20 28 42 72 61 |unet.UU.|NET (Bra|
|00000090| 6e 64 6f 6e 20 53 2e 20 | 41 6c 6c 62 65 72 79 20 |ndon S. |Allbery |
|000000a0| 2d 20 63 6f 6d 70 2e 73 | 6f 75 72 63 65 73 2e 6d |- comp.s|ources.m|
|000000b0| 69 73 63 29 0a 0a 50 6f | 73 74 69 6e 67 2d 6e 75 |isc)..Po|sting-nu|
|000000c0| 6d 62 65 72 3a 20 56 6f | 6c 75 6d 65 20 31 30 2c |mber: Vo|lume 10,|
|000000d0| 20 49 73 73 75 65 20 31 | 36 0a 53 75 62 6d 69 74 | Issue 1|6.Submit|
|000000e0| 74 65 64 2d 62 79 3a 20 | 62 6c 40 69 6e 66 6f 76 |ted-by: |bl@infov|
|000000f0| 6f 78 2e 73 65 20 28 42 | 6a 7c 72 6e 20 4c 61 72 |ox.se (B|j|rn Lar|
|00000100| 73 73 6f 6e 29 0a 41 72 | 63 68 69 76 65 2d 6e 61 |sson).Ar|chive-na|
|00000110| 6d 65 3a 20 70 63 63 75 | 72 73 65 73 31 34 2f 70 |me: pccu|rses14/p|
|00000120| 61 72 74 30 32 0a 0a 23 | 20 2d 2d 2d 2d 2d 2d 2d |art02..#| -------|
|00000130| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000140| 2d 2d 2d 2d 2d 2d 20 63 | 75 74 20 68 65 72 65 20 |------ c|ut here |
|00000150| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000160| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 0a 23 21 |--------|-----.#!|
|00000170| 20 2f 62 69 6e 2f 73 68 | 0a 23 20 54 68 69 73 20 | /bin/sh|.# This |
|00000180| 69 73 20 61 20 73 68 65 | 6c 6c 20 61 72 63 68 69 |is a she|ll archi|
|00000190| 76 65 2e 20 52 65 6d 6f | 76 65 20 61 6e 79 74 68 |ve. Remo|ve anyth|
|000001a0| 69 6e 67 20 62 65 66 6f | 72 65 20 74 68 65 20 60 |ing befo|re the `|
|000001b0| 63 75 74 27 20 6c 69 6e | 65 2c 0a 23 20 74 68 65 |cut' lin|e,.# the|
|000001c0| 6e 20 75 6e 70 61 63 6b | 20 62 79 20 73 61 76 69 |n unpack| by savi|
|000001d0| 6e 67 20 69 74 20 69 6e | 74 6f 20 61 20 66 69 6c |ng it in|to a fil|
|000001e0| 65 20 61 6e 64 20 74 79 | 70 69 6e 67 20 60 73 68 |e and ty|ping `sh|
|000001f0| 20 66 69 6c 65 27 2e 20 | 54 68 65 0a 23 20 61 72 | file'. |The.# ar|
|00000200| 63 68 69 76 65 20 65 6e | 64 73 20 62 79 20 65 78 |chive en|ds by ex|
|00000210| 69 74 28 30 29 2c 20 73 | 6f 20 64 6f 6e 27 74 20 |it(0), s|o don't |
|00000220| 77 6f 72 72 79 20 61 62 | 6f 75 74 20 74 72 61 69 |worry ab|out trai|
|00000230| 6c 69 6e 67 20 6a 75 6e | 6b 2e 0a 23 20 0a 23 20 |ling jun|k..# .# |
|00000240| 20 20 20 20 20 20 28 54 | 68 69 73 20 69 73 20 61 | (T|his is a|
|00000250| 72 63 68 69 76 65 20 32 | 20 69 6e 20 61 20 73 65 |rchive 2| in a se|
|00000260| 72 69 65 73 20 6f 66 20 | 37 29 2e 0a 23 20 0a 23 |ries of |7)..# .#|
|00000270| 20 43 6f 6e 74 65 6e 74 | 73 3a 0a 23 20 0a 23 20 | Content|s:.# .# |
|00000280| 20 20 61 74 74 72 69 62 | 2e 63 0a 23 20 20 20 62 | attrib|.c.# b|
|00000290| 6f 72 64 65 72 2e 63 0a | 23 20 20 20 62 6f 78 65 |order.c.|# boxe|
|000002a0| 73 2e 63 0a 23 20 20 20 | 63 68 61 72 64 65 6c 2e |s.c.# |chardel.|
|000002b0| 63 0a 23 20 20 20 63 6c | 72 74 6f 62 6f 74 2e 63 |c.# cl|rtobot.c|
|000002c0| 0a 23 20 20 20 63 6c 72 | 74 6f 65 6f 6c 2e 63 0a |.# clr|toeol.c.|
|000002d0| 23 20 20 20 63 75 72 73 | 70 72 69 76 2e 68 0a 23 |# curs|priv.h.#|
|000002e0| 20 20 20 6c 69 6e 65 64 | 65 6c 2e 63 0a 23 20 20 | lined|el.c.# |
|000002f0| 20 6c 69 6e 65 69 6e 73 | 2e 63 0a 23 20 20 20 6f | lineins|.c.# o|
|00000300| 70 74 69 6f 6e 73 2e 63 | 0a 23 20 20 20 72 65 66 |ptions.c|.# ref|
|00000310| 72 65 73 68 2e 63 0a 23 | 20 20 20 73 65 74 6d 6f |resh.c.#| setmo|
|00000320| 64 65 2e 63 0a 23 20 20 | 20 73 65 74 74 65 72 6d |de.c.# | setterm|
|00000330| 2e 63 0a 23 20 0a 23 20 | 57 72 61 70 70 65 64 20 |.c.# .# |Wrapped |
|00000340| 62 79 20 55 53 45 52 40 | 4d 53 2d 44 4f 53 20 2d |by USER@|MS-DOS -|
|00000350| 2d 2d 20 53 75 6e 20 4a | 61 6e 20 31 34 20 31 34 |-- Sun J|an 14 14|
|00000360| 3a 30 32 3a 32 36 20 31 | 39 39 30 0a 23 20 0a 50 |:02:26 1|990.# .P|
|00000370| 41 54 48 3d 2f 62 69 6e | 3a 2f 75 73 72 2f 62 69 |ATH=/bin|:/usr/bi|
|00000380| 6e 3a 2f 75 73 72 2f 75 | 63 62 20 3b 20 65 78 70 |n:/usr/u|cb ; exp|
|00000390| 6f 72 74 20 50 41 54 48 | 0a 69 66 20 74 65 73 74 |ort PATH|.if test|
|000003a0| 20 2d 66 20 61 74 74 72 | 69 62 2e 63 20 2d 61 20 | -f attr|ib.c -a |
|000003b0| 22 24 7b 31 7d 22 20 21 | 3d 20 22 2d 63 22 20 3b |"${1}" !|= "-c" ;|
|000003c0| 20 74 68 65 6e 20 0a 20 | 20 65 63 68 6f 20 57 69 | then . | echo Wi|
|000003d0| 6c 6c 20 6e 6f 74 20 6f | 76 65 72 2d 77 72 69 74 |ll not o|ver-writ|
|000003e0| 65 20 65 78 69 73 74 69 | 6e 67 20 66 69 6c 65 20 |e existi|ng file |
|000003f0| 5c 22 61 74 74 72 69 62 | 2e 63 5c 22 0a 65 6c 73 |\"attrib|.c\".els|
|00000400| 65 0a 65 63 68 6f 20 45 | 78 74 72 61 63 74 69 6e |e.echo E|xtractin|
|00000410| 67 20 2d 20 5c 22 61 74 | 74 72 69 62 2e 63 5c 22 |g - \"at|trib.c\"|
|00000420| 0a 73 65 64 20 22 73 2f | 5e 58 2f 2f 22 20 3e 61 |.sed "s/|^X//" >a|
|00000430| 74 74 72 69 62 2e 63 20 | 3c 3c 27 45 4e 44 5f 4f |ttrib.c |<<'END_O|
|00000440| 46 5f 61 74 74 72 69 62 | 2e 63 27 0a 58 2f 2a 2a |F_attrib|.c'.X/**|
|00000450| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000460| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000470| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000480| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2f 0a |********|******/.|
|00000490| 58 2f 2a 20 43 68 61 72 | 61 63 74 65 72 20 61 74 |X/* Char|acter at|
|000004a0| 74 72 69 62 75 74 65 20 | 72 6f 75 74 69 6e 65 73 |tribute |routines|
|000004b0| 20 6f 66 20 74 68 65 20 | 50 43 63 75 72 73 65 73 | of the |PCcurses|
|000004c0| 20 70 61 63 6b 61 67 65 | 09 09 2a 2f 0a 58 2f 2a | package|..*/.X/*|
|000004d0| 09 09 09 09 09 09 09 09 | 2a 2f 0a 58 2f 2a 2a 2a |........|*/.X/***|
|000004e0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000004f0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000500| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000510| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2f 0a 58 |********|*****/.X|
|00000520| 2f 2a 20 54 68 69 73 20 | 76 65 72 73 69 6f 6e 20 |/* This |version |
|00000530| 6f 66 20 63 75 72 73 65 | 73 20 69 73 20 62 61 73 |of curse|s is bas|
|00000540| 65 64 20 6f 6e 20 6e 63 | 75 72 73 65 73 2c 20 61 |ed on nc|urses, a|
|00000550| 20 63 75 72 73 65 73 20 | 76 65 72 73 69 6f 6e 09 | curses |version.|
|00000560| 2a 2f 0a 58 2f 2a 20 6f | 72 69 67 69 6e 61 6c 6c |*/.X/* o|riginall|
|00000570| 79 20 77 72 69 74 74 65 | 6e 20 62 79 20 50 61 76 |y writte|n by Pav|
|00000580| 65 6c 20 43 75 72 74 69 | 73 20 61 74 20 43 6f 72 |el Curti|s at Cor|
|00000590| 6e 65 6c 6c 20 55 6e 69 | 76 65 72 73 69 74 79 2e |nell Uni|versity.|
|000005a0| 09 2a 2f 0a 58 2f 2a 20 | 49 20 68 61 76 65 20 6d |.*/.X/* |I have m|
|000005b0| 61 64 65 20 73 75 62 73 | 74 61 6e 74 69 61 6c 20 |ade subs|tantial |
|000005c0| 63 68 61 6e 67 65 73 20 | 74 6f 20 6d 61 6b 65 20 |changes |to make |
|000005d0| 69 74 20 72 75 6e 20 6f | 6e 20 49 42 4d 20 50 43 |it run o|n IBM PC|
|000005e0| 27 73 2c 09 2a 2f 0a 58 | 2f 2a 20 61 6e 64 20 74 |'s,.*/.X|/* and t|
|000005f0| 68 65 72 65 66 6f 72 65 | 20 63 6f 6e 73 69 64 65 |herefore| conside|
|00000600| 72 20 6d 79 73 65 6c 66 | 20 66 72 65 65 20 6d 61 |r myself| free ma|
|00000610| 6b 65 20 69 74 20 70 75 | 62 6c 69 63 20 64 6f 6d |ke it pu|blic dom|
|00000620| 61 69 6e 2e 09 2a 2f 0a | 58 2f 2a 09 09 09 09 42 |ain..*/.|X/*....B|
|00000630| 6a 6f 72 6e 20 4c 61 72 | 73 73 6f 6e 20 28 62 6c |jorn Lar|sson (bl|
|00000640| 40 69 6e 66 6f 76 6f 78 | 2e 73 65 29 09 2a 2f 0a |@infovox|.se).*/.|
|00000650| 58 2f 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |X/******|********|
|00000660| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000670| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000680| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000690| 2a 2a 2f 0a 58 2f 2a 20 | 31 2e 34 3a 20 20 50 6f |**/.X/* |1.4: Po|
|000006a0| 72 74 61 62 69 6c 69 74 | 79 20 69 6d 70 72 6f 76 |rtabilit|y improv|
|000006b0| 65 6d 65 6e 74 73 3a 09 | 09 09 39 30 30 31 31 34 |ements:.|..900114|
|000006c0| 09 2a 2f 0a 58 2f 2a 20 | 31 2e 33 3a 09 20 4d 53 |.*/.X/* |1.3:. MS|
|000006d0| 43 20 2d 57 33 2c 20 54 | 75 72 62 6f 27 43 27 20 |C -W3, T|urbo'C' |
|000006e0| 2d 77 20 2d 77 2d 70 72 | 6f 20 63 68 65 63 6b 65 |-w -w-pr|o checke|
|000006f0| 73 3a 09 09 38 38 31 30 | 30 35 09 2a 2f 0a 58 2f |s:..8810|05.*/.X/|
|00000700| 2a 20 31 2e 32 3a 09 20 | 52 63 73 69 64 5b 5d 20 |* 1.2:. |Rcsid[] |
|00000710| 73 74 72 69 6e 67 20 66 | 6f 72 20 6d 61 69 6e 74 |string f|or maint|
|00000720| 65 6e 61 6e 63 65 3a 09 | 09 38 38 31 30 30 32 09 |enance:.|.881002.|
|00000730| 2a 2f 0a 58 2f 2a 20 31 | 2e 30 3a 09 20 52 65 6c |*/.X/* 1|.0:. Rel|
|00000740| 65 61 73 65 3a 09 09 09 | 09 09 38 37 30 35 31 35 |ease:...|..870515|
|00000750| 09 2a 2f 0a 58 2f 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |.*/.X/**|********|
|00000760| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000770| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000780| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000790| 2a 2a 2a 2a 2a 2a 2f 0a | 58 0a 58 23 69 6e 63 6c |******/.|X.X#incl|
|000007a0| 75 64 65 20 3c 63 75 72 | 73 65 73 2e 68 3e 0a 58 |ude <cur|ses.h>.X|
|000007b0| 23 69 6e 63 6c 75 64 65 | 20 3c 63 75 72 73 70 72 |#include| <curspr|
|000007c0| 69 76 2e 68 3e 0a 58 0a | 58 63 68 61 72 20 5f 63 |iv.h>.X.|Xchar _c|
|000007d0| 75 72 73 65 73 5f 61 74 | 74 72 69 62 5f 72 63 73 |urses_at|trib_rcs|
|000007e0| 69 64 5b 5d 20 3d 20 22 | 40 28 23 29 61 74 74 72 |id[] = "|@(#)attr|
|000007f0| 69 62 2e 63 20 20 20 20 | 20 76 2e 31 2e 34 20 20 |ib.c | v.1.4 |
|00000800| 2d 20 39 30 30 31 31 34 | 22 3b 0a 58 0a 58 2f 2a |- 900114|";.X.X/*|
|00000810| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000820| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000830| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000840| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2f |********|*******/|
|00000850| 0a 58 2f 2a 20 57 61 74 | 74 72 73 65 74 28 29 20 |.X/* Wat|trset() |
|00000860| 73 65 74 73 20 74 68 65 | 20 61 74 74 72 69 62 75 |sets the| attribu|
|00000870| 74 65 73 20 61 73 20 73 | 70 65 63 69 66 69 65 64 |tes as s|pecified|
|00000880| 20 69 6e 20 77 69 6e 64 | 6f 77 20 27 77 69 6e 27 | in wind|ow 'win'|
|00000890| 2e 09 2a 2f 0a 58 2f 2a | 2a 2a 2a 2a 2a 2a 2a 2a |..*/.X/*|********|
|000008a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000008b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000008c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000008d0| 2a 2a 2a 2a 2a 2a 2a 2f | 0a 58 0a 58 76 6f 69 64 |*******/|.X.Xvoid|
|000008e0| 20 77 61 74 74 72 73 65 | 74 28 77 69 6e 2c 61 74 | wattrse|t(win,at|
|000008f0| 74 72 73 29 0a 58 20 20 | 57 49 4e 44 4f 57 09 2a |trs).X |WINDOW.*|
|00000900| 77 69 6e 3b 0a 58 20 20 | 69 6e 74 09 09 20 61 74 |win;.X |int.. at|
|00000910| 74 72 73 3b 0a 58 20 20 | 7b 0a 58 20 20 77 69 6e |trs;.X |{.X win|
|00000920| 2d 3e 5f 61 74 74 72 73 | 20 3d 20 61 74 74 72 73 |->_attrs| = attrs|
|00000930| 20 26 20 41 54 52 5f 4d | 53 4b 3b 0a 58 20 20 7d | & ATR_M|SK;.X }|
|00000940| 20 2f 2a 20 77 61 74 74 | 72 73 65 74 20 2a 2f 0a | /* watt|rset */.|
|00000950| 58 0a 58 2f 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |X.X/****|********|
|00000960| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000970| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000980| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000990| 2a 2a 2a 2a 2f 0a 58 2f | 2a 20 57 61 74 74 72 6f |****/.X/|* Wattro|
|000009a0| 6e 28 29 20 73 65 74 73 | 20 74 68 65 20 73 70 65 |n() sets| the spe|
|000009b0| 63 69 66 69 65 64 20 61 | 74 74 72 69 62 75 74 65 |cified a|ttribute|
|000009c0| 28 73 29 20 69 6e 20 77 | 69 6e 64 6f 77 20 27 77 |(s) in w|indow 'w|
|000009d0| 69 6e 27 2e 09 2a 2f 0a | 58 2f 2a 2a 2a 2a 2a 2a |in'..*/.|X/******|
|000009e0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000009f0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000a00| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000a10| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2f 0a 58 0a 58 76 |********|**/.X.Xv|
|00000a20| 6f 69 64 09 77 61 74 74 | 72 6f 6e 28 77 69 6e 2c |oid.watt|ron(win,|
|00000a30| 61 74 74 72 73 29 0a 58 | 20 20 57 49 4e 44 4f 57 |attrs).X| WINDOW|
|00000a40| 09 2a 77 69 6e 3b 0a 58 | 20 20 69 6e 74 09 09 20 |.*win;.X| int.. |
|00000a50| 61 74 74 72 73 3b 0a 58 | 20 20 7b 0a 58 20 20 77 |attrs;.X| {.X w|
|00000a60| 69 6e 2d 3e 5f 61 74 74 | 72 73 20 7c 3d 20 28 61 |in->_att|rs |= (a|
|00000a70| 74 74 72 73 20 26 20 41 | 54 52 5f 4d 53 4b 29 3b |ttrs & A|TR_MSK);|
|00000a80| 0a 58 20 20 7d 20 2f 2a | 20 77 61 74 74 72 6f 6e |.X } /*| wattron|
|00000a90| 20 2a 2f 0a 58 0a 58 2f | 2a 2a 2a 2a 2a 2a 2a 2a | */.X.X/|********|
|00000aa0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000ab0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000ac0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000ad0| 2a 2a 2a 2a 2a 2a 2a 2a | 2f 0a 58 2f 2a 20 57 61 |********|/.X/* Wa|
|00000ae0| 74 74 72 6f 66 66 28 29 | 20 63 6c 65 61 72 73 20 |ttroff()| clears |
|00000af0| 74 68 65 20 73 70 65 63 | 69 66 69 65 64 20 61 74 |the spec|ified at|
|00000b00| 74 72 69 62 75 74 65 28 | 73 29 20 69 6e 20 77 69 |tribute(|s) in wi|
|00000b10| 6e 64 6f 77 09 2a 2f 0a | 58 2f 2a 20 27 77 69 6e |ndow.*/.|X/* 'win|
|00000b20| 27 2e 09 09 09 09 09 09 | 09 2a 2f 0a 58 2f 2a 2a |'.......|.*/.X/**|
|00000b30| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000b40| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000b50| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000b60| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2f 0a |********|******/.|
|00000b70| 58 0a 58 76 6f 69 64 09 | 77 61 74 74 72 6f 66 66 |X.Xvoid.|wattroff|
|00000b80| 28 77 69 6e 2c 61 74 74 | 72 73 29 0a 58 20 20 57 |(win,att|rs).X W|
|00000b90| 49 4e 44 4f 57 09 2a 77 | 69 6e 3b 0a 58 20 20 69 |INDOW.*w|in;.X i|
|00000ba0| 6e 74 09 09 20 61 74 74 | 72 73 3b 0a 58 20 20 7b |nt.. att|rs;.X {|
|00000bb0| 0a 58 20 20 77 69 6e 2d | 3e 5f 61 74 74 72 73 20 |.X win-|>_attrs |
|00000bc0| 26 3d 20 28 7e 61 74 74 | 72 73 20 26 20 41 54 52 |&= (~att|rs & ATR|
|00000bd0| 5f 4d 53 4b 29 3b 0a 58 | 20 20 7d 20 2f 2a 20 77 |_MSK);.X| } /* w|
|00000be0| 61 74 74 72 6f 66 66 20 | 2a 2f 0a 58 0a 58 2f 2a |attroff |*/.X.X/*|
|00000bf0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000c00| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000c10| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000c20| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2f |********|*******/|
|00000c30| 0a 58 2f 2a 20 57 73 74 | 61 6e 64 6f 75 74 28 29 |.X/* Wst|andout()|
|00000c40| 20 73 74 61 72 74 73 20 | 73 74 61 6e 64 6f 75 74 | starts |standout|
|00000c50| 20 6d 6f 64 65 20 69 6e | 20 77 69 6e 64 6f 77 20 | mode in| window |
|00000c60| 27 77 69 6e 27 2e 09 09 | 2a 2f 0a 58 2f 2a 2a 2a |'win'...|*/.X/***|
|00000c70| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000c80| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000c90| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000ca0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2f 0a 58 |********|*****/.X|
|00000cb0| 0a 58 76 6f 69 64 09 77 | 73 74 61 6e 64 6f 75 74 |.Xvoid.w|standout|
|00000cc0| 28 77 69 6e 29 0a 58 20 | 20 57 49 4e 44 4f 57 09 |(win).X | WINDOW.|
|00000cd0| 2a 77 69 6e 3b 0a 58 20 | 20 7b 0a 58 20 20 77 69 |*win;.X | {.X wi|
|00000ce0| 6e 2d 3e 5f 61 74 74 72 | 73 20 3d 20 41 5f 53 54 |n->_attr|s = A_ST|
|00000cf0| 41 4e 44 4f 55 54 3b 0a | 58 20 20 7d 20 2f 2a 20 |ANDOUT;.|X } /* |
|00000d00| 77 73 74 61 6e 64 6f 75 | 74 20 2a 2f 0a 58 0a 58 |wstandou|t */.X.X|
|00000d10| 2f 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |/*******|********|
|00000d20| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000d30| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000d40| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000d50| 2a 2f 0a 58 2f 2a 20 57 | 73 74 61 6e 64 65 6e 64 |*/.X/* W|standend|
|00000d60| 28 29 20 63 6c 65 61 72 | 73 20 61 6c 6c 20 73 70 |() clear|s all sp|
|00000d70| 65 63 69 61 6c 20 61 74 | 74 72 69 62 75 74 65 73 |ecial at|tributes|
|00000d80| 20 69 6e 20 77 69 6e 64 | 6f 77 20 27 77 69 6e 27 | in wind|ow 'win'|
|00000d90| 2e 09 2a 2f 0a 58 2f 2a | 2a 2a 2a 2a 2a 2a 2a 2a |..*/.X/*|********|
|00000da0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000db0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000dc0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000dd0| 2a 2a 2a 2a 2a 2a 2a 2f | 0a 58 0a 58 76 6f 69 64 |*******/|.X.Xvoid|
|00000de0| 09 77 73 74 61 6e 64 65 | 6e 64 28 77 69 6e 29 0a |.wstande|nd(win).|
|00000df0| 58 20 20 57 49 4e 44 4f | 57 09 2a 77 69 6e 3b 0a |X WINDO|W.*win;.|
|00000e00| 58 20 20 7b 0a 58 20 20 | 77 69 6e 2d 3e 5f 61 74 |X {.X |win->_at|
|00000e10| 74 72 73 20 3d 20 41 54 | 52 5f 4e 52 4d 3b 0a 58 |trs = AT|R_NRM;.X|
|00000e20| 20 20 7d 20 2f 2a 20 77 | 73 74 61 6e 64 65 6e 64 | } /* w|standend|
|00000e30| 20 2a 2f 0a 58 0a 58 2f | 2a 2a 2a 2a 2a 2a 2a 2a | */.X.X/|********|
|00000e40| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000e50| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000e60| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000e70| 2a 2a 2a 2a 2a 2a 2a 2a | 2f 0a 58 2f 2a 20 41 74 |********|/.X/* At|
|00000e80| 74 72 73 65 74 28 29 20 | 73 65 74 73 20 74 68 65 |trset() |sets the|
|00000e90| 20 61 74 74 72 69 62 75 | 74 65 73 20 61 73 20 73 | attribu|tes as s|
|00000ea0| 70 65 63 69 66 69 65 64 | 20 69 6e 20 73 74 64 73 |pecified| in stds|
|00000eb0| 63 72 2e 09 2a 2f 0a 58 | 2f 2a 2a 2a 2a 2a 2a 2a |cr..*/.X|/*******|
|00000ec0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000ed0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000ee0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000ef0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2f 0a 58 0a 58 76 6f |********|*/.X.Xvo|
|00000f00| 69 64 09 61 74 74 72 73 | 65 74 28 61 74 74 72 73 |id.attrs|et(attrs|
|00000f10| 29 0a 58 20 20 69 6e 74 | 20 61 74 74 72 73 3b 0a |).X int| attrs;.|
|00000f20| 58 20 20 7b 0a 58 20 20 | 73 74 64 73 63 72 2d 3e |X {.X |stdscr->|
|00000f30| 5f 61 74 74 72 73 20 3d | 20 61 74 74 72 73 20 26 |_attrs =| attrs &|
|00000f40| 20 41 54 52 5f 4d 53 4b | 3b 0a 58 20 20 7d 20 2f | ATR_MSK|;.X } /|
|00000f50| 2a 20 61 74 74 72 73 65 | 74 20 2a 2f 0a 58 0a 58 |* attrse|t */.X.X|
|00000f60| 2f 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |/*******|********|
|00000f70| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000f80| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000f90| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000fa0| 2a 2f 0a 58 2f 2a 20 41 | 74 74 72 6f 6e 28 29 20 |*/.X/* A|ttron() |
|00000fb0| 73 65 74 73 20 74 68 65 | 20 73 70 65 63 69 66 69 |sets the| specifi|
|00000fc0| 65 64 20 61 74 74 72 69 | 62 75 74 65 28 73 29 20 |ed attri|bute(s) |
|00000fd0| 69 6e 20 73 74 64 73 63 | 72 2e 09 09 2a 2f 0a 58 |in stdsc|r...*/.X|
|00000fe0| 2f 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |/*******|********|
|00000ff0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001000| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001010| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001020| 2a 2f 0a 58 0a 58 76 6f | 69 64 09 61 74 74 72 6f |*/.X.Xvo|id.attro|
|00001030| 6e 28 61 74 74 72 73 29 | 0a 58 20 20 69 6e 74 09 |n(attrs)|.X int.|
|00001040| 09 20 61 74 74 72 73 3b | 0a 58 20 20 7b 0a 58 20 |. attrs;|.X {.X |
|00001050| 20 73 74 64 73 63 72 2d | 3e 5f 61 74 74 72 73 20 | stdscr-|>_attrs |
|00001060| 7c 3d 20 28 61 74 74 72 | 73 20 26 20 41 54 52 5f ||= (attr|s & ATR_|
|00001070| 4d 53 4b 29 3b 0a 58 20 | 20 7d 20 2f 2a 20 61 74 |MSK);.X | } /* at|
|00001080| 74 72 6f 6e 20 2a 2f 0a | 58 0a 58 2f 2a 2a 2a 2a |tron */.|X.X/****|
|00001090| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000010a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000010b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000010c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2f 0a 58 2f |********|****/.X/|
|000010d0| 2a 20 41 74 74 72 6f 66 | 66 28 29 20 63 6c 65 61 |* Attrof|f() clea|
|000010e0| 72 73 20 74 68 65 20 73 | 70 65 63 69 66 69 65 64 |rs the s|pecified|
|000010f0| 20 61 74 74 72 69 62 75 | 74 65 28 73 29 20 69 6e | attribu|te(s) in|
|00001100| 20 73 74 64 73 63 72 2e | 09 2a 2f 0a 58 2f 2a 2a | stdscr.|.*/.X/**|
|00001110| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001120| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001130| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001140| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2f 0a |********|******/.|
|00001150| 58 0a 58 76 6f 69 64 09 | 61 74 74 72 6f 66 66 28 |X.Xvoid.|attroff(|
|00001160| 61 74 74 72 73 29 0a 58 | 20 20 69 6e 74 09 09 20 |attrs).X| int.. |
|00001170| 61 74 74 72 73 3b 0a 58 | 20 20 7b 0a 58 20 20 73 |attrs;.X| {.X s|
|00001180| 74 64 73 63 72 2d 3e 5f | 61 74 74 72 73 20 26 3d |tdscr->_|attrs &=|
|00001190| 20 28 7e 61 74 74 72 73 | 20 26 20 41 54 52 5f 4d | (~attrs| & ATR_M|
|000011a0| 53 4b 29 3b 0a 58 20 20 | 7d 20 2f 2a 20 61 74 74 |SK);.X |} /* att|
|000011b0| 72 6f 66 66 20 2a 2f 0a | 58 0a 58 2f 2a 2a 2a 2a |roff */.|X.X/****|
|000011c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000011d0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000011e0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000011f0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2f 0a 58 2f |********|****/.X/|
|00001200| 2a 20 53 74 61 6e 64 6f | 75 74 28 29 20 73 74 61 |* Stando|ut() sta|
|00001210| 72 74 73 20 73 74 61 6e | 64 6f 75 74 20 6d 6f 64 |rts stan|dout mod|
|00001220| 65 20 69 6e 20 73 74 64 | 73 63 72 2e 09 09 09 2a |e in std|scr....*|
|00001230| 2f 0a 58 2f 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |/.X/****|********|
|00001240| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001250| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001260| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001270| 2a 2a 2a 2a 2f 0a 58 0a | 58 76 6f 69 64 09 73 74 |****/.X.|Xvoid.st|
|00001280| 61 6e 64 6f 75 74 28 29 | 0a 58 20 20 7b 0a 58 20 |andout()|.X {.X |
|00001290| 20 73 74 64 73 63 72 2d | 3e 5f 61 74 74 72 73 20 | stdscr-|>_attrs |
|000012a0| 3d 20 41 5f 53 54 41 4e | 44 4f 55 54 3b 0a 58 20 |= A_STAN|DOUT;.X |
|000012b0| 20 7d 20 2f 2a 20 73 74 | 61 6e 64 6f 75 74 20 2a | } /* st|andout *|
|000012c0| 2f 0a 58 0a 58 2f 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |/.X.X/**|********|
|000012d0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000012e0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000012f0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001300| 2a 2a 2a 2a 2a 2a 2f 0a | 58 2f 2a 20 53 74 61 6e |******/.|X/* Stan|
|00001310| 64 65 6e 64 28 29 20 63 | 6c 65 61 72 73 20 61 6c |dend() c|lears al|
|00001320| 6c 20 73 70 65 63 69 61 | 6c 20 61 74 74 72 69 62 |l specia|l attrib|
|00001330| 75 74 65 73 20 69 6e 20 | 73 74 64 73 63 72 2e 09 |utes in |stdscr..|
|00001340| 09 2a 2f 0a 58 2f 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |.*/.X/**|********|
|00001350| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001360| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001370| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001380| 2a 2a 2a 2a 2a 2a 2f 0a | 58 0a 58 76 6f 69 64 09 |******/.|X.Xvoid.|
|00001390| 73 74 61 6e 64 65 6e 64 | 28 29 0a 58 20 20 7b 0a |standend|().X {.|
|000013a0| 58 20 20 73 74 64 73 63 | 72 2d 3e 5f 61 74 74 72 |X stdsc|r->_attr|
|000013b0| 73 20 3d 20 41 54 52 5f | 4e 52 4d 3b 0a 58 20 20 |s = ATR_|NRM;.X |
|000013c0| 7d 20 2f 2a 20 73 74 61 | 6e 64 65 6e 64 20 2a 2f |} /* sta|ndend */|
|000013d0| 0a 45 4e 44 5f 4f 46 5f | 61 74 74 72 69 62 2e 63 |.END_OF_|attrib.c|
|000013e0| 0a 69 66 20 74 65 73 74 | 20 33 38 35 31 20 2d 6e |.if test| 3851 -n|
|000013f0| 65 20 60 77 63 20 2d 63 | 20 3c 61 74 74 72 69 62 |e `wc -c| <attrib|
|00001400| 2e 63 60 3b 20 74 68 65 | 6e 0a 20 20 20 20 65 63 |.c`; the|n. ec|
|00001410| 68 6f 20 5c 22 61 74 74 | 72 69 62 2e 63 5c 22 20 |ho \"att|rib.c\" |
|00001420| 75 6e 70 61 63 6b 65 64 | 20 77 69 74 68 20 77 72 |unpacked| with wr|
|00001430| 6f 6e 67 20 73 69 7a 65 | 21 0a 66 69 0a 23 20 65 |ong size|!.fi.# e|
|00001440| 6e 64 20 6f 66 20 6f 76 | 65 72 77 72 69 74 69 6e |nd of ov|erwritin|
|00001450| 67 20 63 68 65 63 6b 0a | 66 69 0a 69 66 20 74 65 |g check.|fi.if te|
|00001460| 73 74 20 2d 66 20 62 6f | 72 64 65 72 2e 63 20 2d |st -f bo|rder.c -|
|00001470| 61 20 22 24 7b 31 7d 22 | 20 21 3d 20 22 2d 63 22 |a "${1}"| != "-c"|
|00001480| 20 3b 20 74 68 65 6e 20 | 0a 20 20 65 63 68 6f 20 | ; then |. echo |
|00001490| 57 69 6c 6c 20 6e 6f 74 | 20 6f 76 65 72 2d 77 72 |Will not| over-wr|
|000014a0| 69 74 65 20 65 78 69 73 | 74 69 6e 67 20 66 69 6c |ite exis|ting fil|
|000014b0| 65 20 5c 22 62 6f 72 64 | 65 72 2e 63 5c 22 0a 65 |e \"bord|er.c\".e|
|000014c0| 6c 73 65 0a 65 63 68 6f | 20 45 78 74 72 61 63 74 |lse.echo| Extract|
|000014d0| 69 6e 67 20 2d 20 5c 22 | 62 6f 72 64 65 72 2e 63 |ing - \"|border.c|
|000014e0| 5c 22 0a 73 65 64 20 22 | 73 2f 5e 58 2f 2f 22 20 |\".sed "|s/^X//" |
|000014f0| 3e 62 6f 72 64 65 72 2e | 63 20 3c 3c 27 45 4e 44 |>border.|c <<'END|
|00001500| 5f 4f 46 5f 62 6f 72 64 | 65 72 2e 63 27 0a 58 2f |_OF_bord|er.c'.X/|
|00001510| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001520| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001530| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001540| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001550| 2f 0a 58 2f 2a 20 42 6f | 78 20 62 6f 72 64 65 72 |/.X/* Bo|x border|
|00001560| 20 63 6f 6e 74 72 6f 6c | 20 72 6f 75 74 69 6e 65 | control| routine|
|00001570| 73 20 6f 66 20 74 68 65 | 20 50 43 63 75 72 73 65 |s of the| PCcurse|
|00001580| 73 20 70 61 63 6b 61 67 | 65 2e 09 09 2a 2f 0a 58 |s packag|e...*/.X|
|00001590| 2f 2a 09 09 09 09 09 09 | 09 09 2a 2f 0a 58 2f 2a |/*......|..*/.X/*|
|000015a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000015b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000015c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000015d0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2f |********|*******/|
|000015e0| 0a 58 2f 2a 20 54 68 69 | 73 20 76 65 72 73 69 6f |.X/* Thi|s versio|
|000015f0| 6e 20 6f 66 20 63 75 72 | 73 65 73 20 69 73 20 62 |n of cur|ses is b|
|00001600| 61 73 65 64 20 6f 6e 20 | 6e 63 75 72 73 65 73 2c |ased on |ncurses,|
|00001610| 20 61 20 63 75 72 73 65 | 73 20 76 65 72 73 69 6f | a curse|s versio|
|00001620| 6e 09 2a 2f 0a 58 2f 2a | 20 6f 72 69 67 69 6e 61 |n.*/.X/*| origina|
|00001630| 6c 6c 79 20 77 72 69 74 | 74 65 6e 20 62 79 20 50 |lly writ|ten by P|
|00001640| 61 76 65 6c 20 43 75 72 | 74 69 73 20 61 74 20 43 |avel Cur|tis at C|
|00001650| 6f 72 6e 65 6c 6c 20 55 | 6e 69 76 65 72 73 69 74 |ornell U|niversit|
|00001660| 79 2e 09 2a 2f 0a 58 2f | 2a 20 49 20 68 61 76 65 |y..*/.X/|* I have|
|00001670| 20 6d 61 64 65 20 73 75 | 62 73 74 61 6e 74 69 61 | made su|bstantia|
|00001680| 6c 20 63 68 61 6e 67 65 | 73 20 74 6f 20 6d 61 6b |l change|s to mak|
|00001690| 65 20 69 74 20 72 75 6e | 20 6f 6e 20 49 42 4d 20 |e it run| on IBM |
|000016a0| 50 43 27 73 2c 09 2a 2f | 0a 58 2f 2a 20 61 6e 64 |PC's,.*/|.X/* and|
|000016b0| 20 74 68 65 72 65 66 6f | 72 65 20 63 6f 6e 73 69 | therefo|re consi|
|000016c0| 64 65 72 20 6d 79 73 65 | 6c 66 20 66 72 65 65 20 |der myse|lf free |
|000016d0| 6d 61 6b 65 20 69 74 20 | 70 75 62 6c 69 63 20 64 |make it |public d|
|000016e0| 6f 6d 61 69 6e 2e 09 2a | 2f 0a 58 2f 2a 09 09 09 |omain..*|/.X/*...|
|000016f0| 09 42 6a 6f 72 6e 20 4c | 61 72 73 73 6f 6e 20 28 |.Bjorn L|arsson (|
|00001700| 62 6c 40 69 6e 66 6f 76 | 6f 78 2e 73 65 29 09 2a |bl@infov|ox.se).*|
|00001710| 2f 0a 58 2f 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |/.X/****|********|
|00001720| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001730| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001740| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001750| 2a 2a 2a 2a 2f 0a 58 2f | 2a 20 31 2e 34 20 3a 20 |****/.X/|* 1.4 : |
|00001760| 43 68 61 6e 67 65 64 20 | 74 6f 20 64 72 61 77 20 |Changed |to draw |
|00001770| 61 20 62 6f 72 64 65 72 | 2e 20 55 73 65 20 73 68 |a border|. Use sh|
|00001780| 6f 72 74 20 77 68 65 72 | 65 76 65 72 09 09 2a 2f |ort wher|ever..*/|
|00001790| 0a 58 2f 2a 09 20 70 6f | 73 73 69 62 6c 65 3a 20 |.X/*. po|ssible: |
|000017a0| 50 6f 72 74 61 62 69 6c | 69 74 79 20 69 6d 70 72 |Portabil|ity impr|
|000017b0| 6f 76 65 6d 65 6e 74 73 | 3a 09 09 39 30 30 31 31 |ovements|:..90011|
|000017c0| 34 09 2a 2f 0a 58 2f 2a | 20 31 2e 33 3a 09 20 52 |4.*/.X/*| 1.3:. R|
|000017d0| 65 6c 65 61 73 65 64 3a | 09 09 09 09 09 38 38 31 |eleased:|.....881|
|000017e0| 30 30 35 09 2a 2f 0a 58 | 2f 2a 2a 2a 2a 2a 2a 2a |005.*/.X|/*******|
|000017f0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001800| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001810| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001820| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2f 0a 58 0a 58 23 69 |********|*/.X.X#i|
|00001830| 6e 63 6c 75 64 65 20 3c | 63 75 72 73 65 73 2e 68 |nclude <|curses.h|
|00001840| 3e 0a 58 23 69 6e 63 6c | 75 64 65 20 3c 63 75 72 |>.X#incl|ude <cur|
|00001850| 73 70 72 69 76 2e 68 3e | 0a 58 0a 58 63 68 61 72 |spriv.h>|.X.Xchar|
|00001860| 20 5f 63 75 72 73 65 73 | 5f 62 6f 72 64 65 72 5f | _curses|_border_|
|00001870| 72 63 73 69 64 5b 5d 20 | 3d 20 22 40 28 23 29 62 |rcsid[] |= "@(#)b|
|00001880| 6f 72 64 65 72 2e 63 20 | 20 20 20 20 76 2e 31 2e |order.c | v.1.|
|00001890| 34 20 20 2d 20 39 30 30 | 31 31 34 22 3b 0a 58 0a |4 - 900|114";.X.|
|000018a0| 58 2f 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |X/******|********|
|000018b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000018c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000018d0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000018e0| 2a 2a 2f 0a 58 2f 2a 20 | 57 62 6f 72 64 65 72 28 |**/.X/* |Wborder(|
|000018f0| 77 69 6e 2c 20 6c 2c 20 | 72 2c 20 74 2c 20 62 2c |win, l, |r, t, b,|
|00001900| 20 74 6c 2c 20 74 72 2c | 20 62 6c 2c 20 62 72 29 | tl, tr,| bl, br)|
|00001910| 20 64 72 61 77 73 20 61 | 20 62 6f 72 64 65 72 20 | draws a| border |
|00001920| 69 6e 09 2a 2f 0a 58 2f | 2a 20 77 69 6e 64 6f 77 |in.*/.X/|* window|
|00001930| 20 77 69 6e 2c 20 77 69 | 74 68 20 74 68 65 20 73 | win, wi|th the s|
|00001940| 70 65 63 69 66 69 65 64 | 20 63 68 61 72 61 63 74 |pecified| charact|
|00001950| 65 72 73 20 61 73 20 62 | 6f 72 64 65 72 20 65 64 |ers as b|order ed|
|00001960| 67 65 73 3a 09 2a 2f 0a | 58 2f 2a 20 6c 09 6c 65 |ges:.*/.|X/* l.le|
|00001970| 66 74 09 09 09 09 09 09 | 09 2a 2f 0a 58 2f 2a 20 |ft......|.*/.X/* |
|00001980| 72 09 72 69 67 68 74 09 | 09 09 09 09 09 09 2a 2f |r.right.|......*/|
|00001990| 0a 58 2f 2a 20 62 09 62 | 6f 74 74 6f 6d 09 09 09 |.X/* b.b|ottom...|
|000019a0| 09 09 09 09 2a 2f 0a 58 | 2f 2a 20 74 09 74 6f 70 |....*/.X|/* t.top|
|000019b0| 09 09 09 09 09 09 09 2a | 2f 0a 58 2f 2a 20 74 6c |.......*|/.X/* tl|
|000019c0| 09 74 6f 70 20 6c 65 66 | 74 20 63 6f 72 6e 65 72 |.top lef|t corner|
|000019d0| 09 09 09 09 09 09 2a 2f | 0a 58 2f 2a 20 74 72 09 |......*/|.X/* tr.|
|000019e0| 74 6f 70 20 72 69 67 68 | 74 20 63 6f 72 6e 65 72 |top righ|t corner|
|000019f0| 09 09 09 09 09 2a 2f 0a | 58 2f 2a 20 62 6c 09 62 |.....*/.|X/* bl.b|
|00001a00| 6f 74 74 6f 6d 20 6c 65 | 66 74 20 63 6f 72 6e 65 |ottom le|ft corne|
|00001a10| 72 09 09 09 09 09 2a 2f | 0a 58 2f 2a 20 62 72 09 |r.....*/|.X/* br.|
|00001a20| 62 6f 74 74 6f 6d 20 72 | 69 67 68 74 20 63 6f 72 |bottom r|ight cor|
|00001a30| 6e 65 72 09 09 09 09 09 | 2a 2f 0a 58 2f 2a 2a 2a |ner.....|*/.X/***|
|00001a40| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001a50| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001a60| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001a70| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2f 0a 58 |********|*****/.X|
|00001a80| 0a 58 76 6f 69 64 20 77 | 62 6f 72 64 65 72 28 77 |.Xvoid w|border(w|
|00001a90| 69 6e 2c 20 6c 2c 20 72 | 2c 20 74 2c 20 62 2c 20 |in, l, r|, t, b, |
|00001aa0| 74 6c 2c 20 74 72 2c 20 | 62 6c 2c 20 62 72 29 0a |tl, tr, |bl, br).|
|00001ab0| 58 20 20 57 49 4e 44 4f | 57 09 2a 77 69 6e 3b 0a |X WINDO|W.*win;.|
|00001ac0| 58 20 20 69 6e 74 09 09 | 20 6c 3b 0a 58 20 20 69 |X int..| l;.X i|
|00001ad0| 6e 74 09 09 20 72 3b 0a | 58 20 20 69 6e 74 09 09 |nt.. r;.|X int..|
|00001ae0| 20 74 3b 0a 58 20 20 69 | 6e 74 09 09 20 62 3b 0a | t;.X i|nt.. b;.|
|00001af0| 58 20 20 69 6e 74 09 09 | 20 74 6c 3b 0a 58 20 20 |X int..| tl;.X |
|00001b00| 69 6e 74 09 09 20 74 72 | 3b 0a 58 20 20 69 6e 74 |int.. tr|;.X int|
|00001b10| 09 09 20 62 6c 3b 0a 58 | 20 20 69 6e 74 09 09 20 |.. bl;.X| int.. |
|00001b20| 62 72 3b 0a 58 20 20 7b | 0a 58 20 20 73 68 6f 72 |br;.X {|.X shor|
|00001b30| 74 09 20 78 6d 61 78 2c | 20 79 6d 61 78 2c 20 69 |t. xmax,| ymax, i|
|00001b40| 3b 0a 58 0a 58 20 20 79 | 6d 61 78 20 3d 20 77 69 |;.X.X y|max = wi|
|00001b50| 6e 2d 3e 5f 6d 61 78 79 | 20 2d 20 31 3b 0a 58 20 |n->_maxy| - 1;.X |
|00001b60| 20 78 6d 61 78 20 3d 20 | 77 69 6e 2d 3e 5f 6d 61 | xmax = |win->_ma|
|00001b70| 78 78 20 2d 20 31 3b 0a | 58 20 20 66 6f 72 20 28 |xx - 1;.|X for (|
|00001b80| 69 20 3d 20 31 3b 20 69 | 20 3c 3d 20 78 6d 61 78 |i = 1; i| <= xmax|
|00001b90| 2d 31 3b 69 2b 2b 29 0a | 58 20 20 20 20 7b 0a 58 |-1;i++).|X {.X|
|00001ba0| 20 20 20 20 77 69 6e 2d | 3e 5f 6c 69 6e 65 5b 30 | win-|>_line[0|
|00001bb0| 5d 5b 69 5d 20 3d 20 20 | 20 20 20 74 20 7c 20 77 |][i] = | t | w|
|00001bc0| 69 6e 2d 3e 5f 61 74 74 | 72 73 3b 0a 58 20 20 20 |in->_att|rs;.X |
|00001bd0| 20 77 69 6e 2d 3e 5f 6c | 69 6e 65 5b 79 6d 61 78 | win->_l|ine[ymax|
|00001be0| 5d 5b 69 5d 20 3d 20 20 | 62 20 7c 20 77 69 6e 2d |][i] = |b | win-|
|00001bf0| 3e 5f 61 74 74 72 73 3b | 0a 58 20 20 20 20 7d 20 |>_attrs;|.X } |
|00001c00| 2f 2a 20 66 6f 72 20 2a | 2f 0a 58 20 20 66 6f 72 |/* for *|/.X for|
|00001c10| 20 28 69 20 3d 20 31 3b | 69 20 3c 3d 20 79 6d 61 | (i = 1;|i <= yma|
|00001c20| 78 2d 31 3b 69 2b 2b 29 | 0a 58 20 20 20 20 7b 0a |x-1;i++)|.X {.|
|00001c30| 58 20 20 20 20 77 69 6e | 2d 3e 5f 6c 69 6e 65 5b |X win|->_line[|
|00001c40| 69 5d 5b 30 5d 20 3d 20 | 20 20 20 20 6c 20 7c 20 |i][0] = | l | |
|00001c50| 77 69 6e 2d 3e 5f 61 74 | 74 72 73 3b 0a 58 20 20 |win->_at|trs;.X |
|00001c60| 20 20 77 69 6e 2d 3e 5f | 6c 69 6e 65 5b 69 5d 5b | win->_|line[i][|
|00001c70| 78 6d 61 78 5d 20 3d 20 | 20 72 20 7c 20 77 69 6e |xmax] = | r | win|
|00001c80| 2d 3e 5f 61 74 74 72 73 | 3b 0a 58 20 20 20 20 7d |->_attrs|;.X }|
|00001c90| 20 2f 2a 20 66 6f 72 20 | 2a 2f 0a 58 20 20 77 69 | /* for |*/.X wi|
|00001ca0| 6e 2d 3e 5f 6c 69 6e 65 | 5b 30 5d 5b 30 5d 20 3d |n->_line|[0][0] =|
|00001cb0| 20 20 20 20 20 20 20 74 | 6c 20 7c 20 77 69 6e 2d | t|l | win-|
|00001cc0| 3e 5f 61 74 74 72 73 3b | 0a 58 20 20 77 69 6e 2d |>_attrs;|.X win-|
|00001cd0| 3e 5f 6c 69 6e 65 5b 30 | 5d 5b 78 6d 61 78 5d 20 |>_line[0|][xmax] |
|00001ce0| 3d 20 20 20 20 74 72 20 | 7c 20 77 69 6e 2d 3e 5f |= tr || win->_|
|00001cf0| 61 74 74 72 73 3b 0a 58 | 20 20 77 69 6e 2d 3e 5f |attrs;.X| win->_|
|00001d00| 6c 69 6e 65 5b 79 6d 61 | 78 5d 5b 30 5d 20 3d 20 |line[yma|x][0] = |
|00001d10| 20 20 20 62 6c 20 7c 20 | 77 69 6e 2d 3e 5f 61 74 | bl | |win->_at|
|00001d20| 74 72 73 3b 0a 58 20 20 | 77 69 6e 2d 3e 5f 6c 69 |trs;.X |win->_li|
|00001d30| 6e 65 5b 79 6d 61 78 5d | 5b 78 6d 61 78 5d 20 3d |ne[ymax]|[xmax] =|
|00001d40| 20 62 72 20 7c 20 77 69 | 6e 2d 3e 5f 61 74 74 72 | br | wi|n->_attr|
|00001d50| 73 3b 0a 58 0a 58 20 20 | 66 6f 72 20 28 69 3d 30 |s;.X.X |for (i=0|
|00001d60| 3b 20 69 20 3c 3d 20 79 | 6d 61 78 20 3b 20 69 2b |; i <= y|max ; i+|
|00001d70| 2b 29 0a 58 20 20 20 20 | 7b 0a 58 20 20 20 20 77 |+).X |{.X w|
|00001d80| 69 6e 2d 3e 5f 6d 69 6e | 63 68 6e 67 5b 69 5d 20 |in->_min|chng[i] |
|00001d90| 3d 20 30 3b 0a 58 20 20 | 20 20 77 69 6e 2d 3e 5f |= 0;.X | win->_|
|00001da0| 6d 61 78 63 68 6e 67 5b | 69 5d 20 3d 20 78 6d 61 |maxchng[|i] = xma|
|00001db0| 78 3b 0a 58 20 20 20 20 | 7d 20 2f 2a 20 66 6f 72 |x;.X |} /* for|
|00001dc0| 20 2a 2f 0a 58 20 20 7d | 20 2f 2a 20 77 62 6f 72 | */.X }| /* wbor|
|00001dd0| 64 65 72 20 2a 2f 0a 58 | 0a 58 2f 2a 2a 2a 2a 2a |der */.X|.X/*****|
|00001de0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001df0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001e00| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001e10| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2f 0a 58 2f 2a |********|***/.X/*|
|00001e20| 20 42 6f 72 64 65 72 28 | 6c 2c 20 72 2c 20 74 2c | Border(|l, r, t,|
|00001e30| 20 62 2c 20 74 6c 2c 20 | 74 72 2c 20 62 6c 2c 20 | b, tl, |tr, bl, |
|00001e40| 62 72 29 20 64 72 61 77 | 73 20 61 20 62 6f 72 64 |br) draw|s a bord|
|00001e50| 65 72 20 69 6e 20 73 74 | 64 73 63 72 2c 09 2a 2f |er in st|dscr,.*/|
|00001e60| 0a 58 2f 2a 20 77 69 74 | 68 20 74 68 65 20 73 70 |.X/* wit|h the sp|
|00001e70| 65 63 69 66 69 65 64 20 | 63 68 61 72 61 63 74 65 |ecified |characte|
|00001e80| 72 73 20 61 73 20 62 6f | 72 64 65 72 20 65 64 67 |rs as bo|rder edg|
|00001e90| 65 73 3a 09 09 2a 2f 0a | 58 2f 2a 20 6c 09 6c 65 |es:..*/.|X/* l.le|
|00001ea0| 66 74 09 09 09 09 09 09 | 09 2a 2f 0a 58 2f 2a 20 |ft......|.*/.X/* |
|00001eb0| 72 09 72 69 67 68 74 09 | 09 09 09 09 09 09 2a 2f |r.right.|......*/|
|00001ec0| 0a 58 2f 2a 20 62 09 62 | 6f 74 74 6f 6d 09 09 09 |.X/* b.b|ottom...|
|00001ed0| 09 09 09 09 2a 2f 0a 58 | 2f 2a 20 74 09 74 6f 70 |....*/.X|/* t.top|
|00001ee0| 09 09 09 09 09 09 09 2a | 2f 0a 58 2f 2a 20 74 6c |.......*|/.X/* tl|
|00001ef0| 09 74 6f 70 20 6c 65 66 | 74 20 63 6f 72 6e 65 72 |.top lef|t corner|
|00001f00| 09 09 09 09 09 09 2a 2f | 0a 58 2f 2a 20 74 72 09 |......*/|.X/* tr.|
|00001f10| 74 6f 70 20 72 69 67 68 | 74 20 63 6f 72 6e 65 72 |top righ|t corner|
|00001f20| 09 09 09 09 09 2a 2f 0a | 58 2f 2a 20 62 6c 09 62 |.....*/.|X/* bl.b|
|00001f30| 6f 74 74 6f 6d 20 6c 65 | 66 74 20 63 6f 72 6e 65 |ottom le|ft corne|
|00001f40| 72 09 09 09 09 09 2a 2f | 0a 58 2f 2a 20 62 72 09 |r.....*/|.X/* br.|
|00001f50| 62 6f 74 74 6f 6d 20 72 | 69 67 68 74 20 63 6f 72 |bottom r|ight cor|
|00001f60| 6e 65 72 09 09 09 09 09 | 2a 2f 0a 58 2f 2a 20 44 |ner.....|*/.X/* D|
|00001f70| 6f 6e 27 74 20 6d 61 6b | 65 20 74 68 69 73 20 61 |on't mak|e this a|
|00001f80| 20 63 61 6c 6c 20 74 6f | 20 77 62 6f 72 64 65 72 | call to| wborder|
|00001f90| 28 29 20 2d 20 69 74 20 | 77 6f 75 6c 64 20 72 65 |() - it |would re|
|00001fa0| 71 75 69 72 65 20 73 6f | 6f 09 2a 2f 0a 58 2f 2a |quire so|o.*/.X/*|
|00001fb0| 20 6d 75 63 68 20 73 74 | 61 63 6b 20 66 6f 72 20 | much st|ack for |
|00001fc0| 70 61 72 61 6d 65 74 65 | 72 73 2e 2e 2e 09 09 09 |paramete|rs......|
|00001fd0| 09 09 2a 2f 0a 58 2f 2a | 2a 2a 2a 2a 2a 2a 2a 2a |..*/.X/*|********|
|00001fe0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001ff0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002000| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002010| 2a 2a 2a 2a 2a 2a 2a 2f | 0a 58 0a 58 76 6f 69 64 |*******/|.X.Xvoid|
|00002020| 20 62 6f 72 64 65 72 28 | 6c 2c 20 72 2c 20 74 2c | border(|l, r, t,|
|00002030| 20 62 2c 20 74 6c 2c 20 | 74 72 2c 20 62 6c 2c 20 | b, tl, |tr, bl, |
|00002040| 62 72 29 0a 58 20 20 69 | 6e 74 09 09 20 6c 3b 0a |br).X i|nt.. l;.|
|00002050| 58 20 20 69 6e 74 09 09 | 20 72 3b 0a 58 20 20 69 |X int..| r;.X i|
|00002060| 6e 74 09 09 20 74 3b 0a | 58 20 20 69 6e 74 09 09 |nt.. t;.|X int..|
|00002070| 20 62 3b 0a 58 20 20 69 | 6e 74 09 09 20 74 6c 3b | b;.X i|nt.. tl;|
|00002080| 0a 58 20 20 69 6e 74 09 | 09 20 74 72 3b 0a 58 20 |.X int.|. tr;.X |
|00002090| 20 69 6e 74 09 09 20 62 | 6c 3b 0a 58 20 20 69 6e | int.. b|l;.X in|
|000020a0| 74 09 09 20 62 72 3b 0a | 58 20 20 7b 0a 58 20 20 |t.. br;.|X {.X |
|000020b0| 73 68 6f 72 74 09 20 78 | 6d 61 78 2c 20 79 6d 61 |short. x|max, yma|
|000020c0| 78 2c 20 69 3b 0a 58 0a | 58 20 20 79 6d 61 78 20 |x, i;.X.|X ymax |
|000020d0| 3d 20 73 74 64 73 63 72 | 2d 3e 5f 6d 61 78 79 20 |= stdscr|->_maxy |
|000020e0| 2d 20 31 3b 0a 58 20 20 | 78 6d 61 78 20 3d 20 73 |- 1;.X |xmax = s|
|000020f0| 74 64 73 63 72 2d 3e 5f | 6d 61 78 78 20 2d 20 31 |tdscr->_|maxx - 1|
|00002100| 3b 0a 58 20 20 66 6f 72 | 20 28 69 20 3d 20 31 3b |;.X for| (i = 1;|
|00002110| 20 69 20 3c 3d 20 78 6d | 61 78 2d 31 3b 69 2b 2b | i <= xm|ax-1;i++|
|00002120| 29 0a 58 20 20 20 20 7b | 0a 58 20 20 20 20 73 74 |).X {|.X st|
|00002130| 64 73 63 72 2d 3e 5f 6c | 69 6e 65 5b 30 5d 5b 69 |dscr->_l|ine[0][i|
|00002140| 5d 20 3d 20 20 20 20 20 | 74 20 7c 20 73 74 64 73 |] = |t | stds|
|00002150| 63 72 2d 3e 5f 61 74 74 | 72 73 3b 0a 58 20 20 20 |cr->_att|rs;.X |
|00002160| 20 73 74 64 73 63 72 2d | 3e 5f 6c 69 6e 65 5b 79 | stdscr-|>_line[y|
|00002170| 6d 61 78 5d 5b 69 5d 20 | 3d 20 20 62 20 7c 20 73 |max][i] |= b | s|
|00002180| 74 64 73 63 72 2d 3e 5f | 61 74 74 72 73 3b 0a 58 |tdscr->_|attrs;.X|
|00002190| 20 20 20 20 7d 20 2f 2a | 20 66 6f 72 20 2a 2f 0a | } /*| for */.|
|000021a0| 58 20 20 66 6f 72 20 28 | 69 20 3d 20 31 3b 69 20 |X for (|i = 1;i |
|000021b0| 3c 3d 20 79 6d 61 78 2d | 31 3b 69 2b 2b 29 0a 58 |<= ymax-|1;i++).X|
|000021c0| 20 20 20 20 7b 0a 58 20 | 20 20 20 73 74 64 73 63 | {.X | stdsc|
|000021d0| 72 2d 3e 5f 6c 69 6e 65 | 5b 69 5d 5b 30 5d 20 3d |r->_line|[i][0] =|
|000021e0| 20 20 20 20 20 6c 20 7c | 20 73 74 64 73 63 72 2d | l || stdscr-|
|000021f0| 3e 5f 61 74 74 72 73 3b | 0a 58 20 20 20 20 73 74 |>_attrs;|.X st|
|00002200| 64 73 63 72 2d 3e 5f 6c | 69 6e 65 5b 69 5d 5b 78 |dscr->_l|ine[i][x|
|00002210| 6d 61 78 5d 20 3d 20 20 | 72 20 7c 20 73 74 64 73 |max] = |r | stds|
|00002220| 63 72 2d 3e 5f 61 74 74 | 72 73 3b 0a 58 20 20 20 |cr->_att|rs;.X |
|00002230| 20 7d 20 2f 2a 20 66 6f | 72 20 2a 2f 0a 58 20 20 | } /* fo|r */.X |
|00002240| 73 74 64 73 63 72 2d 3e | 5f 6c 69 6e 65 5b 30 5d |stdscr->|_line[0]|
|00002250| 5b 30 5d 20 3d 20 20 20 | 20 20 20 20 74 6c 20 7c |[0] = | tl ||
|00002260| 20 73 74 64 73 63 72 2d | 3e 5f 61 74 74 72 73 3b | stdscr-|>_attrs;|
|00002270| 0a 58 20 20 73 74 64 73 | 63 72 2d 3e 5f 6c 69 6e |.X stds|cr->_lin|
|00002280| 65 5b 30 5d 5b 78 6d 61 | 78 5d 20 3d 20 20 20 20 |e[0][xma|x] = |
|00002290| 74 72 20 7c 20 73 74 64 | 73 63 72 2d 3e 5f 61 74 |tr | std|scr->_at|
|000022a0| 74 72 73 3b 0a 58 20 20 | 73 74 64 73 63 72 2d 3e |trs;.X |stdscr->|
|000022b0| 5f 6c 69 6e 65 5b 79 6d | 61 78 5d 5b 30 5d 20 3d |_line[ym|ax][0] =|
|000022c0| 20 20 20 20 62 6c 20 7c | 20 73 74 64 73 63 72 2d | bl || stdscr-|
|000022d0| 3e 5f 61 74 74 72 73 3b | 0a 58 20 20 73 74 64 73 |>_attrs;|.X stds|
|000022e0| 63 72 2d 3e 5f 6c 69 6e | 65 5b 79 6d 61 78 5d 5b |cr->_lin|e[ymax][|
|000022f0| 78 6d 61 78 5d 20 3d 20 | 62 72 20 7c 20 73 74 64 |xmax] = |br | std|
|00002300| 73 63 72 2d 3e 5f 61 74 | 74 72 73 3b 0a 58 0a 58 |scr->_at|trs;.X.X|
|00002310| 20 20 66 6f 72 20 28 69 | 3d 30 3b 20 69 20 3c 3d | for (i|=0; i <=|
|00002320| 20 79 6d 61 78 20 3b 20 | 69 2b 2b 29 0a 58 20 20 | ymax ; |i++).X |
|00002330| 20 20 7b 0a 58 20 20 20 | 20 73 74 64 73 63 72 2d | {.X | stdscr-|
|00002340| 3e 5f 6d 69 6e 63 68 6e | 67 5b 69 5d 20 3d 20 30 |>_minchn|g[i] = 0|
|00002350| 3b 0a 58 20 20 20 20 73 | 74 64 73 63 72 2d 3e 5f |;.X s|tdscr->_|
|00002360| 6d 61 78 63 68 6e 67 5b | 69 5d 20 3d 20 78 6d 61 |maxchng[|i] = xma|
|00002370| 78 3b 0a 58 20 20 20 20 | 7d 20 2f 2a 20 66 6f 72 |x;.X |} /* for|
|00002380| 20 2a 2f 0a 58 20 20 7d | 20 2f 2a 20 62 6f 72 64 | */.X }| /* bord|
|00002390| 65 72 20 2a 2f 0a 45 4e | 44 5f 4f 46 5f 62 6f 72 |er */.EN|D_OF_bor|
|000023a0| 64 65 72 2e 63 0a 69 66 | 20 74 65 73 74 20 33 36 |der.c.if| test 36|
|000023b0| 30 30 20 2d 6e 65 20 60 | 77 63 20 2d 63 20 3c 62 |00 -ne `|wc -c <b|
|000023c0| 6f 72 64 65 72 2e 63 60 | 3b 20 74 68 65 6e 0a 20 |order.c`|; then. |
|000023d0| 20 20 20 65 63 68 6f 20 | 5c 22 62 6f 72 64 65 72 | echo |\"border|
|000023e0| 2e 63 5c 22 20 75 6e 70 | 61 63 6b 65 64 20 77 69 |.c\" unp|acked wi|
|000023f0| 74 68 20 77 72 6f 6e 67 | 20 73 69 7a 65 21 0a 66 |th wrong| size!.f|
|00002400| 69 0a 23 20 65 6e 64 20 | 6f 66 20 6f 76 65 72 77 |i.# end |of overw|
|00002410| 72 69 74 69 6e 67 20 63 | 68 65 63 6b 0a 66 69 0a |riting c|heck.fi.|
|00002420| 69 66 20 74 65 73 74 20 | 2d 66 20 62 6f 78 65 73 |if test |-f boxes|
|00002430| 2e 63 20 2d 61 20 22 24 | 7b 31 7d 22 20 21 3d 20 |.c -a "$|{1}" != |
|00002440| 22 2d 63 22 20 3b 20 74 | 68 65 6e 20 0a 20 20 65 |"-c" ; t|hen . e|
|00002450| 63 68 6f 20 57 69 6c 6c | 20 6e 6f 74 20 6f 76 65 |cho Will| not ove|
|00002460| 72 2d 77 72 69 74 65 20 | 65 78 69 73 74 69 6e 67 |r-write |existing|
|00002470| 20 66 69 6c 65 20 5c 22 | 62 6f 78 65 73 2e 63 5c | file \"|boxes.c\|
|00002480| 22 0a 65 6c 73 65 0a 65 | 63 68 6f 20 45 78 74 72 |".else.e|cho Extr|
|00002490| 61 63 74 69 6e 67 20 2d | 20 5c 22 62 6f 78 65 73 |acting -| \"boxes|
|000024a0| 2e 63 5c 22 0a 73 65 64 | 20 22 73 2f 5e 58 2f 2f |.c\".sed| "s/^X//|
|000024b0| 22 20 3e 62 6f 78 65 73 | 2e 63 20 3c 3c 27 45 4e |" >boxes|.c <<'EN|
|000024c0| 44 5f 4f 46 5f 62 6f 78 | 65 73 2e 63 27 0a 58 2f |D_OF_box|es.c'.X/|
|000024d0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000024e0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000024f0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002500| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002510| 2f 0a 58 2f 2a 20 42 6f | 78 28 29 20 72 6f 75 74 |/.X/* Bo|x() rout|
|00002520| 69 6e 65 73 20 6f 66 20 | 74 68 65 20 50 43 63 75 |ines of |the PCcu|
|00002530| 72 73 65 73 20 70 61 63 | 6b 61 67 65 09 09 09 2a |rses pac|kage...*|
|00002540| 2f 0a 58 2f 2a 09 09 09 | 09 09 09 09 09 2a 2f 0a |/.X/*...|.....*/.|
|00002550| 58 2f 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |X/******|********|
|00002560| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002570| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002580| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002590| 2a 2a 2f 0a 58 2f 2a 20 | 54 68 69 73 20 76 65 72 |**/.X/* |This ver|
|000025a0| 73 69 6f 6e 20 6f 66 20 | 63 75 72 73 65 73 20 69 |sion of |curses i|
|000025b0| 73 20 62 61 73 65 64 20 | 6f 6e 20 6e 63 75 72 73 |s based |on ncurs|
|000025c0| 65 73 2c 20 61 20 63 75 | 72 73 65 73 20 76 65 72 |es, a cu|rses ver|
|000025d0| 73 69 6f 6e 09 2a 2f 0a | 58 2f 2a 20 6f 72 69 67 |sion.*/.|X/* orig|
|000025e0| 69 6e 61 6c 6c 79 20 77 | 72 69 74 74 65 6e 20 62 |inally w|ritten b|
|000025f0| 79 20 50 61 76 65 6c 20 | 43 75 72 74 69 73 20 61 |y Pavel |Curtis a|
|00002600| 74 20 43 6f 72 6e 65 6c | 6c 20 55 6e 69 76 65 72 |t Cornel|l Univer|
|00002610| 73 69 74 79 2e 09 2a 2f | 0a 58 2f 2a 20 49 20 68 |sity..*/|.X/* I h|
|00002620| 61 76 65 20 6d 61 64 65 | 20 73 75 62 73 74 61 6e |ave made| substan|
|00002630| 74 69 61 6c 20 63 68 61 | 6e 67 65 73 20 74 6f 20 |tial cha|nges to |
|00002640| 6d 61 6b 65 20 69 74 20 | 72 75 6e 20 6f 6e 20 49 |make it |run on I|
|00002650| 42 4d 20 50 43 27 73 2c | 09 2a 2f 0a 58 2f 2a 20 |BM PC's,|.*/.X/* |
|00002660| 61 6e 64 20 74 68 65 72 | 65 66 6f 72 65 20 63 6f |and ther|efore co|
|00002670| 6e 73 69 64 65 72 20 6d | 79 73 65 6c 66 20 66 72 |nsider m|yself fr|
|00002680| 65 65 20 74 6f 20 6d 61 | 6b 65 20 69 74 20 70 75 |ee to ma|ke it pu|
|00002690| 62 6c 69 63 20 64 6f 6d | 61 69 6e 2e 09 2a 2f 0a |blic dom|ain..*/.|
|000026a0| 58 2f 2a 09 09 09 09 42 | 6a 6f 72 6e 20 4c 61 72 |X/*....B|jorn Lar|
|000026b0| 73 73 6f 6e 20 28 62 6c | 40 69 6e 66 6f 76 6f 78 |sson (bl|@infovox|
|000026c0| 2e 73 65 29 09 2a 2f 0a | 58 2f 2a 2a 2a 2a 2a 2a |.se).*/.|X/******|
|000026d0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000026e0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000026f0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002700| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2f 0a 58 2f 2a 20 |********|**/.X/* |
|00002710| 31 2e 34 3a 20 20 52 65 | 66 65 72 65 6e 63 65 73 |1.4: Re|ferences|
|00002720| 20 74 6f 20 77 69 6e 2d | 3e 62 6f 72 64 65 72 63 | to win-|>borderc|
|00002730| 68 61 72 5b 5d 20 72 65 | 6d 6f 76 65 64 20 64 75 |har[] re|moved du|
|00002740| 65 20 74 6f 09 09 2a 2f | 0a 58 2f 2a 09 20 72 65 |e to..*/|.X/*. re|
|00002750| 2d 64 65 66 69 6e 65 64 | 20 62 6f 72 64 65 72 28 |-defined| border(|
|00002760| 29 20 66 75 6e 63 74 69 | 6f 6e 73 2e 20 55 73 65 |) functi|ons. Use|
|00002770| 20 6f 66 20 73 68 6f 72 | 74 09 09 2a 2f 0a 58 2f | of shor|t..*/.X/|
|00002780| 2a 09 20 77 68 65 72 65 | 76 65 72 20 70 6f 73 73 |*. where|ver poss|
|00002790| 69 62 6c 65 2e 20 50 6f | 72 74 61 62 69 6c 69 74 |ible. Po|rtabilit|
|000027a0| 79 20 69 6d 70 72 6f 76 | 65 6d 65 6e 74 73 3a 09 |y improv|ements:.|
|000027b0| 39 30 30 31 31 34 09 2a | 2f 0a 58 2f 2a 20 31 2e |900114.*|/.X/* 1.|
|000027c0| 33 3a 20 20 4d 53 43 20 | 27 2d 57 33 27 2c 20 54 |3: MSC |'-W3', T|
|000027d0| 75 72 62 6f 27 43 27 20 | 27 2d 77 20 2d 77 2d 70 |urbo'C' |'-w -w-p|
|000027e0| 72 6f 27 20 63 68 65 63 | 6b 73 2e 09 09 2a 2f 0a |ro' chec|ks...*/.|
|000027f0| 58 2f 2a 09 20 53 75 70 | 70 6f 72 74 20 66 6f 72 |X/*. Sup|port for|
|00002800| 20 62 6f 72 64 65 72 28 | 29 2c 20 77 62 6f 72 64 | border(|), wbord|
|00002810| 65 72 28 29 20 66 75 6e | 63 74 69 6f 6e 73 3a 09 |er() fun|ctions:.|
|00002820| 38 38 31 30 30 35 09 2a | 2f 0a 58 2f 2a 20 31 2e |881005.*|/.X/* 1.|
|00002830| 32 3a 09 20 4d 61 78 20 | 6c 69 6d 69 74 73 20 6f |2:. Max |limits o|
|00002840| 66 66 20 62 79 20 31 2e | 20 46 69 78 65 64 20 74 |ff by 1.| Fixed t|
|00002850| 68 61 6e 6b 73 20 74 6f | 20 53 2e 20 43 72 65 70 |hanks to| S. Crep|
|00002860| 73 3a 09 38 38 31 30 30 | 32 09 2a 2f 0a 58 2f 2a |s:.88100|2.*/.X/*|
|00002870| 20 31 2e 30 3a 09 20 52 | 65 6c 65 61 73 65 3a 09 | 1.0:. R|elease:.|
|00002880| 09 09 09 09 38 37 30 35 | 31 35 09 2a 2f 0a 58 2f |....8705|15.*/.X/|
|00002890| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000028a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000028b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000028c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000028d0| 2f 0a 58 0a 58 23 69 6e | 63 6c 75 64 65 20 3c 63 |/.X.X#in|clude <c|
|000028e0| 75 72 73 65 73 2e 68 3e | 0a 58 23 69 6e 63 6c 75 |urses.h>|.X#inclu|
|000028f0| 64 65 20 3c 63 75 72 73 | 70 72 69 76 2e 68 3e 0a |de <curs|priv.h>.|
|00002900| 58 0a 58 63 68 61 72 20 | 5f 63 75 72 73 65 73 5f |X.Xchar |_curses_|
|00002910| 62 6f 78 65 73 5f 72 63 | 73 69 64 5b 5d 20 3d 20 |boxes_rc|sid[] = |
|00002920| 22 40 28 23 29 62 6f 78 | 65 73 2e 63 20 20 20 20 |"@(#)box|es.c |
|00002930| 20 20 76 2e 31 2e 34 20 | 20 2d 20 39 30 30 31 31 | v.1.4 | - 90011|
|00002940| 34 22 3b 0a 58 0a 58 2f | 2a 2a 2a 2a 2a 2a 2a 2a |4";.X.X/|********|
|00002950| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002960| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002970| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002980| 2a 2a 2a 2a 2a 2a 2a 2a | 2f 0a 58 2f 2a 20 77 62 |********|/.X/* wb|
|00002990| 6f 78 28 77 69 6e 2c 79 | 6d 69 6e 2c 78 6d 69 6e |ox(win,y|min,xmin|
|000029a0| 2c 79 6d 61 78 2c 78 6d | 61 78 2c 76 2c 68 29 20 |,ymax,xm|ax,v,h) |
|000029b0| 64 72 61 77 73 20 61 20 | 62 6f 78 20 69 6e 20 77 |draws a |box in w|
|000029c0| 69 6e 64 6f 77 09 2a 2f | 0a 58 2f 2a 20 27 77 69 |indow.*/|.X/* 'wi|
|000029d0| 6e 27 2c 20 65 6e 63 6c | 6f 73 69 6e 67 20 74 68 |n', encl|osing th|
|000029e0| 65 20 61 72 65 61 20 78 | 6d 69 6e 2d 78 6d 61 78 |e area x|min-xmax|
|000029f0| 20 61 6e 64 20 79 6d 69 | 6e 2d 78 6d 61 78 2e 20 | and ymi|n-xmax. |
|00002a00| 49 66 09 2a 2f 0a 58 2f | 2a 20 78 6d 61 78 20 61 |If.*/.X/|* xmax a|
|00002a10| 6e 64 2f 6f 72 20 79 6d | 61 78 20 69 73 20 30 2c |nd/or ym|ax is 0,|
|00002a20| 20 74 68 65 20 77 69 6e | 64 6f 77 20 6d 61 78 20 | the win|dow max |
|00002a30| 76 61 6c 75 65 20 69 73 | 20 75 73 65 64 2e 20 27 |value is| used. '|
|00002a40| 76 27 20 61 6e 64 09 2a | 2f 0a 58 2f 2a 20 27 68 |v' and.*|/.X/* 'h|
|00002a50| 27 20 61 72 65 20 74 68 | 65 20 76 65 72 74 69 63 |' are th|e vertic|
|00002a60| 61 6c 20 61 6e 64 20 68 | 6f 72 69 7a 6f 6e 74 61 |al and h|orizonta|
|00002a70| 6c 20 63 68 61 72 61 63 | 74 65 72 73 20 74 6f 20 |l charac|ters to |
|00002a80| 75 73 65 2e 20 49 66 09 | 2a 2f 0a 58 2f 2a 20 27 |use. If.|*/.X/* '|
|00002a90| 76 27 20 61 6e 64 20 27 | 68 27 20 61 72 65 20 50 |v' and '|h' are P|
|00002aa0| 43 20 67 72 61 70 69 63 | 73 20 6c 69 6e 65 73 2c |C grapic|s lines,|
|00002ab0| 20 77 62 6f 78 20 77 69 | 6c 6c 20 6d 61 6b 65 20 | wbox wi|ll make |
|00002ac0| 74 68 65 20 63 6f 72 6e | 65 72 73 09 2a 2f 0a 58 |the corn|ers.*/.X|
|00002ad0| 2f 2a 20 69 6e 20 61 20 | 70 72 65 74 74 79 20 77 |/* in a |pretty w|
|00002ae0| 61 79 2e 09 09 09 09 09 | 09 2a 2f 0a 58 2f 2a 2a |ay......|.*/.X/**|
|00002af0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002b00| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002b10| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002b20| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2f 0a |********|******/.|
|00002b30| 58 0a 58 69 6e 74 09 77 | 62 6f 78 28 77 69 6e 2c |X.Xint.w|box(win,|
|00002b40| 79 6d 69 6e 2c 78 6d 69 | 6e 2c 79 6d 61 78 2c 78 |ymin,xmi|n,ymax,x|
|00002b50| 6d 61 78 2c 76 2c 68 29 | 0a 58 20 20 57 49 4e 44 |max,v,h)|.X WIND|
|00002b60| 4f 57 09 2a 77 69 6e 3b | 0a 58 20 20 69 6e 74 09 |OW.*win;|.X int.|
|00002b70| 09 20 79 6d 69 6e 3b 0a | 58 20 20 69 6e 74 09 09 |. ymin;.|X int..|
|00002b80| 20 78 6d 69 6e 3b 0a 58 | 20 20 69 6e 74 09 09 20 | xmin;.X| int.. |
|00002b90| 79 6d 61 78 3b 0a 58 20 | 20 69 6e 74 09 09 20 78 |ymax;.X | int.. x|
|00002ba0| 6d 61 78 3b 0a 58 20 20 | 63 68 61 72 09 09 20 76 |max;.X |char.. v|
|00002bb0| 3b 0a 58 20 20 63 68 61 | 72 09 09 20 68 3b 0a 58 |;.X cha|r.. h;.X|
|00002bc0| 20 20 7b 0a 58 20 20 73 | 74 61 74 69 63 20 73 68 | {.X s|tatic sh|
|00002bd0| 6f 72 74 09 20 6c 2c 20 | 72 2c 20 74 2c 20 62 2c |ort. l, |r, t, b,|
|00002be0| 20 74 6c 2c 20 74 72 2c | 20 62 6c 2c 62 72 3b 09 | tl, tr,| bl,br;.|
|00002bf0| 2f 2a 20 62 6f 72 64 65 | 72 20 63 68 61 72 73 20 |/* borde|r chars |
|00002c00| 2a 2f 0a 58 20 20 73 68 | 6f 72 74 09 09 20 69 3b |*/.X sh|ort.. i;|
|00002c10| 0a 58 0a 58 20 20 69 66 | 20 28 79 6d 61 78 20 3d |.X.X if| (ymax =|
|00002c20| 3d 20 30 29 0a 58 20 20 | 20 20 79 6d 61 78 20 3d |= 0).X | ymax =|
|00002c30| 20 77 69 6e 2d 3e 5f 6d | 61 78 79 20 2d 20 31 3b | win->_m|axy - 1;|
|00002c40| 0a 58 20 20 69 66 20 28 | 78 6d 61 78 20 3d 3d 20 |.X if (|xmax == |
|00002c50| 30 29 0a 58 20 20 20 20 | 78 6d 61 78 20 3d 20 77 |0).X |xmax = w|
|00002c60| 69 6e 2d 3e 5f 6d 61 78 | 78 20 2d 20 31 3b 0a 58 |in->_max|x - 1;.X|
|00002c70| 0a 58 20 20 69 66 20 28 | 79 6d 69 6e 20 3e 3d 20 |.X if (|ymin >= |
|00002c80| 77 69 6e 2d 3e 5f 6d 61 | 78 79 20 7c 7c 20 79 6d |win->_ma|xy || ym|
|00002c90| 61 78 20 3e 20 77 69 6e | 2d 3e 5f 6d 61 78 79 20 |ax > win|->_maxy |
|00002ca0| 7c 7c 0a 58 20 20 20 20 | 20 20 78 6d 69 6e 20 3e |||.X | xmin >|
|00002cb0| 3d 20 77 69 6e 2d 3e 5f | 6d 61 78 78 20 7c 7c 20 |= win->_|maxx || |
|00002cc0| 78 6d 61 78 20 3e 20 77 | 69 6e 2d 3e 5f 6d 61 78 |xmax > w|in->_max|
|00002cd0| 78 20 7c 7c 0a 58 20 20 | 20 20 20 20 79 6d 69 6e |x ||.X | ymin|
|00002ce0| 20 3e 3d 20 79 6d 61 78 | 20 7c 7c 20 78 6d 69 6e | >= ymax| || xmin|
|00002cf0| 20 3e 3d 20 78 6d 61 78 | 0a 58 20 20 20 20 20 29 | >= xmax|.X )|
|00002d00| 0a 58 20 20 20 20 20 72 | 65 74 75 72 6e 28 45 52 |.X r|eturn(ER|
|00002d10| 52 29 3b 0a 58 0a 58 20 | 20 6c 20 3d 20 72 20 3d |R);.X.X | l = r =|
|00002d20| 20 76 20 26 20 30 78 66 | 66 3b 09 09 09 2f 2a 20 | v & 0xf|f;.../* |
|00002d30| 67 65 74 20 72 69 64 20 | 6f 66 20 73 69 67 6e 2d |get rid |of sign-|
|00002d40| 65 78 74 65 6e 64 65 64 | 20 69 6e 74 20 2a 2f 0a |extended| int */.|
|00002d50| 58 20 20 74 20 3d 20 62 | 20 3d 20 68 20 26 20 30 |X t = b| = h & 0|
|00002d60| 78 66 66 3b 0a 58 20 20 | 74 6c 20 3d 20 74 72 20 |xff;.X |tl = tr |
|00002d70| 3d 20 62 6c 20 3d 20 62 | 72 20 3d 20 76 3b 09 09 |= bl = b|r = v;..|
|00002d80| 2f 2a 20 64 65 66 61 75 | 6c 74 20 73 61 6d 65 20 |/* defau|lt same |
|00002d90| 61 73 20 76 65 72 74 69 | 63 61 6c 20 2a 2f 0a 58 |as verti|cal */.X|
|00002da0| 0a 58 20 20 69 66 20 28 | 6c 20 3d 3d 20 30 78 62 |.X if (|l == 0xb|
|00002db0| 61 29 09 09 09 2f 2a 20 | 76 65 72 74 69 63 61 6c |a).../* |vertical|
|00002dc0| 20 64 6f 75 62 6c 65 20 | 62 61 72 73 20 2a 2f 0a | double |bars */.|
|00002dd0| 58 20 20 20 20 7b 0a 58 | 20 20 20 20 69 66 20 28 |X {.X| if (|
|00002de0| 74 20 3d 3d 20 30 78 63 | 64 29 09 09 09 2f 2a 20 |t == 0xc|d).../* |
|00002df0| 68 6f 72 69 7a 6f 6e 74 | 61 6c 20 74 6f 6f 3f 20 |horizont|al too? |
|00002e00| 2a 2f 0a 58 20 20 20 20 | 20 20 7b 74 6c 3d 30 78 |*/.X | {tl=0x|
|00002e10| 63 39 3b 74 72 3d 30 78 | 62 62 3b 62 6c 3d 30 78 |c9;tr=0x|bb;bl=0x|
|00002e20| 63 38 3b 62 72 3d 30 78 | 62 63 3b 7d 2f 2a 20 75 |c8;br=0x|bc;}/* u|
|00002e30| 73 65 20 64 6f 75 62 6c | 65 20 62 61 72 20 63 6f |se doubl|e bar co|
|00002e40| 72 6e 65 72 73 20 2a 2f | 0a 58 20 20 20 20 65 6c |rners */|.X el|
|00002e50| 73 65 0a 58 20 20 20 20 | 20 20 7b 74 6c 3d 30 78 |se.X | {tl=0x|
|00002e60| 64 36 3b 74 72 3d 30 78 | 62 37 3b 62 6c 3d 30 78 |d6;tr=0x|b7;bl=0x|
|00002e70| 64 33 3b 62 72 3d 30 78 | 62 64 3b 7d 2f 2a 20 75 |d3;br=0x|bd;}/* u|
|00002e80| 73 65 20 68 6f 72 2d 73 | 20 76 65 72 74 2d 64 20 |se hor-s| vert-d |
|00002e90| 63 6f 72 6e 65 72 73 20 | 2a 2f 0a 58 20 20 20 20 |corners |*/.X |
|00002ea0| 7d 20 2f 2a 20 69 66 20 | 2a 2f 0a 58 0a 58 20 20 |} /* if |*/.X.X |
|00002eb0| 69 66 20 28 6c 20 3d 3d | 20 30 78 62 33 29 09 09 |if (l ==| 0xb3)..|
|00002ec0| 09 2f 2a 20 76 65 72 74 | 69 63 61 6c 20 73 69 6e |./* vert|ical sin|
|00002ed0| 67 6c 65 20 62 61 72 73 | 20 2a 2f 0a 58 20 20 20 |gle bars| */.X |
|00002ee0| 20 7b 0a 58 20 20 20 20 | 69 66 20 28 74 20 3d 3d | {.X |if (t ==|
|00002ef0| 20 30 78 63 64 29 09 09 | 09 0a 58 20 20 20 20 20 | 0xcd)..|..X |
|00002f00| 20 7b 74 6c 3d 30 78 64 | 35 3b 74 72 3d 30 78 62 | {tl=0xd|5;tr=0xb|
|00002f10| 38 3b 62 6c 3d 30 78 64 | 34 3b 62 72 3d 30 78 62 |8;bl=0xd|4;br=0xb|
|00002f20| 65 3b 7d 2f 2a 20 68 6f | 72 69 7a 6f 6e 74 61 6c |e;}/* ho|rizontal|
|00002f30| 20 64 6f 75 62 6c 65 20 | 62 61 72 73 20 2a 2f 0a | double |bars */.|
|00002f40| 58 20 20 20 20 65 6c 73 | 65 09 09 09 09 0a 58 20 |X els|e.....X |
|00002f50| 20 20 20 20 20 7b 74 6c | 3d 30 78 64 61 3b 74 72 | {tl|=0xda;tr|
|00002f60| 3d 30 78 62 66 3b 62 6c | 3d 30 78 63 30 3b 62 72 |=0xbf;bl|=0xc0;br|
|00002f70| 3d 30 78 64 39 3b 7d 2f | 2a 20 75 73 65 20 68 6f |=0xd9;}/|* use ho|
|00002f80| 72 2d 73 20 76 65 72 74 | 2d 73 20 62 61 72 73 20 |r-s vert|-s bars |
|00002f90| 2a 2f 0a 58 20 20 20 20 | 7d 20 2f 2a 20 69 66 20 |*/.X |} /* if |
|00002fa0| 2a 2f 0a 58 20 0a 58 20 | 20 66 6f 72 20 28 69 20 |*/.X .X | for (i |
|00002fb0| 3d 20 78 6d 69 6e 2b 31 | 3b 69 20 3c 3d 20 78 6d |= xmin+1|;i <= xm|
|00002fc0| 61 78 2d 31 3b 69 2b 2b | 29 0a 58 20 20 20 20 7b |ax-1;i++|).X {|
|00002fd0| 0a 58 20 20 20 20 77 69 | 6e 2d 3e 5f 6c 69 6e 65 |.X wi|n->_line|
|00002fe0| 5b 79 6d 69 6e 5d 5b 69 | 5d 20 3d 20 74 20 7c 20 |[ymin][i|] = t | |
|00002ff0| 77 69 6e 2d 3e 5f 61 74 | 74 72 73 3b 0a 58 20 20 |win->_at|trs;.X |
|00003000| 20 20 77 69 6e 2d 3e 5f | 6c 69 6e 65 5b 79 6d 61 | win->_|line[yma|
|00003010| 78 5d 5b 69 5d 20 3d 20 | 62 20 7c 20 77 69 6e 2d |x][i] = |b | win-|
|00003020| 3e 5f 61 74 74 72 73 3b | 0a 58 20 20 20 20 7d 0a |>_attrs;|.X }.|
|00003030| 58 20 20 66 6f 72 20 28 | 69 20 3d 20 79 6d 69 6e |X for (|i = ymin|
|00003040| 2b 31 3b 69 20 3c 3d 20 | 79 6d 61 78 2d 31 3b 69 |+1;i <= |ymax-1;i|
|00003050| 2b 2b 29 0a 58 20 20 20 | 20 7b 0a 58 20 20 20 20 |++).X | {.X |
|00003060| 77 69 6e 2d 3e 5f 6c 69 | 6e 65 5b 69 5d 5b 78 6d |win->_li|ne[i][xm|
|00003070| 69 6e 5d 20 3d 20 6c 20 | 7c 20 77 69 6e 2d 3e 5f |in] = l || win->_|
|00003080| 61 74 74 72 73 3b 0a 58 | 20 20 20 20 77 69 6e 2d |attrs;.X| win-|
|00003090| 3e 5f 6c 69 6e 65 5b 69 | 5d 5b 78 6d 61 78 5d 20 |>_line[i|][xmax] |
|000030a0| 3d 20 72 20 7c 20 77 69 | 6e 2d 3e 5f 61 74 74 72 |= r | wi|n->_attr|
|000030b0| 73 3b 0a 58 20 20 20 20 | 7d 0a 58 20 20 77 69 6e |s;.X |}.X win|
|000030c0| 2d 3e 5f 6c 69 6e 65 5b | 79 6d 69 6e 5d 5b 78 6d |->_line[|ymin][xm|
|000030d0| 69 6e 5d 20 3d 20 74 6c | 20 7c 20 77 69 6e 2d 3e |in] = tl| | win->|
|000030e0| 5f 61 74 74 72 73 3b 0a | 58 20 20 77 69 6e 2d 3e |_attrs;.|X win->|
|000030f0| 5f 6c 69 6e 65 5b 79 6d | 69 6e 5d 5b 78 6d 61 78 |_line[ym|in][xmax|
|00003100| 5d 20 3d 20 74 72 20 7c | 20 77 69 6e 2d 3e 5f 61 |] = tr || win->_a|
|00003110| 74 74 72 73 3b 0a 58 20 | 20 77 69 6e 2d 3e 5f 6c |ttrs;.X | win->_l|
|00003120| 69 6e 65 5b 79 6d 61 78 | 5d 5b 78 6d 69 6e 5d 20 |ine[ymax|][xmin] |
|00003130| 3d 20 62 6c 20 7c 20 77 | 69 6e 2d 3e 5f 61 74 74 |= bl | w|in->_att|
|00003140| 72 73 3b 0a 58 20 20 77 | 69 6e 2d 3e 5f 6c 69 6e |rs;.X w|in->_lin|
|00003150| 65 5b 79 6d 61 78 5d 5b | 78 6d 61 78 5d 20 3d 20 |e[ymax][|xmax] = |
|00003160| 62 72 20 7c 20 77 69 6e | 2d 3e 5f 61 74 74 72 73 |br | win|->_attrs|
|00003170| 3b 0a 58 0a 58 20 20 66 | 6f 72 20 28 69 3d 79 6d |;.X.X f|or (i=ym|
|00003180| 69 6e 3b 20 69 20 3c 3d | 20 79 6d 61 78 20 3b 20 |in; i <=| ymax ; |
|00003190| 69 2b 2b 29 0a 58 20 20 | 20 20 7b 0a 58 20 20 20 |i++).X | {.X |
|000031a0| 20 69 66 20 28 77 69 6e | 2d 3e 5f 6d 69 6e 63 68 | if (win|->_minch|
|000031b0| 6e 67 5b 69 5d 20 3d 3d | 20 5f 4e 4f 5f 43 48 41 |ng[i] ==| _NO_CHA|
|000031c0| 4e 47 45 29 0a 58 20 20 | 20 20 20 20 7b 0a 58 20 |NGE).X | {.X |
|000031d0| 20 20 20 20 20 77 69 6e | 2d 3e 5f 6d 69 6e 63 68 | win|->_minch|
|000031e0| 6e 67 5b 69 5d 20 3d 20 | 78 6d 69 6e 3b 0a 58 20 |ng[i] = |xmin;.X |
|000031f0| 20 20 20 20 20 77 69 6e | 2d 3e 5f 6d 61 78 63 68 | win|->_maxch|
|00003200| 6e 67 5b 69 5d 20 3d 20 | 78 6d 61 78 3b 0a 58 20 |ng[i] = |xmax;.X |
|00003210| 20 20 20 20 20 7d 20 2f | 2a 20 69 66 20 2a 2f 0a | } /|* if */.|
|00003220| 58 20 20 20 20 65 6c 73 | 65 0a 58 20 20 20 20 20 |X els|e.X |
|00003230| 20 7b 0a 58 20 20 20 20 | 20 20 77 69 6e 2d 3e 5f | {.X | win->_|
|00003240| 6d 69 6e 63 68 6e 67 5b | 69 5d 20 3d 20 6d 69 6e |minchng[|i] = min|
|00003250| 28 77 69 6e 2d 3e 5f 6d | 69 6e 63 68 6e 67 5b 69 |(win->_m|inchng[i|
|00003260| 5d 2c 20 78 6d 69 6e 29 | 3b 0a 58 20 20 20 20 20 |], xmin)|;.X |
|00003270| 20 77 69 6e 2d 3e 5f 6d | 61 78 63 68 6e 67 5b 69 | win->_m|axchng[i|
|00003280| 5d 20 3d 20 6d 61 78 28 | 77 69 6e 2d 3e 5f 6d 61 |] = max(|win->_ma|
|00003290| 78 63 68 6e 67 5b 69 5d | 2c 20 78 6d 61 78 29 3b |xchng[i]|, xmax);|
|000032a0| 0a 58 20 20 20 20 20 20 | 7d 20 2f 2a 20 65 6c 73 |.X |} /* els|
|000032b0| 65 20 2a 2f 0a 58 20 20 | 20 20 7d 20 2f 2a 20 66 |e */.X | } /* f|
|000032c0| 6f 72 20 2a 2f 0a 58 20 | 20 72 65 74 75 72 6e 28 |or */.X | return(|
|000032d0| 4f 4b 29 3b 0a 58 20 20 | 7d 20 2f 2a 20 62 6f 78 |OK);.X |} /* box|
|000032e0| 20 2a 2f 0a 58 0a 58 2f | 2a 2a 2a 2a 2a 2a 2a 2a | */.X.X/|********|
|000032f0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003300| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003310| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003320| 2a 2a 2a 2a 2a 2a 2a 2a | 2f 0a 58 2f 2a 20 62 6f |********|/.X/* bo|
|00003330| 78 28 77 69 6e 2c 76 2c | 68 29 20 64 72 61 77 73 |x(win,v,|h) draws|
|00003340| 20 61 20 62 6f 78 20 61 | 72 6f 75 6e 64 20 77 69 | a box a|round wi|
|00003350| 6e 64 6f 77 20 77 69 6e | 64 6f 77 20 27 77 69 6e |ndow win|dow 'win|
|00003360| 27 2e 20 27 76 27 20 61 | 6e 64 09 2a 2f 0a 58 2f |'. 'v' a|nd.*/.X/|
|00003370| 2a 20 27 68 27 20 61 72 | 65 20 74 68 65 20 76 65 |* 'h' ar|e the ve|
|00003380| 72 74 69 63 61 6c 20 61 | 6e 64 20 68 6f 72 69 7a |rtical a|nd horiz|
|00003390| 6f 6e 74 61 6c 20 63 68 | 61 72 61 63 74 65 72 73 |ontal ch|aracters|
|000033a0| 20 74 6f 20 75 73 65 2e | 09 2a 2f 0a 58 2f 2a 2a | to use.|.*/.X/**|
|000033b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000033c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000033d0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000033e0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2f 0a |********|******/.|
|000033f0| 58 0a 58 76 6f 69 64 09 | 62 6f 78 28 77 69 6e 2c |X.Xvoid.|box(win,|
|00003400| 76 2c 68 29 0a 58 20 20 | 57 49 4e 44 4f 57 09 2a |v,h).X |WINDOW.*|
|00003410| 77 69 6e 3b 0a 58 20 20 | 63 68 61 72 09 09 20 76 |win;.X |char.. v|
|00003420| 3b 0a 58 20 20 63 68 61 | 72 09 09 20 68 3b 0a 58 |;.X cha|r.. h;.X|
|00003430| 20 20 7b 0a 58 20 20 77 | 62 6f 78 28 77 69 6e 2c | {.X w|box(win,|
|00003440| 30 2c 30 2c 30 2c 30 2c | 76 2c 68 29 3b 0a 58 20 |0,0,0,0,|v,h);.X |
|00003450| 20 7d 20 2f 2a 20 62 6f | 78 20 2a 2f 0a 45 4e 44 | } /* bo|x */.END|
|00003460| 5f 4f 46 5f 62 6f 78 65 | 73 2e 63 0a 69 66 20 74 |_OF_boxe|s.c.if t|
|00003470| 65 73 74 20 33 38 36 34 | 20 2d 6e 65 20 60 77 63 |est 3864| -ne `wc|
|00003480| 20 2d 63 20 3c 62 6f 78 | 65 73 2e 63 60 3b 20 74 | -c <box|es.c`; t|
|00003490| 68 65 6e 0a 20 20 20 20 | 65 63 68 6f 20 5c 22 62 |hen. |echo \"b|
|000034a0| 6f 78 65 73 2e 63 5c 22 | 20 75 6e 70 61 63 6b 65 |oxes.c\"| unpacke|
|000034b0| 64 20 77 69 74 68 20 77 | 72 6f 6e 67 20 73 69 7a |d with w|rong siz|
|000034c0| 65 21 0a 66 69 0a 23 20 | 65 6e 64 20 6f 66 20 6f |e!.fi.# |end of o|
|000034d0| 76 65 72 77 72 69 74 69 | 6e 67 20 63 68 65 63 6b |verwriti|ng check|
|000034e0| 0a 66 69 0a 69 66 20 74 | 65 73 74 20 2d 66 20 63 |.fi.if t|est -f c|
|000034f0| 68 61 72 64 65 6c 2e 63 | 20 2d 61 20 22 24 7b 31 |hardel.c| -a "${1|
|00003500| 7d 22 20 21 3d 20 22 2d | 63 22 20 3b 20 74 68 65 |}" != "-|c" ; the|
|00003510| 6e 20 0a 20 20 65 63 68 | 6f 20 57 69 6c 6c 20 6e |n . ech|o Will n|
|00003520| 6f 74 20 6f 76 65 72 2d | 77 72 69 74 65 20 65 78 |ot over-|write ex|
|00003530| 69 73 74 69 6e 67 20 66 | 69 6c 65 20 5c 22 63 68 |isting f|ile \"ch|
|00003540| 61 72 64 65 6c 2e 63 5c | 22 0a 65 6c 73 65 0a 65 |ardel.c\|".else.e|
|00003550| 63 68 6f 20 45 78 74 72 | 61 63 74 69 6e 67 20 2d |cho Extr|acting -|
|00003560| 20 5c 22 63 68 61 72 64 | 65 6c 2e 63 5c 22 0a 73 | \"chard|el.c\".s|
|00003570| 65 64 20 22 73 2f 5e 58 | 2f 2f 22 20 3e 63 68 61 |ed "s/^X|//" >cha|
|00003580| 72 64 65 6c 2e 63 20 3c | 3c 27 45 4e 44 5f 4f 46 |rdel.c <|<'END_OF|
|00003590| 5f 63 68 61 72 64 65 6c | 2e 63 27 0a 58 2f 2a 2a |_chardel|.c'.X/**|
|000035a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000035b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000035c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000035d0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2f 0a |********|******/.|
|000035e0| 58 2f 2a 20 57 64 65 6c | 63 68 28 29 20 72 6f 75 |X/* Wdel|ch() rou|
|000035f0| 74 69 6e 65 20 6f 66 20 | 74 68 65 20 50 43 63 75 |tine of |the PCcu|
|00003600| 72 73 65 73 20 70 61 63 | 6b 61 67 65 09 09 09 2a |rses pac|kage...*|
|00003610| 2f 0a 58 2f 2a 09 09 09 | 09 09 09 09 09 2a 2f 0a |/.X/*...|.....*/.|
|00003620| 58 2f 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |X/******|********|
|00003630| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003640| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003650| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003660| 2a 2a 2f 0a 58 2f 2a 20 | 54 68 69 73 20 76 65 72 |**/.X/* |This ver|
|00003670| 73 69 6f 6e 20 6f 66 20 | 63 75 72 73 65 73 20 69 |sion of |curses i|
|00003680| 73 20 62 61 73 65 64 20 | 6f 6e 20 6e 63 75 72 73 |s based |on ncurs|
|00003690| 65 73 2c 20 61 20 63 75 | 72 73 65 73 20 76 65 72 |es, a cu|rses ver|
|000036a0| 73 69 6f 6e 09 2a 2f 0a | 58 2f 2a 20 6f 72 69 67 |sion.*/.|X/* orig|
|000036b0| 69 6e 61 6c 6c 79 20 77 | 72 69 74 74 65 6e 20 62 |inally w|ritten b|
|000036c0| 79 20 50 61 76 65 6c 20 | 43 75 72 74 69 73 20 61 |y Pavel |Curtis a|
|000036d0| 74 20 43 6f 72 6e 65 6c | 6c 20 55 6e 69 76 65 72 |t Cornel|l Univer|
|000036e0| 73 69 74 79 2e 09 2a 2f | 0a 58 2f 2a 20 49 20 68 |sity..*/|.X/* I h|
|000036f0| 61 76 65 20 6d 61 64 65 | 20 73 75 62 73 74 61 6e |ave made| substan|
|00003700| 74 69 61 6c 20 63 68 61 | 6e 67 65 73 20 74 6f 20 |tial cha|nges to |
|00003710| 6d 61 6b 65 20 69 74 20 | 72 75 6e 20 6f 6e 20 49 |make it |run on I|
|00003720| 42 4d 20 50 43 27 73 2c | 09 2a 2f 0a 58 2f 2a 20 |BM PC's,|.*/.X/* |
|00003730| 61 6e 64 20 74 68 65 72 | 65 66 6f 72 65 20 63 6f |and ther|efore co|
|00003740| 6e 73 69 64 65 72 20 6d | 79 73 65 6c 66 20 66 72 |nsider m|yself fr|
|00003750| 65 65 20 74 6f 20 6d 61 | 6b 65 20 69 74 20 70 75 |ee to ma|ke it pu|
|00003760| 62 6c 69 63 20 64 6f 6d | 61 69 6e 2e 09 2a 2f 0a |blic dom|ain..*/.|
|00003770| 58 2f 2a 09 09 09 09 42 | 6a 6f 72 6e 20 4c 61 72 |X/*....B|jorn Lar|
|00003780| 73 73 6f 6e 20 28 62 6c | 40 69 6e 66 6f 76 6f 78 |sson (bl|@infovox|
|00003790| 2e 73 65 29 09 2a 2f 0a | 58 2f 2a 2a 2a 2a 2a 2a |.se).*/.|X/******|
|000037a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000037b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000037c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000037d0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2f 0a 58 2f 2a 20 |********|**/.X/* |
|000037e0| 31 2e 34 3a 20 20 55 73 | 65 20 73 68 6f 72 74 20 |1.4: Us|e short |
|000037f0| 77 68 65 72 65 76 65 72 | 20 70 6f 73 73 69 62 6c |wherever| possibl|
|00003800| 65 2e 20 50 6f 72 74 61 | 62 69 6c 69 74 79 09 09 |e. Porta|bility..|
|00003810| 2a 2f 0a 58 2f 2a 09 20 | 69 6d 70 72 6f 76 65 6d |*/.X/*. |improvem|
|00003820| 65 6e 74 73 3a 09 09 09 | 09 09 39 30 30 31 31 34 |ents:...|..900114|
|00003830| 09 2a 2f 0a 58 2f 2a 20 | 31 2e 33 3a 09 20 4d 53 |.*/.X/* |1.3:. MS|
|00003840| 43 20 2d 57 33 2c 20 54 | 75 72 62 6f 27 43 27 20 |C -W3, T|urbo'C' |
|00003850| 2d 77 20 2d 77 2d 70 72 | 6f 20 63 68 65 63 6b 65 |-w -w-pr|o checke|
|00003860| 73 3a 09 09 38 38 31 30 | 30 35 09 2a 2f 0a 58 2f |s:..8810|05.*/.X/|
|00003870| 2a 20 31 2e 32 3a 09 20 | 4d 61 78 20 6c 69 6d 69 |* 1.2:. |Max limi|
|00003880| 74 73 20 6f 66 66 20 62 | 79 20 31 2e 20 46 69 78 |ts off b|y 1. Fix|
|00003890| 65 64 20 74 68 61 6e 6b | 73 20 74 6f 20 53 2e 20 |ed thank|s to S. |
|000038a0| 43 72 65 70 73 3a 09 38 | 38 31 30 30 32 09 2a 2f |Creps:.8|81002.*/|
|000038b0| 0a 58 2f 2a 20 31 2e 30 | 3a 09 20 52 65 6c 65 61 |.X/* 1.0|:. Relea|
|000038c0| 73 65 3a 09 09 09 09 09 | 38 37 30 35 31 35 09 2a |se:.....|870515.*|
|000038d0| 2f 0a 58 2f 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |/.X/****|********|
|000038e0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000038f0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003900| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003910| 2a 2a 2a 2a 2f 0a 58 0a | 58 23 69 6e 63 6c 75 64 |****/.X.|X#includ|
|00003920| 65 20 3c 63 75 72 73 65 | 73 2e 68 3e 0a 58 23 69 |e <curse|s.h>.X#i|
|00003930| 6e 63 6c 75 64 65 20 3c | 63 75 72 73 70 72 69 76 |nclude <|curspriv|
|00003940| 2e 68 3e 0a 58 0a 58 63 | 68 61 72 20 5f 63 75 72 |.h>.X.Xc|har _cur|
|00003950| 73 65 73 5f 63 68 61 72 | 64 65 6c 5f 72 63 73 69 |ses_char|del_rcsi|
|00003960| 64 5b 5d 20 3d 20 22 40 | 28 23 29 63 68 61 72 64 |d[] = "@|(#)chard|
|00003970| 65 6c 2e 63 20 20 20 20 | 76 2e 31 2e 34 20 20 2d |el.c |v.1.4 -|
|00003980| 20 39 30 30 31 31 34 22 | 3b 0a 58 0a 58 2f 2a 2a | 900114"|;.X.X/**|
|00003990| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000039a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000039b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000039c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2f 0a |********|******/.|
|000039d0| 58 2f 2a 20 57 64 65 6c | 63 68 28 29 20 64 65 6c |X/* Wdel|ch() del|
|000039e0| 65 74 65 73 20 74 68 65 | 20 63 68 61 72 61 63 74 |etes the| charact|
|000039f0| 65 72 20 61 74 20 74 68 | 65 20 77 69 6e 64 6f 77 |er at th|e window|
|00003a00| 20 63 75 72 73 6f 72 2c | 20 61 6e 64 20 74 68 65 | cursor,| and the|
|00003a10| 09 2a 2f 0a 58 2f 2a 20 | 63 68 61 72 61 63 74 65 |.*/.X/* |characte|
|00003a20| 72 73 20 74 6f 20 74 68 | 65 20 72 69 67 68 74 20 |rs to th|e right |
|00003a30| 6f 66 20 69 74 20 61 72 | 65 20 73 68 69 66 74 65 |of it ar|e shifte|
|00003a40| 64 20 6c 65 66 74 2c 20 | 69 6e 73 65 72 74 69 6e |d left, |insertin|
|00003a50| 67 20 61 09 2a 2f 0a 58 | 2f 2a 20 73 70 61 63 65 |g a.*/.X|/* space|
|00003a60| 20 61 74 20 74 68 65 20 | 6c 61 73 74 20 70 6f 73 | at the |last pos|
|00003a70| 69 74 69 6f 6e 20 6f 66 | 20 74 68 65 20 6c 69 6e |ition of| the lin|
|00003a80| 65 2e 09 09 09 2a 2f 0a | 58 2f 2a 2a 2a 2a 2a 2a |e....*/.|X/******|
|00003a90| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003aa0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003ab0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003ac0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2f 0a 58 0a 58 69 |********|**/.X.Xi|
|00003ad0| 6e 74 09 77 64 65 6c 63 | 68 28 77 69 6e 29 0a 58 |nt.wdelc|h(win).X|
|00003ae0| 20 20 57 49 4e 44 4f 57 | 09 2a 77 69 6e 3b 0a 58 | WINDOW|.*win;.X|
|00003af0| 20 20 7b 0a 58 20 20 73 | 68 6f 72 74 09 09 2a 74 | {.X s|hort..*t|
|00003b00| 65 6d 70 31 3b 0a 58 20 | 20 73 68 6f 72 74 09 09 |emp1;.X | short..|
|00003b10| 2a 74 65 6d 70 32 3b 0a | 58 20 20 73 68 6f 72 74 |*temp2;.|X short|
|00003b20| 09 09 2a 65 6e 64 3b 0a | 58 20 20 73 68 6f 72 74 |..*end;.|X short|
|00003b30| 09 20 79 20 3d 20 77 69 | 6e 2d 3e 5f 63 75 72 79 |. y = wi|n->_cury|
|00003b40| 3b 0a 58 20 20 73 68 6f | 72 74 09 20 78 20 3d 20 |;.X sho|rt. x = |
|00003b50| 77 69 6e 2d 3e 5f 63 75 | 72 78 3b 0a 58 20 20 73 |win->_cu|rx;.X s|
|00003b60| 68 6f 72 74 09 20 6d 61 | 78 78 20 3d 20 77 69 6e |hort. ma|xx = win|
|00003b70| 2d 3e 5f 6d 61 78 78 20 | 2d 20 31 3b 0a 58 0a 58 |->_maxx |- 1;.X.X|
|00003b80| 20 20 65 6e 64 20 3d 20 | 26 77 69 6e 2d 3e 5f 6c | end = |&win->_l|
|00003b90| 69 6e 65 5b 79 5d 5b 6d | 61 78 78 5d 3b 0a 58 20 |ine[y][m|axx];.X |
|00003ba0| 20 74 65 6d 70 31 20 3d | 20 26 77 69 6e 2d 3e 5f | temp1 =| &win->_|
|00003bb0| 6c 69 6e 65 5b 79 5d 5b | 78 5d 3b 0a 58 20 20 74 |line[y][|x];.X t|
|00003bc0| 65 6d 70 32 20 3d 20 74 | 65 6d 70 31 20 2b 20 31 |emp2 = t|emp1 + 1|
|00003bd0| 3b 0a 58 20 20 77 68 69 | 6c 65 20 28 74 65 6d 70 |;.X whi|le (temp|
|00003be0| 31 20 3c 20 65 6e 64 29 | 0a 58 20 20 20 20 2a 74 |1 < end)|.X *t|
|00003bf0| 65 6d 70 31 2b 2b 20 3d | 20 2a 74 65 6d 70 32 2b |emp1++ =| *temp2+|
|00003c00| 2b 3b 0a 58 20 20 2a 74 | 65 6d 70 31 20 3d 20 27 |+;.X *t|emp1 = '|
|00003c10| 20 27 20 7c 20 28 77 69 | 6e 2d 3e 5f 61 74 74 72 | ' | (wi|n->_attr|
|00003c20| 73 20 26 20 41 54 52 5f | 4d 53 4b 29 3b 0a 58 20 |s & ATR_|MSK);.X |
|00003c30| 20 77 69 6e 2d 3e 5f 6d | 61 78 63 68 6e 67 5b 79 | win->_m|axchng[y|
|00003c40| 5d 20 3d 20 6d 61 78 78 | 3b 0a 58 20 20 69 66 20 |] = maxx|;.X if |
|00003c50| 28 77 69 6e 2d 3e 5f 6d | 69 6e 63 68 6e 67 5b 79 |(win->_m|inchng[y|
|00003c60| 5d 20 3d 3d 20 5f 4e 4f | 5f 43 48 41 4e 47 45 20 |] == _NO|_CHANGE |
|00003c70| 7c 7c 20 77 69 6e 2d 3e | 5f 6d 69 6e 63 68 6e 67 ||| win->|_minchng|
|00003c80| 5b 79 5d 20 3e 20 78 29 | 0a 58 20 20 20 20 77 69 |[y] > x)|.X wi|
|00003c90| 6e 2d 3e 5f 6d 69 6e 63 | 68 6e 67 5b 79 5d 20 3d |n->_minc|hng[y] =|
|00003ca0| 20 78 3b 0a 58 20 20 72 | 65 74 75 72 6e 28 4f 4b | x;.X r|eturn(OK|
|00003cb0| 29 3b 0a 58 20 20 7d 20 | 2f 2a 20 77 64 65 6c 63 |);.X } |/* wdelc|
|00003cc0| 68 20 2a 2f 0a 58 0a 58 | 2f 2a 2a 2a 2a 2a 2a 2a |h */.X.X|/*******|
|00003cd0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003ce0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003cf0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003d00| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2f 0a 58 2f 2a 20 44 |********|*/.X/* D|
|00003d10| 65 6c 63 68 28 29 20 64 | 65 6c 65 74 65 73 20 74 |elch() d|eletes t|
|00003d20| 68 65 20 63 68 61 72 61 | 63 74 65 72 20 61 74 20 |he chara|cter at |
|00003d30| 74 68 65 20 73 74 64 73 | 63 72 20 63 75 72 73 6f |the stds|cr curso|
|00003d40| 72 2c 20 61 6e 64 20 74 | 68 65 09 2a 2f 0a 58 2f |r, and t|he.*/.X/|
|00003d50| 2a 20 63 68 61 72 61 63 | 74 65 72 73 20 74 6f 20 |* charac|ters to |
|00003d60| 74 68 65 20 72 69 67 68 | 74 20 6f 66 20 69 74 20 |the righ|t of it |
|00003d70| 61 72 65 20 73 68 69 66 | 74 65 64 20 6c 65 66 74 |are shif|ted left|
|00003d80| 2c 20 69 6e 73 65 72 74 | 69 6e 67 20 61 09 2a 2f |, insert|ing a.*/|
|00003d90| 0a 58 2f 2a 20 73 70 61 | 63 65 20 61 74 20 74 68 |.X/* spa|ce at th|
|00003da0| 65 20 6c 61 73 74 20 70 | 6f 73 69 74 69 6f 6e 20 |e last p|osition |
|00003db0| 6f 66 20 74 68 65 20 6c | 69 6e 65 2e 09 09 09 2a |of the l|ine....*|
|00003dc0| 2f 0a 58 2f 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |/.X/****|********|
|00003dd0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003de0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003df0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003e00| 2a 2a 2a 2a 2f 0a 58 0a | 58 69 6e 74 20 64 65 6c |****/.X.|Xint del|
|00003e10| 63 68 28 29 0a 58 20 20 | 7b 0a 58 20 20 72 65 74 |ch().X |{.X ret|
|00003e20| 75 72 6e 28 77 64 65 6c | 63 68 28 73 74 64 73 63 |urn(wdel|ch(stdsc|
|00003e30| 72 29 29 3b 0a 58 20 20 | 7d 20 2f 2a 20 64 65 6c |r));.X |} /* del|
|00003e40| 63 68 20 2a 2f 0a 58 0a | 58 2f 2a 2a 2a 2a 2a 2a |ch */.X.|X/******|
|00003e50| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003e60| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003e70| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003e80| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2f 0a 58 2f 2a 20 |********|**/.X/* |
|00003e90| 4d 76 64 65 6c 63 68 28 | 29 20 6d 6f 76 65 73 20 |Mvdelch(|) moves |
|00003ea0| 74 68 65 20 73 74 64 73 | 63 72 20 63 75 72 73 6f |the stds|cr curso|
|00003eb0| 72 20 74 6f 20 61 20 6e | 65 77 20 70 6f 73 69 74 |r to a n|ew posit|
|00003ec0| 69 6f 6e 2c 20 74 68 65 | 6e 09 2a 2f 0a 58 2f 2a |ion, the|n.*/.X/*|
|00003ed0| 20 64 65 6c 65 74 65 73 | 20 74 68 65 20 63 68 61 | deletes| the cha|
|00003ee0| 72 61 63 74 65 72 20 61 | 74 20 74 68 65 20 73 74 |racter a|t the st|
|00003ef0| 64 73 63 72 20 63 75 72 | 73 6f 72 2c 20 61 6e 64 |dscr cur|sor, and|
|00003f00| 20 74 68 65 20 63 68 61 | 72 61 63 2d 09 2a 2f 0a | the cha|rac-.*/.|
|00003f10| 58 2f 2a 20 74 65 72 73 | 20 74 6f 20 74 68 65 20 |X/* ters| to the |
|00003f20| 72 69 67 68 74 20 6f 66 | 20 69 74 20 61 72 65 20 |right of| it are |
|00003f30| 73 68 69 66 74 65 64 20 | 6c 65 66 74 2c 20 69 6e |shifted |left, in|
|00003f40| 73 65 72 74 69 6e 67 20 | 61 20 73 70 61 63 65 09 |serting |a space.|
|00003f50| 2a 2f 0a 58 2f 2a 20 61 | 74 20 74 68 65 20 6c 61 |*/.X/* a|t the la|
|00003f60| 73 74 20 70 6f 73 69 74 | 69 6f 6e 20 6f 66 20 74 |st posit|ion of t|
|00003f70| 68 65 20 6c 69 6e 65 2e | 09 09 09 09 2a 2f 0a 58 |he line.|....*/.X|
|00003f80| 2f 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |/*******|********|
|00003f90| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003fa0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003fb0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003fc0| 2a 2f 0a 58 0a 58 69 6e | 74 20 6d 76 64 65 6c 63 |*/.X.Xin|t mvdelc|
|00003fd0| 68 28 79 2c 78 29 0a 58 | 20 20 69 6e 74 20 79 3b |h(y,x).X| int y;|
|00003fe0| 0a 58 20 20 69 6e 74 20 | 78 3b 0a 58 20 20 7b 0a |.X int |x;.X {.|
|00003ff0| 58 20 20 69 66 20 28 77 | 6d 6f 76 65 28 73 74 64 |X if (w|move(std|
|00004000| 73 63 72 2c 79 2c 78 29 | 20 3d 3d 20 45 52 52 29 |scr,y,x)| == ERR)|
|00004010| 0a 58 20 20 20 20 72 65 | 74 75 72 6e 28 45 52 52 |.X re|turn(ERR|
|00004020| 29 3b 0a 58 20 20 72 65 | 74 75 72 6e 28 77 64 65 |);.X re|turn(wde|
|00004030| 6c 63 68 28 73 74 64 73 | 63 72 29 29 3b 0a 58 20 |lch(stds|cr));.X |
|00004040| 20 7d 20 2f 2a 20 6d 76 | 64 65 6c 63 68 20 2a 2f | } /* mv|delch */|
|00004050| 0a 58 0a 58 2f 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |.X.X/***|********|
|00004060| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004070| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004080| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004090| 2a 2a 2a 2a 2a 2f 0a 58 | 2f 2a 20 4d 76 77 64 65 |*****/.X|/* Mvwde|
|000040a0| 6c 63 68 28 29 20 6d 6f | 76 65 73 20 74 68 65 20 |lch() mo|ves the |
|000040b0| 63 75 72 73 6f 72 20 6f | 66 20 77 69 6e 64 6f 77 |cursor o|f window|
|000040c0| 20 27 77 69 6e 27 20 74 | 6f 20 61 20 6e 65 77 20 | 'win' t|o a new |
|000040d0| 70 6f 73 69 2d 09 2a 2f | 0a 58 2f 2a 20 74 69 6f |posi-.*/|.X/* tio|
|000040e0| 6e 2c 20 74 68 65 6e 20 | 64 65 6c 65 74 65 73 20 |n, then |deletes |
|000040f0| 74 68 65 20 63 68 61 72 | 61 63 74 65 72 20 61 74 |the char|acter at|
|00004100| 20 74 68 65 20 73 74 64 | 73 63 72 20 63 75 72 73 | the std|scr curs|
|00004110| 6f 72 2c 20 61 6e 64 09 | 2a 2f 0a 58 2f 2a 20 74 |or, and.|*/.X/* t|
|00004120| 68 65 20 63 68 61 72 61 | 63 74 65 72 73 20 74 6f |he chara|cters to|
|00004130| 20 74 68 65 20 72 69 67 | 68 74 20 6f 66 20 69 74 | the rig|ht of it|
|00004140| 20 61 72 65 20 73 68 69 | 66 74 65 64 20 6c 65 66 | are shi|fted lef|
|00004150| 74 2c 20 69 6e 73 65 72 | 2d 09 2a 2f 0a 58 2f 2a |t, inser|-.*/.X/*|
|00004160| 20 74 69 6e 67 20 61 20 | 73 70 61 63 65 20 61 74 | ting a |space at|
|00004170| 20 74 68 65 20 6c 61 73 | 74 20 70 6f 73 69 74 69 | the las|t positi|
|00004180| 6f 6e 20 6f 66 20 74 68 | 65 20 6c 69 6e 65 2e 09 |on of th|e line..|
|00004190| 09 2a 2f 0a 58 2f 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |.*/.X/**|********|
|000041a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000041b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000041c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000041d0| 2a 2a 2a 2a 2a 2a 2f 0a | 58 0a 58 69 6e 74 20 6d |******/.|X.Xint m|
|000041e0| 76 77 64 65 6c 63 68 28 | 77 69 6e 2c 79 2c 78 29 |vwdelch(|win,y,x)|
|000041f0| 0a 58 20 20 57 49 4e 44 | 4f 57 20 2a 77 69 6e 3b |.X WIND|OW *win;|
|00004200| 0a 58 20 20 69 6e 74 20 | 79 3b 0a 58 20 20 69 6e |.X int |y;.X in|
|00004210| 74 20 78 3b 0a 58 20 20 | 7b 0a 58 20 20 69 66 20 |t x;.X |{.X if |
|00004220| 28 77 6d 6f 76 65 28 77 | 69 6e 2c 79 2c 78 29 20 |(wmove(w|in,y,x) |
|00004230| 3d 3d 20 45 52 52 29 0a | 58 20 20 20 20 72 65 74 |== ERR).|X ret|
|00004240| 75 72 6e 28 45 52 52 29 | 3b 0a 58 20 20 72 65 74 |urn(ERR)|;.X ret|
|00004250| 75 72 6e 28 77 64 65 6c | 63 68 28 77 69 6e 29 29 |urn(wdel|ch(win))|
|00004260| 3b 0a 58 20 20 7d 20 2f | 2a 20 6d 76 77 64 65 6c |;.X } /|* mvwdel|
|00004270| 63 68 20 2a 2f 0a 45 4e | 44 5f 4f 46 5f 63 68 61 |ch */.EN|D_OF_cha|
|00004280| 72 64 65 6c 2e 63 0a 69 | 66 20 74 65 73 74 20 33 |rdel.c.i|f test 3|
|00004290| 31 39 37 20 2d 6e 65 20 | 60 77 63 20 2d 63 20 3c |197 -ne |`wc -c <|
|000042a0| 63 68 61 72 64 65 6c 2e | 63 60 3b 20 74 68 65 6e |chardel.|c`; then|
|000042b0| 0a 20 20 20 20 65 63 68 | 6f 20 5c 22 63 68 61 72 |. ech|o \"char|
|000042c0| 64 65 6c 2e 63 5c 22 20 | 75 6e 70 61 63 6b 65 64 |del.c\" |unpacked|
|000042d0| 20 77 69 74 68 20 77 72 | 6f 6e 67 20 73 69 7a 65 | with wr|ong size|
|000042e0| 21 0a 66 69 0a 23 20 65 | 6e 64 20 6f 66 20 6f 76 |!.fi.# e|nd of ov|
|000042f0| 65 72 77 72 69 74 69 6e | 67 20 63 68 65 63 6b 0a |erwritin|g check.|
|00004300| 66 69 0a 69 66 20 74 65 | 73 74 20 2d 66 20 63 6c |fi.if te|st -f cl|
|00004310| 72 74 6f 62 6f 74 2e 63 | 20 2d 61 20 22 24 7b 31 |rtobot.c| -a "${1|
|00004320| 7d 22 20 21 3d 20 22 2d | 63 22 20 3b 20 74 68 65 |}" != "-|c" ; the|
|00004330| 6e 20 0a 20 20 65 63 68 | 6f 20 57 69 6c 6c 20 6e |n . ech|o Will n|
|00004340| 6f 74 20 6f 76 65 72 2d | 77 72 69 74 65 20 65 78 |ot over-|write ex|
|00004350| 69 73 74 69 6e 67 20 66 | 69 6c 65 20 5c 22 63 6c |isting f|ile \"cl|
|00004360| 72 74 6f 62 6f 74 2e 63 | 5c 22 0a 65 6c 73 65 0a |rtobot.c|\".else.|
|00004370| 65 63 68 6f 20 45 78 74 | 72 61 63 74 69 6e 67 20 |echo Ext|racting |
|00004380| 2d 20 5c 22 63 6c 72 74 | 6f 62 6f 74 2e 63 5c 22 |- \"clrt|obot.c\"|
|00004390| 0a 73 65 64 20 22 73 2f | 5e 58 2f 2f 22 20 3e 63 |.sed "s/|^X//" >c|
|000043a0| 6c 72 74 6f 62 6f 74 2e | 63 20 3c 3c 27 45 4e 44 |lrtobot.|c <<'END|
|000043b0| 5f 4f 46 5f 63 6c 72 74 | 6f 62 6f 74 2e 63 27 0a |_OF_clrt|obot.c'.|
|000043c0| 58 2f 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |X/******|********|
|000043d0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000043e0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000043f0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004400| 2a 2a 2f 0a 58 2f 2a 20 | 57 63 6c 72 74 6f 62 6f |**/.X/* |Wclrtobo|
|00004410| 74 28 29 20 72 6f 75 74 | 69 6e 65 20 6f 66 20 74 |t() rout|ine of t|
|00004420| 68 65 20 50 43 63 75 72 | 73 65 73 20 70 61 63 6b |he PCcur|ses pack|
|00004430| 61 67 65 09 09 09 2a 2f | 0a 58 2f 2a 09 09 09 09 |age...*/|.X/*....|
|00004440| 09 09 09 09 2a 2f 0a 58 | 2f 2a 2a 2a 2a 2a 2a 2a |....*/.X|/*******|
|00004450| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004460| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004470| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004480| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2f 0a 58 2f 2a 20 54 |********|*/.X/* T|
|00004490| 68 69 73 20 76 65 72 73 | 69 6f 6e 20 6f 66 20 63 |his vers|ion of c|
|000044a0| 75 72 73 65 73 20 69 73 | 20 62 61 73 65 64 20 6f |urses is| based o|
|000044b0| 6e 20 6e 63 75 72 73 65 | 73 2c 20 61 20 63 75 72 |n ncurse|s, a cur|
|000044c0| 73 65 73 20 76 65 72 73 | 69 6f 6e 09 2a 2f 0a 58 |ses vers|ion.*/.X|
|000044d0| 2f 2a 20 6f 72 69 67 69 | 6e 61 6c 6c 79 20 77 72 |/* origi|nally wr|
|000044e0| 69 74 74 65 6e 20 62 79 | 20 50 61 76 65 6c 20 43 |itten by| Pavel C|
|000044f0| 75 72 74 69 73 20 61 74 | 20 43 6f 72 6e 65 6c 6c |urtis at| Cornell|
|00004500| 20 55 6e 69 76 65 72 73 | 69 74 79 2e 09 2a 2f 0a | Univers|ity..*/.|
|00004510| 58 2f 2a 20 49 20 68 61 | 76 65 20 6d 61 64 65 20 |X/* I ha|ve made |
|00004520| 73 75 62 73 74 61 6e 74 | 69 61 6c 20 63 68 61 6e |substant|ial chan|
|00004530| 67 65 73 20 74 6f 20 6d | 61 6b 65 20 69 74 20 72 |ges to m|ake it r|
|00004540| 75 6e 20 6f 6e 20 49 42 | 4d 20 50 43 27 73 2c 09 |un on IB|M PC's,.|
|00004550| 2a 2f 0a 58 2f 2a 20 61 | 6e 64 20 74 68 65 72 65 |*/.X/* a|nd there|
|00004560| 66 6f 72 65 20 63 6f 6e | 73 69 64 65 72 20 6d 79 |fore con|sider my|
|00004570| 73 65 6c 66 20 66 72 65 | 65 20 74 6f 20 6d 61 6b |self fre|e to mak|
|00004580| 65 20 69 74 20 70 75 62 | 6c 69 63 20 64 6f 6d 61 |e it pub|lic doma|
|00004590| 69 6e 2e 09 2a 2f 0a 58 | 2f 2a 09 09 09 09 42 6a |in..*/.X|/*....Bj|
|000045a0| 6f 72 6e 20 4c 61 72 73 | 73 6f 6e 20 28 62 6c 40 |orn Lars|son (bl@|
|000045b0| 69 6e 66 6f 76 6f 78 2e | 73 65 29 09 2a 2f 0a 58 |infovox.|se).*/.X|
|000045c0| 2f 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |/*******|********|
|000045d0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000045e0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000045f0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004600| 2a 2f 0a 58 2f 2a 20 31 | 2e 34 3a 20 20 55 73 65 |*/.X/* 1|.4: Use|
|00004610| 20 6f 66 20 73 68 6f 72 | 74 20 77 68 65 72 65 76 | of shor|t wherev|
|00004620| 65 72 20 70 6f 73 73 69 | 62 6c 65 2e 20 50 6f 72 |er possi|ble. Por|
|00004630| 74 61 62 69 6c 69 74 79 | 09 09 2a 2f 0a 58 2f 2a |tability|..*/.X/*|
|00004640| 09 20 69 6d 70 72 6f 76 | 65 6d 65 6e 74 73 3a 09 |. improv|ements:.|
|00004650| 09 09 09 09 39 30 30 31 | 31 34 09 2a 2f 0a 58 2f |....9001|14.*/.X/|
|00004660| 2a 20 31 2e 33 3a 09 20 | 4d 53 43 20 2d 57 33 2c |* 1.3:. |MSC -W3,|
|00004670| 20 54 75 72 62 6f 27 43 | 27 20 2d 77 20 2d 77 2d | Turbo'C|' -w -w-|
|00004680| 70 72 6f 20 63 68 65 63 | 6b 65 73 3a 09 09 38 38 |pro chec|kes:..88|
|00004690| 31 30 30 35 09 2a 2f 0a | 58 2f 2a 20 31 2e 32 3a |1005.*/.|X/* 1.2:|
|000046a0| 09 20 4d 61 78 20 6c 69 | 6d 69 74 73 20 6f 66 66 |. Max li|mits off|
|000046b0| 20 62 79 20 31 2e 20 46 | 69 78 65 64 20 74 68 61 | by 1. F|ixed tha|
|000046c0| 6e 6b 73 20 74 6f 20 53 | 2e 20 43 72 65 70 73 3a |nks to S|. Creps:|
|000046d0| 09 38 38 31 30 30 32 09 | 2a 2f 0a 58 2f 2a 20 31 |.881002.|*/.X/* 1|
|000046e0| 2e 31 3a 09 20 52 65 6e | 61 6d 65 64 20 63 6c 72 |.1:. Ren|amed clr|
|000046f0| 62 6f 74 28 29 20 74 6f | 20 63 6c 72 74 6f 62 6f |bot() to| clrtobo|
|00004700| 74 28 29 2e 20 52 65 70 | 6f 72 74 65 64 20 62 79 |t(). Rep|orted by|
|00004710| 09 09 2a 2f 0a 58 2f 2a | 09 20 45 72 69 63 20 52 |..*/.X/*|. Eric R|
|00004720| 6f 73 63 6f 73 3a 09 09 | 09 09 09 38 37 30 39 30 |oscos:..|...87090|
|00004730| 37 09 2a 2f 0a 58 2f 2a | 20 31 2e 30 3a 09 20 52 |7.*/.X/*| 1.0:. R|
|00004740| 65 6c 65 61 73 65 3a 09 | 09 09 09 09 38 37 30 35 |elease:.|....8705|
|00004750| 31 35 09 2a 2f 0a 58 2f | 2a 2a 2a 2a 2a 2a 2a 2a |15.*/.X/|********|
|00004760| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004770| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004780| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004790| 2a 2a 2a 2a 2a 2a 2a 2a | 2f 0a 58 0a 58 23 69 6e |********|/.X.X#in|
|000047a0| 63 6c 75 64 65 20 3c 63 | 75 72 73 65 73 2e 68 3e |clude <c|urses.h>|
|000047b0| 0a 58 23 69 6e 63 6c 75 | 64 65 20 3c 63 75 72 73 |.X#inclu|de <curs|
|000047c0| 70 72 69 76 2e 68 3e 0a | 58 0a 58 63 68 61 72 20 |priv.h>.|X.Xchar |
|000047d0| 5f 63 75 72 73 65 73 5f | 63 6c 72 74 6f 62 6f 74 |_curses_|clrtobot|
|000047e0| 5f 72 63 73 69 64 5b 5d | 20 3d 20 22 40 28 23 29 |_rcsid[]| = "@(#)|
|000047f0| 63 6c 72 74 6f 62 6f 74 | 2e 63 20 20 20 76 2e 31 |clrtobot|.c v.1|
|00004800| 2e 34 20 20 2d 20 39 30 | 30 31 31 34 22 3b 0a 58 |.4 - 90|0114";.X|
|00004810| 0a 58 2f 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |.X/*****|********|
|00004820| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004830| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004840| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004850| 2a 2a 2a 2f 0a 58 2f 2a | 20 57 63 6c 72 74 6f 62 |***/.X/*| Wclrtob|
|00004860| 6f 74 28 29 20 66 69 6c | 6c 73 20 74 68 65 20 72 |ot() fil|ls the r|
|00004870| 69 67 68 74 20 68 61 6c | 66 20 6f 66 20 74 68 65 |ight hal|f of the|
|00004880| 20 63 75 72 73 6f 72 20 | 6c 69 6e 65 20 6f 66 09 | cursor |line of.|
|00004890| 2a 2f 0a 58 2f 2a 20 77 | 69 6e 64 6f 77 20 27 77 |*/.X/* w|indow 'w|
|000048a0| 69 6e 27 2c 20 61 6e 64 | 20 61 6c 6c 20 6c 69 6e |in', and| all lin|
|000048b0| 65 73 20 62 65 6c 6f 77 | 20 69 74 20 77 69 74 68 |es below| it with|
|000048c0| 20 62 6c 61 6e 6b 73 2e | 09 09 2a 2f 0a 58 2f 2a | blanks.|..*/.X/*|
|000048d0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000048e0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000048f0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004900| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2f |********|*******/|
|00004910| 0a 58 0a 58 69 6e 74 09 | 77 63 6c 72 74 6f 62 6f |.X.Xint.|wclrtobo|
|00004920| 74 28 77 69 6e 29 0a 58 | 20 20 57 49 4e 44 4f 57 |t(win).X| WINDOW|
|00004930| 09 2a 77 69 6e 3b 0a 58 | 20 20 7b 0a 58 20 20 73 |.*win;.X| {.X s|
|00004940| 68 6f 72 74 09 20 79 3b | 0a 58 20 20 73 68 6f 72 |hort. y;|.X shor|
|00004950| 74 20 20 20 6d 69 6e 78 | 3b 0a 58 20 20 73 74 61 |t minx|;.X sta|
|00004960| 74 69 63 20 73 68 6f 72 | 74 09 73 74 61 72 74 78 |tic shor|t.startx|
|00004970| 3b 0a 58 20 20 73 74 61 | 74 69 63 20 73 68 6f 72 |;.X sta|tic shor|
|00004980| 74 09 2a 70 74 72 3b 0a | 58 20 20 73 74 61 74 69 |t.*ptr;.|X stati|
|00004990| 63 20 73 68 6f 72 74 20 | 20 2a 65 6e 64 3b 0a 58 |c short | *end;.X|
|000049a0| 20 20 73 74 61 74 69 63 | 20 73 68 6f 72 74 20 20 | static| short |
|000049b0| 2a 6d 61 78 78 3b 0a 58 | 20 20 73 74 61 74 69 63 |*maxx;.X| static|
|000049c0| 20 73 68 6f 72 74 20 20 | 20 62 6c 61 6e 6b 3b 0a | short | blank;.|
|000049d0| 58 0a 58 20 20 62 6c 61 | 6e 6b 20 3d 20 27 20 27 |X.X bla|nk = ' '|
|000049e0| 20 7c 20 28 77 69 6e 2d | 3e 5f 61 74 74 72 73 20 | | (win-|>_attrs |
|000049f0| 26 20 41 54 52 5f 4d 53 | 4b 29 3b 0a 58 20 20 73 |& ATR_MS|K);.X s|
|00004a00| 74 61 72 74 78 20 3d 20 | 77 69 6e 2d 3e 5f 63 75 |tartx = |win->_cu|
|00004a10| 72 78 3b 0a 58 20 20 66 | 6f 72 20 28 79 20 3d 20 |rx;.X f|or (y = |
|00004a20| 77 69 6e 2d 3e 5f 63 75 | 72 79 3b 20 79 20 3c 3d |win->_cu|ry; y <=|
|00004a30| 20 77 69 6e 2d 3e 5f 72 | 65 67 62 6f 74 74 6f 6d | win->_r|egbottom|
|00004a40| 3b 20 79 2b 2b 29 0a 58 | 20 20 20 20 7b 0a 58 20 |; y++).X| {.X |
|00004a50| 20 20 20 6d 69 6e 78 20 | 3d 20 5f 4e 4f 5f 43 48 | minx |= _NO_CH|
|00004a60| 41 4e 47 45 3b 0a 58 20 | 20 20 20 65 6e 64 20 3d |ANGE;.X | end =|
|00004a70| 20 26 77 69 6e 2d 3e 5f | 6c 69 6e 65 5b 79 5d 5b | &win->_|line[y][|
|00004a80| 77 69 6e 2d 3e 5f 6d 61 | 78 78 20 2d 20 31 5d 3b |win->_ma|xx - 1];|
|00004a90| 0a 58 20 20 20 20 66 6f | 72 20 28 70 74 72 20 3d |.X fo|r (ptr =|
|00004aa0| 20 26 77 69 6e 2d 3e 5f | 6c 69 6e 65 5b 79 5d 5b | &win->_|line[y][|
|00004ab0| 73 74 61 72 74 78 5d 3b | 20 70 74 72 20 3c 3d 20 |startx];| ptr <= |
|00004ac0| 65 6e 64 3b 20 70 74 72 | 2b 2b 29 0a 58 20 20 20 |end; ptr|++).X |
|00004ad0| 20 20 20 7b 0a 58 20 20 | 20 20 20 20 69 66 20 28 | {.X | if (|
|00004ae0| 2a 70 74 72 20 21 3d 20 | 62 6c 61 6e 6b 29 0a 58 |*ptr != |blank).X|
|00004af0| 09 7b 0a 58 09 6d 61 78 | 78 20 3d 20 70 74 72 3b |.{.X.max|x = ptr;|
|00004b00| 0a 58 09 69 66 20 28 6d | 69 6e 78 20 3d 3d 20 5f |.X.if (m|inx == _|
|00004b10| 4e 4f 5f 43 48 41 4e 47 | 45 29 0a 58 09 20 20 6d |NO_CHANG|E).X. m|
|00004b20| 69 6e 78 20 3d 20 28 69 | 6e 74 29 20 28 70 74 72 |inx = (i|nt) (ptr|
|00004b30| 20 2d 20 77 69 6e 2d 3e | 5f 6c 69 6e 65 5b 79 5d | - win->|_line[y]|
|00004b40| 29 3b 0a 58 09 2a 70 74 | 72 20 3d 20 62 6c 61 6e |);.X.*pt|r = blan|
|00004b50| 6b 3b 0a 58 09 7d 20 2f | 2a 20 69 66 20 2a 2f 0a |k;.X.} /|* if */.|
|00004b60| 58 20 20 20 20 20 20 7d | 20 2f 2a 20 66 6f 72 20 |X }| /* for |
|00004b70| 2a 2f 0a 58 20 20 20 20 | 69 66 20 28 6d 69 6e 78 |*/.X |if (minx|
|00004b80| 20 21 3d 20 5f 4e 4f 5f | 43 48 41 4e 47 45 29 0a | != _NO_|CHANGE).|
|00004b90| 58 20 20 20 20 20 20 7b | 0a 58 20 20 20 20 20 20 |X {|.X |
|00004ba0| 69 66 20 28 28 77 69 6e | 2d 3e 5f 6d 69 6e 63 68 |if ((win|->_minch|
|00004bb0| 6e 67 5b 79 5d 20 3e 20 | 6d 69 6e 78 29 20 7c 7c |ng[y] > |minx) |||
|00004bc0| 20 20 28 77 69 6e 2d 3e | 5f 6d 69 6e 63 68 6e 67 | (win->|_minchng|
|00004bd0| 5b 79 5d 20 3d 3d 20 5f | 4e 4f 5f 43 48 41 4e 47 |[y] == _|NO_CHANG|
|00004be0| 45 29 29 0a 58 09 77 69 | 6e 2d 3e 5f 6d 69 6e 63 |E)).X.wi|n->_minc|
|00004bf0| 68 6e 67 5b 79 5d 20 3d | 20 6d 69 6e 78 3b 0a 58 |hng[y] =| minx;.X|
|00004c00| 20 20 20 20 20 20 69 66 | 20 28 77 69 6e 2d 3e 5f | if| (win->_|
|00004c10| 6d 61 78 63 68 6e 67 5b | 79 5d 20 3c 20 28 69 6e |maxchng[|y] < (in|
|00004c20| 74 29 20 28 6d 61 78 78 | 20 2d 20 77 69 6e 2d 3e |t) (maxx| - win->|
|00004c30| 5f 6c 69 6e 65 5b 79 5d | 29 29 0a 58 09 77 69 6e |_line[y]|)).X.win|
|00004c40| 2d 3e 5f 6d 61 78 63 68 | 6e 67 5b 79 5d 20 3d 20 |->_maxch|ng[y] = |
|00004c50| 28 69 6e 74 29 20 28 6d | 61 78 78 20 2d 20 77 69 |(int) (m|axx - wi|
|00004c60| 6e 2d 3e 5f 6c 69 6e 65 | 5b 79 5d 29 3b 0a 58 20 |n->_line|[y]);.X |
|00004c70| 20 20 20 20 20 7d 20 2f | 2a 20 69 66 20 2a 2f 0a | } /|* if */.|
|00004c80| 58 20 20 20 20 73 74 61 | 72 74 78 20 3d 20 30 3b |X sta|rtx = 0;|
|00004c90| 0a 58 20 20 20 20 7d 20 | 2f 2a 20 66 6f 72 20 2a |.X } |/* for *|
|00004ca0| 2f 0a 58 20 20 72 65 74 | 75 72 6e 28 4f 4b 29 3b |/.X ret|urn(OK);|
|00004cb0| 0a 58 20 20 7d 20 2f 2a | 20 77 63 6c 72 74 6f 62 |.X } /*| wclrtob|
|00004cc0| 6f 74 20 2a 2f 0a 58 0a | 58 2f 2a 2a 2a 2a 2a 2a |ot */.X.|X/******|
|00004cd0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004ce0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004cf0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004d00| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2f 0a 58 2f 2a 20 |********|**/.X/* |
|00004d10| 43 6c 72 74 6f 62 6f 74 | 28 29 20 66 69 6c 6c 73 |Clrtobot|() fills|
|00004d20| 20 74 68 65 20 72 69 67 | 68 74 20 68 61 6c 66 20 | the rig|ht half |
|00004d30| 6f 66 20 74 68 65 20 63 | 75 72 73 6f 72 20 6c 69 |of the c|ursor li|
|00004d40| 6e 65 20 6f 66 09 2a 2f | 0a 58 2f 2a 20 73 74 64 |ne of.*/|.X/* std|
|00004d50| 73 63 72 2c 20 61 6e 64 | 20 61 6c 6c 20 6c 69 6e |scr, and| all lin|
|00004d60| 65 73 20 62 65 6c 6f 77 | 20 69 74 20 77 69 74 68 |es below| it with|
|00004d70| 20 62 6c 61 6e 6b 73 2e | 09 09 09 2a 2f 0a 58 2f | blanks.|...*/.X/|
|00004d80| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004d90| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004da0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004db0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004dc0| 2f 0a 58 0a 58 69 6e 74 | 20 63 6c 72 74 6f 62 6f |/.X.Xint| clrtobo|
|00004dd0| 74 28 29 0a 58 20 20 7b | 0a 58 20 20 72 65 74 75 |t().X {|.X retu|
|00004de0| 72 6e 28 77 63 6c 72 74 | 6f 62 6f 74 28 73 74 64 |rn(wclrt|obot(std|
|00004df0| 73 63 72 29 29 3b 0a 58 | 20 20 7d 20 2f 2a 20 63 |scr));.X| } /* c|
|00004e00| 6c 72 74 6f 62 6f 74 20 | 2a 2f 0a 58 0a 58 2f 2a |lrtobot |*/.X.X/*|
|00004e10| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004e20| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004e30| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004e40| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2f |********|*******/|
|00004e50| 0a 58 2f 2a 20 4d 76 63 | 6c 72 74 6f 62 6f 74 28 |.X/* Mvc|lrtobot(|
|00004e60| 29 20 6d 6f 76 65 73 20 | 74 68 65 20 63 75 72 73 |) moves |the curs|
|00004e70| 6f 72 20 74 6f 20 61 20 | 6e 65 77 20 70 6f 73 69 |or to a |new posi|
|00004e80| 74 69 6f 6e 20 69 6e 20 | 73 74 64 73 63 72 09 2a |tion in |stdscr.*|
|00004e90| 2f 0a 58 2f 2a 20 61 6e | 64 20 66 69 6c 6c 73 20 |/.X/* an|d fills |
|00004ea0| 74 68 65 20 72 69 67 68 | 74 20 68 61 6c 66 20 6f |the righ|t half o|
|00004eb0| 66 20 74 68 65 20 63 75 | 72 73 6f 72 20 6c 69 6e |f the cu|rsor lin|
|00004ec0| 65 2c 20 61 6e 64 20 61 | 6c 6c 20 6c 69 6e 65 73 |e, and a|ll lines|
|00004ed0| 09 2a 2f 0a 58 2f 2a 20 | 62 65 6c 6f 77 20 69 74 |.*/.X/* |below it|
|00004ee0| 20 77 69 74 68 20 62 6c | 61 6e 6b 73 2e 09 09 09 | with bl|anks....|
|00004ef0| 09 09 2a 2f 0a 58 2f 2a | 2a 2a 2a 2a 2a 2a 2a 2a |..*/.X/*|********|
|00004f00| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004f10| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004f20| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004f30| 2a 2a 2a 2a 2a 2a 2a 2f | 0a 58 0a 58 69 6e 74 20 |*******/|.X.Xint |
|00004f40| 6d 76 63 6c 72 74 6f 62 | 6f 74 28 79 2c 78 29 0a |mvclrtob|ot(y,x).|
|00004f50| 58 20 20 69 6e 74 20 79 | 3b 0a 58 20 20 69 6e 74 |X int y|;.X int|
|00004f60| 20 78 3b 0a 58 20 20 7b | 0a 58 20 20 69 66 20 28 | x;.X {|.X if (|
|00004f70| 77 6d 6f 76 65 28 73 74 | 64 73 63 72 2c 79 2c 78 |wmove(st|dscr,y,x|
|00004f80| 29 20 3d 3d 20 45 52 52 | 29 0a 58 20 20 20 20 72 |) == ERR|).X r|
|00004f90| 65 74 75 72 6e 28 45 52 | 52 29 3b 0a 58 20 20 72 |eturn(ER|R);.X r|
|00004fa0| 65 74 75 72 6e 28 77 63 | 6c 72 74 6f 62 6f 74 28 |eturn(wc|lrtobot(|
|00004fb0| 73 74 64 73 63 72 29 29 | 3b 0a 58 20 20 7d 20 2f |stdscr))|;.X } /|
|00004fc0| 2a 20 6d 76 63 6c 72 74 | 6f 62 6f 74 20 2a 2f 0a |* mvclrt|obot */.|
|00004fd0| 58 0a 58 2f 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |X.X/****|********|
|00004fe0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004ff0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005000| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005010| 2a 2a 2a 2a 2f 0a 58 2f | 2a 20 4d 76 77 63 6c 72 |****/.X/|* Mvwclr|
|00005020| 74 6f 62 6f 74 28 29 20 | 6d 6f 76 65 73 20 74 68 |tobot() |moves th|
|00005030| 65 20 63 75 72 73 6f 72 | 20 74 6f 20 61 20 6e 65 |e cursor| to a ne|
|00005040| 77 20 70 6f 73 69 74 69 | 6f 6e 20 69 6e 20 77 69 |w positi|on in wi|
|00005050| 6e 64 6f 77 09 2a 2f 0a | 58 2f 2a 20 27 77 69 6e |ndow.*/.|X/* 'win|
|00005060| 27 2c 20 61 6e 64 20 66 | 69 6c 6c 73 20 74 68 65 |', and f|ills the|
|00005070| 20 72 69 67 68 74 20 68 | 61 6c 66 20 6f 66 20 74 | right h|alf of t|
|00005080| 68 65 20 63 75 72 73 6f | 72 20 6c 69 6e 65 2c 20 |he curso|r line, |
|00005090| 61 6e 64 20 61 6c 6c 09 | 2a 2f 0a 58 2f 2a 20 6c |and all.|*/.X/* l|
|000050a0| 69 6e 65 73 20 62 65 6c | 6f 77 20 69 74 20 77 69 |ines bel|ow it wi|
|000050b0| 74 68 20 62 6c 61 6e 6b | 73 2e 09 09 09 09 09 2a |th blank|s......*|
|000050c0| 2f 0a 58 2f 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |/.X/****|********|
|000050d0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000050e0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000050f0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005100| 2a 2a 2a 2a 2f 0a 58 0a | 58 69 6e 74 20 6d 76 77 |****/.X.|Xint mvw|
|00005110| 63 6c 72 74 6f 62 6f 74 | 28 77 69 6e 2c 79 2c 78 |clrtobot|(win,y,x|
|00005120| 29 0a 58 20 20 57 49 4e | 44 4f 57 20 2a 77 69 6e |).X WIN|DOW *win|
|00005130| 3b 0a 58 20 20 69 6e 74 | 20 79 3b 0a 58 20 20 69 |;.X int| y;.X i|
|00005140| 6e 74 20 78 3b 0a 58 20 | 20 7b 0a 58 20 20 69 66 |nt x;.X | {.X if|
|00005150| 20 28 77 6d 6f 76 65 28 | 77 69 6e 2c 79 2c 78 29 | (wmove(|win,y,x)|
|00005160| 20 3d 3d 20 45 52 52 29 | 0a 58 20 20 20 20 72 65 | == ERR)|.X re|
|00005170| 74 75 72 6e 28 45 52 52 | 29 3b 0a 58 20 20 72 65 |turn(ERR|);.X re|
|00005180| 74 75 72 6e 28 77 63 6c | 72 74 6f 62 6f 74 28 77 |turn(wcl|rtobot(w|
|00005190| 69 6e 29 29 3b 0a 58 20 | 20 7d 20 2f 2a 20 6d 76 |in));.X | } /* mv|
|000051a0| 77 63 6c 72 74 6f 62 6f | 74 20 2a 2f 0a 45 4e 44 |wclrtobo|t */.END|
|000051b0| 5f 4f 46 5f 63 6c 72 74 | 6f 62 6f 74 2e 63 0a 69 |_OF_clrt|obot.c.i|
|000051c0| 66 20 74 65 73 74 20 33 | 34 35 37 20 2d 6e 65 20 |f test 3|457 -ne |
|000051d0| 60 77 63 20 2d 63 20 3c | 63 6c 72 74 6f 62 6f 74 |`wc -c <|clrtobot|
|000051e0| 2e 63 60 3b 20 74 68 65 | 6e 0a 20 20 20 20 65 63 |.c`; the|n. ec|
|000051f0| 68 6f 20 5c 22 63 6c 72 | 74 6f 62 6f 74 2e 63 5c |ho \"clr|tobot.c\|
|00005200| 22 20 75 6e 70 61 63 6b | 65 64 20 77 69 74 68 20 |" unpack|ed with |
|00005210| 77 72 6f 6e 67 20 73 69 | 7a 65 21 0a 66 69 0a 23 |wrong si|ze!.fi.#|
|00005220| 20 65 6e 64 20 6f 66 20 | 6f 76 65 72 77 72 69 74 | end of |overwrit|
|00005230| 69 6e 67 20 63 68 65 63 | 6b 0a 66 69 0a 69 66 20 |ing chec|k.fi.if |
|00005240| 74 65 73 74 20 2d 66 20 | 63 6c 72 74 6f 65 6f 6c |test -f |clrtoeol|
|00005250| 2e 63 20 2d 61 20 22 24 | 7b 31 7d 22 20 21 3d 20 |.c -a "$|{1}" != |
|00005260| 22 2d 63 22 20 3b 20 74 | 68 65 6e 20 0a 20 20 65 |"-c" ; t|hen . e|
|00005270| 63 68 6f 20 57 69 6c 6c | 20 6e 6f 74 20 6f 76 65 |cho Will| not ove|
|00005280| 72 2d 77 72 69 74 65 20 | 65 78 69 73 74 69 6e 67 |r-write |existing|
|00005290| 20 66 69 6c 65 20 5c 22 | 63 6c 72 74 6f 65 6f 6c | file \"|clrtoeol|
|000052a0| 2e 63 5c 22 0a 65 6c 73 | 65 0a 65 63 68 6f 20 45 |.c\".els|e.echo E|
|000052b0| 78 74 72 61 63 74 69 6e | 67 20 2d 20 5c 22 63 6c |xtractin|g - \"cl|
|000052c0| 72 74 6f 65 6f 6c 2e 63 | 5c 22 0a 73 65 64 20 22 |rtoeol.c|\".sed "|
|000052d0| 73 2f 5e 58 2f 2f 22 20 | 3e 63 6c 72 74 6f 65 6f |s/^X//" |>clrtoeo|
|000052e0| 6c 2e 63 20 3c 3c 27 45 | 4e 44 5f 4f 46 5f 63 6c |l.c <<'E|ND_OF_cl|
|000052f0| 72 74 6f 65 6f 6c 2e 63 | 27 0a 58 2f 2a 2a 2a 2a |rtoeol.c|'.X/****|
|00005300| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005310| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005320| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005330| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2f 0a 58 2f |********|****/.X/|
|00005340| 2a 20 57 63 6c 72 74 6f | 65 6f 6c 28 29 20 72 6f |* Wclrto|eol() ro|
|00005350| 75 74 69 6e 65 20 6f 66 | 20 74 68 65 20 50 43 63 |utine of| the PCc|
|00005360| 75 72 73 65 73 20 70 61 | 63 6b 61 67 65 09 09 09 |urses pa|ckage...|
|00005370| 2a 2f 0a 58 2f 2a 09 09 | 09 09 09 09 09 09 2a 2f |*/.X/*..|......*/|
|00005380| 0a 58 2f 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |.X/*****|********|
|00005390| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000053a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000053b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000053c0| 2a 2a 2a 2f 0a 58 2f 2a | 20 54 68 69 73 20 76 65 |***/.X/*| This ve|
|000053d0| 72 73 69 6f 6e 20 6f 66 | 20 63 75 72 73 65 73 20 |rsion of| curses |
|000053e0| 69 73 20 62 61 73 65 64 | 20 6f 6e 20 6e 63 75 72 |is based| on ncur|
|000053f0| 73 65 73 2c 20 61 20 63 | 75 72 73 65 73 20 76 65 |ses, a c|urses ve|
|00005400| 72 73 69 6f 6e 09 2a 2f | 0a 58 2f 2a 20 6f 72 69 |rsion.*/|.X/* ori|
|00005410| 67 69 6e 61 6c 6c 79 20 | 77 72 69 74 74 65 6e 20 |ginally |written |
|00005420| 62 79 20 50 61 76 65 6c | 20 43 75 72 74 69 73 20 |by Pavel| Curtis |
|00005430| 61 74 20 43 6f 72 6e 65 | 6c 6c 20 55 6e 69 76 65 |at Corne|ll Unive|
|00005440| 72 73 69 74 79 2e 09 2a | 2f 0a 58 2f 2a 20 49 20 |rsity..*|/.X/* I |
|00005450| 68 61 76 65 20 6d 61 64 | 65 20 73 75 62 73 74 61 |have mad|e substa|
|00005460| 6e 74 69 61 6c 20 63 68 | 61 6e 67 65 73 20 74 6f |ntial ch|anges to|
|00005470| 20 6d 61 6b 65 20 69 74 | 20 72 75 6e 20 6f 6e 20 | make it| run on |
|00005480| 49 42 4d 20 50 43 27 73 | 2c 09 2a 2f 0a 58 2f 2a |IBM PC's|,.*/.X/*|
|00005490| 20 61 6e 64 20 74 68 65 | 72 65 66 6f 72 65 20 63 | and the|refore c|
|000054a0| 6f 6e 73 69 64 65 72 20 | 6d 79 73 65 6c 66 20 66 |onsider |myself f|
|000054b0| 72 65 65 20 74 6f 20 6d | 61 6b 65 20 69 74 20 70 |ree to m|ake it p|
|000054c0| 75 62 6c 69 63 20 64 6f | 6d 61 69 6e 2e 09 2a 2f |ublic do|main..*/|
|000054d0| 0a 58 2f 2a 09 09 09 09 | 42 6a 6f 72 6e 20 4c 61 |.X/*....|Bjorn La|
|000054e0| 72 73 73 6f 6e 20 28 62 | 6c 40 69 6e 66 6f 76 6f |rsson (b|l@infovo|
|000054f0| 78 2e 73 65 29 09 2a 2f | 0a 58 2f 2a 2a 2a 2a 2a |x.se).*/|.X/*****|
|00005500| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005510| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005520| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005530| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2f 0a 58 2f 2a |********|***/.X/*|
|00005540| 20 31 2e 34 3a 20 20 55 | 73 65 20 6f 66 20 73 68 | 1.4: U|se of sh|
|00005550| 6f 72 74 20 77 68 65 72 | 65 76 65 72 20 70 6f 73 |ort wher|ever pos|
|00005560| 73 69 62 6c 65 2e 20 50 | 6f 72 74 61 62 69 6c 69 |sible. P|ortabili|
|00005570| 74 79 09 09 2a 2f 0a 58 | 2f 2a 09 20 69 6d 70 72 |ty..*/.X|/*. impr|
|00005580| 6f 76 65 6d 65 6e 74 73 | 2c 20 6d 69 73 73 70 65 |ovements|, misspe|
|00005590| 6c 6c 65 64 20 6e 61 6d | 65 20 6f 66 20 6d 76 63 |lled nam|e of mvc|
|000055a0| 72 6c 74 6f 65 6f 6c 28 | 29 3a 09 39 30 30 31 31 |rltoeol(|):.90011|
|000055b0| 34 09 2a 2f 0a 58 2f 2a | 20 31 2e 33 3a 09 20 4d |4.*/.X/*| 1.3:. M|
|000055c0| 53 43 20 2d 57 33 2c 20 | 54 75 72 62 6f 27 43 27 |SC -W3, |Turbo'C'|
|000055d0| 20 2d 77 20 2d 77 2d 70 | 72 6f 20 63 68 65 63 6b | -w -w-p|ro check|
|000055e0| 65 73 3a 09 09 38 38 31 | 30 30 35 09 2a 2f 0a 58 |es:..881|005.*/.X|
|000055f0| 2f 2a 20 31 2e 32 3a 09 | 20 4d 61 78 20 6c 69 6d |/* 1.2:.| Max lim|
|00005600| 69 74 73 20 6f 66 66 20 | 62 79 20 31 2e 20 46 69 |its off |by 1. Fi|
|00005610| 78 65 64 20 74 68 61 6e | 6b 73 20 74 6f 20 53 2e |xed than|ks to S.|
|00005620| 20 43 72 65 70 73 3a 09 | 38 38 30 32 31 30 09 2a | Creps:.|880210.*|
|00005630| 2f 0a 58 2f 2a 20 31 2e | 30 3a 09 20 52 65 6c 65 |/.X/* 1.|0:. Rele|
|00005640| 61 73 65 3a 09 09 09 09 | 09 38 37 30 35 31 35 09 |ase:....|.870515.|
|00005650| 2a 2f 0a 58 2f 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |*/.X/***|********|
|00005660| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005670| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005680| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005690| 2a 2a 2a 2a 2a 2f 0a 58 | 0a 58 23 69 6e 63 6c 75 |*****/.X|.X#inclu|
|000056a0| 64 65 20 3c 63 75 72 73 | 65 73 2e 68 3e 0a 58 23 |de <curs|es.h>.X#|
|000056b0| 69 6e 63 6c 75 64 65 20 | 3c 63 75 72 73 70 72 69 |include |<curspri|
|000056c0| 76 2e 68 3e 0a 58 0a 58 | 63 68 61 72 20 5f 63 75 |v.h>.X.X|char _cu|
|000056d0| 72 73 65 73 5f 63 6c 72 | 74 6f 65 6f 6c 5f 72 63 |rses_clr|toeol_rc|
|000056e0| 73 69 64 5b 5d 20 3d 20 | 22 40 28 23 29 63 6c 72 |sid[] = |"@(#)clr|
|000056f0| 74 6f 65 6f 6c 2e 63 20 | 20 20 76 2e 31 2e 34 20 |toeol.c | v.1.4 |
|00005700| 20 2d 20 39 30 30 31 31 | 34 22 3b 0a 58 0a 58 2f | - 90011|4";.X.X/|
|00005710| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005720| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005730| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005740| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005750| 2f 0a 58 2f 2a 20 57 63 | 6c 72 74 6f 65 6f 6c 28 |/.X/* Wc|lrtoeol(|
|00005760| 29 20 66 69 6c 6c 73 20 | 74 68 65 20 68 61 6c 66 |) fills |the half|
|00005770| 20 6f 66 20 74 68 65 20 | 63 75 72 73 6f 72 20 6c | of the |cursor l|
|00005780| 69 6e 65 20 74 6f 20 74 | 68 65 20 72 69 67 68 74 |ine to t|he right|
|00005790| 09 2a 2f 0a 58 2f 2a 20 | 6f 66 20 74 68 65 20 63 |.*/.X/* |of the c|
|000057a0| 75 72 73 6f 72 20 69 6e | 20 77 69 6e 64 6f 77 20 |ursor in| window |
|000057b0| 27 77 69 6e 27 20 77 69 | 74 68 20 62 6c 61 6e 6b |'win' wi|th blank|
|000057c0| 73 2e 09 09 09 2a 2f 0a | 58 2f 2a 2a 2a 2a 2a 2a |s....*/.|X/******|
|000057d0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000057e0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000057f0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005800| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2f 0a 58 0a 58 69 |********|**/.X.Xi|
|00005810| 6e 74 09 77 63 6c 72 74 | 6f 65 6f 6c 28 77 69 6e |nt.wclrt|oeol(win|
|00005820| 29 0a 58 20 20 20 57 49 | 4e 44 4f 57 09 2a 77 69 |).X WI|NDOW.*wi|
|00005830| 6e 3b 0a 58 20 20 7b 0a | 58 20 20 73 68 6f 72 74 |n;.X {.|X short|
|00005840| 09 09 2a 6d 61 78 78 3b | 0a 58 20 20 73 68 6f 72 |..*maxx;|.X shor|
|00005850| 74 09 09 2a 70 74 72 3b | 0a 58 20 20 73 68 6f 72 |t..*ptr;|.X shor|
|00005860| 74 09 09 2a 65 6e 64 3b | 0a 58 20 20 73 74 61 74 |t..*end;|.X stat|
|00005870| 69 63 20 73 68 6f 72 74 | 09 20 79 3b 0a 58 20 20 |ic short|. y;.X |
|00005880| 73 74 61 74 69 63 20 73 | 68 6f 72 74 09 20 78 3b |static s|hort. x;|
|00005890| 0a 58 20 20 73 74 61 74 | 69 63 20 73 68 6f 72 74 |.X stat|ic short|
|000058a0| 09 20 6d 69 6e 78 3b 0a | 58 20 20 73 74 61 74 69 |. minx;.|X stati|
|000058b0| 63 20 73 68 6f 72 74 09 | 20 62 6c 61 6e 6b 3b 0a |c short.| blank;.|
|000058c0| 58 20 20 0a 58 20 20 79 | 20 3d 20 77 69 6e 2d 3e |X .X y| = win->|
|000058d0| 5f 63 75 72 79 3b 0a 58 | 20 20 78 20 3d 20 77 69 |_cury;.X| x = wi|
|000058e0| 6e 2d 3e 5f 63 75 72 78 | 3b 0a 58 20 20 62 6c 61 |n->_curx|;.X bla|
|000058f0| 6e 6b 20 3d 20 27 20 27 | 20 7c 20 28 77 69 6e 2d |nk = ' '| | (win-|
|00005900| 3e 5f 61 74 74 72 73 20 | 26 20 41 54 52 5f 4d 53 |>_attrs |& ATR_MS|
|00005910| 4b 29 3b 0a 58 0a 58 20 | 20 65 6e 64 20 3d 20 26 |K);.X.X | end = &|
|00005920| 77 69 6e 2d 3e 5f 6c 69 | 6e 65 5b 79 5d 5b 77 69 |win->_li|ne[y][wi|
|00005930| 6e 2d 3e 5f 6d 61 78 78 | 20 2d 20 31 5d 3b 0a 58 |n->_maxx| - 1];.X|
|00005940| 20 20 6d 69 6e 78 20 3d | 20 5f 4e 4f 5f 43 48 41 | minx =| _NO_CHA|
|00005950| 4e 47 45 3b 0a 58 20 20 | 6d 61 78 78 20 3d 20 26 |NGE;.X |maxx = &|
|00005960| 77 69 6e 2d 3e 5f 6c 69 | 6e 65 5b 79 5d 5b 78 5d |win->_li|ne[y][x]|
|00005970| 3b 0a 58 20 20 66 6f 72 | 20 28 70 74 72 20 3d 20 |;.X for| (ptr = |
|00005980| 6d 61 78 78 3b 20 70 74 | 72 20 3c 3d 20 65 6e 64 |maxx; pt|r <= end|
|00005990| 3b 20 70 74 72 2b 2b 29 | 0a 58 20 20 20 20 7b 0a |; ptr++)|.X {.|
|000059a0| 58 20 20 20 20 69 66 20 | 28 2a 70 74 72 20 21 3d |X if |(*ptr !=|
|000059b0| 20 62 6c 61 6e 6b 29 0a | 58 20 20 20 20 20 20 7b | blank).|X {|
|000059c0| 0a 58 20 20 20 20 20 20 | 6d 61 78 78 20 3d 20 70 |.X |maxx = p|
|000059d0| 74 72 3b 0a 58 20 20 20 | 20 20 20 69 66 20 28 6d |tr;.X | if (m|
|000059e0| 69 6e 78 20 3d 3d 20 5f | 4e 4f 5f 43 48 41 4e 47 |inx == _|NO_CHANG|
|000059f0| 45 29 0a 58 09 6d 69 6e | 78 20 3d 20 28 69 6e 74 |E).X.min|x = (int|
|00005a00| 29 20 28 70 74 72 20 2d | 20 77 69 6e 2d 3e 5f 6c |) (ptr -| win->_l|
|00005a10| 69 6e 65 5b 79 5d 29 3b | 0a 58 20 20 20 20 20 20 |ine[y]);|.X |
|00005a20| 2a 70 74 72 20 3d 20 62 | 6c 61 6e 6b 3b 0a 58 20 |*ptr = b|lank;.X |
|00005a30| 20 20 20 20 20 7d 20 2f | 2a 20 69 66 20 2a 2f 0a | } /|* if */.|
|00005a40| 58 20 20 20 20 7d 20 2f | 2a 20 66 6f 72 20 2a 2f |X } /|* for */|
|00005a50| 0a 58 0a 58 20 20 69 66 | 20 28 6d 69 6e 78 20 21 |.X.X if| (minx !|
|00005a60| 3d 20 5f 4e 4f 5f 43 48 | 41 4e 47 45 29 0a 58 20 |= _NO_CH|ANGE).X |
|00005a70| 20 20 20 7b 0a 58 20 20 | 20 20 69 66 20 28 28 77 | {.X | if ((w|
|00005a80| 69 6e 2d 3e 5f 6d 69 6e | 63 68 6e 67 5b 79 5d 20 |in->_min|chng[y] |
|00005a90| 3e 20 6d 69 6e 78 29 20 | 7c 7c 20 28 77 69 6e 2d |> minx) ||| (win-|
|00005aa0| 3e 5f 6d 69 6e 63 68 6e | 67 5b 79 5d 20 3d 3d 20 |>_minchn|g[y] == |
|00005ab0| 5f 4e 4f 5f 43 48 41 4e | 47 45 29 29 0a 58 20 20 |_NO_CHAN|GE)).X |
|00005ac0| 20 20 20 20 77 69 6e 2d | 3e 5f 6d 69 6e 63 68 6e | win-|>_minchn|
|00005ad0| 67 5b 79 5d 20 3d 20 6d | 69 6e 78 3b 0a 58 20 20 |g[y] = m|inx;.X |
|00005ae0| 20 20 69 66 20 28 77 69 | 6e 2d 3e 5f 6d 61 78 63 | if (wi|n->_maxc|
|00005af0| 68 6e 67 5b 79 5d 20 3c | 20 28 69 6e 74 29 20 28 |hng[y] <| (int) (|
|00005b00| 6d 61 78 78 20 2d 20 77 | 69 6e 2d 3e 5f 6c 69 6e |maxx - w|in->_lin|
|00005b10| 65 5b 79 5d 29 29 0a 58 | 20 20 20 20 20 20 77 69 |e[y])).X| wi|
|00005b20| 6e 2d 3e 5f 6d 61 78 63 | 68 6e 67 5b 79 5d 20 3d |n->_maxc|hng[y] =|
|00005b30| 20 28 69 6e 74 29 20 28 | 6d 61 78 78 20 2d 20 77 | (int) (|maxx - w|
|00005b40| 69 6e 2d 3e 5f 6c 69 6e | 65 5b 79 5d 29 3b 0a 58 |in->_lin|e[y]);.X|
|00005b50| 20 20 20 20 7d 20 2f 2a | 20 69 66 20 2a 2f 0a 58 | } /*| if */.X|
|00005b60| 20 20 72 65 74 75 72 6e | 28 4f 4b 29 3b 0a 58 20 | return|(OK);.X |
|00005b70| 20 7d 20 2f 2a 20 77 63 | 6c 72 74 6f 65 6f 6c 20 | } /* wc|lrtoeol |
|00005b80| 2a 2f 0a 58 0a 58 2f 2a | 2a 2a 2a 2a 2a 2a 2a 2a |*/.X.X/*|********|
|00005b90| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005ba0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005bb0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005bc0| 2a 2a 2a 2a 2a 2a 2a 2f | 0a 58 2f 2a 20 43 6c 72 |*******/|.X/* Clr|
|00005bd0| 74 6f 65 6f 6c 28 29 20 | 66 69 6c 6c 73 20 74 68 |toeol() |fills th|
|00005be0| 65 20 68 61 6c 66 20 6f | 66 20 74 68 65 20 63 75 |e half o|f the cu|
|00005bf0| 72 73 6f 72 20 6c 69 6e | 65 20 74 6f 20 74 68 65 |rsor lin|e to the|
|00005c00| 20 72 69 67 68 74 09 2a | 2f 0a 58 2f 2a 20 6f 66 | right.*|/.X/* of|
|00005c10| 20 74 68 65 20 63 75 72 | 73 6f 72 20 69 6e 20 73 | the cur|sor in s|
|00005c20| 74 64 73 63 72 20 77 69 | 74 68 20 62 6c 61 6e 6b |tdscr wi|th blank|
|00005c30| 73 2e 09 09 09 09 2a 2f | 0a 58 2f 2a 2a 2a 2a 2a |s.....*/|.X/*****|
|00005c40| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005c50| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005c60| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005c70| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2f 0a 58 0a 58 |********|***/.X.X|
|00005c80| 69 6e 74 20 63 6c 72 74 | 6f 65 6f 6c 28 29 0a 58 |int clrt|oeol().X|
|00005c90| 20 20 7b 0a 58 20 20 72 | 65 74 75 72 6e 28 77 63 | {.X r|eturn(wc|
|00005ca0| 6c 72 74 6f 65 6f 6c 28 | 73 74 64 73 63 72 29 29 |lrtoeol(|stdscr))|
|00005cb0| 3b 0a 58 20 20 7d 20 2f | 2a 20 63 6c 72 74 6f 65 |;.X } /|* clrtoe|
|00005cc0| 6f 6c 20 2a 2f 0a 58 0a | 58 2f 2a 2a 2a 2a 2a 2a |ol */.X.|X/******|
|00005cd0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005ce0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005cf0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005d00| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2f 0a 58 2f 2a 20 |********|**/.X/* |
|00005d10| 4d 76 63 6c 72 74 6f 65 | 6f 6c 28 29 20 6d 6f 76 |Mvclrtoe|ol() mov|
|00005d20| 65 73 20 74 68 65 20 63 | 75 72 73 6f 72 20 74 6f |es the c|ursor to|
|00005d30| 20 61 20 6e 65 77 20 70 | 6f 73 69 74 69 6f 6e 20 | a new p|osition |
|00005d40| 69 6e 20 73 74 64 73 63 | 72 09 2a 2f 0a 58 2f 2a |in stdsc|r.*/.X/*|
|00005d50| 20 61 6e 64 20 66 69 6c | 6c 73 20 74 68 65 20 72 | and fil|ls the r|
|00005d60| 69 67 68 74 20 68 61 6c | 66 20 6f 66 20 74 68 65 |ight hal|f of the|
|00005d70| 20 63 75 72 73 6f 72 20 | 6c 69 6e 65 20 77 69 74 | cursor |line wit|
|00005d80| 68 20 62 6c 61 6e 6b 73 | 2e 09 2a 2f 0a 58 2f 2a |h blanks|..*/.X/*|
|00005d90| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005da0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005db0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005dc0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2f |********|*******/|
|00005dd0| 0a 58 0a 58 69 6e 74 20 | 6d 76 63 6c 72 74 6f 65 |.X.Xint |mvclrtoe|
|00005de0| 6f 6c 28 79 2c 78 29 0a | 58 20 20 69 6e 74 20 79 |ol(y,x).|X int y|
|00005df0| 3b 0a 58 20 20 69 6e 74 | 20 78 3b 0a 58 20 20 7b |;.X int| x;.X {|
|00005e00| 0a 58 20 20 69 66 20 28 | 77 6d 6f 76 65 28 73 74 |.X if (|wmove(st|
|00005e10| 64 73 63 72 2c 79 2c 78 | 29 20 3d 3d 20 45 52 52 |dscr,y,x|) == ERR|
|00005e20| 29 0a 58 20 20 20 20 72 | 65 74 75 72 6e 28 45 52 |).X r|eturn(ER|
|00005e30| 52 29 3b 0a 58 20 20 72 | 65 74 75 72 6e 28 77 63 |R);.X r|eturn(wc|
|00005e40| 6c 72 74 6f 65 6f 6c 28 | 73 74 64 73 63 72 29 29 |lrtoeol(|stdscr))|
|00005e50| 3b 0a 58 20 20 7d 20 2f | 2a 20 6d 76 63 6c 72 74 |;.X } /|* mvclrt|
|00005e60| 6f 65 6f 6c 20 2a 2f 0a | 58 0a 58 2f 2a 2a 2a 2a |oeol */.|X.X/****|
|00005e70| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005e80| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005e90| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005ea0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2f 0a 58 2f |********|****/.X/|
|00005eb0| 2a 20 4d 76 77 63 6c 72 | 74 6f 65 6f 6c 28 29 20 |* Mvwclr|toeol() |
|00005ec0| 6d 6f 76 65 73 20 74 68 | 65 20 63 75 72 73 6f 72 |moves th|e cursor|
|00005ed0| 20 74 6f 20 61 20 6e 65 | 77 20 70 6f 73 69 74 69 | to a ne|w positi|
|00005ee0| 6f 6e 20 69 6e 20 77 69 | 6e 64 6f 77 09 2a 2f 0a |on in wi|ndow.*/.|
|00005ef0| 58 2f 2a 20 27 77 69 6e | 27 2c 20 61 6e 64 20 66 |X/* 'win|', and f|
|00005f00| 69 6c 6c 73 20 74 68 65 | 20 72 69 67 68 74 20 68 |ills the| right h|
|00005f10| 61 6c 66 20 6f 66 20 74 | 68 65 20 63 75 72 73 6f |alf of t|he curso|
|00005f20| 72 20 6c 69 6e 65 20 77 | 69 74 68 09 2a 2f 0a 58 |r line w|ith.*/.X|
|00005f30| 2f 2a 20 62 6c 61 6e 6b | 73 2e 09 09 09 09 09 09 |/* blank|s.......|
|00005f40| 09 2a 2f 0a 58 2f 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |.*/.X/**|********|
|00005f50| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005f60| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005f70| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005f80| 2a 2a 2a 2a 2a 2a 2f 0a | 58 0a 58 69 6e 74 20 6d |******/.|X.Xint m|
|00005f90| 76 77 63 6c 72 74 6f 65 | 6f 6c 28 77 69 6e 2c 79 |vwclrtoe|ol(win,y|
|00005fa0| 2c 78 29 0a 58 20 20 57 | 49 4e 44 4f 57 20 2a 77 |,x).X W|INDOW *w|
|00005fb0| 69 6e 3b 0a 58 20 20 69 | 6e 74 20 79 3b 0a 58 20 |in;.X i|nt y;.X |
|00005fc0| 20 69 6e 74 20 78 3b 0a | 58 20 20 7b 0a 58 20 20 | int x;.|X {.X |
|00005fd0| 69 66 20 28 77 6d 6f 76 | 65 28 77 69 6e 2c 79 2c |if (wmov|e(win,y,|
|00005fe0| 78 29 20 3d 3d 20 45 52 | 52 29 0a 58 20 20 20 20 |x) == ER|R).X |
|00005ff0| 72 65 74 75 72 6e 28 45 | 52 52 29 3b 0a 58 20 20 |return(E|RR);.X |
|00006000| 72 65 74 75 72 6e 28 77 | 63 6c 72 74 6f 65 6f 6c |return(w|clrtoeol|
|00006010| 28 77 69 6e 29 29 3b 0a | 58 20 20 7d 20 2f 2a 20 |(win));.|X } /* |
|00006020| 6d 76 77 63 6c 72 74 6f | 65 6f 6c 20 2a 2f 0a 45 |mvwclrto|eol */.E|
|00006030| 4e 44 5f 4f 46 5f 63 6c | 72 74 6f 65 6f 6c 2e 63 |ND_OF_cl|rtoeol.c|
|00006040| 0a 69 66 20 74 65 73 74 | 20 33 32 37 36 20 2d 6e |.if test| 3276 -n|
|00006050| 65 20 60 77 63 20 2d 63 | 20 3c 63 6c 72 74 6f 65 |e `wc -c| <clrtoe|
|00006060| 6f 6c 2e 63 60 3b 20 74 | 68 65 6e 0a 20 20 20 20 |ol.c`; t|hen. |
|00006070| 65 63 68 6f 20 5c 22 63 | 6c 72 74 6f 65 6f 6c 2e |echo \"c|lrtoeol.|
|00006080| 63 5c 22 20 75 6e 70 61 | 63 6b 65 64 20 77 69 74 |c\" unpa|cked wit|
|00006090| 68 20 77 72 6f 6e 67 20 | 73 69 7a 65 21 0a 66 69 |h wrong |size!.fi|
|000060a0| 0a 23 20 65 6e 64 20 6f | 66 20 6f 76 65 72 77 72 |.# end o|f overwr|
|000060b0| 69 74 69 6e 67 20 63 68 | 65 63 6b 0a 66 69 0a 69 |iting ch|eck.fi.i|
|000060c0| 66 20 74 65 73 74 20 2d | 66 20 63 75 72 73 70 72 |f test -|f curspr|
|000060d0| 69 76 2e 68 20 2d 61 20 | 22 24 7b 31 7d 22 20 21 |iv.h -a |"${1}" !|
|000060e0| 3d 20 22 2d 63 22 20 3b | 20 74 68 65 6e 20 0a 20 |= "-c" ;| then . |
|000060f0| 20 65 63 68 6f 20 57 69 | 6c 6c 20 6e 6f 74 20 6f | echo Wi|ll not o|
|00006100| 76 65 72 2d 77 72 69 74 | 65 20 65 78 69 73 74 69 |ver-writ|e existi|
|00006110| 6e 67 20 66 69 6c 65 20 | 5c 22 63 75 72 73 70 72 |ng file |\"curspr|
|00006120| 69 76 2e 68 5c 22 0a 65 | 6c 73 65 0a 65 63 68 6f |iv.h\".e|lse.echo|
|00006130| 20 45 78 74 72 61 63 74 | 69 6e 67 20 2d 20 5c 22 | Extract|ing - \"|
|00006140| 63 75 72 73 70 72 69 76 | 2e 68 5c 22 0a 73 65 64 |curspriv|.h\".sed|
|00006150| 20 22 73 2f 5e 58 2f 2f | 22 20 3e 63 75 72 73 70 | "s/^X//|" >cursp|
|00006160| 72 69 76 2e 68 20 3c 3c | 27 45 4e 44 5f 4f 46 5f |riv.h <<|'END_OF_|
|00006170| 63 75 72 73 70 72 69 76 | 2e 68 27 0a 58 2f 2a 2a |curspriv|.h'.X/**|
|00006180| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00006190| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000061a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000061b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2f 0a |********|******/.|
|000061c0| 58 2f 2a 09 09 09 20 20 | 20 43 55 52 53 50 52 49 |X/*... | CURSPRI|
|000061d0| 56 2e 48 09 09 09 09 2a | 2f 0a 58 2f 2a 20 48 65 |V.H....*|/.X/* He|
|000061e0| 61 64 65 72 20 66 69 6c | 65 20 66 6f 72 20 64 65 |ader fil|e for de|
|000061f0| 66 69 6e 69 74 69 6f 6e | 73 20 61 6e 64 20 64 65 |finition|s and de|
|00006200| 63 6c 61 72 61 74 69 6f | 6e 73 20 66 6f 72 20 74 |claratio|ns for t|
|00006210| 68 65 09 09 2a 2f 0a 58 | 2f 2a 20 50 43 63 75 72 |he..*/.X|/* PCcur|
|00006220| 73 65 73 20 70 61 63 6b | 61 67 65 2e 20 54 68 65 |ses pack|age. The|
|00006230| 73 65 20 64 65 66 69 6e | 69 74 69 6f 6e 73 20 73 |se defin|itions s|
|00006240| 68 6f 75 6c 64 20 6e 6f | 74 20 62 65 20 67 65 6e |hould no|t be gen|
|00006250| 65 2d 09 2a 2f 0a 58 2f | 2a 20 72 61 6c 6c 79 20 |e-.*/.X/|* rally |
|00006260| 61 63 63 65 73 73 69 62 | 6c 65 20 74 6f 20 70 72 |accessib|le to pr|
|00006270| 6f 67 72 61 6d 6d 65 72 | 73 2e 09 09 09 09 2a 2f |ogrammer|s.....*/|
|00006280| 0a 58 2f 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |.X/*****|********|
|00006290| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000062a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000062b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000062c0| 2a 2a 2a 2f 0a 58 2f 2a | 20 54 68 69 73 20 76 65 |***/.X/*| This ve|
|000062d0| 72 73 69 6f 6e 20 6f 66 | 20 63 75 72 73 65 73 20 |rsion of| curses |
|000062e0| 69 73 20 62 61 73 65 64 | 20 6f 6e 20 6e 63 75 72 |is based| on ncur|
|000062f0| 73 65 73 2c 20 61 20 63 | 75 72 73 65 73 20 76 65 |ses, a c|urses ve|
|00006300| 72 73 69 6f 6e 09 2a 2f | 0a 58 2f 2a 20 6f 72 69 |rsion.*/|.X/* ori|
|00006310| 67 69 6e 61 6c 6c 79 20 | 77 72 69 74 74 65 6e 20 |ginally |written |
|00006320| 62 79 20 50 61 76 65 6c | 20 43 75 72 74 69 73 20 |by Pavel| Curtis |
|00006330| 61 74 20 43 6f 72 6e 65 | 6c 6c 20 55 6e 69 76 65 |at Corne|ll Unive|
|00006340| 72 73 69 74 79 2e 09 2a | 2f 0a 58 2f 2a 20 49 20 |rsity..*|/.X/* I |
|00006350| 68 61 76 65 20 6d 61 64 | 65 20 73 75 62 73 74 61 |have mad|e substa|
|00006360| 6e 74 69 61 6c 20 63 68 | 61 6e 67 65 73 20 74 6f |ntial ch|anges to|
|00006370| 20 6d 61 6b 65 20 69 74 | 20 72 75 6e 20 6f 6e 20 | make it| run on |
|00006380| 49 42 4d 20 50 43 27 73 | 2c 09 2a 2f 0a 58 2f 2a |IBM PC's|,.*/.X/*|
|00006390| 20 61 6e 64 20 74 68 65 | 72 65 66 6f 72 65 20 63 | and the|refore c|
|000063a0| 6f 6e 73 69 64 65 72 20 | 6d 79 73 65 6c 66 20 66 |onsider |myself f|
|000063b0| 72 65 65 20 74 6f 20 6d | 61 6b 65 20 69 74 20 70 |ree to m|ake it p|
|000063c0| 75 62 6c 69 63 20 64 6f | 6d 61 69 6e 2e 09 2a 2f |ublic do|main..*/|
|000063d0| 0a 58 2f 2a 09 09 09 09 | 42 6a 6f 72 6e 20 4c 61 |.X/*....|Bjorn La|
|000063e0| 72 73 73 6f 6e 20 28 62 | 6c 40 69 6e 66 6f 76 6f |rsson (b|l@infovo|
|000063f0| 78 2e 73 65 29 09 2a 2f | 0a 58 2f 2a 2a 2a 2a 2a |x.se).*/|.X/*****|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.