[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Multi-return value functions and with-input-stream-do
- To: clisp-list@ma2s2.mathematik.uni-karlsruhe.de
- Subject: Multi-return value functions and with-input-stream-do
- From: Oliver Andrich <andrich@informatik.uni-koblenz.de>
- Date: Wed, 15 Feb 95 12:33:30 MET
Hello everybody!
After playing around with CLISP for a while, I think that I have
reached now a point of knowledge to be able to solve some more
ambitious problem than playing around with lists, streams and so on.
I want to develop a program to lemmatise a german text, but that is
not the topic of this mail.
I want that my program has an nice X-Windows userinterface, and
inspired by an article in Linux Journal I thought "Why shouldn't I do
it the same way?". This guy simply opened a pipe to a wish Task (the
Tcl/Tk-interpreter) and send this task via the pipe the required
commands and makes all data processing within a C-program. And I want
to do the same with LISP, yesterday I tried it and all works fine.
That means I opened a pipe with make-pipe-io-stream to the wish task
and I also managed to send all information for displaying the main
window. But then my problems started, I wanted to read something from
the in-stream and parse it, but I got really messed up with all these
input functions provided by LISP. Then I discovered this nice macro
with-open-stream and thought that this macro would solve my problems.
But I doesn't solve anything, cause make-pipe-io-stream returns a
multi-returnvalue. How do I use with-open-stream with make-pipe-io-stream?
Or how do I solve the following task? I want to constantly read from a
pipe similar to read-char-no-hang, but I want to read a whole line and
reading stops when an EOF is received, then all pipes produced by
make-pipe-io-stream should be closed.
I hope, that some could help me.
Bye, Oliver
P.M.: Excuse my bad english, but I have to learn writing english all
over again. I lacked some experience in the past.