Back to index

cell-binutils  2.17cvs20070401
Classes | Functions | Variables
client.c File Reference
#include <stdio.h>

Go to the source code of this file.

Classes

struct  TEST

Functions

void print_var (void)
void print_foo (void)
int main (void)

Variables

int var
void(* func_ptr )(void)
int foo
int var2 [2]
TEST xyz = { &var, print_var }

Function Documentation

int main ( void  )

Definition at line 20 of file client.c.

{
  print_var ();

  printf ("We see var = %d\n", var);
  printf ("Setting var = 456\n");

  var = 456;

  print_var ();
  printf ("We see var = %d\n\n", var);

  var = 90;
  print_var ();
  printf ("We see var = %d\n\n", var);

  print_foo ();
  printf ("We see foo = %d\n", foo);
  printf ("Setting foo = 19\n");
  foo = 19;
  print_foo ();
  printf ("We see foo = %d\n\n", foo);
  fflush (stdout);

  printf ("Calling dllimported function pointer\n");
  func_ptr ();

  printf ("Calling functions using global structure\n"); 
  xyz.func_ptr ();
  * xyz.var = 40;
  xyz.func_ptr ();

  printf ("We see var2[0] = %d\n\n", var2[0]);

  return 0;
}

Here is the call graph for this function:

void print_foo ( void  )

Definition at line 15 of file dll.c.

{
  printf ("DLL sees foo = %d\n", foo);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void print_var ( void  )

Definition at line 9 of file dll.c.

{
  printf ("DLL sees var = %d\n", var);
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

Definition at line 7 of file bar.c.

{
  printf ("strong foo\n");
}
void(* func_ptr)(void)

Definition at line 20 of file dll.c.

Definition at line 1 of file dll.c.

int var2[2]

Definition at line 4 of file dll.c.

TEST xyz = { &var, print_var }

Definition at line 17 of file client.c.