FTAM/9000 Programmer's Guide

422 Chapter 10
Example Programs
Common Code Example
/*
** Change the legal_qualification.
*/
attributes-values.legal_qualification = “I’m_bad”;
/*
** Change the private_use.
*/
attributes-values.private_use.pointer = (Octet *)“private”;
attributes-values.private_use.length = 7;
}
/*
**
** ftam_3
**
** DESCRIPTION:
** This routine assigns a ftam_3 document type to the Ft_contents_type
** structure.
**
**
** PARAMETERS:
** Outputs:
** cont_type : pointer to the Ft_contents_type structure
**
*/
void
ftam_3(cont_type)
struct Ft_contents_type *cont_type;
{
struct Ft_dt_ftam_3 *ftm_3;
/*
** Initialize all fields of the Ft_contents_type structure.
*/
cont_type-contents_form = FT_DOCUMENT_TYPE;
ftm_3 = (struct Ft_dt_ftam_3 *)malloc(sizeof(struct Ft_dt_ftam_3));
cont_type-contents_info.document.name.element =
(Sint32 *)malloc(5*sizeof(Sint32));
ftm_3-string_length = 512;
ftm_3-significance = FT_SS_NO_SIGNIFICANCE;
cont_type-contents_info.document.parameters = (char *)ftm_3;
cont_type-contents_info.document.name.length = 5;
cont_type-contents_info.document.name.element[0]=1;
cont_type-contents_info.document.name.element[1]=0;
cont_type-contents_info.document.name.element[2]=8571;
cont_type-contents_info.document.name.element[3]=5;
cont_type-contents_info.document.name.element[4]=3;
}