/* Copyright (c) 2001-2004 by SoftIntegration, Inc. All Rights Reserved */
#include <ch.h>
#include <stdlib.h>
#include "retstruct.h"

EXPORTCH void retstruct_chdl(void *varg) {
  ChInterp_t interp;
  ChVaList_t ap;

  int i;
  short *sptr;
  double d;
  struct tag_t *ps;
  struct tag_t *pretval;

  Ch_VaStart(interp, ap, varg);
  pretval = Ch_VaArg(interp, ap, struct tag_t *);
  i = Ch_VaArg(interp, ap, int);   
  sptr = Ch_VaArg(interp, ap, short *);   
  d = Ch_VaArg(interp, ap, double);   
  ps = Ch_VaArg(interp, ap, struct tag_t *);   

  *pretval = retstruct(i, sptr, d, ps); 

  Ch_VaEnd(interp, ap);
}
