/***********************************
  (C) Copyright 1992-1993; dit/upm
   Distributed under the conditions stated in the
   TOPO General Public License (see file LICENSE)
 ***********************************
 $Log: ocall.c,v $
 * Revision 1.1  1994/07/18  18:55:49  lotos
 * Initial revision
 *
 * Revision 1.3  1993/09/30  15:24:14  lotos
 * fix tool building procedures
 *
 * Revision 1.2  1993/09/30  15:05:49  lotos
 * fix version control
 *
 * Revision 1.1  1993/09/30  15:04:24  lotos
 * Initial revision
 *
 ***********************************/

#ifndef lint
static char rcsid1[]= "$Id: ocall.c,v 1.1 1994/07/18 18:55:49 lotos Exp $";
#endif

#define CMN_MAX_ARG 3

PRIVATE kdatum
ocall (func, argc, argv)
  kdatum (*func)();
  int argc;
  kdatum argv[];
{
  switch (argc)
  { case 0:
      return func();
    case 1:
      return func(argv[0]);
    case 2:
      return func(argv[0], argv[1]);
    case 3:
      return func(argv[0], argv[1], argv[2]);
    default:
      return NULL;
  }
}

