⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 editline.3

📁 Unix操作系统minix 2.0源码
💻 3
📖 第 1 页 / 共 2 页
字号:
%!PS-Adobe-1.0%%Creator: devps (Pipeline Associates, Inc.)%%CreationDate: Fri Sep 13 13:06:38 1996%%Pages: (atend)%%DocumentFonts: (atend)/devps 180 dict def devps begin/res 10.000000 def/y_offset 843 def/X{exch}bind def/mm {transform round X round X itransform} bind def/r{rmoveto}bind def/m{moveto}bind def/l{lineto}bind def/rl{rlineto}bind def/st{stroke}bind def/gs{gsave}bind def/gr{grestore}bind def/cp{currentpoint}bind def/np{newpath}bind def/ct{curveto}bind defsystemdict /setpacking known { /savepacking currentpacking def true setpacking } if/m0{0 0 moveto}bind def/xc{//res div}bind def/yc{//res neg div //y_offset add}bind def/lc{yc X xc X l st}bind def/mc{yc X xc X m}bind def/el{gs /a X def a div 1 X scale cp np a xc 2 div 0 360 arc st gr}bind def/ar{cp 7 2 roll np xc 5 1 roll atan 3 1 roll atan X arc st}bind def/sp{yc X xc X 6 2 roll yc X xc X 6 2 roll yc X xc X 6 2 roll ct}bind def/V{//res neg div //y_offset addcurrentpoint pop Xm}bind def/H{//res div0 transform X round X itransform popcurrentpoint X popmoveto}bind def/h{//res div 0 r}bind def/v{//res neg div 0 X r}bind def/S{X H show}bind def/A{H //res div 1 index stringwidth pop sub 1 index length div 0 3 2 roll ashow}bind def/psize 10 def/height 0 def/cheight { height 0 ne { height } { psize } ifelse } bind def/slant 0 def/FF{findfont X dup 30 div 0 mm pop setlinewidth /psize X def    [psize 0 cheight slant sin slant cos div mul cheight 0 0]    makefont setfont}bind def/shade{gs /dy X def /dx X def np m 0 /dy rl /dx 0 rl 0 /dy neg rl /dx neg 0 rl closepath .9 setgray fillgr}bind def1 setlinecap/resolution res 72 mul def/startFig {	/SavedState save def	userdict maxlength dict begin	currentpoint transform	DocumentInitState setmiterlimit setgray setdash setlinejoin setlinecap		setlinewidth setmatrix	itransform moveto	/ury exch def	/urx exch def	/lly exch def	/llx exch def	/y exch 72 mul resolution div def	/x exch 72 mul resolution div def		currentpoint /cy exch def /cx exch def	/sx x urx llx sub div def	/sy y ury lly sub div def	sx sy scale	cx sx div llx sub	cy sy div ury sub translate		/DefFigCTM matrix currentmatrix def	/initmatrix {		DefFigCTM setmatrix	} def	/defaultmatrix {		DefFigCTM exch copy	} def	/initgraphics {		DocumentInitState setmiterlimit setgray setdash 			setlinejoin setlinecap setlinewidth setmatrix		DefFigCTM setmatrix	} def	/showpage {		initgraphics	} def}bind  def/clipFig {	currentpoint 6 2 roll	newpath 4 copy	4 2 roll moveto	6 -1 roll exch lineto	exch lineto	exch lineto	closepath clip	newpath	moveto}bind  def/doclip { llx lly urx ury clipFig } def/endFig {	end SavedState restore}bind  def/globalstart {	fontnum psize slant height resolution currentpoint 	pagesave restore gsave }bind  def/globalend {	grestore moveto	/resolution exch def /height exch def	/slant exch def /psize exch def /fontnum exch def	F	/pagesave save def}bind  def/fontnum 1 def systemdict /setpacking known { savepacking setpacking} ifend/BP{save mark devps begin m0/DocumentInitState [ matrix currentmatrix currentlinewidth currentlinecapcurrentlinejoin currentdash currentgray currentmiterlimit ] cvx def}bind def/EP{end cleartomark restore showpage}def/Encoding-1 256 array def0 1 255 {Encoding-1 exch /.notdef put} forEncoding-1 8#301 StandardEncoding 8#101 26 getinterval putinterval %A-BEncoding-1 8#341 StandardEncoding 8#141 26 getinterval putinterval %a-bEncoding-1 8#241 StandardEncoding 8#301 16 getinterval putinterval %accentsEncoding-1 8#373 StandardEncoding 8#365 1 getinterval putinterval %dotlessiEncoding-1dup 8#41 /copyright putdup 8#42 /registered putdup 8#43 /trademark putdup 8#44 /logicalnot putdup 8#45 /Eth putdup 8#46 /eth putdup 8#47 /Thorn putdup 8#50 /thorn putdup 8#51 /brokenbar putdup 8#52 /degree putdup 8#53 /divide putdup 8#54 /multiply putdup 8#55 /minus putdup 8#56 /onehalf putdup 8#57 /onequarter putdup 8#60 /threequarters putdup 8#101 /Aacute putdup 8#102 /Acircumflex putdup 8#103 /Adieresis putdup 8#104 /Agrave putdup 8#105 /Aring putdup 8#106 /Atilde putdup 8#107 /Ccedilla putdup 8#110 /Eacute putdup 8#111 /Ecircumflex putdup 8#112 /Edieresis putdup 8#113 /Egrave putdup 8#114 /Iacute putdup 8#115 /Icircumflex putdup 8#116 /Idieresis putdup 8#117 /Igrave putdup 8#120 /Ntilde putdup 8#121 /Oacute putdup 8#122 /Ocircumflex putdup 8#123 /Odieresis putdup 8#124 /Ograve putdup 8#125 /Otilde putdup 8#126 /Scaron putdup 8#127 /Uacute putdup 8#130 /Ucircumflex putdup 8#131 /Udieresis putdup 8#132 /Ugrave putdup 8#133 /Ydieresis putdup 8#134 /Zcaron putdup 8#135 /aacute putdup 8#136 /acircumflex putdup 8#137 /adieresis putdup 8#140 /agrave putdup 8#141 /aring putdup 8#142 /atilde putdup 8#143 /ccedilla putdup 8#144 /eacute putdup 8#145 /ecircumflex putdup 8#146 /edieresis putdup 8#147 /egrave putdup 8#150 /iacute putdup 8#151 /icircumflex putdup 8#152 /idieresis putdup 8#153 /igrave putdup 8#154 /ntilde putdup 8#155 /oacute putdup 8#156 /ocircumflex putdup 8#157 /odieresis putdup 8#160 /ograve putdup 8#161 /otilde putdup 8#162 /scaron putdup 8#163 /uacute putdup 8#164 /ucircumflex putdup 8#165 /udieresis putdup 8#166 /ugrave putdup 8#167 /ydieresis putdup 8#170 /zcaron putpop/Enc-dict 30 dict defEnc-dict /tmpstr1 50 string putEnc-dict /tmpstr2 50 string putEnc-dict /tmpstr3 50 string dup (Encoding-) exch cvs pop put/AEnc-def { % arguments: the original font's name, encoding nrEnc-dict begintmpstr2 cvs /Enc-no exch def % Remember the number in a stringdup /OrigName exch def % remember the namefindfont dup maxlength dict /newdict exch def % get dictionary for new font{ exch dup /FID ne   { exch newdict 3 1 roll put }   { pop pop } % Ignore FID   ifelse} forallnewdict begin/Encoding  tmpstr3 9 Enc-no putinterval tmpstr3 0 9 Enc-no length add getinterval  cvn load  def % Replace encodingcurrentdict /UniqueID known{ /UniqueID UniqueID Enc-no cvi 49999 mul add def } if % Derive New UniqueIDend % newdict/FNlength OrigName tmpstr1 cvs length def % convert name, remember lengthFNlength 1 add Enc-no length add stringdup 0 OrigName tmpstr1 cvs putintervaldup FNlength (-) putintervaldup FNlength 1 add Enc-no putintervaldup 0 tmpstr1 0 FNlength getinterval putinterval % Add old namecvn dup newdict /FontName 3 2 roll put newdict definefontend % Enc-dict} def/Times-Roman 1 AEnc-def pop/R-1{/Times-Roman-1 FF}def/R{/Times-Roman FF}def/B{/Times-Bold FF}def/I{/Times-Italic FF}def%%EndProlog%%Page: 1 1BP/slant 0 def/height 0 def480 V10 R720(EDITLINE)S1190(\()S1232(3)S1290(\))S2696(Eighth)S(Edition)296 2989 A4657(EDITLINE)S5127(\()S5169(3)S5227(\))S960 V9 R720(N)S722(NA)S790(AM)S858(ME)S940(E)S1080 V10 R(editline)302 1080 A10 R-11407(-)S10 R1489(command-line)S(editing)279 2095 A2399(library)S2693(with)S2897(history)S1248 V9 R720(S)S722(SY)S774(YN)S842(NO)S910(OP)S978(PS)S1030(SI)S1082(IS)S1115(S)S1368 V10 B1080(char)S1314(*)S1488 V1080(readline\(prompt\))S1608 V1270(char)S1800(*prompt;)S1848 V1080(void)S1968 V1080(add_history\(line\))S2088 V1232(char)S1440(*line;)S2256 V9 R720(D)S722(DE)S790(ES)S848(SC)S900(CR)S962(RI)S1024(IP)S1057(PT)S1109(TI)S1167(IO)S1200(ON)S1268(N)S2376 V10 I(Editline)319 1080 A10 R1426(is)S1520(a)S1592(library)S1888(that)S2066(provides)S2439(an)S(line-editing)464 2561 A(interface)354 3052 A3433(with)S3639(text)S(recall.)250 3817 A4119(It)S4208(is)S4302(intended)S4675(to)S4780(be)S4903(compati-)S2496 V1080(ble)S1230(with)S1436(the)S10 I1586(readline)S10 R1948(library)S2244(provided)S2628(by)S2755(the)S2905(Free)S3112(Software)S(Foundation,)482 3504 A4013(but)S4168(much)S4417(smaller.)S4790(The)S4973(bulk)S5177(of)S2616 V1080(this)S1250(manual)S1571(page)S1786(describes)S2186(the)S2334(user)S(interface.)379 2527 A2784 V1080(The)S10 I1266(readline)S10 R1630(routine)S1944(returns)S2253(a)S2327(line)S2507(of)S2620(text)S2800(with)S3008(the)S(trailing)291 3160 A3480(newline)S3828(removed.)S4260(The)S4447(data)S4645(is)S4742(returned)S5108(in)S5216(a)S2904 V1080(buffer)S1355(allocated)S1747(with)S10 I1954(malloc)S10 R2236(\(3\),)S2407(so)S2524(the)S(space)224 2675 A(should)267 2927 A3222(be)S3345(released)S3704(with)S10 I3911(free)S10 R4076(\(3\))S4222(when)S4468(the)S(calling)274 4619 A4920(program)S3024 V1080(is)S(done)195 1172 A1392(with)S1596(it.)S1727(Before)S(accepting)386 2027 A(input)206 2438 A2669(from)S2890(the)S3038(user,)S3256(the)S3404(speci\256ed)S10 I3787(prompt)S10 R4102(is)S4194(displayed)S4604(on)S4729(the)S4877(terminal.)S3192 V1080(The)S10 I(add_history)479 1262 A10 R1766(routine)S2076(makes)S2358(a)S(copy)195 2428 A2648(of)S2757(the)S2905(speci\256ed)S10 I3288(line)S10 R3464(and)S3634(adds)S3843(it)S3924(to)S4027(the)S4175(internal)S4508(history)S4812(list.)S3360 V870(U)S872(Us)S947(se)S988(er)S1035(r)S1096(I)S1098(In)S1134(nt)S1186(te)S1216(er)S1263(rf)S1299(fa)S1335(ac)S1382(ce)S1429(e)S3480 V1080(A)S1180(program)S1548(that)S1726(uses)S1927(this)S2100(library)S2397(provides)S2771(a)S2844(simple)S3140(emacs-like)S(editing)279 3605 A(interface)354 3912 A4294(to)S4400(its)S4523(users.)S4808(A)S4909(line)S5088(may)S3600 V1080(be)S1228(edited)S1527(before)S1838(it)S1947(is)S2067(sent)S2282(to)S2413(the)S(calling)274 2589 A2916(program)S3310(by)S3463(typing)S3772(either)S4055(control)S4393(characters)S4856(or)S4992(escape)S3720 V1080(sequences.)S1573(A)S1681(control)S2001(character,)S2432(shown)S2729(as)S2848(a)S2928(caret)S3160(followed)S3553(by)S3689(a)S3770(letter,)S4039(is)S4142(typed)S4401(by)S4537(holding)S4879(down)S5138(the)S3840 V1080(``control'')S1538(key)S1720(while)S1981(the)S2141(letter)S2386(is)S2490(typed.)S2800(For)S2977(example,)S(``\303A'')243 3380 A3660(is)S3764(a)S3846(control-A.)S4325(An)S4484(escape)S4789(sequence)S5194(is)S3960 V1080(entered)S1409(by)S1542(typing)S1831(the)S1987(``escape'')S2425(key)S2603(followed)S2994(by)S3127(one)S3305(or)S3422(more)S3662(characters.)S4155(The)S4345(escape)S4647(key)S4825(is)S4925(abbrevi-)S4080 V1080(ated)S1279(as)S1394(``ESC.'')S1796(Note)S2023(that)S2205(unlike)S2487(control)S2803(keys,)S3043(case)S3248(matters)S3576(in)S3685(escape)S3985(sequences;)S4451(``ESC)S4729(F'')S4883(is)S4980(not)S5138(the)S4200 V1080(same)S1312(as)S1421(``ESC)S(f''.)127 1699 A4368 V1080(An)S(editing)279 1228 A1532(command)S1953(may)S2151(be)S2271(typed)S2519(anywhere)S2936(on)S3061(the)S3209(line,)S3410(not)S3563(just)S3734(at)S3833(the)S3982(beginning.)S4459(In)S(addition,)354 4569 A4949(a)S5020(return)S4488 V1080(may)S1278(also)S1465(be)S1585(typed)S1833(anywhere)S2250(on)S2375(the)S2523(line,)S2724(not)S2877(just)S3047(at)S3145(the)S3293(end.)S4656 V1080(Most)S(editing)279 1313 A1619(commands)S2081(may)S2281(be)S2403(given)S2654(a)S2727(repeat)S(count,)248 3002 A10 I3278(n)S10 R3336(,)S3389(where)S10 I3664(n)S10 R3742(is)S3837(a)S3910(number.)S4295(To)S4435(enter)S4665(a)S4738(repeat)S(count,)248 5013 A4776 V1080(type)S1284(the)S1438(escape)S1738(key,)S1939(the)S2093(number,)S2456(and)S2632(then)S2836(the)S2990(command)S3417(to)S3526(execute.)S3914(For)S4084(example,)S4480(``ESC)S4758(4)S(\303f'')136 4833 A4999(moves)S4896 V1080(forward)S1427(four)S1623(characters.)S2111(If)S2207(a)S2280(command)S2704(may)S2905(be)S3028(given)S3279(a)S3352(repeat)S(count)223 3627 A3878(then)S4079(the)S4230(text)S

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -