Exemplo n.º 1
0
int main(int argc, char *argv[])
{
  if (argc<2) {
    printf("I need 2 arguments to add\n");
    return 1;
  }
  int x = atoi(argv[1]);
  int y = atoi(argv[2]);
  cl_boot(argc, argv);
  read_VV(OBJNULL, init_add);
  int sum = lisp_add(x, y);
  printf("%d\n", sum);
  cl_shutdown();
  return 0;
}
Exemplo n.º 2
0
static void initialize_ecl(void) 
{
	int fake_argc = 1;
	char *fake_argv[] = {"InternalPlugin", NULL};

	if (g_cl_booted == FALSE) {
		// Initialize ECL
		cl_boot(fake_argc, fake_argv);

		// Use the UFFI package before we do anything.
		cl_use_package(1, (cl_find_package(ecl_make_keyword("UFFI"))));

		// Initalize the Common Lisp plugin library.
		// Magic name is previously known 
		extern void I_libfoo(cl_object);
		read_VV(OBJNULL, I_libfoo);

		g_cl_booted = TRUE;
	}
}