[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problem Implementing EP
From: |
Zeeshan Ali |
Subject: |
Problem Implementing EP |
Date: |
Sat, 26 Feb 2005 09:44:47 +0500 |
Hello,
I am trying to write an XChat guile plugin these days and in it i
need to have the EP part of REPL and here is how i do it:
/* Code begins here */
value = scm_c_eval_string (str);
if (value != SCM_UNDEFINED && value != SCM_UNSPECIFIED)
scm_write (value, port);
/* Code ends here */
The problem is that i get newlines after each char if the string
evaluates to a list or string. E.g if the string i evaluate is
"hello", i get this printed on my port:
"
h
e
l
l
o
"
And on evaluating '(1 2 3), i get this:
(
1
2
3
)
I just tried replacing the scm_write by scm_display and it fixed
the problem, but for strings only. i-e on "hello" i get hello printed,
but the result remains the same for lists. Any clue?
One more problem is that i can't seem to find an scm_* equivalent
of gh_eval_str_with_catch. If i am correct to assume that there is
none, perhaps i'll go for what dsmith proposed: get the code of
gh_eval_str_with_catch and write one myself and submit it for
inclusion into the next release?
- Problem Implementing EP,
Zeeshan Ali <=