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

📄 curses.3

📁 Unix操作系统minix 2.0源码
💻 3
📖 第 1 页 / 共 2 页
字号:
%!PS-Adobe-1.0%%Creator: devps (Pipeline Associates, Inc.)%%CreationDate: Fri Sep 13 13:06:37 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%%EndProlog%%Page: 1 1BP/slant 0 def/height 0 def480 V10 R720(CURSES)S1109(\()S1151(3)S1209(\))S2696(Eighth)S(Edition)296 2989 A4738(CURSES)S5127(\()S5169(3)S5227(\))S960 V9 R720(N)S722(NA)S790(AM)S858(ME)S940(E)S1080 V10 R1080(curses)S10 R-11357(-)S10 R(screen/window)610 1439 A2074(management)S2613(library)S1248 V9 R720(S)S722(SY)S774(YN)S842(NO)S910(OP)S978(PS)S1030(SI)S1082(IS)S1115(S)S1368 V10 R1080(cc)S1208(demo.c)S1539(-lcurses)S1536 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)S1656 V10 R1080(Curses)S1387(is)S1487(a)S1565(library)S1867(of)S1984(screen)S2275(and)S(window)324 2454 A2812(management)S3360(routines.)S3768(It)S3864(is)S3965(modeled)S4345(after)S4565(the)S4722(UNIX)S5009(curses)S1776 V1080(and)S1253(ncurses)S1583(libraries.)S1967(Normally,)S2405(programs)S(written)286 2812 A3125(for)S3270(curses)S(should)267 3549 A3843(be)S3965(easily)S4227(ported)S4511(to)S4616(UNIX,)S4921(and)S5093(vice)S1896 V1080(versa.)S2064 V1080(To)S1219(use)S1380(the)S1530(routines,)S1906(the)S2056(function)S(initscr\(\))320 2418 A2765(must)S2987(\256rst)S3172(be)S3295(called.)S3614(This)S3821(creates)S4130(two)S('windows')431 4309 A4768(for)S4914(the)S5065(user:)S2184 V1080(stdscr)S1343(and)S1516(curscr.)S1841(Stdscr)S2121(is)S2216(the)S2367(default)S(window)324 2675 A3027(for)S3173(the)S3324(user)S3520(to)S3625(make)S3870(changes)S4221(on,)S4373(and)S4545(curscr)S4819(re\257ects)S5138(the)S2304 V1080(current)S1391(contents)S1751(of)S1860(the)S(physical)335 2008 A2369(display)S2685(screen.)S3019(The)S3202(user)S3396(writes)S3669(or)S3779(edits)S3995(the)S4144(stdscr)S(window)324 4405 A4755(to)S4859(his)S5002(liking,)S2424 V1080(then)S1281(calls)S1494(the)S1645(refresh\(\))S2022(function)S2385(to)S2491(make)S2737(curscr)S3012(and)S3184(the)S(physical)335 3334 A3696(screen)S(look)178 3981 A4186(like)S4364(stdscr.)S4676(When)S4943(the)S5093(user)S2544 V1080(program)S1446(terminates,)S1916(it)S(should)267 1997 A2289(call)S2460(the)S2608(endwin\(\))S2997(function)S3357(to)S3460(restore)S3760(things)S4030(to)S4133(normal.)S2712 V1080(There)S1351(are)S1510(all)S1646(sorts)S1871(of)S(window)324 1990 A2349(manipulation)S2914(routines)S3273(available)S3672(to)S3785(the)S3943(programmer:)S(auxiliary)358 4504 A(windows)363 4898 A2832 V1080(may)S1285(be)S1412(created,)S1761(edited,)S2064(moved)S2369(and)S2545(deleted.)S2917(The)S3105(terminal)S3472(may)S3676(be)S3802(set)S3945(in)S4054(many)S4308(different)S4687(modes,)S5005(output)S2952 V1080(text)S1267(may)S1476(be)S1608(attributed)S2031(with)S2247(blink,)S2515(blank,)S2800(bold)S3015(and)S3197(reverse)S3526(attributes.)S3988(Screen)S4300(colors)S4583(may)S4793(also)S4992(be)S5124(set,)S3072 V(foreground)447 1080 A1568(and)S(background.)499 1754 A2319(There)S2596(are)S(window-speci\256c)666 2761 A3468(printf-)S3767(and)S3952(scanf-like)S4390(routines,)S4779(routines)S5143(for)S3192 V(scrolling,)377 1080 A(box-drawing,)539 1482 A(window)324 2046 A2395(overlaying,)S2875(clearing)S3225(routines)S3574(etc.)S3360 V1080(For)S1246(more)S1479(and)S1650(detailed)S1995(information,)S2521(see)S2676(the)S2825(library)S3120(source)S3409(codes.)S3714(All)S3869(curses)S4147(functions)S4547(are)S(preceded)364 4698 A5089(by)S5216(a)S3480 V1080(complete)S1474(description.)S3648 V9 R720(F)S722(FU)S774(UN)S842(NC)S910(CT)S972(TI)S1030(IO)S1063(ON)S1131(NS)S1199(S)S3768 V10 R1080(Below)S1374(is)S1472(a)S1548(list)S1702(over)S1912(the)S2066(available)S2461(functions,)S2891(together)S3252(with)S3462(a)S3538(brief)S3760(description)S4238(of)S4353(what)S4580(they)S4784(do.)S4966(In)S5082(gen-)S3888 V1080(eral,)S1286(functions)S1689(whose)S1975(names)S2261(start)S2464(with)S2672('w')S2841(differ)S3094(from)S3318(the)S3469(one)S(without)307 3642 A3977('w')S4146(\(like)S4359(wmove)S4683(vs.)S4825(move\))S5110(sig-)S4008 V1080(nify)S1268(that)S1446(a)S1518(speci\256c)S(window)324 1853 A2204(is)S2298(used.)S(Without)329 2534 A2890(a)S2962('w',)S3155(sdtscr)S3417(is)S3511(implied.)S3895(The)S4079(functions)S4480(that)S4658(start)S4859(with)S5065('mv')S4128 V1080(before)S1380(the)S1545('genereic')S1997(function)S2374(name)S2634(signify)S2955(that)S3148(a)S3235(cursor)S3529(motion)S(should)267 3854 A4162(be)S4298(made)S4557(before)S4856(the)S5020(actual)S4248 V1080(work.)S1362('mv')S1583(and)S1753('w')S1919(combine)S2290(as)S2399(expected.)S4416 V1080(Most)S1313(routines)S1664(that)S1842(return)S2110(an)S2232(int)S(will)157 2365 A2549(return)S2817(the)S2967(manifest)S3341(constant)S3703(ERR)S3926(if)S4015(there)S4244(is)S4338(a)S4410(failure)S4702(during)S4992(execu-)S4536 V1080(tion.)S1314(Routines)S1699(that)S1878(return)S2147(a)S2220(char)S2422(actually)S2769(return)S3038(an)S3161(int,)S3320(so)S3437(that)S3616(ERR)S3839(does)S4050(not)S4205(con\257ict)S4534(with)S4740(the)S4890(character)S4656 V1080(code)S1295(0xff.)S1538(All)S1692(characters)S2127(from)S2348(0)S2423(to)S2526(0xff)S2719(are)S2868(allowed)S3212(for)S3355(usage)S3609(with)S3813(curses.)S4824 V1080(Some)S1340(routines,)S1720(like)S1902({mv}{w})S2326(printw\(\))S2688(and)S2864({mv}{w}scanw\(\))S3608(return)S3880(a)S3956(meaningful)S(positive)318 4445 A4794(value)S5044(if)S5138(the)S4944 V1080(operation)S1485(is)S(successful.)439 1577 A5112 V1080(The)S1263(curses)S1541(package)S1897(uses)S2096(some)S2334(prede\256ned)S2785(types,)S3048(variables)S3438(and)S3609(manifest)S3982(constants)S4382(that)S4559(are)S4709(also)S4897(available)S5232 V1080(to)S1184(the)S1333(programmer.)S1907(There)S2169(are)S2318(also)S2505(a)S2575(few)S2752(globally)S(accessible)409 3106 A3540(variables)S3929(that)S(should)267 4105 A4397(not)S4550(be)S4670(touched)S5013(by)S5138(the)S5352 V1080(application)S1554(program.)S1972(Those)S2245(untouchable)S2763(variables)S3154(have)S3371(names)S3656(starting)S3986(with)S4193(an)S(underscore)442 4316 A4786(\(_\))S4932(to)S5038(avoid)S5472 V1080(con\257icts.)S1500(The)S(user-accessible)611 1686 A2326(types,)S2592(variables)S2985(and)S3159(constants)S3562(are)S3715(\(there)S3980(are)S4132(a)S4205(number)S4540(of)S4652(other)S4887(constants)S5592 V1080(de\256ning)S1434(character)S1830(attribute)S2191(names)S2473(and)S2643(function)S3003(key)S3173(names)S3455(-)S3514(consult)S3829(<curses.h>)S4295(for)S4438(details\):)S5832 V1080(\(manifest)S1486(constants\))S5952 V1440(TRUE)S(boolean)318 3600 A3943(true)S6072 V1440(FALSE)S(boolean)318 3600 A3943(false)S6192 V1440(ERR)S(unsuccessfull)542 3600 A4167(operation)S6312 V1440(OK)S(successfull)442 3600 A4067(operation)S6552 V1080(\(types\))S6672 V(WINDOW)443 1440 A3600(a)S(window)324 3670 A4019(structure)S4397(type)S6792 V(bool)178 1440 A(boolean)318 3600 A3943(\257ag)S4119(type)S7032 V1080(\(variables\))S7152 V(WINDOW)443 1440 A1908(curscr)S(physical)335 3600 A3960(display)S4275(image)S7272 V(WINDOW)443 1440 A1908(stdscr)S3600(default)S3905(user)S4098(drawing)S4453(board)S7392 V1440(int)S1571(LINES)S3600(terminal)S3961(height)S7512 V1440(int)S1571(COLS)S3600(terminal)S3961(width)S7903 V720(Page)S941(1)S4455(September)S4911(13,)S(1996)200 5061 A8143 VEP%%Page: 2 2BP/slant 0 def/height 0 def480 V10 R720(CURSES)S1109(\()S1151(3)S1209(\))S2696(Eighth)S(Edition)296 2989 A4738(CURSES)S5127(\()S5169(3)S5227(\))S960 V1440(int)S(NONL)281 1571 A3600(\\n)S3703(causes)S3991(CR)S4150(and)S4320(LF)S4463(when)S4706(TRUE)S1200 V1080(The)S1264(following)S1682(is)S1776(an)S1898(alphabetical)S2412(list)S2562(of)S2673(the)S2823(curses)S3102(functions,)S3529(together)S3887(with)S4094(their)S4307(types,)S4572(parameters)S5043(and)S5216(a)S1320 V1080(short)S1308(comment)S1709(for)S(each)185 1854 A2066(\(win)S2278(is)S2372(a)S(window,)349 2444 A2820(ch,)S2967(vc,)S

⌨️ 快捷键说明

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