From: Ian T Zimmerman <itz@transbay.net>
To: caml-list@inria.fr
Subject: ANNOUNCE: mlexpect 0.9
Date: Fri, 1 Jan 1999 00:21:05 -0800 [thread overview]
Message-ID: <199901010821.AAA05691@kronstadt.transbay.net> (raw)
mlexpect 0.9 has been uploaded to
ftp://ftp.prosa.it/pub/people/itz/mlexpect-0.9.0.tar.gz
All comments of any kind are heartily welcome.
I quote the README file:
This is mlexpect, a feeble attempt to to the same thing in ocaml as
Don Libes' expect program does in Tcl.
Install the GNU way: configure, make, make install. This will add the
following to your system:
expect.cma ... a ocaml bytecode library
expect_lib.mli ... a ocaml interface source file for the library
expect_lib.cmi ... compiled interface file
mlexpect ... a ocaml toplevel with the expect library linked
in.
Also, for people who still miss C macro hackery :-) I added a camlp4
gizmo in expect_p4.cmo. When you load it you can write things like
<:expect<
spawn_id_0 * "exact string" => handle_exact_string
spawn_id_1 * /"pattern"/ => handle_pattern
spawn_id_1 * Eof => handle_eof
>>
the handlers must be of type int -> spawn_id -> unit. The first
parameter is the ordinal of the clause in the expect construct
(starting with 0, as hinted above) and the second is the spawn_id on
which match occurred. Thus you can use the same handler in multiple
clauses.
BUGS:
`interact' is missing. I planned to include it and have it work the
same as the interact command in real expect, but it proved so
complicated and requiring so many dirty tricks that I gave up for this
first release. Maybe later, if someone can suggest a way to do it
without breaking all the rules of clean programming (i.e. the interact
function would have to use pretty much all the internals of the Buffer
submodule, as matching must be done at every buffer position for
multiple regexps in turn).
The Pty functions assume either a plain BSD style pty allocation
scheme without any kernel or libc support (which is the way it works
on my system, Linux 2.0/GNU), or SysV style ptys (/dev/ptmx,
ptsname(), etc.; latest Linux 2.1 kernels work like this). If your
system doesn't have the SysV bells & whistles but OTOH is also
incompatible with BSD and Linux < 2.1 as far as manual allocation
(eg. if the device names are something else than [pt]ty[p-s][0-9a-f]),
you're in for some source hacking.
Ob-apology: No French version.
BIG FAT WARNING
There are 2 (count 'em, two) ways of referring to ptys under Linux up
to 2.0. The old obsolete scheme gives both masters and slaves major
device no. 4, same as regular ttys, and starts their minor nos. at 128
and 192 respectively. The new way gives a separate major no. both to
pty masters (2) and slaves (3). IF YOUR ACTUAL DEVICE FILES USE ONE
SCHEME (probably the old one) BUT YOUR KERNEL HEADER FILES USE THE
OTHER (probably the new one) THIS SOFTWARE WILL BE MISCONFIGURED.
That's what happened to me during testing. You really should convert
consistently to the new scheme ASAP. This may mean editing
/etc/devinfo and re-running /dev/MAKEDEV.
Other than that, it works; even in this immature state it statisfies
my first goal, which was to erase all traces of Tcl from my machine
:-) Enjoy.
Note the email address below is current, the one in most source files
(@rahul.net) is outdated.
--
Ian T Zimmerman <itz@transbay.net>
I came to the conclusion that what was wrong about the guillotine
was that the condemned man had no chance at all, absolutely none.
Albert Camus, _The Outsider_
reply other threads:[~1999-01-02 21:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=199901010821.AAA05691@kronstadt.transbay.net \
--to=itz@transbay.net \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).