From 3eb86a528523e716329c19266c85fb3e9fcc73eb Mon Sep 17 00:00:00 2001 From: jsancho Date: Fri, 22 Apr 2011 15:36:49 +0000 Subject: [PATCH] --- gacela.c | 4 ++++ gacela_core.c | 19 ++++++++++--------- 2 files changed, 14 insertions(+), 9 deletions(-) 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) {} } -- 2.39.5