Artifact 63449c0b03334777143b4e6bb36a890de68b4866:


0000: 3c 48 45 41 44 3e 0a 3c 54 49 54 4c 45 3e 20 41  <HEAD>.<TITLE> A
0010: 56 43 41 4c 4c 20 6d 61 6e 75 61 6c 20 70 61 67  VCALL manual pag
0020: 65 20 3c 2f 54 49 54 4c 45 3e 0a 3c 2f 48 45 41  e </TITLE>.</HEA
0030: 44 3e 0a 3c 42 4f 44 59 3e 0a 3c 48 31 3e 41 56  D>.<BODY>.<H1>AV
0040: 43 41 4c 4c 20 6d 61 6e 75 61 6c 20 70 61 67 65  CALL manual page
0050: 3c 2f 48 31 3e 0a 0a 3c 55 4c 3e 0a 3c 4c 49 3e  </H1>..<UL>.<LI>
0060: 20 3c 41 20 48 52 45 46 3d 22 23 4e 61 6d 65 22   <A HREF="#Name"
0070: 3e 4e 61 6d 65 3c 2f 41 3e 0a 3c 4c 49 3e 20 3c  >Name</A>.<LI> <
0080: 41 20 48 52 45 46 3d 22 23 53 79 6e 6f 70 73 69  A HREF="#Synopsi
0090: 73 22 3e 53 79 6e 6f 70 73 69 73 3c 2f 41 3e 0a  s">Synopsis</A>.
00a0: 3c 4c 49 3e 20 3c 41 20 48 52 45 46 3d 22 23 44  <LI> <A HREF="#D
00b0: 65 73 63 72 69 70 74 69 6f 6e 22 3e 44 65 73 63  escription">Desc
00c0: 72 69 70 74 69 6f 6e 3c 2f 41 3e 0a 3c 4c 49 3e  ription</A>.<LI>
00d0: 20 3c 41 20 48 52 45 46 3d 22 23 4e 6f 74 65 73   <A HREF="#Notes
00e0: 22 3e 4e 6f 74 65 73 3c 2f 41 3e 0a 3c 4c 49 3e  ">Notes</A>.<LI>
00f0: 20 3c 41 20 48 52 45 46 3d 22 23 53 65 65 20 61   <A HREF="#See a
0100: 6c 73 6f 22 3e 53 65 65 20 61 6c 73 6f 3c 2f 41  lso">See also</A
0110: 3e 0a 3c 4c 49 3e 20 3c 41 20 48 52 45 46 3d 22  >.<LI> <A HREF="
0120: 23 42 75 67 73 22 3e 42 75 67 73 3c 2f 41 3e 0a  #Bugs">Bugs</A>.
0130: 3c 4c 49 3e 20 3c 41 20 48 52 45 46 3d 22 23 4e  <LI> <A HREF="#N
0140: 6f 6e 2d 42 75 67 73 22 3e 4e 6f 6e 2d 42 75 67  on-Bugs">Non-Bug
0150: 73 3c 2f 41 3e 0a 3c 4c 49 3e 20 3c 41 20 48 52  s</A>.<LI> <A HR
0160: 45 46 3d 22 23 50 6f 72 74 69 6e 67 20 41 56 43  EF="#Porting AVC
0170: 41 4c 4c 22 3e 50 6f 72 74 69 6e 67 20 41 56 43  ALL">Porting AVC
0180: 41 4c 4c 3c 2f 41 3e 0a 3c 4c 49 3e 20 3c 41 20  ALL</A>.<LI> <A 
0190: 48 52 45 46 3d 22 23 41 75 74 68 6f 72 22 3e 41  HREF="#Author">A
01a0: 75 74 68 6f 72 3c 2f 41 3e 0a 3c 4c 49 3e 20 3c  uthor</A>.<LI> <
01b0: 41 20 48 52 45 46 3d 22 23 41 63 6b 6e 6f 77 6c  A HREF="#Acknowl
01c0: 65 64 67 65 6d 65 6e 74 73 22 3e 41 63 6b 6e 6f  edgements">Ackno
01d0: 77 6c 65 64 67 65 6d 65 6e 74 73 3c 2f 41 3e 0a  wledgements</A>.
01e0: 3c 2f 55 4c 3e 0a 3c 50 3e 0a 0a 3c 48 52 3e 0a  </UL>.<P>..<HR>.
01f0: 0a 3c 41 20 4e 41 4d 45 3d 22 4e 61 6d 65 22 3e  .<A NAME="Name">
0200: 0a 3c 48 32 3e 4e 61 6d 65 3c 2f 48 32 3e 0a 3c  .<H2>Name</H2>.<
0210: 2f 41 3e 0a 0a 61 76 63 61 6c 6c 20 20 2d 20 20  /A>..avcall  -  
0220: 62 75 69 6c 64 20 61 20 43 20 61 72 67 75 6d 65  build a C argume
0230: 6e 74 20 6c 69 73 74 20 69 6e 63 72 65 6d 65 6e  nt list incremen
0240: 74 61 6c 6c 79 20 61 6e 64 20 63 61 6c 6c 20 61  tally and call a
0250: 0a 43 20 66 75 6e 63 74 69 6f 6e 20 6f 6e 20 69  .C function on i
0260: 74 2e 0a 0a 3c 41 20 4e 41 4d 45 3d 22 53 79 6e  t...<A NAME="Syn
0270: 6f 70 73 69 73 22 3e 0a 3c 48 32 3e 53 79 6e 6f  opsis">.<H2>Syno
0280: 70 73 69 73 3c 2f 48 32 3e 0a 3c 2f 41 3e 0a 0a  psis</H2>.</A>..
0290: 3c 50 52 45 3e 0a 3c 43 4f 44 45 3e 23 69 6e 63  <PRE>.<CODE>#inc
02a0: 6c 75 64 65 20 26 6c 74 3b 61 76 63 61 6c 6c 2e  lude &lt;avcall.
02b0: 68 26 67 74 3b 3c 2f 43 4f 44 45 3e 0a 3c 43 4f  h&gt;</CODE>.<CO
02c0: 44 45 3e 61 76 5f 61 6c 69 73 74 20 3c 56 41 52  DE>av_alist <VAR
02d0: 3e 61 6c 69 73 74 3c 2f 56 41 52 3e 3b 3c 2f 43  >alist</VAR>;</C
02e0: 4f 44 45 3e 0a 3c 43 4f 44 45 3e 61 76 5f 73 74  ODE>.<CODE>av_st
02f0: 61 72 74 5f 3c 56 41 52 3e 74 79 70 65 3c 2f 56  art_<VAR>type</V
0300: 41 52 3e 20 28 3c 56 41 52 3e 61 6c 69 73 74 3c  AR> (<VAR>alist<
0310: 2f 56 41 52 3e 2c 20 26 61 6d 70 3b 3c 56 41 52  /VAR>, &amp;<VAR
0320: 3e 66 75 6e 63 3c 2f 56 41 52 3e 2c 20 5b 5b 3c  >func</VAR>, [[<
0330: 56 41 52 3e 72 65 74 75 72 6e 5f 74 79 70 65 3c  VAR>return_type<
0340: 2f 56 41 52 3e 2c 5d 20 26 61 6d 70 3b 3c 56 41  /VAR>,] &amp;<VA
0350: 52 3e 72 65 74 75 72 6e 5f 76 61 6c 75 65 3c 2f  R>return_value</
0360: 56 41 52 3e 5d 29 3b 3c 2f 43 4f 44 45 3e 0a 3c  VAR>]);</CODE>.<
0370: 43 4f 44 45 3e 61 76 5f 3c 56 41 52 3e 74 79 70  CODE>av_<VAR>typ
0380: 65 3c 2f 56 41 52 3e 20 28 3c 56 41 52 3e 61 6c  e</VAR> (<VAR>al
0390: 69 73 74 3c 2f 56 41 52 3e 2c 20 5b 3c 56 41 52  ist</VAR>, [<VAR
03a0: 3e 61 72 67 5f 74 79 70 65 3c 2f 56 41 52 3e 2c  >arg_type</VAR>,
03b0: 5d 20 3c 56 41 52 3e 76 61 6c 75 65 3c 2f 56 41  ] <VAR>value</VA
03c0: 52 3e 29 3b 3c 2f 43 4f 44 45 3e 0a 3c 43 4f 44  R>);</CODE>.<COD
03d0: 45 3e 61 76 5f 63 61 6c 6c 28 3c 56 41 52 3e 61  E>av_call(<VAR>a
03e0: 6c 69 73 74 3c 2f 56 41 52 3e 29 3b 3c 2f 43 4f  list</VAR>);</CO
03f0: 44 45 3e 0a 3c 2f 50 52 45 3e 0a 0a 3c 41 20 4e  DE>.</PRE>..<A N
0400: 41 4d 45 3d 22 44 65 73 63 72 69 70 74 69 6f 6e  AME="Description
0410: 22 3e 0a 3c 48 32 3e 44 65 73 63 72 69 70 74 69  ">.<H2>Descripti
0420: 6f 6e 3c 2f 48 32 3e 0a 3c 2f 41 3e 0a 0a 54 68  on</H2>.</A>..Th
0430: 69 73 20 20 73 65 74 20 20 6f 66 20 6d 61 63 72  is  set  of macr
0440: 6f 73 20 62 75 69 6c 64 73 20 61 6e 20 61 72 67  os builds an arg
0450: 75 6d 65 6e 74 20 6c 69 73 74 20 66 6f 72 20 61  ument list for a
0460: 20 43 20 66 75 6e 63 74 69 6f 6e 0a 61 6e 64 20   C function.and 
0470: 20 63 61 6c 6c 73 20 20 74 68 65 20 20 66 75 6e   calls  the  fun
0480: 63 74 69 6f 6e 20 20 6f 6e 20 20 69 74 2e 20 20  ction  on  it.  
0490: 49 74 20 20 73 69 67 6e 69 66 69 63 61 6e 74 6c  It  significantl
04a0: 79 0a 72 65 64 75 63 65 73 20 20 74 68 65 20 20  y.reduces  the  
04b0: 61 6d 6f 75 6e 74 20 20 6f 66 20 60 67 6c 75 65  amount  of `glue
04c0: 27 20 63 6f 64 65 20 72 65 71 75 69 72 65 64 20  ' code required 
04d0: 66 6f 72 20 70 61 72 73 65 72 73 2c 0a 64 65 62  for parsers,.deb
04e0: 75 67 67 65 72 73 2c 20 69 6d 62 65 64 64 65 64  uggers, imbedded
04f0: 20 69 6e 74 65 72 70 72 65 74 65 72 73 2c 20 43   interpreters, C
0500: 20 65 78 74 65 6e 73 69 6f 6e 73 20 74 6f 20 61   extensions to a
0510: 70 70 6c 69 63 61 74 69 6f 6e 0a 70 72 6f 67 72  pplication.progr
0520: 61 6d 73 20 20 61 6e 64 20 20 6f 74 68 65 72 20  ams  and  other 
0530: 73 69 74 75 61 74 69 6f 6e 73 20 77 68 65 72 65  situations where
0540: 20 63 6f 6c 6c 65 63 74 69 6f 6e 73 20 6f 66 0a   collections of.
0550: 66 75 6e 63 74 69 6f 6e 73 20 6e 65 65 64 20 20  functions need  
0560: 74 6f 20 20 62 65 20 20 63 61 6c 6c 65 64 20 20  to  be  called  
0570: 6f 6e 20 20 6c 69 73 74 73 20 20 6f 66 20 20 65  on  lists  of  e
0580: 78 74 65 72 6e 61 6c 6c 79 2d 0a 73 75 70 70 6c  xternally-.suppl
0590: 69 65 64 20 61 72 67 75 6d 65 6e 74 73 2e 0a 3c  ied arguments..<
05a0: 50 3e 0a 46 75 6e 63 74 69 6f 6e 20 20 63 61 6c  P>.Function  cal
05b0: 6c 69 6e 67 20 20 63 6f 6e 76 65 6e 74 69 6f 6e  ling  convention
05c0: 73 20 64 69 66 66 65 72 20 63 6f 6e 73 69 64 65  s differ conside
05d0: 72 61 62 6c 79 20 6f 6e 20 64 69 66 66 65 72 65  rably on differe
05e0: 6e 74 0a 6d 61 63 68 69 6e 65 73 20 61 6e 64 20  nt.machines and 
05f0: 3c 43 4f 44 45 3e 61 76 63 61 6c 6c 3c 2f 43 4f  <CODE>avcall</CO
0600: 44 45 3e 20 61 74 74 65 6d 70 74 73 20 74 6f 20  DE> attempts to 
0610: 70 72 6f 76 69 64 65 20 73 6f 6d 65 20 64 65 67  provide some deg
0620: 72 65 65 0a 6f 66 20 69 73 6f 6c 61 74 69 6f 6e  ree.of isolation
0630: 20 66 72 6f 6d 20 73 75 63 68 20 61 72 63 68 69   from such archi
0640: 74 65 63 74 75 72 65 20 64 65 70 65 6e 64 65 6e  tecture dependen
0650: 63 69 65 73 2e 0a 3c 50 3e 0a 54 68 65 20 20 69  cies..<P>.The  i
0660: 6e 74 65 72 66 61 63 65 20 20 69 73 20 20 6c 69  nterface  is  li
0670: 6b 65 20 3c 41 20 48 52 45 46 3d 22 73 74 64 61  ke <A HREF="stda
0680: 72 67 28 33 29 22 3e 3c 43 4f 44 45 3e 3c 42 3e  rg(3)"><CODE><B>
0690: 73 74 64 61 72 67 3c 2f 42 3e 3c 2f 43 4f 44 45  stdarg</B></CODE
06a0: 3e 3c 2f 41 3e 28 33 29 20 69 6e 20 72 65 76 65  ></A>(3) in reve
06b0: 72 73 65 2e 20 41 6c 6c 20 6f 66 20 74 68 65 0a  rse. All of the.
06c0: 6d 61 63 72 6f 73 20 72 65 74 75 72 6e 20 30 20  macros return 0 
06d0: 66 6f 72 20 73 75 63 63 65 73 73 2c 20 3c 20 30  for success, < 0
06e0: 20 66 6f 72 20 66 61 69 6c 75 72 65 20 28 65 2e   for failure (e.
06f0: 67 2e 2c 20 20 61 72 67 75 6d 65 6e 74 0a 6c 69  g.,  argument.li
0700: 73 74 20 6f 76 65 72 66 6c 6f 77 20 6f 72 20 74  st overflow or t
0710: 79 70 65 2d 6e 6f 74 2d 73 75 70 70 6f 72 74 65  ype-not-supporte
0720: 64 29 2e 0a 3c 50 3e 0a 3c 4f 4c 3e 0a 3c 4c 49  d)..<P>.<OL>.<LI
0730: 3e 20 3c 43 4f 44 45 3e 23 69 6e 63 6c 75 64 65  > <CODE>#include
0740: 20 20 26 6c 74 3b 61 76 63 61 6c 6c 2e 68 26 67    &lt;avcall.h&g
0750: 74 3b 3c 2f 43 4f 44 45 3e 20 20 61 6e 64 20 20  t;</CODE>  and  
0760: 64 65 63 6c 61 72 65 20 20 74 68 65 20 61 72 67  declare  the arg
0770: 75 6d 65 6e 74 20 6c 69 73 74 0a 73 74 72 75 63  ument list.struc
0780: 74 75 72 65 20 3c 43 4f 44 45 3e 61 76 5f 61 6c  ture <CODE>av_al
0790: 69 73 74 20 3c 56 41 52 3e 61 6c 69 73 74 3c 2f  ist <VAR>alist</
07a0: 56 41 52 3e 3b 3c 2f 43 4f 44 45 3e 0a 3c 50 3e  VAR>;</CODE>.<P>
07b0: 0a 3c 4c 49 3e 20 53 65 74 20 20 61 6e 79 20 73  .<LI> Set  any s
07c0: 70 65 63 69 61 6c 20 66 6c 61 67 73 2e 20 54 68  pecial flags. Th
07d0: 69 73 20 69 73 20 61 72 63 68 69 74 65 63 74 75  is is architectu
07e0: 72 65 20 61 6e 64 20 63 6f 6d 70 69 6c 65 72 0a  re and compiler.
07f0: 64 65 70 65 6e 64 65 6e 74 2e 0a 43 6f 6d 70 69  dependent..Compi
0800: 6c 65 72 20 20 6f 70 74 69 6f 6e 73 20 74 68 61  ler  options tha
0810: 74 20 61 66 66 65 63 74 20 70 61 73 73 69 6e 67  t affect passing
0820: 20 63 6f 6e 76 65 6e 74 69 6f 6e 73 20 6d 61 79   conventions may
0830: 20 6e 65 65 64 0a 74 6f 20 62 65 20 66 6c 61 67   need.to be flag
0840: 67 65 64 20 62 79 20 3c 43 4f 44 45 3e 23 64 65  ged by <CODE>#de
0850: 66 69 6e 65 3c 2f 43 4f 44 45 3e 73 20 62 65 66  fine</CODE>s bef
0860: 6f 72 65 20 74 68 65 20 3c 43 4f 44 45 3e 23 69  ore the <CODE>#i
0870: 6e 63 6c 75 64 65 20 26 6c 74 3b 61 76 63 61 6c  nclude &lt;avcal
0880: 6c 2e 68 26 67 74 3b 3c 2f 43 4f 44 45 3e 0a 73  l.h&gt;</CODE>.s
0890: 74 61 74 65 6d 65 6e 74 2e 20 48 6f 77 65 76 65  tatement. Howeve
08a0: 72 2c 20 74 68 65 20 3c 53 41 4d 50 3e 63 6f 6e  r, the <SAMP>con
08b0: 66 69 67 75 72 65 3c 2f 53 41 4d 50 3e 20 73 63  figure</SAMP> sc
08c0: 72 69 70 74 20 73 68 6f 75 6c 64 20 68 61 76 65  ript should have
08d0: 0a 64 65 74 65 72 6d 69 6e 65 64 20 77 68 69 63  .determined whic
08e0: 68 20 3c 43 4f 44 45 3e 23 64 65 66 69 6e 65 3c  h <CODE>#define<
08f0: 2f 43 4f 44 45 3e 73 20 61 72 65 20 6e 65 65 64  /CODE>s are need
0900: 65 64 20 61 6e 64 20 70 75 74 20 74 68 65 6d 0a  ed and put them.
0910: 61 74 20 74 68 65 20 74 6f 70 20 6f 66 20 3c 53  at the top of <S
0920: 41 4d 50 3e 61 76 63 61 6c 6c 2e 68 3c 2f 53 41  AMP>avcall.h</SA
0930: 4d 50 3e 2e 0a 3c 50 3e 0a 3c 4c 49 3e 20 49 6e  MP>..<P>.<LI> In
0940: 69 74 69 61 6c 69 7a 65 20 74 68 65 20 61 6c 69  itialize the ali
0950: 73 74 20 77 69 74 68 20 20 74 68 65 20 20 66 75  st with  the  fu
0960: 6e 63 74 69 6f 6e 20 20 61 64 64 72 65 73 73 20  nction  address 
0970: 20 61 6e 64 0a 72 65 74 75 72 6e 20 20 76 61 6c   and.return  val
0980: 75 65 20 20 70 6f 69 6e 74 65 72 20 28 69 66 20  ue  pointer (if 
0990: 61 6e 79 29 2e 20 54 68 65 72 65 20 69 73 20 61  any). There is a
09a0: 20 73 65 70 61 72 61 74 65 20 6d 61 63 72 6f 0a   separate macro.
09b0: 66 6f 72 20 65 61 63 68 20 73 69 6d 70 6c 65 20  for each simple 
09c0: 72 65 74 75 72 6e 20 74 79 70 65 20 20 28 5b 75  return type  ([u
09d0: 5d 63 68 61 72 2c 20 20 5b 75 5d 73 68 6f 72 74  ]char,  [u]short
09e0: 2c 20 20 5b 75 5d 69 6e 74 2c 0a 5b 75 5d 6c 6f  ,  [u]int,.[u]lo
09f0: 6e 67 2c 20 20 5b 75 5d 6c 6f 6e 67 6c 6f 6e 67  ng,  [u]longlong
0a00: 2c 20 66 6c 6f 61 74 2c 20 20 64 6f 75 62 6c 65  , float,  double
0a10: 2c 20 77 68 65 72 65 20 60 75 27 20 69 6e 64 69  , where `u' indi
0a20: 63 61 74 65 73 0a 60 75 6e 73 69 67 6e 65 64 27  cates.`unsigned'
0a30: 29 2e 20 54 68 65 20 6d 61 63 72 6f 73 20 66 6f  ). The macros fo
0a40: 72 20 66 75 6e 63 74 69 6f 6e 73 20 72 65 74 75  r functions retu
0a50: 72 6e 69 6e 67 20 73 74 72 75 63 74 75 72 65 73  rning structures
0a60: 0a 6f 72 20 70 6f 69 6e 74 65 72 73 20 72 65 71  .or pointers req
0a70: 75 69 72 65 20 61 6e 20 65 78 70 6c 69 63 69 74  uire an explicit
0a80: 20 74 79 70 65 20 61 72 67 75 6d 65 6e 74 2e 0a   type argument..
0a90: 3c 50 3e 0a 45 2e 67 2e 2c 0a 3c 50 52 45 3e 0a  <P>.E.g.,.<PRE>.
0aa0: 3c 43 4f 44 45 3e 61 76 5f 73 74 61 72 74 5f 69  <CODE>av_start_i
0ab0: 6e 74 20 28 3c 56 41 52 3e 61 6c 69 73 74 3c 2f  nt (<VAR>alist</
0ac0: 56 41 52 3e 2c 20 26 61 6d 70 3b 3c 56 41 52 3e  VAR>, &amp;<VAR>
0ad0: 66 75 6e 63 3c 2f 56 41 52 3e 2c 20 26 61 6d 70  func</VAR>, &amp
0ae0: 3b 3c 56 41 52 3e 69 6e 74 5f 72 65 74 75 72 6e  ;<VAR>int_return
0af0: 3c 2f 56 41 52 3e 29 3b 3c 2f 43 4f 44 45 3e 0a  </VAR>);</CODE>.
0b00: 3c 43 4f 44 45 3e 61 76 5f 73 74 61 72 74 5f 64  <CODE>av_start_d
0b10: 6f 75 62 6c 65 20 28 3c 56 41 52 3e 61 6c 69 73  ouble (<VAR>alis
0b20: 74 3c 2f 56 41 52 3e 2c 20 26 61 6d 70 3b 3c 56  t</VAR>, &amp;<V
0b30: 41 52 3e 66 75 6e 63 3c 2f 56 41 52 3e 2c 20 26  AR>func</VAR>, &
0b40: 61 6d 70 3b 3c 56 41 52 3e 64 6f 75 62 6c 65 5f  amp;<VAR>double_
0b50: 72 65 74 75 72 6e 3c 2f 56 41 52 3e 29 3b 3c 2f  return</VAR>);</
0b60: 43 4f 44 45 3e 0a 3c 43 4f 44 45 3e 61 76 5f 73  CODE>.<CODE>av_s
0b70: 74 61 72 74 5f 76 6f 69 64 20 28 3c 56 41 52 3e  tart_void (<VAR>
0b80: 61 6c 69 73 74 3c 2f 56 41 52 3e 2c 20 26 61 6d  alist</VAR>, &am
0b90: 70 3b 3c 56 41 52 3e 66 75 6e 63 3c 2f 56 41 52  p;<VAR>func</VAR
0ba0: 3e 29 3b 3c 2f 43 4f 44 45 3e 0a 3c 43 4f 44 45  >);</CODE>.<CODE
0bb0: 3e 61 76 5f 73 74 61 72 74 5f 73 74 72 75 63 74  >av_start_struct
0bc0: 20 28 3c 56 41 52 3e 61 6c 69 73 74 3c 2f 56 41   (<VAR>alist</VA
0bd0: 52 3e 2c 20 26 61 6d 70 3b 3c 56 41 52 3e 66 75  R>, &amp;<VAR>fu
0be0: 6e 63 3c 2f 56 41 52 3e 2c 20 3c 56 41 52 3e 73  nc</VAR>, <VAR>s
0bf0: 74 72 75 63 74 5f 74 79 70 65 3c 2f 56 41 52 3e  truct_type</VAR>
0c00: 2c 20 3c 56 41 52 3e 73 70 6c 69 74 74 61 62 6c  , <VAR>splittabl
0c10: 65 3c 2f 56 41 52 3e 2c 20 26 61 6d 70 3b 3c 56  e</VAR>, &amp;<V
0c20: 41 52 3e 73 74 72 75 63 74 5f 72 65 74 75 72 6e  AR>struct_return
0c30: 3c 2f 56 41 52 3e 29 3b 3c 2f 43 4f 44 45 3e 0a  </VAR>);</CODE>.
0c40: 3c 43 4f 44 45 3e 61 76 5f 73 74 61 72 74 5f 70  <CODE>av_start_p
0c50: 74 72 20 28 3c 56 41 52 3e 61 6c 69 73 74 3c 2f  tr (<VAR>alist</
0c60: 56 41 52 3e 2c 20 26 61 6d 70 3b 3c 56 41 52 3e  VAR>, &amp;<VAR>
0c70: 66 75 6e 63 3c 2f 56 41 52 3e 2c 20 3c 56 41 52  func</VAR>, <VAR
0c80: 3e 70 6f 69 6e 74 65 72 5f 74 79 70 65 3c 2f 56  >pointer_type</V
0c90: 41 52 3e 2c 20 26 61 6d 70 3b 3c 56 41 52 3e 70  AR>, &amp;<VAR>p
0ca0: 6f 69 6e 74 65 72 5f 72 65 74 75 72 6e 3c 2f 56  ointer_return</V
0cb0: 41 52 3e 29 3b 3c 2f 43 4f 44 45 3e 0a 3c 2f 50  AR>);</CODE>.</P
0cc0: 52 45 3e 0a 54 68 65 20 20 3c 56 41 52 3e 73 70  RE>.The  <VAR>sp
0cd0: 6c 69 74 74 61 62 6c 65 3c 2f 56 41 52 3e 20 66  littable</VAR> f
0ce0: 6c 61 67 20 73 70 65 63 69 66 69 65 73 20 77 68  lag specifies wh
0cf0: 65 74 68 65 72 20 74 68 65 20 3c 56 41 52 3e 73  ether the <VAR>s
0d00: 74 72 75 63 74 5f 74 79 70 65 3c 2f 56 41 52 3e  truct_type</VAR>
0d10: 20 63 61 6e 0a 62 65 20 72 65 74 75 72 6e 65 64   can.be returned
0d20: 20 69 6e 20 72 65 67 69 73 74 65 72 73 20 73 75   in registers su
0d30: 63 68 20 74 68 61 74 20 65 76 65 72 79 20 73 74  ch that every st
0d40: 72 75 63 74 20 66 69 65 6c 64 20 66 69 74 73 0a  ruct field fits.
0d50: 65 6e 74 69 72 65 6c 79 20 20 69 6e 20 61 20 73  entirely  in a s
0d60: 69 6e 67 6c 65 20 72 65 67 69 73 74 65 72 2e 20  ingle register. 
0d70: 54 68 69 73 20 6e 65 65 64 73 20 74 6f 20 62 65  This needs to be
0d80: 20 73 70 65 63 69 66 69 65 64 0a 66 6f 72 20 73   specified.for s
0d90: 74 72 75 63 74 73 20 6f 66 20 73 69 7a 65 20 3c  tructs of size <
0da0: 53 41 4d 50 3e 32 2a 73 69 7a 65 6f 66 28 6c 6f  SAMP>2*sizeof(lo
0db0: 6e 67 29 3c 2f 53 41 4d 50 3e 2e 20 46 6f 72 20  ng)</SAMP>. For 
0dc0: 73 74 72 75 63 74 73 20 6f 66 20 73 69 7a 65 0a  structs of size.
0dd0: 26 6c 74 3b 3d 20 3c 53 41 4d 50 3e 73 69 7a 65  &lt;= <SAMP>size
0de0: 6f 66 28 6c 6f 6e 67 29 3c 2f 53 41 4d 50 3e 2c  of(long)</SAMP>,
0df0: 20 20 73 70 6c 69 74 74 61 62 6c 65 20 20 69 73    splittable  is
0e00: 20 69 67 6e 6f 72 65 64 20 61 6e 64 20 61 73 73   ignored and ass
0e10: 75 6d 65 64 20 74 6f 20 62 65 20 31 2e 0a 46 6f  umed to be 1..Fo
0e20: 72 20 20 73 74 72 75 63 74 73 20 20 6f 66 20 20  r  structs  of  
0e30: 73 69 7a 65 20 20 26 67 74 3b 20 3c 53 41 4d 50  size  &gt; <SAMP
0e40: 3e 32 2a 73 69 7a 65 6f 66 28 6c 6f 6e 67 29 3c  >2*sizeof(long)<
0e50: 2f 53 41 4d 50 3e 2c 20 20 73 70 6c 69 74 74 61  /SAMP>,  splitta
0e60: 62 6c 65 20 20 69 73 0a 69 67 6e 6f 72 65 64 20  ble  is.ignored 
0e70: 20 61 6e 64 20 20 61 73 73 75 6d 65 64 20 74 6f   and  assumed to
0e80: 20 62 65 20 30 2e 20 54 68 65 72 65 20 61 72 65   be 0. There are
0e90: 20 73 6f 6d 65 20 68 61 6e 64 79 20 6d 61 63 72   some handy macr
0ea0: 6f 73 0a 66 6f 72 20 74 68 69 73 3a 0a 3c 50 52  os.for this:.<PR
0eb0: 45 3e 0a 3c 43 4f 44 45 3e 61 76 5f 77 6f 72 64  E>.<CODE>av_word
0ec0: 5f 73 70 6c 69 74 74 61 62 6c 65 5f 31 20 28 3c  _splittable_1 (<
0ed0: 56 41 52 3e 74 79 70 65 31 3c 2f 56 41 52 3e 29  VAR>type1</VAR>)
0ee0: 3c 2f 43 4f 44 45 3e 0a 3c 43 4f 44 45 3e 61 76  </CODE>.<CODE>av
0ef0: 5f 77 6f 72 64 5f 73 70 6c 69 74 74 61 62 6c 65  _word_splittable
0f00: 5f 32 20 28 3c 56 41 52 3e 74 79 70 65 31 3c 2f  _2 (<VAR>type1</
0f10: 56 41 52 3e 2c 20 3c 56 41 52 3e 74 79 70 65 32  VAR>, <VAR>type2
0f20: 3c 2f 56 41 52 3e 29 3c 2f 43 4f 44 45 3e 0a 3c  </VAR>)</CODE>.<
0f30: 43 4f 44 45 3e 61 76 5f 77 6f 72 64 5f 73 70 6c  CODE>av_word_spl
0f40: 69 74 74 61 62 6c 65 5f 33 20 28 3c 56 41 52 3e  ittable_3 (<VAR>
0f50: 74 79 70 65 31 3c 2f 56 41 52 3e 2c 20 3c 56 41  type1</VAR>, <VA
0f60: 52 3e 74 79 70 65 32 3c 2f 56 41 52 3e 2c 20 3c  R>type2</VAR>, <
0f70: 56 41 52 3e 74 79 70 65 33 3c 2f 56 41 52 3e 29  VAR>type3</VAR>)
0f80: 3c 2f 43 4f 44 45 3e 0a 3c 43 4f 44 45 3e 61 76  </CODE>.<CODE>av
0f90: 5f 77 6f 72 64 5f 73 70 6c 69 74 74 61 62 6c 65  _word_splittable
0fa0: 5f 34 20 28 3c 56 41 52 3e 74 79 70 65 31 3c 2f  _4 (<VAR>type1</
0fb0: 56 41 52 3e 2c 20 3c 56 41 52 3e 74 79 70 65 32  VAR>, <VAR>type2
0fc0: 3c 2f 56 41 52 3e 2c 20 3c 56 41 52 3e 74 79 70  </VAR>, <VAR>typ
0fd0: 65 33 3c 2f 56 41 52 3e 2c 20 3c 56 41 52 3e 74  e3</VAR>, <VAR>t
0fe0: 79 70 65 34 3c 2f 56 41 52 3e 29 3c 2f 43 4f 44  ype4</VAR>)</COD
0ff0: 45 3e 0a 3c 2f 50 52 45 3e 0a 46 6f 72 20 61 20  E>.</PRE>.For a 
1000: 73 74 72 75 63 74 20 77 69 74 68 20 74 68 72 65  struct with thre
1010: 65 20 73 6c 6f 74 73 0a 3c 50 52 45 3e 0a 3c 43  e slots.<PRE>.<C
1020: 4f 44 45 3e 73 74 72 75 63 74 20 7b 20 3c 56 41  ODE>struct { <VA
1030: 52 3e 74 79 70 65 31 20 69 64 31 3c 2f 56 41 52  R>type1 id1</VAR
1040: 3e 3b 20 3c 56 41 52 3e 74 79 70 65 32 20 69 64  >; <VAR>type2 id
1050: 32 3c 2f 56 41 52 3e 3b 20 3c 56 41 52 3e 74 79  2</VAR>; <VAR>ty
1060: 70 65 33 20 69 64 33 3c 2f 56 41 52 3e 3b 20 7d  pe3 id3</VAR>; }
1070: 3c 2f 43 4f 44 45 3e 0a 3c 2f 50 52 45 3e 0a 79  </CODE>.</PRE>.y
1080: 6f 75 20 63 61 6e 20 73 70 65 63 69 66 79 20 3c  ou can specify <
1090: 56 41 52 3e 73 70 6c 69 74 74 61 62 6c 65 3c 2f  VAR>splittable</
10a0: 56 41 52 3e 20 61 73 0a 3c 43 4f 44 45 3e 61 76  VAR> as.<CODE>av
10b0: 5f 77 6f 72 64 5f 73 70 6c 69 74 74 61 62 6c 65  _word_splittable
10c0: 5f 33 20 28 3c 56 41 52 3e 74 79 70 65 31 3c 2f  _3 (<VAR>type1</
10d0: 56 41 52 3e 2c 20 3c 56 41 52 3e 74 79 70 65 32  VAR>, <VAR>type2
10e0: 3c 2f 56 41 52 3e 2c 20 3c 56 41 52 3e 74 79 70  </VAR>, <VAR>typ
10f0: 65 33 3c 2f 56 41 52 3e 29 3c 2f 43 4f 44 45 3e  e3</VAR>)</CODE>
1100: 2e 0a 3c 50 3e 0a 3c 4c 49 3e 20 50 75 73 68 20  ..<P>.<LI> Push 
1110: 20 74 68 65 20 20 61 72 67 75 6d 65 6e 74 73 20   the  arguments 
1120: 20 6f 6e 20 20 74 6f 20 74 68 65 20 6c 69 73 74   on  to the list
1130: 20 69 6e 20 6f 72 64 65 72 2e 20 41 67 61 69 6e   in order. Again
1140: 0a 74 68 65 72 65 20 69 73 20 61 20 6d 61 63 72  .there is a macr
1150: 6f 20 66 6f 72 20 65 61 63 68 20 73 69 6d 70 6c  o for each simpl
1160: 65 20 62 75 69 6c 74 2d 69 6e 20 20 74 79 70 65  e built-in  type
1170: 2c 20 20 61 6e 64 20 20 74 68 65 0a 6d 61 63 72  ,  and  the.macr
1180: 6f 73 20 20 66 6f 72 20 20 73 74 72 75 63 74 75  os  for  structu
1190: 72 65 20 20 61 6e 64 20 20 70 6f 69 6e 74 65 72  re  and  pointer
11a0: 20 20 61 72 67 75 6d 65 6e 74 73 20 72 65 71 75    arguments requ
11b0: 69 72 65 20 61 6e 0a 65 78 74 72 61 20 74 79 70  ire an.extra typ
11c0: 65 20 61 72 67 75 6d 65 6e 74 3a 0a 3c 50 52 45  e argument:.<PRE
11d0: 3e 0a 3c 43 4f 44 45 3e 61 76 5f 69 6e 74 20 28  >.<CODE>av_int (
11e0: 3c 56 41 52 3e 61 6c 69 73 74 3c 2f 56 41 52 3e  <VAR>alist</VAR>
11f0: 2c 20 3c 56 41 52 3e 69 6e 74 5f 76 61 6c 75 65  , <VAR>int_value
1200: 3c 2f 56 41 52 3e 29 3b 3c 2f 43 4f 44 45 3e 0a  </VAR>);</CODE>.
1210: 3c 43 4f 44 45 3e 61 76 5f 64 6f 75 62 6c 65 20  <CODE>av_double 
1220: 28 3c 56 41 52 3e 61 6c 69 73 74 3c 2f 56 41 52  (<VAR>alist</VAR
1230: 3e 2c 20 3c 56 41 52 3e 64 6f 75 62 6c 65 5f 76  >, <VAR>double_v
1240: 61 6c 75 65 3c 2f 56 41 52 3e 29 3b 3c 2f 43 4f  alue</VAR>);</CO
1250: 44 45 3e 0a 3c 43 4f 44 45 3e 61 76 5f 73 74 72  DE>.<CODE>av_str
1260: 75 63 74 20 28 3c 56 41 52 3e 61 6c 69 73 74 3c  uct (<VAR>alist<
1270: 2f 56 41 52 3e 2c 20 3c 56 41 52 3e 73 74 72 75  /VAR>, <VAR>stru
1280: 63 74 5f 6f 72 5f 75 6e 69 6f 6e 5f 74 79 70 65  ct_or_union_type
1290: 3c 2f 56 41 52 3e 2c 20 3c 56 41 52 3e 73 74 72  </VAR>, <VAR>str
12a0: 75 63 74 5f 76 61 6c 75 65 3c 2f 56 41 52 3e 29  uct_value</VAR>)
12b0: 3b 3c 2f 43 4f 44 45 3e 0a 3c 43 4f 44 45 3e 61  ;</CODE>.<CODE>a
12c0: 76 5f 70 74 72 20 28 3c 56 41 52 3e 61 6c 69 73  v_ptr (<VAR>alis
12d0: 74 3c 2f 56 41 52 3e 2c 20 3c 56 41 52 3e 70 6f  t</VAR>, <VAR>po
12e0: 69 6e 74 65 72 5f 74 79 70 65 3c 2f 56 41 52 3e  inter_type</VAR>
12f0: 2c 20 3c 56 41 52 3e 70 6f 69 6e 74 65 72 5f 76  , <VAR>pointer_v
1300: 61 6c 75 65 3c 2f 56 41 52 3e 29 3b 3c 2f 43 4f  alue</VAR>);</CO
1310: 44 45 3e 0a 3c 2f 50 52 45 3e 0a 3c 4c 49 3e 20  DE>.</PRE>.<LI> 
1320: 43 61 6c 6c 20 74 68 65 20 66 75 6e 63 74 69 6f  Call the functio
1330: 6e 2c 20 73 65 74 20 74 68 65 20 72 65 74 75 72  n, set the retur
1340: 6e 20 76 61 6c 75 65 2c 20 61 6e 64 20 74 69 64  n value, and tid
1350: 79 20 75 70 3a 0a 3c 43 4f 44 45 3e 61 76 5f 63  y up:.<CODE>av_c
1360: 61 6c 6c 20 28 3c 56 41 52 3e 61 6c 69 73 74 3c  all (<VAR>alist<
1370: 2f 56 41 52 3e 29 3b 3c 2f 43 4f 44 45 3e 0a 3c  /VAR>);</CODE>.<
1380: 2f 4f 4c 3e 0a 0a 3c 41 20 4e 41 4d 45 3d 22 4e  /OL>..<A NAME="N
1390: 6f 74 65 73 22 3e 0a 3c 48 32 3e 4e 6f 74 65 73  otes">.<H2>Notes
13a0: 3c 2f 48 32 3e 0a 3c 2f 41 3e 0a 0a 3c 4f 4c 3e  </H2>.</A>..<OL>
13b0: 0a 3c 4c 49 3e 20 46 75 6e 63 74 69 6f 6e 73 20  .<LI> Functions 
13c0: 77 68 6f 73 65 20 66 69 72 73 74 20 64 65 63 6c  whose first decl
13d0: 61 72 61 74 69 6f 6e 20 69 73 20 20 69 6e 20 20  aration is  in  
13e0: 4b 65 72 6e 69 67 68 61 6e 20 20 26 61 6d 70 3b  Kernighan  &amp;
13f0: 0a 52 69 74 63 68 69 65 20 20 73 74 79 6c 65 20  .Ritchie  style 
1400: 20 28 69 2e 65 2e 2c 20 77 69 74 68 6f 75 74 20   (i.e., without 
1410: 61 20 74 79 70 65 64 20 61 72 67 75 6d 65 6e 74  a typed argument
1420: 20 6c 69 73 74 29 20 4d 55 53 54 0a 75 73 65 20   list) MUST.use 
1430: 64 65 66 61 75 6c 74 20 4b 26 61 6d 70 3b 52 20  default K&amp;R 
1440: 43 20 65 78 70 72 65 73 73 69 6f 6e 20 70 72 6f  C expression pro
1450: 6d 6f 74 69 6f 6e 73 20 28 3c 43 4f 44 45 3e 63  motions (<CODE>c
1460: 68 61 72 3c 2f 43 4f 44 45 3e 20 61 6e 64 20 3c  har</CODE> and <
1470: 43 4f 44 45 3e 73 68 6f 72 74 3c 2f 43 4f 44 45  CODE>short</CODE
1480: 3e 20 74 6f 0a 3c 43 4f 44 45 3e 69 6e 74 3c 2f  > to.<CODE>int</
1490: 43 4f 44 45 3e 2c 20 20 3c 43 4f 44 45 3e 66 6c  CODE>,  <CODE>fl
14a0: 6f 61 74 3c 2f 43 4f 44 45 3e 20 20 74 6f 20 3c  oat</CODE>  to <
14b0: 43 4f 44 45 3e 64 6f 75 62 6c 65 3c 2f 43 4f 44  CODE>double</COD
14c0: 45 3e 29 20 77 68 65 74 68 65 72 20 74 68 65 79  E>) whether they
14d0: 20 61 72 65 20 63 6f 6d 70 69 6c 65 64 20 62 79   are compiled by
14e0: 20 61 20 4b 26 61 6d 70 3b 52 0a 6f 72 20 61 6e   a K&amp;R.or an
14f0: 20 41 4e 53 49 20 63 6f 6d 70 69 6c 65 72 2c 20   ANSI compiler, 
1500: 62 65 63 61 75 73 65 20 74 68 65 20 74 72 75 65  because the true
1510: 20 61 72 67 75 6d 65 6e 74 20 20 74 79 70 65 73   argument  types
1520: 20 20 6d 61 79 0a 6e 6f 74 20 20 62 65 20 20 6b    may.not  be  k
1530: 6e 6f 77 6e 20 61 74 20 74 68 65 20 63 61 6c 6c  nown at the call
1540: 20 70 6f 69 6e 74 2e 20 53 75 63 68 20 66 75 6e   point. Such fun
1550: 63 74 69 6f 6e 73 20 74 79 70 69 63 61 6c 6c 79  ctions typically
1560: 0a 62 61 63 6b 2d 63 6f 6e 76 65 72 74 20 74 68  .back-convert th
1570: 65 69 72 20 61 72 67 75 6d 65 6e 74 73 20 20 74  eir arguments  t
1580: 6f 20 20 74 68 65 20 20 64 65 63 6c 61 72 65 64  o  the  declared
1590: 20 20 74 79 70 65 73 20 20 6f 6e 0a 66 75 6e 63    types  on.func
15a0: 74 69 6f 6e 20 20 65 6e 74 72 79 2e 20 20 28 49  tion  entry.  (I
15b0: 6e 20 20 66 61 63 74 2c 20 20 74 68 65 20 20 6f  n  fact,  the  o
15c0: 6e 6c 79 20 77 61 79 20 74 6f 20 70 61 73 73 20  nly way to pass 
15d0: 61 20 74 72 75 65 0a 3c 43 4f 44 45 3e 63 68 61  a true.<CODE>cha
15e0: 72 3c 2f 43 4f 44 45 3e 2c 20 3c 43 4f 44 45 3e  r</CODE>, <CODE>
15f0: 73 68 6f 72 74 3c 2f 43 4f 44 45 3e 20 6f 72 20  short</CODE> or 
1600: 3c 43 4f 44 45 3e 66 6c 6f 61 74 3c 2f 43 4f 44  <CODE>float</COD
1610: 45 3e 20 69 6e 20 4b 26 61 6d 70 3b 52 20 43 20  E> in K&amp;R C 
1620: 20 69 73 20 20 62 79 20 20 61 6e 20 20 65 78 70   is  by  an  exp
1630: 6c 69 63 69 74 20 20 63 61 73 74 3a 0a 3c 43 4f  licit  cast:.<CO
1640: 44 45 3e 66 75 6e 63 28 28 63 68 61 72 29 63 2c  DE>func((char)c,
1650: 28 66 6c 6f 61 74 29 66 29 3c 2f 43 4f 44 45 3e  (float)f)</CODE>
1660: 20 20 29 2e 20 20 20 53 69 6d 69 6c 61 72 6c 79    ).   Similarly
1670: 2c 20 73 6f 6d 65 20 4b 26 61 6d 70 3b 52 20 63  , some K&amp;R c
1680: 6f 6d 70 69 6c 65 72 73 0a 28 73 75 63 68 20 61  ompilers.(such a
1690: 73 20 53 75 6e 20 3c 53 41 4d 50 3e 63 63 3c 2f  s Sun <SAMP>cc</
16a0: 53 41 4d 50 3e 20 6f 6e 20 74 68 65 20 73 70 61  SAMP> on the spa
16b0: 72 63 29 20 61 63 74 75 61 6c 6c 79 20 72 65 74  rc) actually ret
16c0: 75 72 6e 20 61 20 3c 43 4f 44 45 3e 66 6c 6f 61  urn a <CODE>floa
16d0: 74 3c 2f 43 4f 44 45 3e 20 61 73 20 61 0a 3c 43  t</CODE> as a.<C
16e0: 4f 44 45 3e 64 6f 75 62 6c 65 3c 2f 43 4f 44 45  ODE>double</CODE
16f0: 3e 2e 0a 3c 50 3e 0a 48 65 6e 63 65 2c 20 20 66  >..<P>.Hence,  f
1700: 6f 72 20 20 61 72 67 75 6d 65 6e 74 73 20 20 6f  or  arguments  o
1710: 66 20 66 75 6e 63 74 69 6f 6e 73 20 64 65 63 6c  f functions decl
1720: 61 72 65 64 20 69 6e 20 4b 26 61 6d 70 3b 52 20  ared in K&amp;R 
1730: 73 74 79 6c 65 0a 79 6f 75 20 20 73 68 6f 75 6c  style.you  shoul
1740: 64 20 20 75 73 65 20 20 3c 43 4f 44 45 3e 61 76  d  use  <CODE>av
1750: 5f 69 6e 74 28 29 3c 2f 43 4f 44 45 3e 20 20 61  _int()</CODE>  a
1760: 6e 64 20 20 3c 2f 43 4f 44 45 3e 61 76 5f 64 6f  nd  </CODE>av_do
1770: 75 62 6c 65 28 29 3c 2f 43 4f 44 45 3e 20 20 72  uble()</CODE>  r
1780: 61 74 68 65 72 20 20 74 68 61 6e 0a 3c 43 4f 44  ather  than.<COD
1790: 45 3e 61 76 5f 63 68 61 72 28 29 3c 2f 43 4f 44  E>av_char()</COD
17a0: 45 3e 2c 20 20 3c 43 4f 44 45 3e 61 76 5f 73 68  E>,  <CODE>av_sh
17b0: 6f 72 74 28 29 3c 2f 43 4f 44 45 3e 20 20 6f 72  ort()</CODE>  or
17c0: 20 20 3c 43 4f 44 45 3e 61 76 5f 66 6c 6f 61 74    <CODE>av_float
17d0: 28 29 3c 2f 43 4f 44 45 3e 2e 20 20 20 49 66 20  ()</CODE>.   If 
17e0: 79 6f 75 20 75 73 65 20 61 20 4b 26 61 6d 70 3b  you use a K&amp;
17f0: 52 0a 63 6f 6d 70 69 6c 65 72 2c 20 74 68 65 20  R.compiler, the 
1800: 61 76 63 61 6c 6c 20 68 65 61 64 65 72 20 66 69  avcall header fi
1810: 6c 65 73 20 6d 61 79 20 62 65 20 20 61 62 6c 65  les may be  able
1820: 20 20 74 6f 20 20 64 65 74 65 63 74 0a 74 68 69    to  detect.thi
1830: 73 20 20 61 6e 64 20 20 64 65 66 69 6e 65 20 3c  s  and  define <
1840: 43 4f 44 45 3e 61 76 5f 66 6c 6f 61 74 28 29 3c  CODE>av_float()<
1850: 2f 43 4f 44 45 3e 2c 20 65 74 63 2c 20 61 70 70  /CODE>, etc, app
1860: 72 6f 70 72 69 61 74 65 6c 79 2c 20 62 75 74 20  ropriately, but 
1870: 77 69 74 68 0a 61 6e 20 41 4e 53 49 20 63 6f 6d  with.an ANSI com
1880: 70 69 6c 65 72 20 74 68 65 72 65 20 69 73 20 6e  piler there is n
1890: 6f 20 77 61 79 20 3c 42 3e 61 76 63 61 6c 6c 3c  o way <B>avcall<
18a0: 2f 42 3e 20 63 61 6e 20 20 6b 6e 6f 77 20 20 68  /B> can  know  h
18b0: 6f 77 20 20 61 0a 66 75 6e 63 74 69 6f 6e 20 77  ow  a.function w
18c0: 61 73 20 64 65 63 6c 61 72 65 64 2c 20 73 6f 20  as declared, so 
18d0: 79 6f 75 20 68 61 76 65 20 74 6f 20 63 6f 72 72  you have to corr
18e0: 65 63 74 20 74 68 65 20 61 72 67 75 6d 65 6e 74  ect the argument
18f0: 0a 74 79 70 65 73 20 79 6f 75 72 73 65 6c 66 2e  .types yourself.
1900: 0a 3c 50 3e 0a 3c 4c 49 3e 20 54 68 65 20 65 78  .<P>.<LI> The ex
1910: 70 6c 69 63 69 74 20 74 79 70 65 20 61 72 67 75  plicit type argu
1920: 6d 65 6e 74 73 20 20 6f 66 20 20 74 68 65 20 20  ments  of  the  
1930: 3c 43 4f 44 45 3e 61 76 5f 73 74 72 75 63 74 28  <CODE>av_struct(
1940: 29 3c 2f 43 4f 44 45 3e 20 20 61 6e 64 0a 3c 43  )</CODE>  and.<C
1950: 4f 44 45 3e 61 76 5f 70 74 72 28 29 3c 2f 43 4f  ODE>av_ptr()</CO
1960: 44 45 3e 20 20 6d 61 63 72 6f 73 20 20 61 72 65  DE>  macros  are
1970: 20 20 74 79 70 69 63 61 6c 6c 79 20 20 75 73 65    typically  use
1980: 64 20 20 74 6f 20 63 61 6c 63 75 6c 61 74 65 20  d  to calculate 
1990: 73 69 7a 65 2c 0a 61 6c 69 67 6e 6d 65 6e 74 2c  size,.alignment,
19a0: 20 61 6e 64 20 70 61 73 73 69 6e 67 20 63 6f 6e   and passing con
19b0: 76 65 6e 74 69 6f 6e 73 2e 20 20 54 68 69 73 20  ventions.  This 
19c0: 6d 61 79 20 6e 6f 74 20 62 65 20 20 73 75 66 66  may not be  suff
19d0: 69 63 69 65 6e 74 20 20 66 6f 72 20 20 73 6f 6d  icient  for  som
19e0: 65 20 20 6d 61 63 68 69 6e 65 73 20 20 77 69 74  e  machines  wit
19f0: 68 20 20 75 6e 75 73 75 61 6c 20 20 73 74 72 75  h  unusual  stru
1a00: 63 74 75 72 65 20 61 6e 64 0a 70 6f 69 6e 74 65  cture and.pointe
1a10: 72 20 68 61 6e 64 6c 69 6e 67 3a 20 69 6e 20 74  r handling: in t
1a20: 68 69 73 20 63 61 73 65 20 61 64 64 69 74 69 6f  his case additio
1a30: 6e 61 6c 20 20 3c 43 4f 44 45 3e 61 76 5f 73 74  nal  <CODE>av_st
1a40: 61 72 74 5f 3c 56 41 52 3e 74 79 70 65 3c 2f 56  art_<VAR>type</V
1a50: 41 52 3e 28 29 3c 2f 43 4f 44 45 3e 0a 61 6e 64  AR>()</CODE>.and
1a60: 20 3c 43 4f 44 45 3e 61 76 5f 3c 56 41 52 3e 74   <CODE>av_<VAR>t
1a70: 79 70 65 3c 2f 56 41 52 3e 28 29 3c 2f 43 4f 44  ype</VAR>()</COD
1a80: 45 3e 20 6d 61 63 72 6f 73 20 6d 61 79 20 62 65  E> macros may be
1a90: 20 64 65 66 69 6e 65 64 2e 0a 3c 50 3e 0a 3c 4c   defined..<P>.<L
1aa0: 49 3e 20 54 68 65 20 6d 61 63 72 6f 73 20 3c 43  I> The macros <C
1ab0: 4f 44 45 3e 61 76 5f 73 74 61 72 74 5f 6c 6f 6e  ODE>av_start_lon
1ac0: 67 6c 6f 6e 67 28 29 3c 2f 43 4f 44 45 3e 2c 0a  glong()</CODE>,.
1ad0: 3c 43 4f 44 45 3e 61 76 5f 73 74 61 72 74 5f 75  <CODE>av_start_u
1ae0: 6c 6f 6e 67 6c 6f 6e 67 28 29 3c 2f 43 4f 44 45  longlong()</CODE
1af0: 3e 2c 20 3c 43 4f 44 45 3e 61 76 5f 6c 6f 6e 67  >, <CODE>av_long
1b00: 6c 6f 6e 67 28 29 3c 2f 43 4f 44 45 3e 20 20 61  long()</CODE>  a
1b10: 6e 64 0a 3c 43 4f 44 45 3e 61 76 5f 75 6c 6f 6e  nd.<CODE>av_ulon
1b20: 67 6c 6f 6e 67 28 29 3c 2f 43 4f 44 45 3e 20 77  glong()</CODE> w
1b30: 6f 72 6b 20 6f 6e 6c 79 20 69 66 20 74 68 65 20  ork only if the 
1b40: 43 20 63 6f 6d 70 69 6c 65 72 20 68 61 73 20 61  C compiler has a
1b50: 20 77 6f 72 6b 69 6e 67 0a 3c 43 4f 44 45 3e 6c   working.<CODE>l
1b60: 6f 6e 67 20 6c 6f 6e 67 3c 2f 43 4f 44 45 3e 20  ong long</CODE> 
1b70: 36 34 2d 62 69 74 20 69 6e 74 65 67 65 72 20 74  64-bit integer t
1b80: 79 70 65 2e 0a 3c 50 3e 0a 3c 4c 49 3e 20 54 68  ype..<P>.<LI> Th
1b90: 65 20 73 74 72 75 63 74 20 74 79 70 65 73 20 75  e struct types u
1ba0: 73 65 64 20 69 6e 20 3c 43 4f 44 45 3e 61 76 5f  sed in <CODE>av_
1bb0: 73 74 61 72 74 5f 73 74 72 75 63 74 28 29 3c 2f  start_struct()</
1bc0: 43 4f 44 45 3e 20 61 6e 64 0a 3c 43 4f 44 45 3e  CODE> and.<CODE>
1bd0: 61 76 5f 73 74 72 75 63 74 28 29 3c 2f 43 4f 44  av_struct()</COD
1be0: 45 3e 20 6d 75 73 74 20 6f 6e 6c 79 20 63 6f 6e  E> must only con
1bf0: 74 61 69 6e 20 28 73 69 67 6e 65 64 20 6f 72 20  tain (signed or 
1c00: 75 6e 73 69 67 6e 65 64 29 20 69 6e 74 2c 0a 6c  unsigned) int,.l
1c10: 6f 6e 67 2c 20 6c 6f 6e 67 20 6c 6f 6e 67 20 6f  ong, long long o
1c20: 72 20 70 6f 69 6e 74 65 72 20 66 69 65 6c 64 73  r pointer fields
1c30: 2e 20 53 74 72 75 63 74 20 74 79 70 65 73 20 63  . Struct types c
1c40: 6f 6e 74 61 69 6e 69 6e 67 0a 28 73 69 67 6e 65  ontaining.(signe
1c50: 64 20 6f 72 20 75 6e 73 69 67 6e 65 64 29 20 63  d or unsigned) c
1c60: 68 61 72 2c 20 73 68 6f 72 74 2c 20 66 6c 6f 61  har, short, floa
1c70: 74 2c 20 64 6f 75 62 6c 65 20 6f 72 20 6f 74 68  t, double or oth
1c80: 65 72 0a 73 74 72 75 63 74 73 20 61 72 65 20 6e  er.structs are n
1c90: 6f 74 20 73 75 70 70 6f 72 74 65 64 2e 0a 3c 50  ot supported..<P
1ca0: 3e 0a 3c 2f 4f 4c 3e 0a 0a 3c 41 20 4e 41 4d 45  >.</OL>..<A NAME
1cb0: 3d 22 53 65 65 20 61 6c 73 6f 22 3e 0a 3c 48 32  ="See also">.<H2
1cc0: 3e 53 65 65 20 61 6c 73 6f 3c 2f 48 32 3e 0a 3c  >See also</H2>.<
1cd0: 2f 41 3e 0a 3c 41 20 48 52 45 46 3d 22 73 74 64  /A>.<A HREF="std
1ce0: 61 72 67 28 33 29 22 3e 3c 43 4f 44 45 3e 3c 42  arg(3)"><CODE><B
1cf0: 3e 73 74 64 61 72 67 3c 2f 42 3e 3c 2f 43 4f 44  >stdarg</B></COD
1d00: 45 3e 3c 2f 41 3e 28 33 29 2c 20 3c 41 20 48 52  E></A>(3), <A HR
1d10: 45 46 3d 22 76 61 72 61 72 67 73 28 33 29 22 3e  EF="varargs(3)">
1d20: 3c 43 4f 44 45 3e 3c 42 3e 76 61 72 61 72 67 73  <CODE><B>varargs
1d30: 3c 2f 42 3e 3c 2f 43 4f 44 45 3e 3c 2f 41 3e 28  </B></CODE></A>(
1d40: 33 29 2e 0a 0a 3c 41 20 4e 41 4d 45 3d 22 42 75  3)...<A NAME="Bu
1d50: 67 73 22 3e 0a 3c 48 32 3e 42 75 67 73 3c 2f 48  gs">.<H2>Bugs</H
1d60: 32 3e 0a 3c 2f 41 3e 0a 0a 3c 55 4c 3e 0a 3c 4c  2>.</A>..<UL>.<L
1d70: 49 3e 0a 54 68 65 20 20 63 75 72 72 65 6e 74 20  I>.The  current 
1d80: 20 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 73   implementations
1d90: 20 68 61 76 65 20 62 65 65 6e 20 74 65 73 74 65   have been teste
1da0: 64 20 6f 6e 20 61 20 73 65 6c 65 63 74 69 6f 6e  d on a selection
1db0: 0a 6f 66 20 63 6f 6d 6d 6f 6e 20 63 61 73 65 73  .of common cases
1dc0: 20 62 75 74 20 74 68 65 72 65 20 20 61 72 65 20   but there  are 
1dd0: 20 70 72 6f 62 61 62 6c 79 20 20 73 74 69 6c 6c   probably  still
1de0: 20 20 6d 61 6e 79 0a 62 75 67 73 2e 0a 3c 4c 49    many.bugs..<LI
1df0: 3e 0a 54 68 65 72 65 20 20 61 72 65 20 20 74 79  >.There  are  ty
1e00: 70 69 63 61 6c 6c 79 20 20 62 75 69 6c 74 2d 69  pically  built-i
1e10: 6e 20 20 6c 69 6d 69 74 73 20 6f 6e 20 74 68 65  n  limits on the
1e20: 20 73 69 7a 65 20 6f 66 20 74 68 65 0a 61 72 67   size of the.arg
1e30: 75 6d 65 6e 74 2d 6c 69 73 74 2c 20 77 68 69 63  ument-list, whic
1e40: 68 20 6d 61 79 20 61 6c 73 6f 20 20 69 6e 63 6c  h may also  incl
1e50: 75 64 65 20 20 74 68 65 20 20 73 69 7a 65 20 20  ude  the  size  
1e60: 6f 66 20 20 61 6e 79 0a 73 74 72 75 63 74 75 72  of  any.structur
1e70: 65 20 61 72 67 75 6d 65 6e 74 73 2e 0a 3c 4c 49  e arguments..<LI
1e80: 3e 0a 54 68 65 20 64 65 63 69 73 69 6f 6e 20 77  >.The decision w
1e90: 68 65 74 68 65 72 20 61 20 73 74 72 75 63 74 20  hether a struct 
1ea0: 69 73 20 74 6f 20 62 65 20 72 65 74 75 72 6e 65  is to be returne
1eb0: 64 20 69 6e 20 72 65 67 69 73 74 65 72 73 20 6f  d in registers o
1ec0: 72 20 69 6e 20 6d 65 6d 6f 72 79 0a 63 6f 6e 73  r in memory.cons
1ed0: 69 64 65 72 73 20 6f 6e 6c 79 20 74 68 65 20 73  iders only the s
1ee0: 74 72 75 63 74 27 73 20 73 69 7a 65 20 61 6e 64  truct's size and
1ef0: 20 61 6c 69 67 6e 6d 65 6e 74 2e 20 54 68 69 73   alignment. This
1f00: 20 69 73 20 69 6e 61 63 63 75 72 61 74 65 3a 20   is inaccurate: 
1f10: 66 6f 72 0a 65 78 61 6d 70 6c 65 2c 20 67 63 63  for.example, gcc
1f20: 20 6f 6e 20 6d 36 38 6b 2d 6e 65 78 74 20 72 65   on m68k-next re
1f30: 74 75 72 6e 73 0a 3c 43 4f 44 45 3e 73 74 72 75  turns.<CODE>stru
1f40: 63 74 20 7b 20 63 68 61 72 20 61 2c 62 2c 63 3b  ct { char a,b,c;
1f50: 20 7d 3c 2f 43 4f 44 45 3e 0a 69 6e 20 72 65 67   }</CODE>.in reg
1f60: 69 73 74 65 72 73 20 61 6e 64 0a 3c 43 4f 44 45  isters and.<CODE
1f70: 3e 73 74 72 75 63 74 20 7b 20 63 68 61 72 20 61  >struct { char a
1f80: 5b 33 5d 3b 20 7d 3c 2f 43 4f 44 45 3e 0a 69 6e  [3]; }</CODE>.in
1f90: 20 6d 65 6d 6f 72 79 2c 20 61 6c 74 68 6f 75 67   memory, althoug
1fa0: 68 20 62 6f 74 68 20 74 79 70 65 73 20 68 61 76  h both types hav
1fb0: 65 20 74 68 65 20 73 61 6d 65 20 73 69 7a 65 20  e the same size 
1fc0: 61 6e 64 20 74 68 65 20 73 61 6d 65 20 61 6c 69  and the same ali
1fd0: 67 6e 6d 65 6e 74 2e 0a 3c 2f 55 4c 3e 0a 0a 3c  gnment..</UL>..<
1fe0: 41 20 4e 41 4d 45 3d 22 4e 6f 6e 2d 42 75 67 73  A NAME="Non-Bugs
1ff0: 22 3e 0a 3c 48 32 3e 4e 6f 6e 2d 42 75 67 73 3c  ">.<H2>Non-Bugs<
2000: 2f 48 32 3e 0a 3c 2f 41 3e 0a 0a 41 6c 6c 20 20  /H2>.</A>..All  
2010: 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 69 73 20 70  information is p
2020: 61 73 73 65 64 20 69 6e 20 43 50 55 20 72 65 67  assed in CPU reg
2030: 69 73 74 65 72 73 20 61 6e 64 20 74 68 65 20 73  isters and the s
2040: 74 61 63 6b 2e 0a 54 68 65 20 3c 43 4f 44 45 3e  tack..The <CODE>
2050: 3c 42 3e 61 76 63 61 6c 6c 3c 2f 42 3e 3c 2f 43  <B>avcall</B></C
2060: 4f 44 45 3e 20 70 61 63 6b 61 67 65 20 69 73 20  ODE> package is 
2070: 74 68 65 72 65 66 6f 72 65 20 6d 75 6c 74 69 74  therefore multit
2080: 68 72 65 61 64 2d 73 61 66 65 2e 0a 0a 3c 41 20  hread-safe...<A 
2090: 4e 41 4d 45 3d 22 50 6f 72 74 69 6e 67 20 41 56  NAME="Porting AV
20a0: 43 41 4c 4c 22 3e 0a 3c 48 32 3e 50 6f 72 74 69  CALL">.<H2>Porti
20b0: 6e 67 20 41 56 43 41 4c 4c 3c 2f 48 32 3e 0a 3c  ng AVCALL</H2>.<
20c0: 2f 41 3e 0a 0a 50 6f 72 74 73 2c 20 20 62 75 67  /A>..Ports,  bug
20d0: 2d 66 69 78 65 73 2c 20 20 61 6e 64 20 20 73 75  -fixes,  and  su
20e0: 67 67 65 73 74 69 6f 6e 73 20 61 72 65 20 6d 6f  ggestions are mo
20f0: 73 74 20 77 65 6c 63 6f 6d 65 2e 20 54 68 65 0a  st welcome. The.
2100: 6d 61 63 72 6f 73 20 72 65 71 75 69 72 65 64 20  macros required 
2110: 66 6f 72 20 61 72 67 75 6d 65 6e 74 20 70 75 73  for argument pus
2120: 68 69 6e 67 20 20 61 72 65 20 20 70 72 65 74 74  hing  are  prett
2130: 79 20 20 67 72 75 6e 67 79 2c 0a 62 75 74 20 20  y  grungy,.but  
2140: 69 74 20 64 6f 65 73 20 73 65 65 6d 20 74 6f 20  it does seem to 
2150: 62 65 20 70 6f 73 73 69 62 6c 65 20 74 6f 20 70  be possible to p
2160: 6f 72 74 20 61 76 63 61 6c 6c 20 74 6f 20 61 20  ort avcall to a 
2170: 72 61 6e 67 65 0a 6f 66 20 6d 61 63 68 69 6e 65  range.of machine
2180: 73 2e 20 50 6f 72 74 73 20 74 6f 20 6e 6f 6e 2d  s. Ports to non-
2190: 73 74 61 6e 64 61 72 64 20 6f 72 20 6e 6f 6e 2d  standard or non-
21a0: 33 32 2d 62 69 74 20 20 6d 61 63 68 69 6e 65 73  32-bit  machines
21b0: 0a 61 72 65 20 20 65 73 70 65 63 69 61 6c 6c 79  .are  especially
21c0: 20 20 77 65 6c 63 6f 6d 65 20 20 73 6f 20 77 65    welcome  so we
21d0: 20 63 61 6e 20 73 6f 72 74 20 74 68 65 20 69 6e   can sort the in
21e0: 74 65 72 66 61 63 65 20 6f 75 74 0a 62 65 66 6f  terface out.befo
21f0: 72 65 20 69 74 27 73 20 74 6f 6f 20 6c 61 74 65  re it's too late
2200: 2e 0a 3c 50 3e 0a 4b 6e 6f 77 6c 65 64 67 65 20  ..<P>.Knowledge 
2210: 61 62 6f 75 74 20 61 72 67 75 6d 65 6e 74 20 70  about argument p
2220: 61 73 73 69 6e 67 20 63 6f 6e 76 65 6e 74 69 6f  assing conventio
2230: 6e 73 20 63 61 6e 20 62 65 20 20 66 6f 75 6e 64  ns can be  found
2240: 0a 69 6e 20 20 74 68 65 20 20 67 63 63 20 73 6f  .in  the  gcc so
2250: 75 72 63 65 2c 20 66 69 6c 65 20 3c 53 41 4d 50  urce, file <SAMP
2260: 3e 67 63 63 2d 32 2e 36 2e 33 2f 63 6f 6e 66 69  >gcc-2.6.3/confi
2270: 67 2f 3c 56 41 52 3e 63 70 75 3c 2f 56 41 52 3e  g/<VAR>cpu</VAR>
2280: 2f 3c 56 41 52 3e 63 70 75 3c 2f 56 41 52 3e 2e  /<VAR>cpu</VAR>.
2290: 68 3c 2f 53 41 4d 50 3e 2c 20 73 65 63 74 69 6f  h</SAMP>, sectio
22a0: 6e 0a 3c 53 41 4d 50 3e 22 53 74 61 63 6b 20 6c  n.<SAMP>"Stack l
22b0: 61 79 6f 75 74 3b 20 66 75 6e 63 74 69 6f 6e 20  ayout; function 
22c0: 65 6e 74 72 79 2c 20 65 78 69 74 20 61 6e 64 20  entry, exit and 
22d0: 63 61 6c 6c 69 6e 67 2e 22 3c 2f 53 41 4d 50 3e  calling."</SAMP>
22e0: 0a 3c 50 3e 0a 53 6f 6d 65 20 6f 66 20 74 68 65  .<P>.Some of the
22f0: 20 67 72 75 6e 67 65 20 69 73 20 75 73 75 61 6c   grunge is usual
2300: 6c 79 20 68 61 6e 64 6c 65 64 20 62 79 20 61 20  ly handled by a 
2310: 43 20 20 6f 72 20 20 61 73 73 65 6d 62 6c 79 0a  C  or  assembly.
2320: 6c 65 76 65 6c 20 20 67 6c 75 65 20 20 72 6f 75  level  glue  rou
2330: 74 69 6e 65 20 20 74 68 61 74 20 20 61 63 74 75  tine  that  actu
2340: 61 6c 6c 79 20 70 75 73 68 65 73 20 74 68 65 20  ally pushes the 
2350: 61 72 67 75 6d 65 6e 74 73 2c 0a 63 61 6c 6c 73  arguments,.calls
2360: 20 74 68 65 20 66 75 6e 63 74 69 6f 6e 20 61 6e   the function an
2370: 64 20 75 6e 70 61 63 6b 73 20 20 61 6e 79 20 20  d unpacks  any  
2380: 72 65 74 75 72 6e 20 20 76 61 6c 75 65 2e 20 54  return  value. T
2390: 68 69 73 20 69 73 0a 63 61 6c 6c 65 64 20 3c 43  his is.called <C
23a0: 4f 44 45 3e 5f 5f 62 75 69 6c 74 69 6e 5f 61 76  ODE>__builtin_av
23b0: 63 61 6c 6c 28 29 3c 2f 43 4f 44 45 3e 2e 20 41  call()</CODE>. A
23c0: 20 70 72 65 63 6f 6d 70 69 6c 65 64 20 61 73 73   precompiled ass
23d0: 65 6d 62 6c 65 72 20 76 65 72 73 69 6f 6e 20 66  embler version f
23e0: 6f 72 0a 70 65 6f 70 6c 65 20 77 69 74 68 6f 75  or.people withou
23f0: 74 20 67 63 63 20 69 73 20 61 6c 73 6f 20 6d 61  t gcc is also ma
2400: 64 65 20 61 76 61 69 6c 61 62 6c 65 2e 20 54 68  de available. Th
2410: 65 20 72 6f 75 74 69 6e 65 20 73 68 6f 75 6c 64  e routine should
2420: 20 69 64 65 61 6c 6c 79 0a 68 61 76 65 20 66 6c   ideally.have fl
2430: 61 67 73 20 66 6f 72 20 74 68 65 20 70 61 73 73  ags for the pass
2440: 69 6e 67 20 63 6f 6e 76 65 6e 74 69 6f 6e 73 20  ing conventions 
2450: 6f 66 20 6f 74 68 65 72 20 63 6f 6d 70 69 6c 65  of other compile
2460: 72 73 2e 0a 3c 50 3e 0a 4d 61 6e 79 20 20 6f 66  rs..<P>.Many  of
2470: 20 20 74 68 65 20 20 63 75 72 72 65 6e 74 20 72    the  current r
2480: 6f 75 74 69 6e 65 73 20 77 61 73 74 65 20 61 20  outines waste a 
2490: 6c 6f 74 20 6f 66 20 73 74 61 63 6b 20 73 70 61  lot of stack spa
24a0: 63 65 0a 61 6e 64 20 67 65 6e 65 72 61 6c 6c 79  ce.and generally
24b0: 20 64 6f 20 68 61 69 72 79 20 74 68 69 6e 67 73   do hairy things
24c0: 20 74 6f 20 73 74 61 63 6b 20 66 72 61 6d 65 73   to stack frames
24d0: 20 2d 20 61 20 62 69 74 20 6d 6f 72 65 0a 61 73   - a bit more.as
24e0: 73 65 6d 62 6c 79 20 63 6f 64 65 20 77 6f 75 6c  sembly code woul
24f0: 64 20 70 72 6f 62 61 62 6c 79 20 68 65 6c 70 20  d probably help 
2500: 74 68 69 6e 67 73 20 61 6c 6f 6e 67 20 71 75 69  things along qui
2510: 74 65 20 61 20 62 69 74 0a 68 65 72 65 2e 0a 3c  te a bit.here..<
2520: 50 3e 0a 0a 3c 41 20 4e 41 4d 45 3d 22 41 75 74  P>..<A NAME="Aut
2530: 68 6f 72 22 3e 0a 3c 48 32 3e 41 75 74 68 6f 72  hor">.<H2>Author
2540: 3c 2f 48 32 3e 0a 3c 2f 41 3e 0a 0a 42 69 6c 6c  </H2>.</A>..Bill
2550: 20 54 72 69 67 67 73 20 26 6c 74 3b 42 69 6c 6c   Triggs &lt;Bill
2560: 2e 54 72 69 67 67 73 40 69 6e 72 69 61 6c 70 65  .Triggs@inrialpe
2570: 73 2e 66 72 26 67 74 3b 2c 20 26 6c 74 3b 42 69  s.fr&gt;, &lt;Bi
2580: 6c 6c 2e 54 72 69 67 67 73 40 69 6d 61 67 2e 66  ll.Triggs@imag.f
2590: 72 26 67 74 3b 2e 0a 0a 3c 41 20 4e 41 4d 45 3d  r&gt;...<A NAME=
25a0: 22 41 63 6b 6e 6f 77 6c 65 64 67 65 6d 65 6e 74  "Acknowledgement
25b0: 73 22 3e 0a 3c 48 32 3e 41 63 6b 6e 6f 77 6c 65  s">.<H2>Acknowle
25c0: 64 67 65 6d 65 6e 74 73 3c 2f 48 32 3e 0a 3c 2f  dgements</H2>.</
25d0: 41 3e 0a 0a 53 6f 6d 65 20 69 6e 69 74 69 61 6c  A>..Some initial
25e0: 20 69 64 65 61 73 20 77 65 72 65 20 73 74 6f 6c   ideas were stol
25f0: 65 6e 20 66 72 6f 6d 20 74 68 65 20 43 20 69 6e  en from the C in
2600: 74 65 72 66 61 63 65 20 74 6f 20 74 68 65 0a 5a  terface to the.Z
2610: 65 6c 6b 20 65 78 74 65 6e 73 69 6f 6e 73 20 74  elk extensions t
2620: 6f 20 4f 6c 69 76 65 72 20 4c 61 75 6d 61 6e 6e  o Oliver Laumann
2630: 27 73 20 45 6c 6b 20 73 63 68 65 6d 65 20 69 6e  's Elk scheme in
2640: 74 65 72 70 72 65 74 65 72 0a 62 79 20 4a 2e 50  terpreter.by J.P
2650: 2e 4c 65 77 69 73 2c 20 4e 45 43 20 20 43 26 61  .Lewis, NEC  C&a
2660: 6d 70 3b 43 20 20 52 65 73 65 61 72 63 68 2c 20  mp;C  Research, 
2670: 20 26 6c 74 3b 7a 69 6c 6c 61 40 63 63 72 6c 2e   &lt;zilla@ccrl.
2680: 6e 6a 2e 6e 65 63 2e 63 6f 6d 26 67 74 3b 0a 28  nj.nec.com&gt;.(
2690: 66 6f 72 20 20 20 20 53 75 6e 34 20 20 20 20 26  for    Sun4    &
26a0: 61 6d 70 3b 20 20 20 20 53 47 49 29 2c 20 20 20  amp;    SGI),   
26b0: 20 61 6e 64 20 20 20 20 52 6f 79 20 20 20 20 46   and    Roy    F
26c0: 65 61 74 68 65 72 73 74 6f 6e 65 27 73 0a 26 6c  eatherstone's.&l
26d0: 74 3b 72 6f 79 40 72 6f 62 6f 74 73 2e 6f 78 66  t;roy@robots.oxf
26e0: 6f 72 64 2e 61 63 2e 75 6b 26 67 74 3b 20 70 65  ord.ac.uk&gt; pe
26f0: 72 73 6f 6e 61 6c 20 43 20 69 6e 74 65 72 66 61  rsonal C interfa
2700: 63 65 20 6c 69 62 72 61 72 79 20 66 6f 72 0a 53  ce library for.S
2710: 75 6e 33 2c 20 53 75 6e 34 20 20 26 61 6d 70 3b  un3, Sun4  &amp;
2720: 20 20 53 47 49 2e 20 20 20 49 20 20 61 6c 73 6f    SGI.   I  also
2730: 20 6c 6f 6f 6b 65 64 20 61 74 20 74 68 65 20 6d   looked at the m
2740: 61 63 68 69 6e 65 2d 64 65 70 65 6e 64 65 6e 74  achine-dependent
2750: 0a 70 61 72 74 73 20 6f 66 20 74 68 65 20 47 43  .parts of the GC
2760: 43 20 61 6e 64 20 47 44 42 20 64 69 73 74 72 69  C and GDB distri
2770: 62 75 74 69 6f 6e 73 2c 20 61 6e 64 20 20 70 75  butions, and  pu
2780: 74 20 20 74 68 65 20 20 67 63 63 0a 3c 43 4f 44  t  the  gcc.<COD
2790: 45 3e 61 73 6d 28 29 3c 2f 43 4f 44 45 3e 20 65  E>asm()</CODE> e
27a0: 78 74 65 6e 73 69 6f 6e 73 20 74 6f 20 67 6f 6f  xtensions to goo
27b0: 64 20 75 73 65 2e 20 54 68 61 6e 6b 73 20 67 75  d use. Thanks gu
27c0: 79 73 21 0a 3c 50 3e 0a 54 68 69 73 20 77 6f 72  ys!.<P>.This wor
27d0: 6b 20 77 61 73 20 70 61 72 74 6c 79 20 73 75 70  k was partly sup
27e0: 70 6f 72 74 65 64 20 62 79 20 45 43 2d 45 53 50  ported by EC-ESP
27f0: 52 49 54 20 42 61 73 69 63 20 52 65 73 65 61 72  RIT Basic Resear
2800: 63 68 0a 41 63 74 69 6f 6e 20 53 45 43 4f 4e 44  ch.Action SECOND
2810: 2e 0a 3c 50 3e 0a 0a 3c 48 52 3e 0a 0a 3c 41 44  ..<P>..<HR>..<AD
2820: 44 52 45 53 53 3e 41 56 43 41 4c 4c 20 6d 61 6e  DRESS>AVCALL man
2830: 75 61 6c 20 70 61 67 65 3c 42 52 3e 0a 42 72 75  ual page<BR>.Bru
2840: 6e 6f 20 48 61 69 62 6c 65 20 26 6c 74 3b 62 72  no Haible &lt;br
2850: 75 6e 6f 40 63 6c 69 73 70 2e 6f 72 67 26 67 74  uno@clisp.org&gt
2860: 3b 0a 3c 2f 41 44 44 52 45 53 53 3e 0a 3c 50 3e  ;.</ADDRESS>.<P>
2870: 0a 4c 61 73 74 20 6d 6f 64 69 66 69 65 64 3a 20  .Last modified: 
2880: 31 34 20 4a 61 6e 75 61 72 79 20 32 30 30 31 2e  14 January 2001.
2890: 0a 0a 3c 2f 42 4f 44 59 3e 0a 0a                 ..</BODY>..