4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright (c) 1994, by Sun Microsytems, Inc.
26 #pragma ident "%Z%%M% %I% %E% SMI"
38 { TNF_N_INLINE
, TAG_PROP_INLINE
},
39 { TNF_N_TAGGED
, TAG_PROP_TAGGED
},
40 { TNF_N_SCALAR
, TAG_PROP_SCALAR
},
41 { TNF_N_DERIVED
, TAG_PROP_DERIVED
},
42 { TNF_N_ARRAY
, TAG_PROP_ARRAY
},
43 { TNF_N_STRING
, TAG_PROP_STRING
},
44 { TNF_N_STRUCT
, TAG_PROP_STRUCT
},
45 { TNF_N_TYPE
, TAG_PROP_TYPE
},
53 { TNF_N_CHAR
, TNF_K_CHAR
},
54 { TNF_N_INT8
, TNF_K_INT8
},
55 { TNF_N_INT16
, TNF_K_INT16
},
56 { TNF_N_INT32
, TNF_K_INT32
},
57 { TNF_N_UINT8
, TNF_K_UINT8
},
58 { TNF_N_UINT16
, TNF_K_UINT16
},
59 { TNF_N_UINT32
, TNF_K_UINT32
},
60 { TNF_N_INT64
, TNF_K_INT64
},
61 { TNF_N_UINT64
, TNF_K_UINT64
},
62 { TNF_N_FLOAT32
, TNF_K_FLOAT32
},
63 { TNF_N_FLOAT64
, TNF_K_FLOAT64
},
72 _tnf_get_props(TNF
*tnf
, tnf_ref32_t
*tag
)
80 /* No need to get base tag for inherited properties */
82 if (HAS_PROPERTY(tnf
, tag
, p
->name
))
91 * Data kind depends on implementation properties of base tag
95 _tnf_get_kind(TNF
*tnf
, tnf_ref32_t
*tag
)
97 tnf_ref32_t
*base_tag
;
100 base_tag
= _tnf_get_base_tag(tnf
, tag
);
101 base_name
= _tnf_get_name(tnf
, base_tag
);
103 if (HAS_PROPERTY(tnf
, base_tag
, TNF_N_SCALAR
)) {
108 if (strcmp(p
->name
, base_name
) == 0)
112 return (TNF_K_SCALAR
);
114 } else if (HAS_PROPERTY(tnf
, base_tag
, TNF_N_ARRAY
)) {
115 if (strcmp(base_name
, TNF_N_STRING
) == 0)
116 return (TNF_K_STRING
);
118 return (TNF_K_ARRAY
);
120 } else if (HAS_PROPERTY(tnf
, base_tag
, TNF_N_TYPE
)) {
123 } else if (HAS_PROPERTY(tnf
, base_tag
, TNF_N_STRUCT
)) {
124 return (TNF_K_STRUCT
);
126 } else { /* abstract */
127 return (TNF_K_UNKNOWN
);