FTAM/9000 Programmer's Guide
Chapter 10 421
Example Programs
Common Code Example
/*
** Initialize all fields of the Ft_file_passwords structure.
*/
file_passwords-read.length = 4;
file_passwords-read.pointer = (Octet *)”read”;
file_passwords-insert.length = 6;
file_passwords-insert.pointer = (Octet *)”insert”;
file_passwords-replace.length = 7;
file_passwords-replace.pointer = (Octet *)”replace”;
file_passwords-extend.length = 6;
file_passwords-extend.pointer = (Octet *)”extend”;
file_passwords-erase.length = 5;
file_passwords-erase.pointer = (Octet *)”erase”;
file_passwords-read_attribute.length = 8;
file_passwords-read_attribute.pointer = (Octet *)”readattr”;
file_passwords-change_attribute.length = 8;
file_passwords-change_attribute.pointer = (Octet *)”chngattr”;
file_passwords-delete_file.length = 8;
file_passwords-delete_file.pointer = (Octet *)”delefile”;
}
/*
**
** cat_attribute_in
**
** DESCRIPTION:
** This routine assigns valid values to the Ft_attributes structure
** for the ft_cattributes and ft_fcattributes calls.
**
**
** PARAMETERS:
** Outputs:
** attributes : pointer to the Ft_attributes structure
**
*/
void
cat_attribute_in(attributes)
struct Ft_attributes *attributes;
{
/*
** Initialize all fields in Ft_attributes structure.
*/
attributes-mask = 0;
/*
** Change the storage_account.
*/
attributes-values.storage_account = STORAGE_ACCOUNT;
/*
** Change the file_availability.
*/
attributes-values.file_availability = FT_IMMEDIATE_AVAIL;
/*
** Change the future_filesize.
*/
attributes-values.future_filesize = 1000000;