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

Name

cfp_putln - find a configuration and replace a line

Synopsis


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

Description

This function will search for the specified configuration file and then replace the information for the specified line. The file must be read/write and is closed when done.

Src is the place to get the new contents. Key is the name of the line to find. Name and suff are concatenated together to form the file name. Use NULL for either, if appropriate.

Note that cfp_putln() uses cfp_file() to find the file.

Return Value

This function will only return PASS or FAIL.

Example

To change the detector name:

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

Errors

[ENOTTY]
Invalid handle.
[EINVAL]
The arguments are invalid (probably too many NULL parameters).
[EIO]
Something else has gone wrong.

See Also

cfp(4) , cfp_file(3) .


Table of Contents