Artifact 73113de6a5b7b1e558e7a4bf86258425125632c7:


0000: 61 76 63 61 6c 6c 20 2d 20 63 61 6c 6c 69 6e 67  avcall - calling
0010: 20 43 20 66 75 6e 63 74 69 6f 6e 73 20 77 69 74   C functions wit
0020: 68 20 76 61 72 69 61 62 6c 65 20 61 72 67 75 6d  h variable argum
0030: 65 6e 74 73 0a 0a 54 68 69 73 20 6c 69 62 72 61  ents..This libra
0040: 72 79 20 61 6c 6c 6f 77 73 20 61 72 62 69 74 72  ry allows arbitr
0050: 61 72 79 20 43 20 66 75 6e 63 74 69 6f 6e 73 20  ary C functions 
0060: 74 6f 20 62 65 20 63 61 6c 6c 65 64 20 66 72 6f  to be called fro
0070: 6d 20 65 6d 62 65 64 64 65 64 0a 69 6e 74 65 72  m embedded.inter
0080: 70 72 65 74 65 72 73 2c 20 64 65 62 75 67 67 65  preters, debugge
0090: 72 73 2c 20 52 50 43 20 63 61 6c 6c 73 2c 20 65  rs, RPC calls, e
00a0: 74 63 2c 20 62 79 20 62 75 69 6c 64 69 6e 67 20  tc, by building 
00b0: 75 70 20 61 20 43 0a 61 72 67 75 6d 65 6e 74 2d  up a C.argument-
00c0: 6c 69 73 74 20 69 6e 63 72 65 6d 65 6e 74 61 6c  list incremental
00d0: 6c 79 20 66 72 6f 6d 20 65 78 70 6c 69 63 69 74  ly from explicit
00e0: 6c 79 20 74 79 70 65 64 20 61 72 67 75 6d 65 6e  ly typed argumen
00f0: 74 73 2e 20 54 68 69 73 20 0a 63 6f 6e 73 69 64  ts. This .consid
0100: 65 72 61 62 6c 79 20 72 65 64 75 63 65 73 20 74  erably reduces t
0110: 68 65 20 61 6d 6f 75 6e 74 20 6f 66 20 62 6f 69  he amount of boi
0120: 6c 65 72 70 6c 61 74 65 20 67 6c 75 65 20 63 6f  lerplate glue co
0130: 64 65 20 72 65 71 75 69 72 65 64 0a 66 6f 72 20  de required.for 
0140: 73 75 63 68 20 61 70 70 6c 69 63 61 74 69 6f 6e  such application
0150: 73 2e 0a 0a 54 68 65 20 69 6e 74 65 72 66 61 63  s...The interfac
0160: 65 20 69 73 20 6c 69 6b 65 20 73 74 64 61 72 67  e is like stdarg
0170: 73 2f 76 61 72 61 72 67 73 20 69 6e 20 72 65 76  s/varargs in rev
0180: 65 72 73 65 20 61 6e 64 20 69 73 20 69 6e 74 65  erse and is inte
0190: 6e 64 65 64 20 74 6f 20 62 65 20 61 73 0a 70 6f  nded to be as.po
01a0: 72 74 61 62 6c 65 20 61 73 20 70 6f 73 73 69 62  rtable as possib
01b0: 6c 65 2c 20 68 6f 77 65 76 65 72 20 74 68 65 20  le, however the 
01c0: 64 65 74 61 69 6c 73 20 6f 66 20 66 75 6e 63 74  details of funct
01d0: 69 6f 6e 20 63 61 6c 6c 69 6e 67 20 61 72 65 20  ion calling are 
01e0: 68 69 67 68 6c 79 0a 6d 61 63 68 69 6e 65 2d 64  highly.machine-d
01f0: 65 70 65 6e 64 65 6e 74 20 73 6f 20 79 6f 75 72  ependent so your
0200: 20 6d 69 6c 65 61 67 65 20 6d 61 79 20 76 61 72   mileage may var
0210: 79 2e 20 41 74 20 74 68 65 20 76 65 72 79 20 6c  y. At the very l
0220: 65 61 73 74 20 74 68 65 72 65 20 61 72 65 0a 74  east there are.t
0230: 79 70 69 63 61 6c 6c 79 20 62 75 69 6c 74 2d 69  ypically built-i
0240: 6e 20 6c 69 6d 69 74 73 20 6f 6e 20 74 68 65 20  n limits on the 
0250: 73 69 7a 65 20 6f 66 20 74 68 65 20 61 72 67 75  size of the argu
0260: 6d 65 6e 74 2d 6c 69 73 74 2e 20 54 68 65 0a 61  ment-list. The.a
0270: 72 67 75 6d 65 6e 74 2d 70 75 73 68 69 6e 67 20  rgument-pushing 
0280: 6d 61 63 72 6f 73 20 61 6c 6c 20 72 65 74 75 72  macros all retur
0290: 6e 20 30 20 66 6f 72 20 73 75 63 63 65 73 73 2c  n 0 for success,
02a0: 20 3c 20 30 20 66 6f 72 20 65 72 72 6f 72 20 28   < 0 for error (
02b0: 65 67 2c 0a 61 72 67 2d 6c 69 73 74 20 6f 76 65  eg,.arg-list ove
02c0: 72 66 6c 6f 77 29 2e 0a 0a 0a 49 6e 73 74 61 6c  rflow)....Instal
02d0: 6c 61 74 69 6f 6e 20 69 6e 73 74 72 75 63 74 69  lation instructi
02e0: 6f 6e 73 3a 0a 09 2e 2f 63 6f 6e 66 69 67 75 72  ons:.../configur
02f0: 65 0a 09 6d 61 6b 65 0a 09 6d 61 6b 65 20 63 68  e..make..make ch
0300: 65 63 6b 0a 09 6d 61 6b 65 20 69 6e 73 74 61 6c  eck..make instal
0310: 6c 0a 0a 0a 46 69 6c 65 73 20 69 6e 20 74 68 69  l...Files in thi
0320: 73 20 70 61 63 6b 61 67 65 3a 0a 0a 20 20 20 20  s package:..    
0330: 44 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 3a 0a 0a  Documentation:..
0340: 20 20 20 20 20 20 20 20 52 45 41 44 4d 45 20 20          README  
0350: 20 20 20 20 20 20 20 20 74 68 69 73 20 74 65 78          this tex
0360: 74 0a 20 20 20 20 20 20 20 20 43 4f 50 59 49 4e  t.        COPYIN
0370: 47 20 20 20 20 20 20 20 20 20 66 72 65 65 20 73  G         free s
0380: 6f 66 74 77 61 72 65 20 6c 69 63 65 6e 73 65 0a  oftware license.
0390: 20 20 20 20 20 20 20 20 50 4c 41 54 46 4f 52 4d          PLATFORM
03a0: 53 20 20 20 20 20 20 20 6c 69 73 74 20 6f 66 20  S       list of 
03b0: 73 75 70 70 6f 72 74 65 64 20 70 6c 61 74 66 6f  supported platfo
03c0: 72 6d 73 0a 20 20 20 20 20 20 20 20 61 76 63 61  rms.        avca
03d0: 6c 6c 2e 33 20 20 20 20 20 20 20 20 6d 61 6e 75  ll.3        manu
03e0: 61 6c 20 70 61 67 65 20 69 6e 20 55 6e 69 78 20  al page in Unix 
03f0: 6d 61 6e 20 66 6f 72 6d 61 74 0a 20 20 20 20 20  man format.     
0400: 20 20 20 61 76 63 61 6c 6c 2e 6d 61 6e 20 20 20     avcall.man   
0410: 20 20 20 6d 61 6e 75 61 6c 20 70 61 67 65 0a 20     manual page. 
0420: 20 20 20 20 20 20 20 61 76 63 61 6c 6c 2e 68 74         avcall.ht
0430: 6d 6c 20 20 20 20 20 6d 61 6e 75 61 6c 20 70 61  ml     manual pa
0440: 67 65 20 69 6e 20 48 54 4d 4c 20 66 6f 72 6d 61  ge in HTML forma
0450: 74 0a 20 20 20 20 20 20 20 20 44 4f 43 20 20 20  t.        DOC   
0460: 20 20 20 20 20 20 20 20 20 20 64 6f 63 75 6d 65            docume
0470: 6e 74 61 74 69 6f 6e 0a 0a 20 20 20 20 53 6f 75  ntation..    Sou
0480: 72 63 65 3a 0a 0a 20 20 20 20 20 20 20 20 61 76  rce:..        av
0490: 63 61 6c 6c 2e 68 2e 69 6e 20 20 20 20 20 6d 61  call.h.in     ma
04a0: 73 74 65 72 20 66 6f 72 20 6d 61 69 6e 20 69 6e  ster for main in
04b0: 63 6c 75 64 65 20 66 69 6c 65 20 61 76 63 61 6c  clude file avcal
04c0: 6c 2e 68 0a 20 20 20 20 20 20 20 20 61 76 63 61  l.h.        avca
04d0: 6c 6c 2d 2a 2e 63 20 20 20 20 20 20 73 6f 75 72  ll-*.c      sour
04e0: 63 65 20 66 6f 72 20 74 68 65 20 69 6e 74 65 72  ce for the inter
04f0: 66 61 63 65 20 66 75 6e 63 74 69 6f 6e 0a 20 20  face function.  
0500: 20 20 20 20 20 20 61 76 63 61 6c 6c 2d 2a 2e 5b        avcall-*.[
0510: 73 53 5d 20 20 20 69 74 73 20 74 72 61 6e 73 6c  sS]   its transl
0520: 61 74 69 6f 6e 20 74 6f 20 61 73 73 65 6d 62 6c  ation to assembl
0530: 79 20 6c 61 6e 67 75 61 67 65 0a 20 20 20 20 20  y language.     
0540: 20 20 20 73 74 72 75 63 74 63 70 79 2e 63 20 20     structcpy.c  
0550: 20 20 20 61 75 78 69 6c 69 61 72 79 20 66 75 6e     auxiliary fun
0560: 63 74 69 6f 6e 0a 20 20 20 20 20 20 20 20 74 65  ction.        te
0570: 73 74 73 2e 63 20 20 20 20 20 20 20 20 20 74 65  sts.c         te
0580: 73 74 20 70 72 6f 67 72 61 6d 0a 0a 20 20 20 20  st program..    
0590: 49 6e 73 74 61 6c 6c 61 74 69 6f 6e 3a 0a 0a 20  Installation:.. 
05a0: 20 20 20 20 20 20 20 63 6f 6e 66 69 67 75 72 65         configure
05b0: 20 20 20 20 20 20 20 63 6f 6e 66 69 67 75 72 61         configura
05c0: 74 69 6f 6e 20 73 63 72 69 70 74 0a 20 20 20 20  tion script.    
05d0: 20 20 20 20 63 6f 6e 66 69 67 75 72 65 2e 69 6e      configure.in
05e0: 20 20 20 20 61 75 74 6f 63 6f 6e 66 2d 32 2e 31      autoconf-2.1
05f0: 32 20 73 6f 75 72 63 65 20 66 6f 72 20 74 68 65  2 source for the
0600: 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 73   configuration s
0610: 63 72 69 70 74 0a 20 20 20 20 20 20 20 20 2e 2e  cript.        ..
0620: 2f 62 75 69 6c 64 2d 61 75 78 2f 2a 20 20 61 75  /build-aux/*  au
0630: 78 69 6c 69 61 72 79 20 62 75 69 6c 64 20 73 63  xiliary build sc
0640: 72 69 70 74 73 0a 20 20 20 20 20 20 20 20 4d 61  ripts.        Ma
0650: 6b 65 66 69 6c 65 2e 69 6e 20 20 20 20 20 4d 61  kefile.in     Ma
0660: 6b 65 66 69 6c 65 20 6d 61 73 74 65 72 0a 20 20  kefile master.  
0670: 20 20 20 20 20 20 63 6f 6e 66 69 67 2e 68 2e 69        config.h.i
0680: 6e 20 20 20 20 20 63 6f 6e 66 69 67 2e 68 20 6d  n     config.h m
0690: 61 73 74 65 72 0a 0a 20 20 20 20 50 6f 72 74 69  aster..    Porti
06a0: 6e 67 3a 0a 0a 20 20 20 20 20 20 20 20 4d 61 6b  ng:..        Mak
06b0: 65 66 69 6c 65 2e 64 65 76 65 6c 20 20 64 65 76  efile.devel  dev
06c0: 65 6c 6f 70 65 72 27 73 20 4d 61 6b 65 66 69 6c  eloper's Makefil
06d0: 65 0a 20 20 20 20 20 20 20 20 75 6e 64 65 72 73  e.        unders
06e0: 63 6f 72 65 2e 68 20 20 20 20 75 73 65 64 20 74  core.h    used t
06f0: 6f 20 62 75 69 6c 64 20 74 68 65 20 2a 2e 53 20  o build the *.S 
0700: 66 69 6c 65 73 0a 0a 0a 54 68 65 20 63 75 72 72  files...The curr
0710: 65 6e 74 20 63 6f 64 65 20 69 73 20 75 6e 64 65  ent code is unde
0720: 72 20 74 68 65 20 47 4e 55 20 6c 69 63 65 6e 63  r the GNU licenc
0730: 65 2c 20 62 75 74 20 74 68 65 20 69 6e 74 65 72  e, but the inter
0740: 66 61 63 65 20 28 6d 61 63 72 6f 0a 6e 61 6d 65  face (macro.name
0750: 73 2c 20 61 72 67 75 6d 65 6e 74 73 20 26 20 66  s, arguments & f
0760: 75 6e 63 74 69 6f 6e 61 6c 69 74 79 20 62 75 74  unctionality but
0770: 20 6e 6f 74 20 74 68 65 20 61 63 74 75 61 6c 20   not the actual 
0780: 6d 61 63 72 6f 20 6f 72 20 66 75 6e 63 74 69 6f  macro or functio
0790: 6e 0a 63 6f 64 65 20 69 6e 20 61 76 63 61 6c 6c  n.code in avcall
07a0: 2e 5b 63 68 5d 29 20 69 73 20 61 62 73 6f 6c 75  .[ch]) is absolu
07b0: 74 65 6c 79 20 66 72 65 65 20 61 6e 64 20 61 6e  tely free and an
07c0: 79 20 70 6f 72 74 20 63 6f 6e 66 6f 72 6d 69 6e  y port conformin
07d0: 67 20 74 6f 20 69 74 20 69 73 0a 77 65 6c 63 6f  g to it is.welco
07e0: 6d 65 2e 0a 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  me...-----------
07f0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0800: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0810: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 42 69 6c 6c  -----------.Bill
0820: 20 54 72 69 67 67 73 20 20 20 20 20 20 20 20 20   Triggs         
0830: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7c 20                | 
0840: 42 69 6c 6c 2e 54 72 69 67 67 73 40 69 6e 72 69  Bill.Triggs@inri
0850: 61 6c 70 65 73 2e 66 72 0a 4f 78 66 6f 72 64 20  alpes.fr.Oxford 
0860: 55 6e 69 76 65 72 73 69 74 79 20 52 6f 62 6f 74  University Robot
0870: 69 63 73 20 47 72 6f 75 70 20 20 7c 20 42 69 6c  ics Group  | Bil
0880: 6c 2e 54 72 69 67 67 73 40 69 6d 61 67 2e 66 72  l.Triggs@imag.fr
0890: 0a 31 39 20 50 61 72 6b 73 20 52 64 2c 20 4f 78  .19 Parks Rd, Ox
08a0: 66 6f 72 64 20 4f 58 31 20 33 50 4a 2c 20 47 2e  ford OX1 3PJ, G.
08b0: 42 2e 20 7c 20 66 61 78 20 2b 34 34 2d 38 36 35  B. | fax +44-865
08c0: 2d 32 37 33 39 30 38 0a 2d 2d 2d 2d 2d 2d 2d 2d  -273908.--------
08d0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
08e0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
08f0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 42  --------------.B
0900: 72 75 6e 6f 20 48 61 69 62 6c 65 0a 3c 62 72 75  runo Haible.<bru
0910: 6e 6f 40 63 6c 69 73 70 2e 6f 72 67 3e 0a        no@clisp.org>.