next up previous contents index
Next: Header LALVersion.h Up: Header LALStdio.h Previous: Prototypes   Contents   Index

Description

The routines LALFopen() and LALFclose() are macro defined to be the same as the standard C routines fopen() and fclose(). These should only be used in test programs.

The routine LALOpenDataFile() is used to open a data file for reading. This routine is also to be used in test programs only. Unless the data file is specified with an absolute path (beginning with a /), or a specific path (beginning with a ./ or a ../), the directory that the file is in is obtained from the environment variable LAL_DATA_PATH, which must be set at run-time. (If the environment variable is not set, the default path is . -- i.e., the current directory.) LAL_DATA_PATH should typically be set to /usr/local/share/lal, or wherever LAL data is installed in your system (which may be different if you used a --prefix argument when configuring LAL), but when the test suite is run with make check, the variable LAL_DATA_PATH is set to the current source directory. If the filename (including the directory path) is too long (more than 256 characters), LALOpenDataFile() returns NULL and sets errno to ENAMETOOLONG. It is strongly recommended that LALOpenDataFile() be used when writing test code.



$Id: FileIO.c,v 1.5 2001/09/02 16:55:17 jolien Exp $


next up previous contents index
Next: Header LALVersion.h Up: Header LALStdio.h Previous: Prototypes   Contents   Index
LAL test account 2003-10-23