OSF DCE Application Development Guide--Introduction and Style Guide

OSF DCE Application Development Guide—Introduction and Style Guide
db_acl, /* The returned backing store handle. */
status);
/* Set the global variable that records whether we actually have */
/* opened the databases; this enables us to avoid calling the */
/* dce_db_close() routine for unopened databases, which will cause */
/* a core dump... */
databases_open = TRUE;
/* For the object database, we need standard backing store headers */
dbflags |= db_c_std_header;
if (need_init)
dbflags |= db_c_create;
/* Now open (or create) the "db_object" store... */
/* Build the full pathname string for the database... */
free(acl_path_string);
acl_path_string = malloc(MAX_ACL_PATH_SIZE);
strcpy(acl_path_string, db_acl_path);
strcat(acl_path_string, (unsigned_char_t *)"/");
strncat(acl_path_string, "db_object", strlen("db_object"));
dce_db_open(
(char *)acl_path_string, /* Filename of backing store. */
NULL, /* Backing store "backend type" default == hash. */
dbflags, /* Specifies index by UUID, and include standard */
/* headers. */
(dce_db_convert_func_t)sample_data_convert, /* Serializa- */
/* tion function for object data. */
db_object, /* The returned backing store handle. */
status);
/* Create the indexed-by-name database... */
dbflags = db_c_index_by_name;
if (need_init)
dbflags |= db_c_create;
/* Build the full pathname string for the database... */
free(acl_path_string);
acl_path_string = malloc(MAX_ACL_PATH_SIZE);
strcpy(acl_path_string, db_acl_path);
strcat(acl_path_string, (unsigned_char_t *)"/");
strncat(acl_path_string, "db_name", strlen("db_name"));
dce_db_open(
(char *)acl_path_string, /* Filename of backing store. */
NULL, /* Backing store "backend type" default == hash. */
dbflags, /* Specifies index by name. */
(dce_db_convert_func_t)uu_convert, /* Serialization func- */
/* tion for name data. */
db_name, /* The returned backing store handle. */
status);
free(acl_path_string);
3 −38 Tandem Computers Incorporated 124246