Artifact
ef07171270e4dbb21ef3554a96ac03741d53be69:
0000: 63 61 6c 6c 62 61 63 6b 20 2d 20 63 6c 6f 73 75 callback - closu
0010: 72 65 73 20 77 69 74 68 20 76 61 72 69 61 62 6c res with variabl
0020: 65 20 61 72 67 75 6d 65 6e 74 73 20 61 73 20 66 e arguments as f
0030: 69 72 73 74 2d 63 6c 61 73 73 20 43 20 66 75 6e irst-class C fun
0040: 63 74 69 6f 6e 73 0a 0a 54 68 69 73 20 6c 69 62 ctions..This lib
0050: 72 61 72 79 20 69 6d 70 6c 65 6d 65 6e 74 73 20 rary implements
0060: 63 6c 6f 73 75 72 65 73 20 77 69 74 68 20 76 61 closures with va
0070: 72 69 61 62 6c 65 20 61 72 67 75 6d 65 6e 74 73 riable arguments
0080: 20 61 6e 64 20 76 61 72 69 61 62 6c 65 20 72 65 and variable re
0090: 74 75 72 6e 0a 76 61 6c 75 65 73 20 61 73 20 66 turn.values as f
00a0: 69 72 73 74 2d 63 6c 61 73 73 20 43 20 66 75 6e irst-class C fun
00b0: 63 74 69 6f 6e 73 2e 20 41 20 63 6c 6f 73 75 72 ctions. A closur
00c0: 65 20 63 6f 6e 73 69 73 74 73 20 6f 66 20 61 20 e consists of a
00d0: 72 65 67 75 6c 61 72 20 43 20 66 75 6e 63 74 69 regular C functi
00e0: 6f 6e 0a 61 6e 64 20 61 20 70 69 65 63 65 20 6f on.and a piece o
00f0: 66 20 64 61 74 61 20 77 68 69 63 68 20 67 65 74 f data which get
0100: 73 20 70 61 73 73 65 64 20 74 6f 20 74 68 65 20 s passed to the
0110: 43 20 66 75 6e 63 74 69 6f 6e 20 77 68 65 6e 20 C function when
0120: 74 68 65 20 63 6c 6f 73 75 72 65 20 69 73 0a 63 the closure is.c
0130: 61 6c 6c 65 64 2e 0a 0a 54 68 69 73 20 6c 69 62 alled...This lib
0140: 72 61 72 79 20 69 73 20 65 73 70 65 63 69 61 6c rary is especial
0150: 6c 79 20 73 75 69 74 65 64 20 74 6f 20 74 68 65 ly suited to the
0160: 20 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 20 implementation
0170: 6f 66 20 63 61 6c 6c 2d 62 61 63 6b 20 66 75 6e of call-back fun
0180: 63 74 69 6f 6e 73 0a 69 6e 20 65 6d 62 65 64 64 ctions.in embedd
0190: 65 64 20 69 6e 74 65 72 70 72 65 74 65 72 73 2e ed interpreters.
01a0: 0a 0a 0a 49 6e 73 74 61 6c 6c 61 74 69 6f 6e 20 ...Installation
01b0: 69 6e 73 74 72 75 63 74 69 6f 6e 73 3a 0a 0a 20 instructions:..
01c0: 20 20 20 20 20 20 20 2e 2f 63 6f 6e 66 69 67 75 ./configu
01d0: 72 65 0a 20 20 20 20 20 20 20 20 6d 61 6b 65 0a re. make.
01e0: 20 20 20 20 20 20 20 20 6d 61 6b 65 20 63 68 65 make che
01f0: 63 6b 0a 20 20 20 20 20 20 20 20 6d 61 6b 65 20 ck. make
0200: 69 6e 73 74 61 6c 6c 0a 0a 0a 46 69 6c 65 73 20 install...Files
0210: 69 6e 20 74 68 69 73 20 70 61 63 6b 61 67 65 3a in this package:
0220: 0a 0a 20 20 20 20 44 6f 63 75 6d 65 6e 74 61 74 .. Documentat
0230: 69 6f 6e 3a 0a 0a 20 20 20 20 20 20 20 20 52 45 ion:.. RE
0240: 41 44 4d 45 20 20 20 20 20 20 20 20 20 20 74 68 ADME th
0250: 69 73 20 74 65 78 74 0a 20 20 20 20 20 20 20 20 is text.
0260: 43 4f 50 59 49 4e 47 20 20 20 20 20 20 20 20 20 COPYING
0270: 66 72 65 65 20 73 6f 66 74 77 61 72 65 20 6c 69 free software li
0280: 63 65 6e 73 65 0a 20 20 20 20 20 20 20 20 50 4c cense. PL
0290: 41 54 46 4f 52 4d 53 20 20 20 20 20 20 20 6c 69 ATFORMS li
02a0: 73 74 20 6f 66 20 73 75 70 70 6f 72 74 65 64 20 st of supported
02b0: 70 6c 61 74 66 6f 72 6d 73 0a 20 20 20 20 20 20 platforms.
02c0: 20 20 4d 49 47 52 41 54 49 4f 4e 20 20 20 20 20 MIGRATION
02d0: 20 20 6d 69 67 72 61 74 69 6f 6e 20 67 75 69 64 migration guid
02e0: 65 20 66 72 6f 6d 20 76 61 63 61 6c 6c 2b 74 72 e from vacall+tr
02f0: 61 6d 70 6f 6c 69 6e 65 0a 20 20 20 20 20 20 20 ampoline.
0300: 20 63 61 6c 6c 62 61 63 6b 2e 33 20 20 20 20 20 callback.3
0310: 20 6d 61 6e 75 61 6c 20 70 61 67 65 20 69 6e 20 manual page in
0320: 55 6e 69 78 20 6d 61 6e 20 66 6f 72 6d 61 74 0a Unix man format.
0330: 20 20 20 20 20 20 20 20 63 61 6c 6c 62 61 63 6b callback
0340: 2e 6d 61 6e 20 20 20 20 6d 61 6e 75 61 6c 20 70 .man manual p
0350: 61 67 65 0a 20 20 20 20 20 20 20 20 63 61 6c 6c age. call
0360: 62 61 63 6b 2e 68 74 6d 6c 20 20 20 6d 61 6e 75 back.html manu
0370: 61 6c 20 70 61 67 65 20 69 6e 20 48 54 4d 4c 20 al page in HTML
0380: 66 6f 72 6d 61 74 0a 0a 20 20 20 20 53 6f 75 72 format.. Sour
0390: 63 65 3a 0a 0a 20 20 20 20 20 20 20 20 63 61 6c ce:.. cal
03a0: 6c 62 61 63 6b 2e 68 20 20 20 20 20 20 69 6e 63 lback.h inc
03b0: 6c 75 64 65 20 66 69 6c 65 0a 20 20 20 20 20 20 lude file.
03c0: 20 20 74 65 73 74 73 2e 63 20 20 20 20 20 20 20 tests.c
03d0: 20 20 74 65 73 74 20 70 72 6f 67 72 61 6d 0a 20 test program.
03e0: 20 20 20 20 20 20 20 76 61 63 61 6c 6c 5f 72 2f vacall_r/
03f0: 2a 20 20 20 20 20 20 61 20 72 65 65 6e 74 72 61 * a reentra
0400: 6e 74 20 76 65 72 73 69 6f 6e 20 6f 66 20 74 68 nt version of th
0410: 65 20 76 61 63 61 6c 6c 20 70 61 63 6b 61 67 65 e vacall package
0420: 0a 20 20 20 20 20 20 20 20 74 72 61 6d 70 6f 6c . trampol
0430: 69 6e 65 5f 72 2f 2a 20 20 61 20 72 65 65 6e 74 ine_r/* a reent
0440: 72 61 6e 74 20 76 65 72 73 69 6f 6e 20 6f 66 20 rant version of
0450: 74 68 65 20 74 72 61 6d 70 6f 6c 69 6e 65 20 70 the trampoline p
0460: 61 63 6b 61 67 65 0a 0a 20 20 20 20 49 6e 73 74 ackage.. Inst
0470: 61 6c 6c 61 74 69 6f 6e 3a 0a 0a 20 20 20 20 20 allation:..
0480: 20 20 20 63 6f 6e 66 69 67 75 72 65 20 20 20 20 configure
0490: 20 20 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e configuration
04a0: 20 73 63 72 69 70 74 0a 20 20 20 20 20 20 20 20 script.
04b0: 63 6f 6e 66 69 67 75 72 65 2e 69 6e 20 20 20 20 configure.in
04c0: 61 75 74 6f 63 6f 6e 66 2d 32 2e 31 32 20 73 6f autoconf-2.12 so
04d0: 75 72 63 65 20 66 6f 72 20 74 68 65 20 63 6f 6e urce for the con
04e0: 66 69 67 75 72 61 74 69 6f 6e 20 73 63 72 69 70 figuration scrip
04f0: 74 0a 20 20 20 20 20 20 20 20 2e 2e 2f 61 75 74 t. ../aut
0500: 6f 63 6f 6e 66 2f 2a 20 20 20 61 75 78 69 6c 69 oconf/* auxili
0510: 61 72 79 20 63 6f 6e 66 69 67 75 72 61 74 69 6f ary configuratio
0520: 6e 20 73 63 72 69 70 74 73 0a 20 20 20 20 20 20 n scripts.
0530: 20 20 4d 61 6b 65 66 69 6c 65 2e 69 6e 20 20 20 Makefile.in
0540: 20 20 4d 61 6b 65 66 69 6c 65 20 6d 61 73 74 65 Makefile maste
0550: 72 0a 0a 20 20 20 20 50 6f 72 74 69 6e 67 3a 0a r.. Porting:.
0560: 0a 20 20 20 20 20 20 20 20 4d 61 6b 65 66 69 6c . Makefil
0570: 65 2e 64 65 76 65 6c 20 20 64 65 76 65 6c 6f 70 e.devel develop
0580: 65 72 27 73 20 4d 61 6b 65 66 69 6c 65 0a 20 20 er's Makefile.
0590: 20 20 20 20 20 20 63 61 6c 6c 2d 75 73 65 64 2d call-used-
05a0: 72 65 67 69 73 74 65 72 73 20 20 74 61 62 6c 65 registers table
05b0: 20 6f 66 20 63 61 6c 6c 2d 75 73 65 64 20 72 65 of call-used re
05c0: 67 69 73 74 65 72 73 20 6f 6e 20 64 69 66 66 65 gisters on diffe
05d0: 72 65 6e 74 20 43 50 55 73 0a 0a 0a 43 6f 70 79 rent CPUs...Copy
05e0: 72 69 67 68 74 20 6e 6f 74 69 63 65 3a 0a 0a 43 right notice:..C
05f0: 6f 70 79 72 69 67 68 74 20 31 39 39 35 20 42 72 opyright 1995 Br
0600: 75 6e 6f 20 48 61 69 62 6c 65 2c 20 3c 62 72 75 uno Haible, <bru
0610: 6e 6f 40 63 6c 69 73 70 2e 6f 72 67 3e 0a 0a 54 no@clisp.org>..T
0620: 68 69 73 20 69 73 20 66 72 65 65 20 73 6f 66 74 his is free soft
0630: 77 61 72 65 20 64 69 73 74 72 69 62 75 74 65 64 ware distributed
0640: 20 75 6e 64 65 72 20 74 68 65 20 47 4e 55 20 47 under the GNU G
0650: 65 6e 65 72 61 6c 20 50 75 62 6c 69 63 20 4c 69 eneral Public Li
0660: 63 65 6e 63 65 0a 64 65 73 63 72 69 62 65 64 20 cence.described
0670: 69 6e 20 74 68 65 20 66 69 6c 65 20 43 4f 50 59 in the file COPY
0680: 49 4e 47 2e 20 43 6f 6e 74 61 63 74 20 74 68 65 ING. Contact the
0690: 20 61 75 74 68 6f 72 20 69 66 20 79 6f 75 20 64 author if you d
06a0: 6f 6e 27 74 20 68 61 76 65 20 74 68 69 73 0a 6f on't have this.o
06b0: 72 20 63 61 6e 27 74 20 6c 69 76 65 20 77 69 74 r can't live wit
06c0: 68 20 69 74 2e 20 54 68 65 72 65 20 69 73 20 41 h it. There is A
06d0: 42 53 4f 4c 55 54 45 4c 59 20 4e 4f 20 57 41 52 BSOLUTELY NO WAR
06e0: 52 41 4e 54 59 2c 20 65 78 70 6c 69 63 69 74 20 RANTY, explicit
06f0: 6f 72 20 69 6d 70 6c 69 65 64 2c 0a 6f 6e 20 74 or implied,.on t
0700: 68 69 73 20 73 6f 66 74 77 61 72 65 2e 0a 0a 0a his software....
0710: 42 72 75 6e 6f 20 48 61 69 62 6c 65 0a 3c 62 72 Bruno Haible.<br
0720: 75 6e 6f 40 63 6c 69 73 70 2e 6f 72 67 3e 0a 0a uno@clisp.org>..