/* Copyright (c) 2001-2009 by SoftIntegration, Inc. All Rights Reserved */
#include <sample.h>
#include <ch.h>

EXPORTCH double func1_chdl(void *varg) {
    ChInterp_t interp;
    ChVaList_t ap;
    double x;
    double retval;

    Ch_VaStart(interp, ap, varg);
    x = Ch_VaArg(interp, ap, double);
    retval = func1(x);
    Ch_VaEnd(interp, ap);
    return retval;
}

EXPORTCH double func2_chdl(void *varg) {
    ChInterp_t interp;
    ChVaList_t ap;
    double x;
    double y;
    double retval;

    Ch_VaStart(interp, ap, varg);
    x = Ch_VaArg(interp, ap, double);
    y = Ch_VaArg(interp, ap, double);
    retval = func2(x, y);
    Ch_VaEnd(interp, ap);
    return retval;
}

/*
EXPORTCH TAG func3_chdl(void *varg) {
    ChInterp_t interp;
    ChVaList_t ap;
    int n;
    TAG retval;

    Ch_VaStart(interp, ap, varg);
    n = Ch_VaArg(interp, ap, int);
    retval = func3(n);
    Ch_VaEnd(interp, ap);
    return retval;
}

*/
/*
EXPORTCH TAG func4_chdl(void *varg) {
    ChInterp_t interp;
    ChVaList_t ap;
    int n;
    TAG retval;

    Ch_VaStart(interp, ap, varg);
    n = Ch_VaArg(interp, ap, int);
    retval = func4(n);
    Ch_VaEnd(interp, ap);
    return retval;
}

*/
/*
EXPORTCH int func5_chdl(void *varg) {
    ChInterp_t interp;
    ChVaList_t ap;
    FUNPTR fp;
    int n;
    int retval;

    Ch_VaStart(interp, ap, varg);
    fp = Ch_VaArg(interp, ap, FUNPTR);
    n = Ch_VaArg(interp, ap, int);
    retval = func5(fp, n);
    Ch_VaEnd(interp, ap);
    return retval;
}
*/
