Lines Matching refs:element

681 struct element {  struct
686 struct element *children; argument
687 struct element *next; argument
688 struct element *render_next; argument
689 struct element *list_next; argument
708 struct element *element; argument
798 static struct element *parse_type(struct token **_cursor, struct token *stop,
819 type->element = parse_type(&cursor, type[1].name, NULL); in parse()
820 type->element->type_def = type; in parse()
833 static struct element *element_list;
835 static struct element *alloc_elem(void) in alloc_elem()
837 struct element *e = calloc(1, sizeof(*e)); in alloc_elem()
847 static struct element *parse_compound(struct token **_cursor, struct token *end,
853 static struct element *parse_type(struct token **_cursor, struct token *end, in parse_type()
856 struct element *top, *element; in parse_type() local
863 top = element = alloc_elem(); in parse_type()
864 element->class = ASN1_UNIV; in parse_type()
865 element->method = ASN1_PRIM; in parse_type()
866 element->tag = token_to_tag[cursor->token_type]; in parse_type()
867 element->name = name; in parse_type()
876 element->class = ASN1_UNIV; in parse_type()
880 element->class = ASN1_APPL; in parse_type()
884 element->class = ASN1_CONT; in parse_type()
887 element->class = ASN1_PRIV; in parse_type()
904 element->tag &= ~0x1f; in parse_type()
905 element->tag |= strtoul(cursor->content, &p, 10); in parse_type()
906 element->flags |= ELEMENT_TAG_SPECIFIED; in parse_type()
926 element->flags |= ELEMENT_IMPLICIT; in parse_type()
932 element->flags |= ELEMENT_EXPLICIT; in parse_type()
940 element->method |= ASN1_CONS; in parse_type()
941 element->compound = implicit ? TAG_OVERRIDE : SEQUENCE; in parse_type()
942 element->children = alloc_elem(); in parse_type()
943 element = element->children; in parse_type()
944 element->class = ASN1_UNIV; in parse_type()
945 element->method = ASN1_PRIM; in parse_type()
946 element->tag = token_to_tag[cursor->token_type]; in parse_type()
947 element->name = name; in parse_type()
951 element->type = cursor; in parse_type()
954 element->compound = ANY; in parse_type()
962 element->compound = NOT_COMPOUND; in parse_type()
967 element->method = ASN1_CONS; in parse_type()
985 element->compound = NOT_COMPOUND; in parse_type()
991 element->compound = NOT_COMPOUND; in parse_type()
1001 element->compound = NOT_COMPOUND; in parse_type()
1011 element->compound = TYPE_REF; in parse_type()
1025 element->compound = CHOICE; in parse_type()
1027 element->children = parse_compound(&cursor, end, 1); in parse_type()
1031 element->compound = SEQUENCE; in parse_type()
1032 element->method = ASN1_CONS; in parse_type()
1037 element->compound = SEQUENCE_OF; in parse_type()
1041 element->children = parse_type(&cursor, end, NULL); in parse_type()
1043 element->children = parse_compound(&cursor, end, 0); in parse_type()
1048 element->compound = SET; in parse_type()
1049 element->method = ASN1_CONS; in parse_type()
1054 element->compound = SET_OF; in parse_type()
1058 element->children = parse_type(&cursor, end, NULL); in parse_type()
1060 element->children = parse_compound(&cursor, end, 1); in parse_type()
1118 element->action = action; in parse_type()
1147 static struct element *parse_compound(struct token **_cursor, struct token *end, in parse_compound()
1150 struct element *children, **child_p = &children, *element; in parse_compound() local
1177 element = parse_type(&cursor, end, name); in parse_compound()
1179 element->flags |= ELEMENT_SKIPPABLE | ELEMENT_CONDITIONAL; in parse_compound()
1181 *child_p = element; in parse_compound()
1182 child_p = &element->next; in parse_compound()
1210 static void dump_element(const struct element *e, int level) in dump_element()
1212 const struct element *c; in dump_element()
1244 dump_element(e->type->type->element, level + 3); in dump_element()
1253 dump_element(type_list[0].element, 0); in dump_elements()
1256 static void render_element(FILE *out, struct element *e, struct element *tag);
1261 static struct element *render_list, **render_list_p = &render_list;
1294 struct element *e; in render()
1360 render_element(NULL, root->element, NULL); in render()
1375 render_element(out, root->element, NULL); in render()
1394 struct element *e, *ce; in render_out_of_line_list()
1439 static void render_element(FILE *out, struct element *e, struct element *tag) in render_element()
1441 struct element *ec, *x; in render_element()
1525 render_element(out, e->type->type->element, tag); in render_element()