- pid_t cpid;
- int pfd[2];
-
- pipe(pfd);
- cpid = fork();
- if (cpid != 0) {
- rspl(pfd[0], pfd[1]);
- return 0;
- }
- else {
- char buf;
-
- while (1) {
- while (read(pfd[0], &buf, 1) > 0) {
- if (buf == '\n')
- write(STDOUT_FILENO, "-\n", 2);
- else
- write(STDOUT_FILENO, &buf, 1);
- }
- }
- }
+ 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_shell (argc, argv);