OSI/FTAM Programming Guide

NonStop FTAM Programming
HP NonStop OSI/FTAM Programming Guide528612-001
3-35
Using Predefined Data Structures
C Example
The file ZFTMC shows this C data structure for zfaps_ddl_cntnts_type_def (comments
are omitted, and lines are renumbered):
1 #pragma section zftm_ddl_cntnts_type
2 typedef struct
3 {
4 zaps_ddl_enum1_def zid;
5 union
6 {
7 zaps_ddl_char128_def zcntntstype;
8 struct
9 {
10 zaps_ddl_obj_id_def zdoctypename;
11 zaps_ddl_ispresent_def zuniversalclassispresent;
12 zaps_ddl_int2_def zuniversalclass;
13 zaps_ddl_ispresent_def zmaxstringlenispresent;
14 zaps_ddl_int2_def zmaxstringlen;
15 zaps_ddl_ispresent_def zstringsigispresent;
16 zaps_ddl_int2_def zstringsig;
17 zaps_ddl_ispresent_def zfileattrsispresent;
18 zftm_ddl_attr_names_def zfileattrs;
19 } zdoctype;
20 struct
21 {
22 zaps_ddl_obj_id_def cnstrntsetname;
23 zaps_ddl_obj_id_def zasname;
24 } zcnstrntsetandabssyn;
25 } u_zcntntstype;
26 } zftm_ddl_cntnts_type_def;
Suppose that you want to set up the values for a document type name and have
defined the contents-type parameter variable earlier in your program as follows:
zftm_ddl_cntnts_type_def contents_type;
contents_type, then, is the first element of the document type name identifier. For
the subsequent elements, refer to the data structure above. On line 25, you find the