#define KTYPE_IMP

#include "ldc1.hh"

tSORT_TBL sort_tbl= {  { 0, FALSE, NULL, NULL, NULL, NULL, NULL },
  { 1, TRUE, "bool", NULL, eqbool, dbool, NULL },
  { 2, TRUE, "nat", NULL, eqint, dint, NULL }
};

unsigned sort_tbl_size= 3;

static int _arg_buf[]= {  1, 2, 2, 2, 2, 2, 2
};

kdatum _eval_opn(_oid, _arg)
int _oid;
kdatum _arg[];
{
  return NULL;
}

tOPN_TBL opn_tbl= {  { 0, 0, 0, NULL, FALSE, FALSE, NULL, NULL },
  { 1, 1, 0, NULL, TRUE, FALSE, "true", (kdatum(*)())true },
  { 2, 1, 0, NULL, TRUE, FALSE, "false", (kdatum(*)())false },
  { 3, 1, 1, _arg_buf, TRUE, FALSE, "not", (kdatum(*)())not },
  { 4, 2, 0, NULL, TRUE, FALSE, "n0", (kdatum(*)())n0 },
  { 5, 2, 0, NULL, TRUE, FALSE, "n1", (kdatum(*)())n1 },
  { 6, 2, 0, NULL, TRUE, FALSE, "n2", (kdatum(*)())n2 },
  { 7, 2, 0, NULL, TRUE, FALSE, "n3", (kdatum(*)())n3 },
  { 8, 2, 2, _arg_buf + 1, TRUE, FALSE, "plus", (kdatum(*)())plus },
  { 9, 2, 2, _arg_buf + 3, TRUE, FALSE, "mod", (kdatum(*)())mod },
  { 10, 1, 2, _arg_buf + 5, TRUE, FALSE, "noteq", (kdatum(*)())noteq }
};

unsigned opn_tbl_size= 11;

void ldcinit()
{
bool_sort = ud_sort("bool");
int_sort = ud_sort("nat");
}
