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

📄 string.3

📁 Unix操作系统minix 2.0源码
💻 3
字号:
%!PS-Adobe-1.0%%Creator: devps (Pipeline Associates, Inc.)%%CreationDate: Fri Sep 13 13:07:00 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(STRING)S1093(\()S1135(3)S1193(\))S2696(Eighth)S(Edition)296 2989 A4754(STRING)S5127(\()S5169(3)S5227(\))S960 V9 R720(N)S722(NA)S790(AM)S858(ME)S940(E)S1080 V10 R1080(string,)S1367(strcat,)S1644(strncat,)S1971(strcmp,)S2303(strncmp,)S2685(strcpy,)S2989(strncpy,)S3344(strlen,)S3627(index,)S3909(rindex)S10 R-14200(-)S10 R4291(string)S4554(operations)S5007(string,)S1200 V1080(strcat,)S1371(strncat,)S1712(strcmp,)S2058(strncmp,)S2454(strcpy,)S2772(strncpy,)S3140(strlen,)S3436(strchr,)S3738(strrchr,)S4074(strerror,)S4444(memcmp,)S4890(memcpy,)S1320 V1080(memmove,)S1554(memchr,)S1934(memset,)S2297(index,)S2570(rindex)S10 R-12852(-)S10 R2934(string)S3188(operations)S1488 V9 R720(S)S722(SY)S774(YN)S842(NO)S910(OP)S978(PS)S1030(SI)S1082(IS)S1115(S)S1608 V10 B1080(#include)S1482(<sys/types.h>)S1728 V1080(#include)S1482(<strings.h>)S1968 V1080(char)S1314(*strcat\(char)S1879(*)S10 I1929(s1)S10 B2018(,)S2081(const)S2343(char)S2577(*)S10 I2627(s2)S10 B2716(\))S2088 V1080(char)S1314(*strncat\(char)S1935(*)S10 I1985(s1)S10 B2074(,)S2137(const)S2399(char)S2633(*)S10 I2683(s2)S10 B2772(,)S2835(size_t)S10 I3114(n)S10 B3164(\))S2208 V1080(int)S1236(strcmp\(const)S1835(char)S2069(*)S10 I2119(s1)S10 B2208(,)S2271(const)S2533(char)S2767(*)S10 I2817(s2)S10 B2906(\))S2328 V1080(int)S1236(strncmp\(const)S1891(char)S2125(*)S10 I2175(s1)S10 B2264(,)S2327(const)S2589(char)S2823(*)S10 I2873(s2)S10 B2962(,)S3025(size_t)S10 I3304(n)S10 B3354(\))S2448 V1080(char)S1314(*strcpy\(char)S1901(*)S10 I1951(s1)S10 B2040(,)S2103(const)S2365(char)S2599(*)S10 I2649(s2)S10 B2738(\))S2568 V1080(char)S1314(*strncpy\(char)S1957(*)S10 I2007(s1)S10 B2096(,)S2159(const)S2421(char)S2655(*)S10 I2705(s2)S10 B2794(,)S2857(size_t)S10 I3136(n)S10 B3186(\))S2688 V1080(size_t)S1359(strlen\(const)S1902(char)S2136(*)S10 I2186(s)S10 B2225(\))S2808 V1080(char)S1314(*strchr\(const)S1924(char)S2158(*)S10 I2208(s)S10 B2247(,)S2310(int)S10 I2466(c)S10 B2511(\))S2928 V1080(char)S(*strrchr\(const)617 1314 A1969(char)S2203(*)S10 I2253(s)S10 B2292(,)S2355(int)S10 I2511(c)S10 B2556(\))S3048 V1080(char)S(*strerror\(int)550 1314 A10 I1902(errnum)S10 B2198(\))S3168 V1080(int)S1236(memcmp\(const)S1930(void)S2152(*)S10 I2202(s1)S10 B2291(,)S2354(const)S2616(void)S2838(*)S10 I2888(s2)S10 B2977(,)S3040(size_t)S10 I3319(n)S10 B3369(\))S3288 V1080(void)S1302(*memcpy\(void)S1972(*)S10 I2022(s1)S10 B2111(,)S2174(const)S2436(void)S2658(*)S10 I2708(s2)S10 B2797(,)S2860(size_t)S10 I3139(n)S10 B3189(\))S3408 V1080(void)S1302(*memmove\(void)S2050(*)S10 I2100(s1)S10 B2189(,)S2252(const)S2514(void)S2736(*)S10 I2786(s2)S10 B2875(,)S2938(size_t)S10 I3217(n)S10 B3267(\))S3528 V1080(void)S1302(*memchr\(const)S2007(void)S2229(*)S10 I2279(s)S10 B2318(,)S2381(int)S10 I2537(c)S10 B2582(,)S2645(size_t)S10 I2924(n)S10 B2974(\))S3648 V1080(void)S1302(*memset\(void)S1939(*)S10 I1989(s)S10 B2028(,)S2091(int)S10 I2247(c)S10 B2292(,)S2355(size_t)S10 I2634(n)S10 B2684(\))S3768 V1080(char)S1314(*index\(const)S1895(char)S2129(*)S10 I2179(s)S10 B2218(,)S2281(int)S10 I2437(c)S10 B2482(\))S3888 V1080(char)S1314(*rindex\(const)S1940(char)S2174(*)S10 I2224(s)S10 B2263(,)S2326(int)S10 I2482(c)S10 B2527(\))S4056 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)S4176 V10 R1080(These)S1355(functions)S1763(operate)S2094(on)S2228(null-terminated)S2883(strings.)S3235(They)S3476(do)S3610(not)S3772(check)S4041(for)S4194(over\257ow)S4587(of)S4706(any)S(receiving)375 4886 A4296 V1080(string.)S4464 V10 B1080(Strcat)S10 R1375(appends)S1735(a)S(copy)195 1811 A2037(of)S2152(string)S10 I2412(s2)S10 R2532(to)S2641(the)S2795(end)S2971(of)S3086(string)S10 I3346(s1)S10 R3443(.)S10 B3524(Strncat)S10 R3875(copies)S4163(at)S4267(most)S10 I4493(n)S10 R4574(characters.)S5066(Both)S4584 V1080(return)S1346(a)S1416(pointer)S1726(to)S1829(the)S1977(null-terminated)S2623(result.)S4752 V10 B1080(Strcmp)S10 R1430(compares)S1846(its)S1971(arguments)S2420(and)S2595(returns)S2905(an)S3030(integer)S3340(greater)S3651(than,)S3879(equal)S4127(to,)S4260(or)S4374(less)S4555(than)S4758(0,)S(according)397 4864 A4872 V1080(as)S10 I1193(s1)S10 R1311(is)S1407(lexicographically)S2135(greater)S2445(than,)S2672(equal)S2919(to,)S3050(or)S3162(less)S3341(than)S10 I3542(s2)S10 R3639(.)S10 B3717(Strncmp)S10 R4121(makes)S4406(the)S4557(same)S4792(comparison)S4992 V1080(but)S(looks)217 1233 A1475(at)S1573(at)S1671(most)S10 I1891(n)S10 R1966(characters.)S5160 V10 B1080(Strcpy)S10 R1391(copies)S1673(string)S10 I1927(s2)S10 R2041(to)S10 I2144(s1)S10 R2241(,)S(stopping)345 2291 A2661(after)S2872(the)S3020(null)S3201(character)S3597(has)S3756(been)S3971(moved.)S10 B4319(Strncpy)S10 R4687(copies)S4970(exactly)S5280 V10 I1080(n)S10 R1157(characters,)S1619(truncating)S2054(or)S2165(null-padding)S10 I2704(s2;)S10 R2853(the)S3002(target)S3258(may)S3457(not)S3611(be)S3732(null-terminated)S4379(if)S4467(the)S4616(length)S4893(of)S10 I5003(s2)S10 R5118(is)S10 I5211(n)S5400 V10 R1080(or)S1189(more.)S1471(Both)S1691(return)S10 I1957(s1)S10 R2054(.)S5568 V10 B1080(Strlen)S10 R1369(returns)S1674(the)S1822(number)S2154(of)S(non-null)340 2263 A2628(characters)S3063(in)S10 I3166(s)S10 R3213(.)S5736 V10 B1080(Strchr)S10 R1386(\()S10 B(strrchr)309 1420 A10 R1729(\))S1788(returns)S2093(a)S2163(pointer)S2473(to)S2576(the)S2724(\256rst)S2906(\(last\))S3139(occurrence)S3607(of)S3716(character)S10 I4112(c)S10 R4182(in)S4285(string)S10 I4539(s,)S10 R4628(or)S4737(null)S4918(if)S10 I5006(c)S10 R5077(does)S5856 V1080(not)S1233(occur)S1482(in)S1585(the)S1733(string.)S6024 V10 B(Strerror)365 1080 A10 R1470(returns)S1775(the)S1923(error)S2145(string)S2399(for)S2542(the)S2690(system)S2994(call)S3165(error)S10 I3387(errnum)S10 R3691(.)S3766(See)S10 B3937(intro)S10 R4150(\(2\).)S6192 V10 B1080(Memcmp)S10 R1524(is)S1626(like)S10 B1812(strcmp)S10 R2150(except)S2448(that)S2634(the)S2792(strings)S3096(are)S3256(memory)S3627(blocks)S3925(of)S4045(length)S10 I4332(n)S10 R4390(.)S4476(Null)S4691(characters)S5137(are)S6312 V1080(treated)S1380(as)S1489(ordinary)S1855(characters.)S6480 V10 B1080(Memcpy)S10 R1487(copies)S10 I1776(n)S10 R1858(bytes)S2102(from)S2330(the)S2485(location)S2841(pointed)S3174(to)S3284(by)S10 I3416(s2)S10 R3537(to)S10 I3647(s1)S10 R3744(.)S10 B3826(Memmove)S10 R4311(is)S4410(like)S4594(memcpy,)S4998(except)S6600 V1080(that)S1256(it)S1337(can)S1502(handle)S1795(overlap)S2122(between)S2483(the)S2631(two)S2807(strings.)S3150(Both)S3370(functions)S3769(return)S10 I4035(s1)S10 R4132(.)S6768 V10 B1080(Memchr)S10 R1477(returns)S1784(a)S1856(pointer)S2168(to)S2273(the)S2423(\256rst)S2607(occurrence)S3077(of)S3188(character)S10 I3586(c)S10 R3658(in)S3763(string)S10 I4019(s,)S10 R4110(or)S4221(null)S4404(if)S10 I4493(c)S10 R4565(does)S4776(not)S4931(occur)S5183(in)S6888 V1080(the)S1228(string.)S7056 V10 B1080(Memset)S10 R1447(sets)S10 I1623(n)S10 R1698(bytes)S1935(to)S10 I2038(c)S10 R2108(starting)S2435(at)S2533(location)S10 I2882(s)S10 R2929(.)S3004(It)S3091(returns)S10 I3396(s)S10 R3443(.)S7224 V10 B1080(Index)S10 R1351(and)S10 B1521(rindex)S10 R1826(are)S1975(obsolete)S2335(versions)S2695(of)S10 B2804(strchr)S10 R3093(and)S10 B(strrchr)309 3263 A10 R3572(.)S3647(New)S3863(code)S(should)267 4078 A4370(avoid)S4618(using)S4860(them.)S7392 V9 R720(N)S722(NO)S790(OT)S858(TE)S916(ES)S974(S)S7512 V10 R1080(Characters)S1537(are)S1686(compared)S2108(as)S10 B2217(unsigned)S2628(char)S10 R2824(,)S2874(whether)S10 B3224(char)S10 R3445(itself)S3672(is)S3764(signed)S4051(or)S4160(not.)S7903 V720(Page)S941(1)S2669(\()S2711(May)S2920(15,)S(1985)200 3070 A3278(\))S4455(September)S4911(13,)S(1996)200 5061 A8143 VEP%%Trailer%%DocumentFonts: Times-Roman Times-Bold Times-Italic%%Pages: 1

⌨️ 快捷键说明

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