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

Name

cfp_cursub - substitute current values from a parameter file

Synopsis


#include <cfht/cfht.h>#include <cfht/cfp.h>char *cfp_cursub(id, string, size)FILE_ID
id;char *string;int size;
libcfht.a

Description

The input string will be searched for substitution tokens and modified with replacement characters from the specified parameter file. If a token is of the form ’$token’, then a BOOLEAN type cfp_getcur() will be done on ’token’. If true, then the ’$’ is converted to a ’-’. If false, no characters relating to this token appear in the resultant string. This is useful for creating command argument strings with Booleans. If the token is of the form ’%token’, then a STRING type cfp_getcur() will be done on ’token’. Id is the previously acquired handle for the configuration file. Size is the maximum size of the string.

Return Value

The return value will be a pointer to the start of the modified input string or NULL for error.

Errors

See Also

cfp(4) .

Warnings

The input string will be modified.


Table of Contents