From: jsancho Date: Fri, 22 Apr 2011 15:36:49 +0000 (+0000) Subject: (no commit message) X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=3eb86a528523e716329c19266c85fb3e9fcc73eb;p=gacela.git --- diff --git a/gacela.c b/gacela.c index 0493d8f..90ba5c8 100644 --- a/gacela.c +++ b/gacela.c @@ -49,6 +49,9 @@ int main (int argc, char *argv[]) close(pfd[0]); while (1) { + scm_init_guile(); + scm_c_eval_string("(if (char-ready? (current-input-port)) (format #t \"~a guile~%\" (read)))"); + /* if (line) { free(line); line = (char *)NULL; @@ -58,6 +61,7 @@ int main (int argc, char *argv[]) if (line && *line) { printf("%s-\n", line); } + */ } } } diff --git a/gacela_core.c b/gacela_core.c index 83b15cf..47a849c 100644 --- a/gacela_core.c +++ b/gacela_core.c @@ -1,23 +1,24 @@ -#include -#include +//#include +//#include #include static void* register_functions (void* data) { - scm_c_define_gsubr ("prueba", 0, 0, 0, &prueba); + // scm_c_define_gsubr ("prueba", 0, 0, 0, &prueba); // scm_c_define_gsubr ("ver-contador", 0, 0, 0, &ver_contador); - scm_c_define_gsubr ("lanzar-bucle", 0, 0, 0, &lanzar_bucle); +// scm_c_define_gsubr ("lanzar-bucle", 0, 0, 0, &lanzar_bucle); return NULL; } int main (int argc, char *argv[]) { - scm_with_guile (®ister_functions, NULL); - scm_c_eval_string("(set-repl-prompt! \"gacela>\")"); - scm_c_eval_string("(use-modules (ice-9 readline))"); - scm_c_eval_string("(activate-readline)"); + // scm_with_guile (®ister_functions, NULL); + scm_init_guile(); + scm_c_eval_string("(set-repl-prompt! \"gacela>\")"); + scm_c_eval_string("(use-modules (ice-9 readline))"); + scm_c_eval_string("(activate-readline)"); + scm_c_eval_string("(format #t \"eo~%\")"); // scm_shell (argc, argv); - while (1) {} }