Table of Contents

Name

BldCONFIG_TBLfn - Build configuration table file pathnames

Description

BldCONFIG_TBLfn creates a set of pathnames to be used for renaming configuration files.

The pathnames are formed by concatenating base_path with base_name and appending .dat or .tmp to the complete pathname.

Space for the pathnames is malloc()ed and a pointer to each constructed pathname is returned.

This function is part of libconfig.

Syntax

int BldCONFIG_TBLfn(
   char *base_path,

   char *base_name,

   char **dat_name,

   char **tmp_name

   );

Arguments

base_path

the basic pathname

base_name

the name added to base_path to form the pathnames

dat_name

a pointer to the .dat pathname is returned in the variable pointed to by this argument.

tmp_name

a pointer to the .tmp pathname is returned in the variable pointed to by this argument.

Return Value

0 is returned on success.
-1 is returned on failure and a message is printed to stderr.

Examples

char *dat;
char *tmp;

BldCONFIG_TBLfn("/tmp/thing", "joe", &dat, &tmp);

In this case the returned pathnames are:

dat = /tmp/thing/joe.dat
tmp = /tmp/thing/joe.tmp

See Also

ClearCONFIG_TBL(3cf) , CopyCONFIG_TBL(3cf) , CreateCONFIG_TBL(3cf) , FindCONFIG_TBL(3cf) , LoadCONFIG_TBL(3cf) , PrintCONFIG_TBL(3cf) , SaveCONFIG_TBL(3cf) , libconfigtbl(3cf)

Manual page revision

$Id: BldCONFIG_TBLfn.3,v 1.1 2002/04/07 18:46:04 kitchen Exp $


Table of Contents