/* Collection of code snippets by Arne Vajhøj */
/* (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) */
#include <stdlib.h>

#include "demolib.h"

#ifdef WIN
#define EXTERNAL(t) __declspec(dllexport) t __stdcall
#else
#ifdef NIX
#define EXTERNAL(t) t
#else
#ifdef VMS
#define EXTERNAL(t) t
#else
#error "Platform not supported or not specified"
#endif
#endif
#endif

EXTERNAL(int) std_add(int a, int b)
{
    return add(a, b);
}

EXTERNAL(int) std_sum(int n, int *a)
{
    return sum(n, a);
}

EXTERNAL(char *) std_dup(char *s)
{
    return dup(s);
}

EXTERNAL(void) std_get_out(int *iv, char **sv)
{
    get_out(iv, sv);
}

EXTERNAL(struct Data1 *) std_get_ret()
{
    return get_ret();
}

EXTERNAL(void) std_chg(struct Data2 *d)
{
    chg(d);
}

EXTERNAL(void) std_free(char *s)
{
    free(s);
}
