Exemplo n.º 1
0
int
emacs_module_init(struct emacs_runtime *ert)
{
	emacs_env *env = ert->get_environment(ert);

#define DEFUN(lsym, csym, amin, amax, doc, data) \
	bind_function (env, lsym, env->make_function(env, amin, amax, csym, doc, data))

	DEFUN("mecab-core-new", Fmecab_new, 1, 1, NULL, NULL);
	DEFUN("mecab-core-sparse-to-string", Fmecab_sparse_to_string, 3, 3, NULL, NULL);
	DEFUN("mecab-core-sparse-to-list", Fmecab_sparse_to_list, 3, 3, NULL, NULL);

#undef DEFUN

	provide(env, "mecab-core");
	return 0;
}
Exemplo n.º 2
0
/* Module init function.  */
int
emacs_module_init (struct emacs_runtime *ert)
{
  emacs_env *env = ert->get_environment (ert);

#define DEFUN(lsym, csym, amin, amax, doc, data)        \
  bind_function (env, lsym, \
                 env->make_function (env, amin, amax, csym, doc, data))

  DEFUN ("taglib-core-return-t", Ftaglib_core_return_t, 0, 0,
         "Always return t (for testing).", NULL);
  DEFUN ("taglib-core-tag-title", Ftaglib_core_tag_title, 1, 1,
         "Get Title from file.", NULL);

#undef DEFUN

  provide (env, "taglib-core");
  return 0;
}
Exemplo n.º 3
0
int
emacs_module_init(struct emacs_runtime *ert)
{
	emacs_env *env = ert->get_environment(ert);

#define DEFUN(lsym, csym, amin, amax, doc, data) \
	bind_function(env, lsym, env->make_function(env, amin, amax, csym, doc, data))

	DEFUN("qrencode-encode", Fqrencode_encode, 2, 2, "Encode string to QRCode", NULL);

#undef DEFUN

	provide(env, "qrencode-core");
	return 0;
}
Exemplo n.º 4
0
void builtin_defall(struct env *env) {
#define DEFUN(sym, fn) define_primitive(env, sym, &fn)
  DEFUN("number?", fn_number_p);
  DEFUN("pair?", fn_pair_p);
  DEFUN("vector?", fn_vector_p);
  DEFUN("symbol?", fn_symbol_p);
  DEFUN("string?", fn_string_p);
  DEFUN("procedure?", fn_procedure_p);
  DEFUN("+", fn_add);
  DEFUN("-", fn_sub);
  DEFUN("*", fn_mul);
  DEFUN("div", fn_div);
  DEFUN("mod", fn_mod);
  DEFUN(">", fn_gt);
  DEFUN("=", fn_eq);
  DEFUN("eq?", fn_eq_p);
  DEFUN("cons", fn_cons);
  DEFUN("car", fn_car);
  DEFUN("cdr", fn_cdr);
  DEFUN("make-vector", fn_make_vector);
  DEFUN("vector-length", fn_vector_length);
  DEFUN("vector-ref", fn_vector_ref);
  DEFUN("vector-set!", fn_vector_set);
  DEFUN("eval", fn_eval);
  DEFUN("expand", fn_expand);
  DEFUN("about", fn_about);
#undef DEFUN
}
Exemplo n.º 5
0
/* Module init function.  */
int
emacs_module_init (struct emacs_runtime *ert)
{
  emacs_env *env = ert->get_environment (ert);

#define DEFUN(lsym, csym, amin, amax, doc, data) \
  bind_function (env, lsym, \
		 env->make_function (env, amin, amax, csym, doc, data))

  DEFUN ("mod-test-return-t", Fmod_test_return_t, 1, 1, NULL, NULL);
  DEFUN ("mod-test-sum", Fmod_test_sum, 2, 2, "Return A + B\n\n(fn a b)", NULL);
  DEFUN ("mod-test-signal", Fmod_test_signal, 0, 0, NULL, NULL);
  DEFUN ("mod-test-throw", Fmod_test_throw, 0, 0, NULL, NULL);
  DEFUN ("mod-test-non-local-exit-funcall", Fmod_test_non_local_exit_funcall,
	 1, 1, NULL, NULL);
  DEFUN ("mod-test-globref-make", Fmod_test_globref_make, 0, 0, NULL, NULL);
  DEFUN ("mod-test-string-a-to-b", Fmod_test_string_a_to_b, 1, 1, NULL, NULL);
  DEFUN ("mod-test-userptr-make", Fmod_test_userptr_make, 1, 1, NULL, NULL);
  DEFUN ("mod-test-userptr-get", Fmod_test_userptr_get, 1, 1, NULL, NULL);
  DEFUN ("mod-test-vector-fill", Fmod_test_vector_fill, 2, 2, NULL, NULL);
  DEFUN ("mod-test-vector-eq", Fmod_test_vector_eq, 2, 2, NULL, NULL);

#undef DEFUN

  provide (env, "mod-test");
  return 0;
}