[Go to CFHT Home Page] Man Pages
Back to Software Index  BORDER=0Manpage Top Level
    cfp_getln(3) manual page Table of Contents

Name

cfp_getln - find a configuration and return a line

Synopsis


#include <cfht/cfht.h>#include <cfht/cfp.h>char *cfp_getln(dest, key, name, suff)char
*dest;char *key;char *name;char *suff;
libcfht.a

Description

This function will search for the specified configuration file and then extract the information from the specified line. The file can be read only and is closed when done.

Dest is the place where the results are to be stored. If NULL is passed in, then internal space will be used. Key is the name of the line to find. Name and suff are concatenated together to form the file name. NULL can be used for either as appropriate.

Note that cfp_file() is used to find the correct path of the desired file.

Return Value

The return value is a pointer to the found line or NULL if an error occurs.

Example

To find out the detector name:

"cfp_getln(name, CFHT_DETECTOR, CFHT_CONFNAME, NULL);"

Errors

[EIO]
something has gone wrong.

See Also

cfp(4) .

Warnings

If NULL is used for dest, be sure to finish with the results before cfp_getln() is called again.


Table of Contents