[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Opening files with Cscheme
i have a thing called CScheme, which i love. i have a manual called
RRRS. i have a problem.
i'm trying to write a program that's c-preprocessor compatable, in that
it takes a -I/parameter -I/that/lists/a/bunch -I/of/directories/that
include files might be in. so when the code includes foo.h i have to
find the first one of
/parameter/foo.h
/that/lists/a/bunch/foo.h
/of/directories/that/foo.h
that exists.
RRRS talks about (open-input-file "filename") but if the file doesn't exist
i get an "out of range with "filename"" error and the program stops.
is there a way to figure out if some file exists without crashing? or
some way to substitute some better error behaviour (i'd just as soon
have it return '() or #!the-you-screwed-up-object or something).
i have the CScheme source and am not adverse to making myself un-scheme-
compatable (but i imagine that scheme can do what i want somehow (else
what good is it?))
thanks in advance for the assistance!
Les Milash
wow! with a language like this, i might even be able to handle
a shared-memory multiprocessor!