📄 paper.ps
字号:
99 Q 3(rM)290.198 99 S(Mo)298.528 99 Q -.12(ov)309.858 99 S -.12(ve)315.74 99 S(em)321.622 99 Q(me)326.952 99 Q(en)336.95 99 Q(nt)342.28 99 Q 3(tO)348.954 99S(Op)355.952 99 Q(pt)365.29 99 Q(ti)371.964 99 Q(im)375.962 99 Q(mi)379.3 99 Q(iz)389.298 99 Q(za)392.636 99 Q(at)397.966 99 Q(ti)403.968 99 Q(io)407.966 99Q(on)411.304 99 Q(n:)417.306 99 Q(:)423.98 99 Q 17.324 -8.662(AA L)239.049109.8 T(Li).66 E(ib)258.723 109.8 Q(br)262.061 109.8 Q(ra)268.735 109.8 Q(ar)274.065 109.8 Q(ry)280.067 109.8 Q 3(yP)285.397 109.8 S -.12(Pa)294.399 109.8 S(ac)301.613 109.8 Q(ck)307.615 109.8 Q(ka)312.945 109.8 Q(ag)319.619 109.8 Q(ge)325.621 109.8 Q(e)331.623 109.8 Q/F1 9/Times-Italic@0 SF -.315(Ke)244.03131.4 S(nneth C. R. C. Arnold).315 E(Elan Amir)269.374 142.2 Q/F2 9/Times-Roman@0 SF(Computer Science Di)238.365 163.8 Q(vision)-.225 E(Department of Electrical Engineering and Computer Science)178.524 174.6 Q(Uni)226.552 185.4 Q -.135(ve)-.225 G(rsity of California, Berk).135 E(ele)-.09 E(y)-.135 E(Berk)238.162 196.2 Q(ele)-.09 E 1.17 -.585(y, C)-.135 H 2.25(alifornia 94720).585 F/F3 9/Times-BoldItalic@0 SF(ABSTRA)265.284 239.4 Q(CT)-.585 E/F4 10/Times-Roman@0 SF(This document describes a package of C library functions which allo)97 285.6 Q2.5(wt)-.25 G(he user to:)384.2 285.6 Q 14<8375>79.5 301.8 S(pdate a screen with reasonable optimization,)102 301.8 Q 14<8367>79.5 318 S(et input from the terminal in a screen-oriented f)102 318 Q(ashion, and)-.1 E14<8369>79.5 334.2 S(ndependent from the abo)99.78 334.2 Q -.15(ve)-.15 G 2.5(,m).15 G .3 -.15(ove t)221.4 334.2 T(he cursor optimally from one point to another).15 E(.)-.55 E(These routines all use the)97 350.4 Q/F5 10/Times-Bold@0 SF -3.328(tt)2.5 G-4.438(ee)3.328 G -4.438(rr)4.438 G -8.328(mm)4.438 G -4.438(cc)8.328 G -4.998(aa)4.438 G -5.558(pp)4.998 G F4(\(5\) database to describe the capabilities of the terminal.)5.558 E/F6 9/Times-Bold@0 SF -6.496(AA)72 364.6 S -3.994(cc)6.496 G -5.002(kk)3.994 G-5.002(nn)5.002 G 6.656 -4.498(oo w)5.002 H(wl)-1.998 E(le)103.424 364.6 Q(ed)105.928 364.6 Q(dg)109.926 364.6 Q(ge)114.932 364.6 Q(em)119.434 364.6 Q(me)123.432 364.6 Q(en)130.931 364.6 Q(nt)134.929 364.6 Q(ts)139.935 364.6 Q(s)142.934 364.6 Q F4 1.221(This package w)97 380.8 R 1.221(ould not e)-.1 F 1.221(xist without the w)-.15 F 1.221(ork of Bill Jo)-.1 F 2.52 -.65(y, w)-.1 H 1.22(ho, in writing his editor).65 F 3.72(,c)-.4 G 1.22(reated the)463.63 380.8 R1.134(capability to generally describe terminals, wrote the routines which rea\d this database, and, most impor)72 392.8 R(-)-.2 E(tantly)72 404.8 Q 3.036(,t)-.65 G .536(hose which implement optimal cursor mo)102.446 404.8 R -.15(ve)-.15G .536(ment, which routines I ha).15 F .835 -.15(ve s)-.2 H .535(imply lifted nearly intact.).15 F .413(Doug Merritt and K)72 416.8 R .413(urt Shoens also were e)-.15 F .413(xtremely important, as were both willing to w)-.15 F .414(aste time listening)-.1 F .913(to me rant and ra)72 428.8 R -.15(ve)-.2 G 5.912(.T).15 G .912(he help and/or support of K)167.024 428.8 R .912(en Abrams, Alan Char)-.25 F3.412(,M)-.4 G .912(ark Horton, and Joe Kalash,)388.712 428.8 R -.1(wa)72 440.8S(s, and is, also greatly appreciated.).1 E/F7 10/Times-Italic@0 SF -.35(Ke)5 G2.5(nA).35 G 7.5(rnold 16)247.9 440.8 R(April 1986)2.5 E F4 .509(The help and/or support of Kirk McK)97 457 R .509(usick and K)-.15 F .509(eith Bostic \(public vi!\))-.25 F -.1(wa)5.51 G 3.01(si).1 G -1.95 -.4(nv a)418.08 457 T .51(luable in bringing).4 F .865(the package `)72 469 R .865(`into the 90')-.74 F(s')-.55 E .865(', which no)-.74 F 3.365(wi)-.25 G .865(ncludes completely ne)243.515 469 R 3.365(wd)-.25 G .864(ata structures and screen refresh opti-)350.01 469 R(mization routines.)72 481Q F7(Elan Amir)5 E(29 December 1992)7.5 E EP%%Page: 3 2%%BeginPageSetupBP%%EndPageSetup/F0 10/Times-Bold@0 SF -5.558(SS)72 60 S -4.438(cc)5.558 G 6.196 -4.438(rr ee)4.438 H -4.438(ee)4.438 G 11.116 -5.558(nn P)4.438 H -.1(Pa)-.55 G(ac)109.22660 Q(ck)114.228 60 Q(ka)118.67 60 Q(ag)124.232 60 Q(ge)129.234 60 Q 326.978(eP)134.236 60 S(PS)465.656 60 Q(S1)471.768 60 Q(1:)477.33 60 Q(:1)482.332 60 Q(19)485.664 60 Q(9-)490.666 60 Q(-3)495.668 60 Q(3)499 60 Q -4.998(11)72 96 S 7.496-2.498(.. O)4.998 H(Ov)84.506 96 Q -.1(ve)92.288 96 S(er)97.19 96 Q -.1(rv)101.632 96 S(vi)105.974 96 Q(ie)110.976 96 Q(ew)113.758 96 Q(w)118.2 96 Q/F1 10/Times-Roman@0 SF 2.106(In making a)97 112.2 R -.25(va)-.2 G 2.106(ilable the generalized terminal descriptions in).25 F F0 -3.328(tt)4.606 G-4.438(ee)3.328 G -4.438(rr)4.438 G -8.328(mm)4.438 G -4.438(cc)8.328 G -4.998(aa)4.438 G -5.558(pp)4.998 G F1 2.106(\(5\), much information w)5.558 F(as)-.1E .391(made a)72 124.2 R -.25(va)-.2 G .391(ilable to the programmer).25 F2.891(,b)-.4 G .391(ut little w)220.095 124.2 R .391(ork w)-.1 F .391(as tak)-.1 F .39(en out of one')-.1 F 2.89(sh)-.55 G 2.89(ands. The)374.02 124.2 R .39(purpose of this pack-)2.89 F .821(age is to allo)72 136.2 R 3.321(wt)-.25 G.822(he C programmer to do the most common type of terminal dependent function\s, those of)138.364 136.2 R(mo)72 148.2 Q -.15(ve)-.15 G .45(ment optimization and optimal screen updating, without doing an).15 F 2.95(yo)-.15 G 2.95(ft)371.7 148.2 S .45(he dirty w)380.76 148.2 R .45(ork, and with nearly)-.1 F(as much ease as is necessary to simply print or read things.)72 160.2 Q F0-4.998(11)72 184.2 S -2.498(..)4.998 G -4.998(11)2.498 G 7.496 -2.498(.. T)4.998 H -.92(Te)92.01 184.2 S(er)97.762 184.2 Q(rm)102.204 184.2 Q(mi)106.646184.2 Q(in)114.978 184.2 Q(no)117.76 184.2 Q(ol)123.322 184.2 Q(lo)128.324184.2 Q(og)131.106 184.2 Q(gy)136.108 184.2 Q(y)141.11 184.2 Q F1(In this document, the follo)97 200.4 Q(wing terminology is used:)-.25 E F0-7.218(ww)72 224.4 S -2.778(ii)7.218 G -5.558(nn)2.778 G -5.558(dd)5.558 G7.396 -4.998(oo w)5.558 H(w)98.032 224.4 Q F1 2.843(:A)C 2.843(ni)118.095 224.4S .343(nternal representation containing an image of what a section of the ter\minal screen may look)128.718 224.4 R(lik)97 236.4 Q 3.322(ea)-.1 G 3.322(ts)119.662 236.4 S .822(ome point in time.)129.654 236.4 R .821(This subsection can either encompass the entire terminal screen, or an)5.821 F(y)-.15 E(smaller portion do)97 248.4 Q(wn to a single character within that screen.)-.25 E F0 -3.328(tt)72 272.4 S-4.438(ee)3.328 G -4.438(rr)4.438 G -8.328(mm)4.438 G -2.778(ii)8.328 G -5.558(nn)2.778 G -4.998(aa)5.558 G -2.778(ll)4.998 G F1 3.248(:S)2.778 G .748(ometimes called)120.264 272.4 R F0 -3.328(tt)3.248 G -4.438(ee)3.328 G -4.438(rr)4.438 G -8.328(mm)4.438 G -2.778(ii)8.328 G -5.558(nn)2.778 G -4.998(aa)5.558 G 6.304 -2.778(ll s)4.998 H(sc)-1.11 E(cr)233.348 272.4 Q -.18(re)237.79272.4 S(ee)242.052 272.4 Q(en)246.494 272.4 Q(n)250.936 272.4 Q F1 5.748(.T)C.748(he package')270.854 272.4 R 3.248(si)-.55 G .748(dea of what the terminal')329 272.4 R 3.249(ss)-.55 G .749(creen currently)443.001 272.4 R(looks lik)97 284.4 Q(e,)-.1 E/F2 10/Times-Italic@0 SF(i.e)2.5 E(.)-.15 E F1 2.5(,w)C(hat the user sees no)165.36 284.4 Q 3.8 -.65(w. T)-.25 H(his is a special).65 E F2(scr)2.5 E(een)-.37 E F1(:)A F0 -3.888(ss)72 308.4 S-4.438(cc)3.888 G 6.196 -4.438(rr ee)4.438 H -4.438(ee)4.438 G -5.558(nn)4.438G F1 2.524(:T)5.558 G .024(his is a subset of windo)110.456 308.4 R .023(ws which are as lar)-.25 F .023(ge as the terminal screen,)-.18 F F2(i.e)2.523E(.)-.15 E F1 2.523(,t)C(he)404.335 308.4 Q 2.523(ys)-.15 G .023(tart at the upper left)425.038 308.4 R .729(hand corner and encompass the lo)97 320.4 R .729(wer right hand corner)-.25 F 5.729(.O)-.55 G .729(ne of these,)339.641 320.4 R F2(stdscr)3.23 E F1 3.23(,i)C 3.23(sa)422.55 320.4 S .73(utomatically pro-)434.11 320.4 R(vided for the programmer)97 332.4 Q(.)-.55 EF0 -4.998(11)72 356.4 S -2.498(..)4.998 G -4.998(22)2.498 G 7.496 -2.498(.. C)4.998 H(Co)92.01 356.4 Q(om)99.232 356.4 Q(mp)104.234 356.4 Q(pi)112.566 356.4Q(il)118.128 356.4 Q(li)120.91 356.4 Q(in)123.692 356.4 Q(ng)126.474 356.4 Q2.5(gA)132.036 356.4 S -.25(Ap)139.538 356.4 S(pp)146.51 356.4 Q(pl)152.072356.4 Q(li)157.634 356.4 Q(ic)160.416 356.4 Q(ca)163.198 356.4 Q(at)167.64356.4 Q(ti)172.642 356.4 Q(io)175.974 356.4 Q(on)178.756 356.4 Q(ns)183.758356.4 Q(s)189.32 356.4 Q F1 .487(In order to use the library)97 372.6 R 2.987(,i)-.65 G 2.987(ti)208.973 372.6 S 2.987(sn)217.52 372.6 S .487(ecessary to ha)229.397 372.6 R .787 -.15(ve c)-.2 H .487(ertain types and v).15 F .487(ariables def)-.25 F 2.987(ined. Therefore,)-.2 F(the)2.987 E(programmer must ha)72 384.6 Q .3 -.15(ve a l)-.2 H(ine:).15 E F0 -4.998(##)112400.8 S -2.778(ii)4.998 G -5.558(nn)2.778 G -4.438(cc)5.558 G -2.778(ll)4.438 G-5.558(uu)2.778 G -5.558(dd)5.558 G 8.876 -4.438(ee <)5.558 H(<c)-1.26 E(cu)156.34 400.8 Q(ur)160.782 400.8 Q(rs)166.344 400.8 Q(se)170.786 400.8 Q(es)174.678 400.8 Q(s.)179.12 400.8 Q(.h)183.012 400.8 Q(h>)185.514 400.8 Q(>)191.076 400.8 Q F1(at the top of the program source.)72 417 Q(Compilations should ha)5 E .3 -.15(ve t)-.2 H(he follo).15 E(wing form:)-.25 EF0 -4.438(cc)112 433.2 S -4.438(cc)4.438 G F1([)6.938 E F2(fla)2.5 E(gs)-.1 EF1 2.5(]f)2.5 G(ile ...)160.024 433.2 Q F0 -5.698<adad>2.5 G -2.778(ll)5.698 G-4.438(cc)2.778 G -5.558(uu)4.438 G -4.438(rr)5.558 G -3.888(ss)4.438 G -4.438(ee)3.888 G 7.776 -3.888(ss \255)4.438 H<ad6c>-1.81 E(lt)225.884 433.2 Q(te)228.666 433.2 Q(er)231.998 433.2 Q(rm)236.44 433.2 Q(mc)240.882 433.2 Q(ca)249.214 433.2 Q(ap)253.656 433.2 Q(p)258.658 433.2 Q -4.998(11)72 461.4 S-2.498(..)4.998 G -4.998(33)2.498 G 7.496 -2.498(.. S)4.998 H(Sc)92.01 461.4 Q(cr)97.572 461.4 Q -.18(re)102.014 461.4 S(ee)106.276 461.4 Q(en)110.718 461.4Q 2.5(nU)115.16 461.4 S(Up)123.222 461.4 Q(pd)130.444 461.4 Q(da)136.006 461.4Q(at)141.568 461.4 Q(ti)146.57 461.4 Q(in)149.902 461.4 Q(ng)152.684 461.4 Q(g)158.246 461.4 Q F1 .562(In order to update the screen optimally)97 477.6 R3.063(,i)-.65 G 3.063(ti)263.037 477.6 S 3.063(sn)271.66 477.6 S .563(ecessary for the routines to kno)283.613 477.6 R 3.063(ww)-.25 G .563(hat the screen cur)428.931 477.6 R(-)-.2 E .578(rently looks lik)72 489.6 R3.078(ea)-.1 G .578(nd what the programmer w)145.574 489.6 R .578(ants it to look lik)-.1 F 3.078(en)-.1 G -.15(ex)338.616 489.6 S 3.078(t. F).15 F .578(or this purpose, a data type \(struc-)-.15 F 1.163(ture\) named)72501.6 R F2(WINDO)3.663 E(W)-.5 E F1 1.163(is def)3.663 F 1.163(ined which describes a windo)-.2 F 3.663(wi)-.25 G 1.164(mage to the routines, including its starting)328.407 501.6 R 1.449(position on the screen \(the \(y)72 513.6 R 2.5(,x)-.65 G 3.949(\)c)204.965513.6 S 1.449(o-ordinates of the upper left hand corner\) and its size.)216.684513.6 R 1.448(One of these)6.449 F(\(called)72 525.6 Q F2(cur)4.043 E(scr)-.1 EF1(for)4.043 E F2(curr)4.043 E 1.543(ent scr)-.37 F(een)-.37 E F1 4.044(\)i)C4.044(sas)217.446 525.6 S 1.544(creen image of what the terminal currently looks lik)237.754 525.6 R 4.044(e. Another)-.1 F(screen \(called)72 537.6 Q F2(stdscr)2.5 E F1 2.5(,f)C(or)161.97 537.6 Q F2(standar)2.5 E 2.5(ds)-.37 G(cr)214.38 537.6 Q(een)-.37 E F12.5(\)i)C 2.5(sp)244.83 537.6 S(ro)256.22 537.6 Q(vided by def)-.15 E(ault to mak)-.1 E 2.5(ec)-.1 G(hanges on.)370.57 537.6 Q 2.775(Aw)97 553.8 S(indo)114.215 553.8 Q 2.775(wi)-.25 G 2.775(sap)144.52 553.8 S .274(urely internal representation.)163.4 553.8 R .274(It is used to b)5.274 F .274(uild and store a potential image of a por)-.2 F(-)-.2 E .96(tion of the terminal.)72 565.8 R .96(It doesn')5.96 F 3.46(tb)-.18 G .96(ear an)207.57 565.8 R 3.46(yn)-.15 G .96(ecessary relation to what is really on the terminal screen.)245.99 565.8 R .96(It is)5.96 F(more lik)72 577.8 Q 2.5(ea)-.1 G 2.5(na)116.89 577.8 S(rray of characters on which to mak)128.83 577.8 Q 2.5(ec)-.1 G(hanges.)279.51577.8 Q .828(When one has a windo)97 594 R 3.328(ww)-.25 G .827(hich describes what some part the terminal should look lik)208.92 594 R .827(e, the routine)-.1 F/F3 10/Courier-Bold@0 SF(refresh)72 606 Q F1 .146(\(\) \(or)B F3(wrefresh)2.646 E F1 .146(\(\) if the windo)B 2.646(wi)-.25 G2.646(sn)255.936 606 S(ot)267.472 606 Q F2(stdscr)2.646 E F1 2.646(\)i)C 2.646(sc)310.544 606 S(alled.)321.52 606 Q F3(Refresh)5.146 E F1 .146(\(\) mak)B.147(es the terminal, in the)-.1 F .231(area co)72 618 R -.15(ve)-.15 G .231(red by the windo).15 F 1.531 -.65(w, l)-.25 H .231(ook lik).65 F 2.731(et)-.1G .231(hat windo)230.617 618 R 4.031 -.65(w. N)-.25 H .23(ote, therefore, that changing something on a windo).65 F(w)-.25 E F2(does)72630 Q/F4 10/Times-BoldItalic@0 SF(not)2.936 E F2 -.15(ch)2.936 G(ang).15 E2.936(et)-.1 G .436(he terminal)143.888 630 R F1 5.436(.A)C .436(ctual updates to the terminal screen are made only by calling)205.31 630 R F3(refresh)2.937 E F1(\(\))A(or)72 642 Q F3(wrefresh)3.228 E F1 3.228(\(\). This)B(allo)3.228 E .728(ws the programmer to maintain se)-.25 F -.15(ve)-.25 G .727(ral dif).15 F .727(ferent ideas of what a portion of the)-.25 F .888(terminal screen should look lik)72 654 R 3.389(e. Also,)-.1 F .889(changes can be made to windo)3.389 F .889(ws in an)-.25 F 3.389(yo)-.15 G(rder)411.953 654 Q 3.389(,w)-.4 G .889(ithout re)440.762 654 R -.05(ga)-.15 G.889(rd to).05 F .214(motion ef)72 666 R -.2(fi)-.25 G(cienc).2 E 4.014 -.65(y. T)-.15 H .214(hen, at will, the programmer can ef).65 F(fecti)-.25 E -.15(ve)-.25 G .214(ly say \231mak).15 F 2.713(ei)-.1 G 2.713(tl)382.002 666 S .213(ook lik)390.275 666 R 2.713(et)-.1 G .213(his\232, and the pack-)428.381 666 R(age will e)72 678 Q -.15(xe)-.15 G(cute the changes in an optimal w).15 E(ay)-.1 E(.)-.65 E EP%%Page: 4 3%%BeginPageSetupBP%%EndPageSetup/F0 10/Times-Bold@0 SF -6.108(PP)72 60 S -5.558(SS)6.108 G -4.998(11)5.558 G-3.328(::)4.998 G -4.998(11)3.328 G -4.998(99)4.998 G -3.328(--)4.998 G 334.474-4.998(44 S)3.328 H(Sc)-.56 E(cr)442.888 60 Q -.18(re)447.33 60 S(ee)451.592 60Q(en)456.034 60 Q 2.5(nP)460.476 60 S -.1(Pa)468.538 60 S(ac)474.55 60 Q(ck)479.552 60 Q(ka)483.994 60 Q(ag)489.556 60 Q(ge)494.558 60 Q(e)499.56 60 Q-4.998(11)72 96 S -2.498(..)4.998 G -4.998(44)2.498 G 7.496 -2.498(.. N)4.998 H(Na)92.01 96 Q(am)99.232 96 Q(mi)104.234 96 Q(in)112.566 96 Q(ng)115.348 96 Q2.5(gC)120.91 96 S(Co)128.412 96 Q(on)135.634 96 Q -.4(nv)140.636 96 S -.1(ve)145.798 96 S(en)150.7 96 Q(nt)155.142 96 Q(ti)160.704 96 Q(io)164.036 96 Q(on)166.818 96 Q(ns)171.82 96 Q(s)177.382 96 Q/F1 10/Times-Roman@0 SF .133(As hinted abo)97 112.2 R -.15(ve)-.15 G 2.633(,t).15 G .133(he routines can use se)169.869 112.2 R -.15(ve)-.25 G .133(ral windo).15 F.133(ws, b)-.25 F .133(ut tw)-.2 F 2.633(oa)-.1 G .133(re al)358.003 112.2 R-.1(wa)-.1 G .133(ys a).1 F -.25(va)-.2 G(ilable:).25 E/F2 10/Times-Italic@0 SF(cur)2.633 E(scr)-.1 E F1 2.634(,w)C .134(hich is)477.476 112.2 R .07(the image of what the terminal looks lik)72 124.2 R 2.57(ea)-.1 G 2.57(tp)243.55 124.2 S .07(resent, and)253.9 124.2 R F2(stdscr)2.57 E F1 2.57(,w)C .07
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -