📄 printf.3
字号:
%!PS-Adobe-1.0%%Creator: devps (Pipeline Associates, Inc.)%%CreationDate: Fri Sep 13 13:06:52 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%% Troff special characters not on Symbol font%% Copyright (C) 1986 by Pipeline Associates, Inc.%% Version 1.0%% $Header: Troff.pro,v 1.7 90/08/14 16:07:55 keie Exp $/altRTD 20 dict defaltRTD begin/s{setcachedevice}bind def/m{moveto}bind def/c{curveto}bind def/S{stroke}bind def/l{lineto}bind defend/F_Troff 17 dict def F_Troff beginsystemdict /currentpacking known{/SavePacking currentpacking def true setpacking}if/PaintType 0 def/FontType 3 def/StrokeWidth 25 def/UniqueID 8277030 def/FontMatrix [.001000 0 0 .001000 0 0] def/FontBBox [-85 -150 1000 1000 ] def/Encoding 256 array def/CD 256 1 add dict def/FontInfo 3 dict def FontInfo begin/UnderlinePosition -133 def /UnderlineThickness 20 def end/FontName (Troff) def0 1 256 1 sub{Encoding exch /.notdef put}forCD /.notdef{500 0 setcharwidth{}}putEncoding (1) 0 get /br put%% bold vertical rule used by tblCD /br{0 0 -500 -500 1000 1000 snpclw0 -100 m0 900 l{S}}putEncoding (2) 0 get /ul put%% underline used by tblCD /ul{500 0 0 -200 500 0 snpclw0 -100 m500 -100 l{S}}putEncoding (3) 0 get /ru put%% baseline ruleCD /ru{500 0 -500 -500 1000 1000 snpclwm0500 0 l{S}}putEncoding (4) 0 get /vr put%% vertical ruleCD /vr{0 0 -500 -500 1000 1000 snpclwm00 1000 l{S}}putEncoding (5) 0 get /sq put%% squareCD /sq{500 0 0 0 500 1000 snpm00 500 rl500 0 rl0 -500 rl-500 0 rlclosepath61 61 m378 0 rl0 378 rl-378 0 rlclosepath{fill}}putEncoding (6) 0 get /bx put%% solid boxCD /bx{500 0 0 0 500 1000 snpm00 500 rl500 0 rl0 -500 rlclosepath{fill}}putEncoding (7) 0 get /rn put%% radical extenderCD /rn{500 0 -500 -500 1000 1000 snp30 setlinewidth-30 900 m500 0 rl{S}}putEncoding 120 /rc put%% top of right bracket above braceexCD /rc {494 0 -85 -80 255 926 s201 -80 m 201 872 l -85 872 l -85 926 l 255 926 l 255 -80 lclosepath {fill}} putEncoding 121 /lc put%% top of left bracket above braceexCD /lc {491 0 201 -80 541 926 s201 -80 m 201 926 l 541 926 l 541 872 l 255 872 l 255 -80 lclosepath {fill}} putEncoding 122 /rf put%% bottom of right bracket below braceexCD /rf {494 0 -85 -80 255 926 s-85 -80 m -85 -26 l 201 -26 l 201 926 l 255 926 l 255 -80 lclosepath {fill}} putEncoding 123 /lf put%% bottom of left bracket below braceexCD /lf {494 0 201 -80 541 926 s201 -80 m 201 926 l 255 926 l 255 -26 l 872 -26 l 872 -80 lclosepath {fill}} putEncoding 97 /a putCD /a{5 setlinewidth 1000 0 0 66 942 421 s 430 415m 578 406 678 349 662 319 c 655 306 614 287 583296 c 570 300 466 340 438 332 c 365 309 335 213270 209 c 0 310 m 108 310 l 108 114 l 0114 l 0 310 l 42 161 m 42 134 l 66 134 l 66161 l 42 161 l 47 155 m 47 140 l 62 140 l 62155 l 47 155 l 110 133 m 226 113 300 66 41080 c 497 91 550 69 634 76 c 645 76 663 92 669107 c 677 125 673 141 668 160 c 725 334 m 758332 734 253 701 250 c 501 325 m 475 316 476 309473 302 c 465 282 482 263 499 257 c 552 236 615253 689 253 c 701 253 713 236 713 218 c 712 194702 168 678 161 c 671 159 663 160 655 160 c 591158 516 156 479 168 c 461 173 453 191 453 210 c 453224 456 235 466 244 c 476 253 490 252 503 255 c 45984 m 447 96 435 106 435 123 c 435 136 440 145 447155 c 453 163 462 168 469 173 c 110 293 m 173318 300 421 435 415 c 609 407 852 416 885 411 c 898409 924 411 930 380 c 942 316 828 339 742 334 c 731334 730 335 725 335 c 701 336 685 336 660 336 c{S}}putEncoding 98 /b putCD /b{5 setlinewidth 1000 0 -12 66 930 421 s 500415 m 352 406 252 349 268 319 c 275 306 316 287347 296 c 360 300 464 340 492 332 c 565 309 595213 660 209 c 930 310 m 822 310 l 822 114 l 930114 l 930 310 l 888 161 m 888 134 l 864 134l 864 161 l 888 161 l 883 155 m 883 140 l 868140 l 868 155 l 883 155 l 820 133 m 704 113630 66 520 80 c 433 91 380 69 296 76 c 285 76267 92 261 107 c 253 125 257 141 262 160 c 205334 m 172 332 196 253 229 250 c 429 325 m 455316 454 309 457 302 c 465 282 448 263 431 257 c 378236 315 253 241 253 c 229 253 217 236 217 218 c 218194 228 168 252 161 c 259 159 267 160 275 160 c 339158 414 156 451 168 c 469 173 477 191 477 210 c 477224 474 235 464 244 c 454 253 440 252 427 255 c 47184 m 483 96 495 106 495 123 c 495 136 490 145 483155 c 477 163 468 168 461 173 c 820 293 m 757318 630 421 495 415 c 321 407 78 416 45 411 c 32409 6 411 0 380 c -12 316 102 339 188 334 c 199334 200 335 205 335 c 229 336 245 336 270 336 c{S}}putEncoding 99 /c putCD /c{710 0 0 0 700 700 s33 setlinewidth335 23 m 335 325 302 -90 270 arc{S}}putEncoding 100 /d putCD /d{590 0 134 158 477 500 s 300160 m 208 162 134 238 135 330 c 136 423 212 500305 500 c 397 500 473 427 475 335 c 477 239 396158 300 160 c{fill}}putEncoding 101 /e putCD /e { % produces the VU symbol760 0 0 0 750 750 s267 267 scale0 setlinejoin.045 setlinewidth0 setlinecap3 setmiterlimitnewpath0 0 moveto0 2.8 rlineto0.38 0 rlineto0 -2.3 rlineto0.02 0 rlineto0.67 2.3 rlineto0.38 0 rlineto-0.83 -2.8 rlinetoclosepath1.61 2.8 moveto0.38 0 rlineto-0.687 -2.32 rlineto-.03 -.1 -0.03 -0.1 0 -0.1 rcurveto1.027 0 rlineto0 2.42 rlineto0.38 0 rlinetocurrentpoint pop 0 % x 02.0 00.28 arcto4 {pop} repeat0.78 0 1.61 2.8 0.15 arcto4 {pop} repeatclosepath{S}} put/BuildChar{altRTD /BuildChar get exec}def endaltRTD begin /BuildChar{altRTD begin/char exch def /fontdict exch def save/charname fontdict /Encoding get char get def/clw { 37 0 mm pop setlinewidth}bind deffontdict /StrokeWidth get setlinewidth0 setlinecap0 setlinejoinfontdict /CD get dup charname known{charname}{/.notdef}ifelse get newpath execfontdict /PaintType get 0 eq{exec}{pop S}ifelserestore end}def endsystemdict /currentpacking known{F_Troff /SavePacking get setpacking}if/Troff F_Troff definefont pop/Y1{/Troff FF}def/Times-Bold 1 AEnc-def pop/B-1{/Times-Bold-1 FF}def/Y{/Symbol FF}def%%EndProlog%%Page: 1 1BP/slant 0 def/height 0 def480 V10 R720(PRINTF)S1076(\()S1118(3)S1176(\))S2696(Eighth)S(Edition)296 2989 A4771(PRINTF)S5127(\()S5169(3)S5227(\))S960 V9 R720(N)S722(NA)S790(AM)S858(ME)S940(E)S1080 V10 R1080(printf,)S1354(fprintf,)S1662(sprintf,)S1975(snprintf,)S2338(vprintf,)S2662(vfprintf,)S3020(vsprintf,)S3383(vsnprintf)S10 R-13771(-)S10 R3853(formatted)S4270(output)S(conversion)441 4551 A1248 V9 R720(S)S722(SY)S774(YN)S842(NO)S910(OP)S978(PS)S1030(SI)S1082(IS)S1115(S)S1368 V10 B1080(#include)S1482(<sys/types.h>)S1488 V1080(#include)S1482(<stdio.h>)S1608 V1080(#include)S1482(<stdarg.h>)S1848 V1080(int)S(printf\(const)511 1236 A1785(char)S2019(*)S10 I2069(format)S10 R2375([)S10 B2409(,)S10 I2472(arg)S10 R2611(])S(...)75 2683 A10 B2758(\);)S1968 V1080(int)S(fprintf\(FILE)556 1236 A1830(*)S10 I1880(stream)S10 B2154(,)S2217(const)S2479(char)S2713(*)S10 I2763(format)S10 R3069([)S10 B3103(,)S10 I3166(arg)S10 R3305(])S(...)75 3377 A10 B3452(\);)S2088 V1080(int)S(sprintf\(char)522 1236 A1796(*)S10 I1846(s)S10 B1885(,)S1948(const)S2210(char)S2444(*)S10 I2494(format)S10 R2800([)S10 B2834(,)S10 I2897(arg)S10 R3036(])S(...)75 3108 A10 B3183(\);)S2208 V1080(int)S(snprintf\(char)578 1236 A1852(*)S10 I1902(s)S10 B1941(,)S2004(size_t)S10 I2283(n)S10 B2333(,)S2396(const)S2658(char)S2892(*)S10 I2942(format)S10 R3248([)S10 B3282(,)S10 I3345(arg)S10 R3484(])S(...)75 3556 A10 B3631(\);)S2328 V1080(int)S(vprintf\(const)561 1236 A1835(char)S2069(*)S10 I2119(format)S10 B2387(,)S(va_list)279 2450 A10 I2767(args)S10 B2945(\);)S2448 V1080(int)S(vfprintf\(FILE)606 1236 A1880(*)S10 I1930(stream)S10 B2204(,)S2267(const)S2529(char)S2763(*)S10 I2813(format)S10 B3081(,)S(va_list)279 3144 A10 I3461(args)S10 B3639(\);)S2568 V1080(int)S(vsprintf\(char)572 1236 A1846(*)S10 I1896(s)S10 B1935(,)S1998(const)S2260(char)S2494(*)S10 I2544(format)S10 B2812(,)S(va_list)279 2875 A10 I3192(args)S10 B3370(\);)S2688 V1080(int)S(vsnprintf\(char)628 1236 A1902(*)S10 I1952(s)S10 B1991(,)S2054(size_t)S10 I2333(n)S10 B2383(,)S2446(const)S2708(char)S2942(*)S10 I2992(format)S10 B3260(,)S(va_list)279 3323 A10 I3640(args)S10 B3818(\);)S2856 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)S2976 V10 B1080(Printf)S10 R(places)252 1368 A1649(output)S1934(on)S2063(the)S2215(standard)S2585(output)S2870(stream)S10 B3168(stdout)S10 R3437(.)S10 B3516(Fprintf)S10 R(places)252 3860 A4141(output)S4426(on)S4555(the)S4707(named)S5005(output)S3096 V10 I1080(stream)S10 R1362(.)S10 B1445(Sprintf)S10 R(places)252 1787 A2072(`output')S2429(in)S2540(the)S2696(string)S10 I2958(s)S10 R3005(,)S3063(followed)S3454(by)S3587(the)S3742(character)S4145(`\\0'.)S10 B(Snprintf)365 4373 A10 R4770(\(Minix-vmd)S3216 V1080(only\))S1317(is)S1409(like)S10 B1585(sprintf)S10 R1902(except)S2190(that)S2366(no)S2491(more)S2723(than)S10 I2921(n)S10 R-12979(-)S10 R3036(1)S3111(characters)S3546(are)S(written)286 3695 A4006(to)S10 I4109(s)S10 R4173(followed)S4556(by)S4681(a)S4751(`\\0'.)S3384 V1080(The)S10 B1265(v*printf)S10 R1646(functions)S2048(can)S2216(be)S2339(used)S2551(to)S2657(make)S2903(functions)S3305(like)S3484(the)S3635(\256rst)S3820(four)S4016(by)S4144(using)S4389(the)S10 B4540(stdarg)S10 R4814(\(3\))S(method)301 4960 A3504 V1080(to)S1183(process)S1510(the)S1658(argument.)S3672 V1080(Each)S1315(of)S1432(these)S1672(functions)S(converts,)366 2079 A2479(formats,)S2846(and)S3025(prints)S3288(its)S3417(arguments)S3870(after)S4090(the)S4247(\256rst)S(under)229 4438 A4701(control)S5020(of)S5138(the)S3792 V1080(\256rst)S1265(argument.)S1723(The)S1908(\256rst)S2093(argument)S2501(is)S2596(a)S2668(character)S3066(string)S3322(which)S3595(contains)S3957(two)S4135(types)S4374(of)S4485(objects:)S4825(plain)S5053(char-)S3912 V1080(acters,)S1382(which)S1669(are)S1834(simply)S2148(copied)S2458(to)S2578(the)S2743(output)S3041(stream,)S3377(and)S(conversion)441 3564 A4047(speci\256cations,)S(each)185 4662 A4889(of)S5015(which)S4032 V1080(causes)S(conversion)441 1368 A1834(and)S2004(printing)S2347(of)S2456(the)S2604(next)S(successive)425 2802 A10 I3252(arg)S10 R3399(.)S4200 V1080(Each)S(conversion)441 1326 A1811(speci\256cation)S2364(is)S(introduced)430 2475 A2949(by)S3093(the)S3260(character)S10 B3675(%)S10 R3775(.)S3869(The)S4070(remainder)S4523(of)S4652(the)S(conversion)441 4820 A4320 V1080(speci\256cation)S1614(includes)S1974(in)S2077(the)S2225(following)S2641(order)S4488 V10 Y11080(d)S10 R1440(Zero)S1656(or)S1765(more)S
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -