📄 allman3.ps
字号:
2544 V10 B1080(isalpha)S10 I1830(c)S10 R1900(is)S1992(a)S2062(letter)S2712 V10 B(isupper)325 1080 A10 I1830(c)S10 R1900(is)S1992(an)S(upper)229 2112 A2366(case)S2565(letter)S2880 V10 B1080(islower)S10 I1830(c)S10 R1900(is)S1992(a)S2062(lower)S2317(case)S2516(letter)S3048 V10 B1080(isdigit)S10 I1830(c)S10 R1900(is)S1992(a)S2062(digit)S3216 V10 B1080(isxdigit)S10 I1830(c)S10 R1900(is)S1992(a)S2062(hex)S2232(digit)S3384 V10 B1080(isalnum)S10 I1830(c)S10 R1900(is)S1992(an)S2112(alphanumeric)S2685(character)S3552 V10 B1080(isspace)S10 I1830(c)S10 R1900(is)S1992(a)S(space,)249 2062 A2336(tab,)S2509(carriage)S2860(return,)S3151(newline,)S3520(vertical)S3848(tab,)S4021(or)S4130(formfeed)S3720 V10 B(ispunct)314 1080 A10 I1830(c)S10 R1900(is)S1992(a)S(punctuation)474 2062 A2561(character)S2957(\(neither)S3296(control)S3606(nor)S3765(alphanumeric\))S3888 V10 B1080(isprint)S10 I1830(c)S10 R1900(is)S1992(a)S2062(printing)S2405(character,)S2826(code)S(040\(8\))268 3041 A(\(space\))292 3334 A(through)312 3651 A(0176)200 3988 A(\(tilde\))247 4213 A4056 V10 B1080(isgraph)S10 I1830(c)S10 R1900(is)S1992(a)S2062(printing)S2405(character,)S2826(similar)S3131(to)S10 B3234(isprint)S10 R3545(except)S3833(false)S4049(for)S(space.)249 4192 A4224 V10 B1080(iscntrl)S10 I1830(c)S10 R1900(is)S1992(a)S2062(delete)S2328(character)S(\(0177\))268 2724 A3017(or)S3126(ordinary)S3492(control)S3802(character)S4198(\(less)S4408(than)S(040\).)209 4606 A4392 V10 B1080(isascii)S10 I1830(c)S10 R1900(is)S1992(an)S2112(ASCII)S2401(character,)S2822(code)S3037(less)S3213(than)S(0200)200 3411 A4560 V10 B1080(tolower)S10 I1830(c)S10 R1900(is)S(converted)397 1992 A2414(to)S2517(lower)S2772(case.)S3021(Return)S3320(value)S3563(is)S(unde\256ned)396 3655 A4076(if)S4163(not)S10 B(isupper)325 4316 A10 R4641(\()S10 I4675(c)S10 R4720(\).)S4728 V10 B(toupper)342 1080 A10 I1830(c)S10 R1900(is)S(converted)397 1992 A2414(to)S(upper)229 2517 A2771(case.)S3020(Return)S3319(value)S3562(is)S(unde\256ned)396 3654 A4075(if)S4162(not)S10 B4315(islower)S10 R4623(\()S10 I4657(c)S10 R4702(\).)S4896 V10 B1080(toascii)S10 I1830(c)S10 R1900(is)S(converted)397 1992 A2414(to)S2517(be)S2637(a)S2707(valid)S2933(ascii)S3143(character.)S5064 V9 R720(S)S722(SE)S774(EE)S832(E)S913(A)S915(AL)S983(LS)S1041(SO)S1093(O)S5184 V10 B1080(ascii)S10 R1270(\(7\))S7903 V720(Page)S941(1)S4455(September)S4911(17,)S(1996)200 5061 A8143 VEP%%Page: 1 10BP/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(17,)S(1996)200 5061 A8143 VEP%%Page: 2 11BP/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,)S3114(hc)S3236(are)S3387(characters,)S3849(buf)S4010(is)S4104(a)S4176(character)S4574(buffer,)S4873(attrs)S5073(is)S5166(an)S1440 V1080(attribute)S1441(bit)S1572(map,)S1795(bf)S1904(is)S1996(a)S(boolean)318 2066 A2409(\257ag.)S2635(Note)S2856(that)S3032(`characters')S3535(in)S3638(this)S3808(context)S4129(usually)S4444(can)S4609(have)S4824(16)S4949(bits\):)S1680 V1080(int)S1211(waddch\(win,ch\))S3240(put)S3393(char)S3592(in)S3695(stdscr)S1800 V1080(int)S1211(addch\(ch\))S1920 V1080(int)S1211(mvaddch\(y,x,ch\))S2040 V1080(int)S1211(mvwaddch\(win,y,x,ch\))S2280 V1080(int)S1211(waddstr\(win,str\))S3240(put)S3393(string)S3647(in)S3750(stdscr)S2400 V1080(int)S1211(addstr\(str\))S2520 V1080(int)S1211(mvaddstr\(y,x,str\))S2640 V1080(int)S1211(mvwaddstr\(win,y,x,str\))S2880 V1080(void)S(wattroff\(win,attrs\))744 1283 A3240(clear)S3462(attribute\(s\))S3930(in)S(window)324 4033 A3000 V1080(void)S(attroff\(attrs\))495 1283 A3240 V1080(void)S1283(wattron\(win,attrs\))S3240(add)S3410(attribute\(s\))S3878(in)S(window)324 3981 A3360 V1080(void)S1283(attron\(attrs\))S3600 V1080(void)S1283(wattrset\(win,attrs\))S3240(set)S(window)324 3377 A3726(char)S3925(attributes)S3720 V1080(void)S1283(attrset\(attrs\))S3960 V1080(int)S1211(baudrate\(\))S3240(dummy)S3571(for)S(compatibility)536 3714 A4200 V1080(void)S1283(beep\(\))S3240(ring)S3427(the)S3575(bell)S3751(or)S3860(visible)S4153(bell)S4329(if)S
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -