/* Copyright (c) 2001-2009 by SoftIntegration, Inc. All Rights Reserved */
/*****************************************
 * function handle with no arguments and return value
 ******************************************/
#include <math.h>
#include "ptfun1_1.h"

void ptfun1_1() {
  printf("# Ch function ptfun1_1() in ptfun1.ch is called \n\n");
  return;
}

void ptfun1_2() {
  printf("# Ch funtion ptfun1_2() in ptfun1.ch is called\n");
  return;
}

int main() {
  funcHandle  handle;

  ptfun1_1_setHandle(ptfun1_1);   /* set function pointer */
  handle = ptfun1_1_getHandle();   /* get Ch function pointer */
  handle();   /* call function by function pointer */

  ptfun1_1_setHandle(ptfun1_2);   /* set another function pointer */
  ptfun1_1_getHandle()(); /* get function pointer and call the function */

  return 0;
}
