%!PS-Adobe-1.0 %%Creator: devps (Pipeline Associates, Inc.) %%CreationDate: Fri Sep 13 13:06:59 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 def systemdict /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 add currentpoint pop X m}bind def /H{//res div 0 transform X round X itransform pop currentpoint X pop moveto}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 fill gr}bind def 1 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} if end /BP{ save mark devps begin m0 /DocumentInitState [ matrix currentmatrix currentlinewidth currentlinecap currentlinejoin currentdash currentgray currentmiterlimit ] cvx def }bind def /EP{ end cleartomark restore showpage}def /Encoding-1 256 array def 0 1 255 {Encoding-1 exch /.notdef put} for Encoding-1 8#301 StandardEncoding 8#101 26 getinterval putinterval %A-B Encoding-1 8#341 StandardEncoding 8#141 26 getinterval putinterval %a-b Encoding-1 8#241 StandardEncoding 8#301 16 getinterval putinterval %accents Encoding-1 8#373 StandardEncoding 8#365 1 getinterval putinterval %dotlessi Encoding-1 dup 8#41 /copyright put dup 8#42 /registered put dup 8#43 /trademark put dup 8#44 /logicalnot put dup 8#45 /Eth put dup 8#46 /eth put dup 8#47 /Thorn put dup 8#50 /thorn put dup 8#51 /brokenbar put dup 8#52 /degree put dup 8#53 /divide put dup 8#54 /multiply put dup 8#55 /minus put dup 8#56 /onehalf put dup 8#57 /onequarter put dup 8#60 /threequarters put dup 8#101 /Aacute put dup 8#102 /Acircumflex put dup 8#103 /Adieresis put dup 8#104 /Agrave put dup 8#105 /Aring put dup 8#106 /Atilde put dup 8#107 /Ccedilla put dup 8#110 /Eacute put dup 8#111 /Ecircumflex put dup 8#112 /Edieresis put dup 8#113 /Egrave put dup 8#114 /Iacute put dup 8#115 /Icircumflex put dup 8#116 /Idieresis put dup 8#117 /Igrave put dup 8#120 /Ntilde put dup 8#121 /Oacute put dup 8#122 /Ocircumflex put dup 8#123 /Odieresis put dup 8#124 /Ograve put dup 8#125 /Otilde put dup 8#126 /Scaron put dup 8#127 /Uacute put dup 8#130 /Ucircumflex put dup 8#131 /Udieresis put dup 8#132 /Ugrave put dup 8#133 /Ydieresis put dup 8#134 /Zcaron put dup 8#135 /aacute put dup 8#136 /acircumflex put dup 8#137 /adieresis put dup 8#140 /agrave put dup 8#141 /aring put dup 8#142 /atilde put dup 8#143 /ccedilla put dup 8#144 /eacute put dup 8#145 /ecircumflex put dup 8#146 /edieresis put dup 8#147 /egrave put dup 8#150 /iacute put dup 8#151 /icircumflex put dup 8#152 /idieresis put dup 8#153 /igrave put dup 8#154 /ntilde put dup 8#155 /oacute put dup 8#156 /ocircumflex put dup 8#157 /odieresis put dup 8#160 /ograve put dup 8#161 /otilde put dup 8#162 /scaron put dup 8#163 /uacute put dup 8#164 /ucircumflex put dup 8#165 /udieresis put dup 8#166 /ugrave put dup 8#167 /ydieresis put dup 8#170 /zcaron put pop /Enc-dict 30 dict def Enc-dict /tmpstr1 50 string put Enc-dict /tmpstr2 50 string put Enc-dict /tmpstr3 50 string dup (Encoding-) exch cvs pop put /AEnc-def { % arguments: the original font's name, encoding nr Enc-dict begin tmpstr2 cvs /Enc-no exch def % Remember the number in a string dup /OrigName exch def % remember the name findfont 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 } forall newdict begin /Encoding tmpstr3 9 Enc-no putinterval tmpstr3 0 9 Enc-no length add getinterval cvn load def % Replace encoding currentdict /UniqueID known { /UniqueID UniqueID Enc-no cvi 49999 mul add def } if % Derive New UniqueID end % newdict /FNlength OrigName tmpstr1 cvs length def % convert name, remember length FNlength 1 add Enc-no length add string dup 0 OrigName tmpstr1 cvs putinterval dup FNlength (-) putinterval dup FNlength 1 add Enc-no putinterval dup 0 tmpstr1 0 FNlength getinterval putinterval % Add old name cvn dup newdict /FontName 3 2 roll put newdict definefont end % 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 1 BP /slant 0 def /height 0 def 480 V 10 R 720(STDARG)S 1132(\()S 1174(3)S 1232(\))S 2696(Eighth)S (Edition)296 2989 A 4715(STDARG)S 5127(\()S 5169(3)S 5227(\))S 960 V 9 R 720(N)S 722(NA)S 790(AM)S 858(ME)S 940(E)S 1080 V 10 R 1080(stdarg)S 10 R-1 1351(-)S 10 R 1433(variable)S 1783(argument)S 2188(list)S 1248 V 9 R 720(S)S 722(SY)S 774(YN)S 842(NO)S 910(OP)S 978(PS)S 1030(SI)S 1082(IS)S 1115(S)S 1368 V 10 B 1080(#include)S 1482()S 1608 V 1080(void)S (va_start\(va_list)665 1302 A 10 I 2005(ap)S 10 B 2105(,)S 10 I 2168(argtypeN)S 2580(parmN)S 10 B 2859(\))S 1728 V 10 I 1080(type)S 10 B (va_arg\(va_list)608 1286 A 10 I 1932(ap)S 10 B 2032(,)S 10 I 2095(type)S 10 B 2263(\))S 1848 V 1080(void)S (va_end\(va_list)620 1302 A 10 I 1960(ap)S 10 B 2060(\))S 2016 V 9 R 720(D)S 722(DE)S 790(ES)S 848(SC)S 900(CR)S 962(RI)S 1024(IP)S 1057(PT)S 1109(TI)S 1167(IO)S 1200(ON)S 1268(N)S 2136 V 10 R 1080(This)S 1286(set)S 1426(of)S 1538(macros)S 1857(provides)S 2231(a)S 2304(means)S 2589(of)S (writing)291 2701 A 3020(portable)S 3378(procedures)S 3848(that)S (accept)258 4027 A 4313(variable)S 4666(argument)S 5074(lists.)S 2256 V 1080(Routines)S 1469(having)S 1774(variable)S 2131(argument)S 2543(lists)S 2737(\(such)S 2987(as)S 10 B 3103(printf)S 10 R 3356(\(3\)\))S 3540(that)S 3723(do)S 3854(not)S 4013(use)S 10 B 4178(stdarg)S 10 R 4483(are)S 4638(inherently)S (non-)184 5077 A 2376 V 1080(portable,)S 1460(since)S 1692(different)S 2065(machines)S 2470(use)S 2629(different)S 3002(argument)S 3407(passing)S (conventions.)510 3733 A 2544 V 1080(A)S 1181(function)S 1544(that)S (accepts)297 1723 A 2049(a)S 2123(variable)S 2477(argument)S 2886(list)S 3038(is)S 3134(declared)S 3505(with)S ("...")157 3713 A 3899(at)S 4001(the)S 4153(end)S 4327(of)S 4440(its)S 4564(parameter)S 4997(list.)S 5199(It)S 2664 V 1080(must)S 1300(have)S 1515(at)S 1613(least)S 1823(one)S 1993(normal)S 2303(argument)S 2708(before)S 2991(the)S ("...".)182 3139 A 3371(For)S 3536(example:)S 2832 V 1440(int)S 1571(printf\(const)S 2066(char)S 2265(*format,)S (...\))109 2634 A 2768({)S 2841(/*)S 2944(code)S 3159(*/)S 3262(})S 2952 V 1440(int)S 1571(fprintf\(FILE)S 2102(*stream,)S 2471(const)S 2708(char)S 2907(*format,)S (...\))109 3276 A 3410({)S 3483(/*)S 3586(code)S 3801(*/)S 3904(})S 3120 V 10 B (va_list)279 1080 A 10 R 1398(is)S 1504(a)S 1588(type)S 1800(which)S 2085(is)S 2191(used)S 2414(for)S 2571(the)S 2733(variable)S 10 I 3097(ap)S 10 R 3236(within)S 3532(the)S (body)200 3694 A 3933(of)S 4056(a)S 4141(variable)S 4506(argument)S 4926(function)S 3240 V 1080(which)S 1351(is)S 1443(used)S 1652(to)S 1755(traverse)S 2100(the)S 2248(list.)S 3408 V 10 B (va_start)352 1080 A 10 R 1432(\()S 10 I 1466(ap)S 10 R 1574(,)S 10 I 1624(parmN)S 10 R 1911(\))S 1970(is)S 2062(called)S 2328(to)S (initialize)353 2431 A 10 I 2809(ap)S 10 R 2934(to)S 3037(the)S 3185(beginning)S 3611(of)S 3720(the)S 3868(list.)S 4066(The)S 4249(last)S 4415(true)S 4598(parameter)S 5028(of)S 5138(the)S 3528 V 1080(function,)S 10 I 1466(parmN)S 10 R 1753(,)S 1803(must)S 2023(be)S (supplied)340 2143 A 2508(to)S 2611(allow)S 10 B (va_start)352 2860 A 10 R 3237(to)S 3340(compute)S 3711(the)S 3859(address)S 4186(of)S 4295(the)S 4443(\256rst)S 4625(variable)S 4975(param-)S 3648 V 1080(eter.)S 3816 V 10 B (va_arg)295 1080 A 10 R 1375(\()S 10 I 1409(ap)S 10 R 1517(,)S 10 I 1573(type)S 10 R 1749(\))S (will)157 1814 A 2002(return)S 2274(the)S 2428(next)S 2632(argument)S 3043(in)S 3152(the)S 3306(list)S 3460(pointed)S 3792(to)S 3901(by)S 10 I 4032(ap)S 10 R 4140(.)S 10 I 4221(Type)S 10 R 4448(is)S 4546(the)S 4700(type)S 4905(to)S 5015(which)S 3936 V 1080(the)S 1228(expected)S 1611(argument)S (will)157 2016 A 2198(be)S (converted)397 2318 A 2740(when)S 2983(passed)S 3276(as)S 3385(an)S 3505(argument.)S 4104 V 1080(Different)S 1486(types)S 1733(can)S 1908(be)S 2038(mixed,)S 2349(but)S 2512(it)S 2603(is)S 2705(up)S 2840(to)S 2953(the)S 3111(routine)S 3431(to)S (know)223 3544 A 3802(what)S 4033(type)S 4241(of)S 4360(argument)S 4775(is)S 4878(expected,)S 4224 V 1080(since)S 1312(it)S (cannot)268 1393 A 1686(be)S 1806(determined)S 2284(at)S 2382(runtime.)S 4392 V 10 B (va_end)307 1080 A 10 R 1387(\()S 10 I 1421(ap)S 10 R 1529(\))S 1588(must)S 1808(be)S 1928(used)S 2137(to)S 2240(\256nish)S 2488(up.)S 4560 V (Multiple)346 1080 A 1451(traversals,)S (each)185 1888 A 2098(bracketed)S 2515(by)S 10 B (va_start)352 2640 A 10 R (...)75 3017 A 10 B (va_end,)332 3142 A 10 R 3499(are)S 3648(possible.)S 4728 V 9 R 720(E)S 722(EX)S 780(XA)S 848(AM)S 916(MP)S 998(PL)S 1050(LE)S 1108(E)S 4848 V 10 B 1280(#include)S 10 R 1669()S 5016 V 1280(execl\()S 10 B 1527(const)S 1776(char)S 10 R 1997(*path,)S 10 B (...)75 2270 A 10 R 2345(\))S 5136 V 1280({)S 5256 V 10 B (va_list)279 1480 A 10 R 1784(ap;)S 5376 V 10 B 1480(char)S 10 R (*args[100];)464 1701 A 5496 V 10 B 1480(int)S 10 R (argno)229 1623 A 1877(=)S 1959(0;)S 5736 V 10 B (va_start)352 1480 A 10 R 1832(\(ap,)S 2011(path\);)S 5856 V 10 B 1480(while)S 10 R (\(\(args[argno++])647 1735 A 2407(=)S 10 B (va_arg)295 2489 A 10 R 2784(\(ap,)S 10 B 2963(char)S 10 R 3184(*\)\))S 3327(!=)S 3443(NULL\))S 3772({})S 5976 V 10 B (va_end)307 1480 A 10 R 1787(\(ap\);)S 6096 V 10 B 1480(return)S 10 R 1786(execv\(path,)S 2278(args\);)S 6216 V 1280(})S 6384 V 9 R 720(N)S 722(NO)S 790(OT)S 858(TE)S 916(ES)S 974(S)S 6504 V 10 R 1080(It)S 1177(is)S 1279(up)S 1414(to)S 1527(the)S (calling)274 1686 A 1996(routine)S 2317(to)S 2431(determine)S 2870(how)S 3079(many)S 3338(arguments)S 3793(there)S 4031(are,)S 4216(since)S 4459(it)S 4551(is)S 4654(not)S 4818(possible)S 5183(to)S 6624 V 1080(determine)S 1515(this)S 1692(from)S 1920(the)S 2075(stack)S 2314(frame.)S 2632(For)S 2804(example,)S 10 B 3202(execl)S 10 R 3446(passes)S 3734(a)S 3810(null)S 3997(pointer)S 4313(to)S 4422(signal)S 4693(the)S 4847(end)S 5023(of)S 5138(the)S 6744 V 1080(list.)S 10 B 1278(Printf)S 10 R 1562(can)S 1727(tell)S 1881(how)S 2079(many)S 2327(arguments)S 2771(are)S (supposed)373 2920 A 3318(to)S 3421(be)S 3541(there)S 3768(by)S 3893(the)S 4041(format.)S 6912 V 1080(The)S 1267(macros)S 10 B (va_start)352 1588 A 10 R 1970(and)S 10 B (va_end)307 2145 A 10 R 2482(may)S 2685(be)S 2810(arbitrarily)S 3244(complex;)S 3648(for)S 3796(example,)S 10 B (va_start)352 4192 A 10 R 4574(might)S 4839(contain)S 5166(an)S 7032 V 1080(opening)S (brace,)244 1433 A 1707(which)S 1983(is)S 2080(closed)S 2367(by)S 2497(a)S 2572(matching)S (brace)219 2976 A 3224(in)S 10 B (va_end)307 3331 A 10 R 3638(.)S 3717(Thus,)S 3972(they)S (should)267 4174 A 4470(only)S 4677(be)S 4801(used)S 5014(where)S 7152 V 1080(they)S 1278(could)S 1526(be)S (placed)263 1646 A 1934(within)S 2216(a)S 2286(single)S 2551(complex)S 2922(statement.)S 7320 V 9 R 720(B)S 722(BU)S 784(UG)S 852(GS)S 920(S)S 7440 V 10 R 1080(It)S 1177(is)S 1279(impossible)S 1749(to)S 1863(properly)S 2240(show)S 2488(the)S 2647(macros)S 2974(as)S 3094(C)S 3197(declarations)S 3720(as)S 3840(is)S (done)195 3943 A 4174(in)S 4288(the)S (synopsis.)370 4447 A 4878(They)S 5121(can)S 7903 V 720(Page)S 941(1)S 2669(\()S 2711(May)S 2920(15,)S (1986)200 3070 A 3278(\))S 4455(September)S 4911(13,)S (1996)200 5061 A 8143 V EP %%Page: 2 2 BP /slant 0 def /height 0 def 480 V 10 R 720(STDARG)S 1132(\()S 1174(3)S 1232(\))S 2696(Eighth)S (Edition)296 2989 A 4715(STDARG)S 5127(\()S 5169(3)S 5227(\))S 960 V 1080(never)S 1337(be)S 1465(coded)S 1738(as)S 1855(C)S 1955(functions,)S (because)319 2387 A 2739(all)S 2873(three)S 3108(macros)S 3432(use)S 3599(their)S 3817(arguments)S 4269(by)S 4402(address,)S 4761(and)S 4938(the)S 10 I 5093(type)S 1080 V 10 R 1080(\256eld)S 1284(is)S 1376(certainly)S 1754(impossible.)S 2264(Just)S (look)178 2445 A 2648(at)S 2746(them)S 2972(as)S 3081(being)S 3329(part)S 3511(of)S 3620(the)S 3768(C)S (language,)388 3860 A 4273(like)S 10 B 4449(sizeof)S 10 R 4690(.)S 7903 V 720(September)S 1176(13,)S (1996)200 1326 A 2669(\()S 2711(May)S 2920(15,)S (1986)200 3070 A 3278(\))S 4990(Page)S 5211(2)S 8143 V EP %%Trailer %%DocumentFonts: Times-Roman Times-Bold Times-Italic %%Pages: 2