/* Generated by oblink */

#include "primtab.h"
#include <stdio.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

type_V xmain_exit(type_I);

value *P_xmain_exit(value *bp) {
     value *sp = bp;
     FPINIT;
     res_V(xmain_exit(arg_I(0)));
     return sp;
}

value *NEW(value *bp);

value *NEWFLEX(value *bp);

value *COMPARE(value *bp);

type_C toupper(type_C);

value *P_toupper(value *bp) {
     value *sp = bp;
     FPINIT;
     res_C(toupper(arg_C(0)));
     return sp;
}

value *COPY(value *bp);

value *FLEXASSIGN(value *bp);

value *EASSERT(value *bp);

value *sys_move(value *bp);

value *sys_liberror(value *bp);

type_V load_lib(type_X);

value *P_load_lib(value *bp) {
     value *sp = bp;
     FPINIT;
     res_V(load_lib(arg_X(0)));
     return sp;
}

value *gc_collect(value *bp);

type_V gc_debug(type_X);

value *P_gc_debug(value *bp) {
     value *sp = bp;
     FPINIT;
     res_V(gc_debug(arg_X(0)));
     return sp;
}

type_I gc_heap_size(void);

value *P_gc_heap_size(value *bp) {
     value *sp = bp;
     FPINIT;
     res_I(gc_heap_size());
     return sp;
}

value *P_fopen(value *bp) {
     value *sp = bp;
     FPINIT;
     res_Q(fopen(arg_X(0), arg_X(2)));
     return sp;
}

value *P_fdopen(value *bp) {
     value *sp = bp;
     FPINIT;
     res_Q(fdopen(arg_I(0), arg_X(1)));
     return sp;
}

value *P_fclose(value *bp) {
     value *sp = bp;
     FPINIT;
     res_V(fclose(arg_Q(0)));
     return sp;
}

value *P_fflush(value *bp) {
     value *sp = bp;
     FPINIT;
     res_V(fflush(arg_Q(0)));
     return sp;
}

type_I obgetc(type_Q);

value *P_obgetc(value *bp) {
     value *sp = bp;
     FPINIT;
     res_I(obgetc(arg_Q(0)));
     return sp;
}

value *P_ungetc(value *bp) {
     value *sp = bp;
     FPINIT;
     res_V(ungetc(arg_C(0), arg_Q(1)));
     return sp;
}

value *P_fputc(value *bp) {
     value *sp = bp;
     FPINIT;
     res_V(fputc(arg_C(0), arg_Q(1)));
     return sp;
}

value *P_fseek(value *bp) {
     value *sp = bp;
     FPINIT;
     res_V(fseek(arg_Q(0), arg_I(2), arg_I(3)));
     return sp;
}

value *P_ftell(value *bp) {
     value *sp = bp;
     FPINIT;
     res_I(ftell(arg_Q(0)));
     return sp;
}

value *P_fread(value *bp) {
     value *sp = bp;
     FPINIT;
     res_I(fread(arg_X(0), arg_I(2), arg_I(3), arg_Q(4)));
     return sp;
}

value *P_fwrite(value *bp) {
     value *sp = bp;
     FPINIT;
     res_V(fwrite(arg_X(0), arg_I(2), arg_I(3), arg_Q(4)));
     return sp;
}

type_V FmtInt(type_Q, type_I, type_I);

value *P_FmtInt(value *bp) {
     value *sp = bp;
     FPINIT;
     res_V(FmtInt(arg_Q(0), arg_I(2), arg_I(3)));
     return sp;
}

type_V FmtLong(type_Q, type_L, type_I);

value *P_FmtLong(value *bp) {
     value *sp = bp;
     FPINIT;
     res_V(FmtLong(arg_Q(0), arg_L(2), arg_I(4)));
     return sp;
}

type_V FmtReal(type_Q, type_F);

value *P_FmtReal(value *bp) {
     value *sp = bp;
     FPINIT;
     res_V(FmtReal(arg_Q(0), arg_F(2)));
     return sp;
}

type_V FmtLongReal(type_Q, type_D);

value *P_FmtLongReal(value *bp) {
     value *sp = bp;
     FPINIT;
     res_V(FmtLongReal(arg_Q(0), arg_D(2)));
     return sp;
}

type_V FmtFixed(type_Q, type_D, type_I, type_I);

value *P_FmtFixed(value *bp) {
     value *sp = bp;
     FPINIT;
     res_V(FmtFixed(arg_Q(0), arg_D(2), arg_I(4), arg_I(5)));
     return sp;
}

type_V FmtString(type_Q, type_X, type_I);

value *P_FmtString(value *bp) {
     value *sp = bp;
     FPINIT;
     res_V(FmtString(arg_Q(0), arg_X(2), arg_I(4)));
     return sp;
}

type_V InitFiles(type_P, type_P, type_P);

value *P_InitFiles(value *bp) {
     value *sp = bp;
     FPINIT;
     res_V(InitFiles(arg_P(0), arg_P(1), arg_P(2)));
     return sp;
}

value *GetArg(value *bp);

value *GetEnv(value *bp);

type_I GetArgc(void);

value *P_GetArgc(value *bp) {
     value *sp = bp;
     FPINIT;
     res_I(GetArgc());
     return sp;
}

value *P_unlink(value *bp) {
     value *sp = bp;
     FPINIT;
     res_I(unlink(arg_X(0)));
     return sp;
}

#ifndef DYNLINK
struct primdef primtab[] = {
     { "P_xmain_exit", P_xmain_exit },
     { "NEW", NEW },
     { "NEWFLEX", NEWFLEX },
     { "COMPARE", COMPARE },
     { "P_toupper", P_toupper },
     { "COPY", COPY },
     { "FLEXASSIGN", FLEXASSIGN },
     { "EASSERT", EASSERT },
     { "sys_move", sys_move },
     { "sys_liberror", sys_liberror },
     { "P_load_lib", P_load_lib },
     { "gc_collect", gc_collect },
     { "P_gc_debug", P_gc_debug },
     { "P_gc_heap_size", P_gc_heap_size },
     { "P_fopen", P_fopen },
     { "P_fdopen", P_fdopen },
     { "P_fclose", P_fclose },
     { "P_fflush", P_fflush },
     { "P_obgetc", P_obgetc },
     { "P_ungetc", P_ungetc },
     { "P_fputc", P_fputc },
     { "P_fseek", P_fseek },
     { "P_ftell", P_ftell },
     { "P_fread", P_fread },
     { "P_fwrite", P_fwrite },
     { "P_FmtInt", P_FmtInt },
     { "P_FmtLong", P_FmtLong },
     { "P_FmtReal", P_FmtReal },
     { "P_FmtLongReal", P_FmtLongReal },
     { "P_FmtFixed", P_FmtFixed },
     { "P_FmtString", P_FmtString },
     { "P_InitFiles", P_InitFiles },
     { "GetArg", GetArg },
     { "GetEnv", GetEnv },
     { "P_GetArgc", P_GetArgc },
     { "P_unlink", P_unlink },
     { NULL, NULL }
};
#endif
