external programs
Jecel Assumpcao Jr
jecel at mail.merlintec.com
Wed Jul 5 21:36:04 UTC 2000
On Wed, 05 Jul 2000, Chris Reuter wrote:
> [Yes, I realize that I'm following up to a 20 day old post. I've been
> ignoring the list and enjoying the nice weather instead, as of late ;)]
Since I have been busy with other things, this was still very timely
and helpful.
> Actually, the "system" function will do this and, since it's part of
> the ANSI C library specification, should be available on every system
> that runs Squeak.
I have actually used this function quite a bit in my programs (mostly
due to laziness - it is much simpler to system("rm /tmp/xxx") than to
look up the proper functions to do this ;-)
Still, it took me quite a while to find that it was declared in
stdlib.h in Linux. I had somehow managed to miss it when grepping
/usr/include and subdirectories.
My impression is that FFI is for calling functions in external
libraries. Can it also be used for stuff like this that is in that
standard library?
> There are a few other ANSI lib OS functions that would also be useful
> to reach from Squeak such as getenv() and setenv().
That would be nice.
-- Jecel
More information about the Squeak-dev
mailing list
|