Back to index

plt-scheme  4.2.1
Classes | Defines | Typedefs | Functions | Variables
foreign-test.c File Reference
#include <stdlib.h>

Go to the source code of this file.

Classes

struct  _char_int

Defines

#define X

Typedefs

typedef unsigned char byte
typedef struct _char_int char_int

Functions

X int add1_int_int (int x)
X int add1_byte_int (byte x)
X byte add1_int_byte (int x)
X byte add1_byte_byte (byte x)
X int decimal_int_int_int (int x, int y)
X int decimal_byte_int_int (byte x, int y)
X int decimal_int_byte_int (int x, byte y)
X int decimal_byte_byte_int (byte x, byte y)
X byte decimal_int_int_byte (int x, int y)
X byte decimal_byte_int_byte (byte x, int y)
X byte decimal_int_byte_byte (int x, byte y)
X byte decimal_byte_byte_byte (byte x, byte y)
X int callback3_int_int_int (int(*f)(int))
X int callback3_byte_int_int (int(*f)(byte))
X int callback3_int_byte_int (byte(*f)(int))
X int callback3_byte_byte_int (byte(*f)(byte))
X byte callback3_int_int_byte (int(*f)(int))
X byte callback3_byte_int_byte (int(*f)(byte))
X byte callback3_int_byte_byte (byte(*f)(int))
X byte callback3_byte_byte_byte (byte(*f)(byte))
X int curry_ret_int_int (int x)
X int curry_ret_byte_int (byte x)
X byte curry_ret_int_byte (int x)
X byte curry_ret_byte_byte (byte x)
X voidcurry_int_int_int (int x)
X voidcurry_byte_int_int (byte x)
X voidcurry_int_byte_int (int x)
X voidcurry_byte_byte_int (byte x)
X voidcurry_int_int_byte (int x)
X voidcurry_byte_int_byte (byte x)
X voidcurry_int_byte_byte (int x)
X voidcurry_byte_byte_byte (byte x)
X int ho_return (int x)
X voidho (int(*f)(int), int x)
X int use_g3 (int x)
X int hoho (int x, int(*(*f)(int))(int))
X int grab7th (void *p)
X int vec4 (int x[])
X int charint_to_int (char_int x)
X char_int int_to_charint (int x)
X char_int charint_swap (char_int x)
X void grab_callback (int(*f)(int))
X int use_grabbed_callback (int n)

Variables

X int g1
X int g2
X voidg3 = NULL
int(* grabbed_callback )(int) = NULL

Class Documentation

struct _char_int

Definition at line 63 of file foreign-test.c.

Class Members
unsigned char a
int b

Define Documentation

#define X

Definition at line 8 of file foreign-test.c.


Typedef Documentation

typedef unsigned char byte

Definition at line 3 of file foreign-test.c.


Function Documentation

Definition at line 14 of file foreign-test.c.

{ return x + 1; }

Definition at line 12 of file foreign-test.c.

{ return x + 1; }

Definition at line 13 of file foreign-test.c.

{ return x + 1; }

Definition at line 11 of file foreign-test.c.

{ return x + 1; }

Definition at line 31 of file foreign-test.c.

{ return f(3); }

Definition at line 27 of file foreign-test.c.

{ return f(3); }

Definition at line 29 of file foreign-test.c.

{ return f(3); }

Definition at line 25 of file foreign-test.c.

{ return f(3); }

Definition at line 30 of file foreign-test.c.

{ return f(3); }

Definition at line 26 of file foreign-test.c.

{ return f(3); }

Definition at line 28 of file foreign-test.c.

{ return f(3); }

Definition at line 24 of file foreign-test.c.

{ if (f) return f(3); else return 79; }

Definition at line 71 of file foreign-test.c.

                                    {
  char_int result;
  result.a = (unsigned char)x.b;
  result.b = (int)x.a;
  return result;
}

Definition at line 64 of file foreign-test.c.

{ return ((int)x.a) + x.b; }

Definition at line 45 of file foreign-test.c.

{ g1 = x; return &curry_ret_byte_byte; }

Here is the call graph for this function:

Definition at line 41 of file foreign-test.c.

{ g1 = x; return &curry_ret_byte_int;  }

Here is the call graph for this function:

Definition at line 43 of file foreign-test.c.

{ g1 = x; return &curry_ret_int_byte;  }

Here is the call graph for this function:

Definition at line 39 of file foreign-test.c.

{ g1 = x; return &curry_ret_int_int;   }

Here is the call graph for this function:

Definition at line 44 of file foreign-test.c.

{ g1 = x; return &curry_ret_byte_byte; }

Here is the call graph for this function:

Definition at line 40 of file foreign-test.c.

{ g1 = x; return &curry_ret_byte_int;  }

Here is the call graph for this function:

Definition at line 42 of file foreign-test.c.

{ g1 = x; return &curry_ret_int_byte;  }

Here is the call graph for this function:

Definition at line 38 of file foreign-test.c.

{ g1 = x; return &curry_ret_int_int;   }

Here is the call graph for this function:

Definition at line 37 of file foreign-test.c.

{ return g1 + x; }

Here is the caller graph for this function:

Definition at line 35 of file foreign-test.c.

{ return g1 + x; }

Here is the caller graph for this function:

Definition at line 36 of file foreign-test.c.

{ return g1 + x; }

Here is the caller graph for this function:

Definition at line 34 of file foreign-test.c.

{ return g1 + x; }

Here is the caller graph for this function:

Definition at line 22 of file foreign-test.c.

{ return 10*x + y; }

Definition at line 18 of file foreign-test.c.

{ return 10*x + y; }

Definition at line 20 of file foreign-test.c.

{ return 10*x + y; }
X int decimal_byte_int_int ( byte  x,
int  y 
)

Definition at line 16 of file foreign-test.c.

{ return 10*x + y; }

Definition at line 21 of file foreign-test.c.

{ return 10*x + y; }
X int decimal_int_byte_int ( int  x,
byte  y 
)

Definition at line 17 of file foreign-test.c.

{ return 10*x + y; }
X byte decimal_int_int_byte ( int  x,
int  y 
)

Definition at line 19 of file foreign-test.c.

{ return 10*x + y; }
X int decimal_int_int_int ( int  x,
int  y 
)

Definition at line 15 of file foreign-test.c.

{ return 10*x + y; }
X int grab7th ( void p)

Definition at line 59 of file foreign-test.c.

{ return ((char *)p)[7]; }
X void grab_callback ( int(*)(int f)

Definition at line 79 of file foreign-test.c.

X void* ho ( int(*)(int f,
int  x 
)

Definition at line 49 of file foreign-test.c.

{ g2 = f(x); return ho_return; }

Here is the call graph for this function:

X int ho_return ( int  x)

Definition at line 48 of file foreign-test.c.

{ return g2 + x; }

Here is the caller graph for this function:

X int hoho ( int  x,
int(*(*f)(int))(int  
)

Definition at line 57 of file foreign-test.c.

{ return (f(x+1))(x-1); }

Definition at line 65 of file foreign-test.c.

                                 {
  char_int result;
  result.a = (unsigned char)x;
  result.b = x;
  return result;
}
X int use_g3 ( int  x)

Definition at line 52 of file foreign-test.c.

{ return ((int(*)(int))g3)(x); }

Definition at line 80 of file foreign-test.c.

{ return grabbed_callback(n); }
X int vec4 ( int  x[])

Definition at line 61 of file foreign-test.c.

{ return x[0]+x[1]+x[2]+x[3]; }

Variable Documentation

X int g1

Definition at line 33 of file foreign-test.c.

X int g2

Definition at line 47 of file foreign-test.c.

X void* g3 = NULL

Definition at line 51 of file foreign-test.c.

Definition at line 78 of file foreign-test.c.