The Complete SPRLIB & ANNLIB

find_full_fname

- search for a file

SYNOPSIS

char *find_full_fname (filename)

ARGUMENTS

char *filename The original filename.

RETURNS

NULL if an error occurred, a pointer to a buffer holding a complete filename (including the path) if succesful.

FUNCTION

This routine tries to open a file (using the C-function access) using a set of alternative search paths. First, the raw name is checked; if this fails, for each path in the *AltPaths[] variable, the raw filename is checked in that path, followed by the filename with a .dat, a .Z or a .dat.Z extension. If the search succeeds, a pointer to a buffer (AlterName, see FILE-IO-variables) is returned; if not, the return value will be NULL.

NOTE

The alternative search paths can be specified in the SPR_DATA environment variable.

SEE ALSO

init_full_fname

This document was generated using api2html on Thu Mar 5 09:00:00 MET DST 1998