cfgcopsf
Purpose
Opens an attribute file.
Library
Run-time Services Library (librts.a)
Syntax
#include <cfg04.h>
CFG__SFT *cfgcopsf (path)
char *path;
Syntax
The cfgcopsf subroutine opens an attribute file for
update. (For details about attribute files, see "attri-
butes.")
The path parameter points to the full path name of the
file to be opened.
The cfgcopsf subroutine calls the fopen subroutine to
open the file for update. If the call to fopen is suc-
cessful, then cfgcopsf allocates a CFG__SFT structure.
This structure contains the file descriptor returned by
fopen, a pointer to a default stanza buffer for reads, a
pointer to an array of indexes in a default stanza
buffer, and the full path name of the file that was
opened.
The calling program must have an effective user ID of
superuser to access system customization files such as
/etc/master, /etc/system, and /etc/predefined.
Return Value
Upon successful completion, the cfgcopsf subroutine
returns a pointer to an open attribute file structure.
If the cfgcopsf subroutine fails, it returns a NULL
pointer.
Related Information
In this book: "cfgcadsz," "cfgcclsf," "cfgcdlsz,"
"cfgcrdsz," "fopen, freopen, fdopen," and "attributes."