2 #include "orte-idl-c-backend.h"
8 static void ch_output_types(IDL_tree tree, OIDL_Run_Info *rinfo, OIDL_C_Info *ci);
9 //static void ch_output_poa(IDL_tree tree, OIDL_Run_Info *rinfo, OIDL_C_Info *ci);
10 //static void ch_output_itypes (IDL_tree tree, OIDL_C_Info *ci);
11 static void ch_output_impls_decl(IDL_tree tree, OIDL_Run_Info *rinfo, OIDL_C_Info *ci);
12 //static void ch_output_skel_protos(IDL_tree tree, OIDL_Run_Info *rinfo, OIDL_C_Info *ci);
15 orte_idl_output_c_headers (IDL_tree tree, OIDL_Run_Info *rinfo, OIDL_C_Info *ci)
17 fprintf (ci->fh, OIDL_C_WARNING);
18 fprintf(ci->fh, "#ifndef %s%s_H\n", rinfo->header_guard_prefix, ci->c_base_name);
19 fprintf(ci->fh, "#define %s%s_H 1\n\n", rinfo->header_guard_prefix, ci->c_base_name);
21 fprintf(ci->fh, "#ifdef __cplusplus\n");
22 fprintf(ci->fh, "extern \"C\" {\n");
23 fprintf(ci->fh, "#endif /* __cplusplus */\n\n");
25 fprintf(ci->fh, "#ifndef EXCLUDE_ORTE_H\n");
26 fprintf(ci->fh, "#include <orte.h>\n");
27 fprintf(ci->fh, "#endif /* EXCLUDE_ORTE_H */\n");
29 /* Do all the typedefs, etc. */
30 fprintf(ci->fh, "\n/** typedefs **/\n");
31 ch_output_types(tree, rinfo, ci);
33 fprintf(ci->fh, "\n/** impls declarations **/\n");
34 ch_output_impls_decl(tree, rinfo, ci);
36 if ( ci->ext_dcls && ci->ext_dcls->str )
37 fputs( ci->ext_dcls->str, ci->fh); /* this may be huge! */
39 fprintf(ci->fh, "\n");
40 fprintf(ci->fh, "#ifdef __cplusplus\n");
41 fprintf(ci->fh, "}\n");
42 fprintf(ci->fh, "#endif /* __cplusplus */\n\n");
44 fprintf(ci->fh, "#endif\n");
48 ch_output_var(IDL_tree val, IDL_tree name, OIDL_C_Info *ci)
50 orte_cbe_write_typespec(ci->fh, val);
53 switch(IDL_NODE_TYPE(name)) {
55 fprintf(ci->fh, "%s", IDL_IDENT(name).str);
61 fprintf(ci->fh, "%s", IDL_IDENT(IDL_TYPE_ARRAY(name).ident).str);
62 for(curitem = IDL_TYPE_ARRAY(name).size_list; curitem; curitem = IDL_LIST(curitem).next) {
63 fprintf(ci->fh, "[%" IDL_LL "d]", IDL_INTEGER(IDL_LIST(curitem).data).value);
68 g_error("Weird varname - %s", IDL_tree_type_names[IDL_NODE_TYPE(name)]);
71 fprintf(ci->fh, ";\n");
74 static void ch_output_interface(IDL_tree tree, OIDL_Run_Info *rinfo, OIDL_C_Info *ci);
75 static void ch_output_type_struct(IDL_tree tree, OIDL_Run_Info *rinfo, OIDL_C_Info *ci);
76 static void ch_output_type_enum(IDL_tree tree, OIDL_Run_Info *rinfo, OIDL_C_Info *ci);
77 static void ch_output_type_dcl(IDL_tree tree, OIDL_Run_Info *rinfo, OIDL_C_Info *ci);
78 static void ch_output_native(IDL_tree tree, OIDL_Run_Info *rinfo, OIDL_C_Info *ci);
79 static void ch_output_type_union(IDL_tree tree, OIDL_Run_Info *rinfo, OIDL_C_Info *ci);
80 static void ch_output_codefrag(IDL_tree tree, OIDL_Run_Info *rinfo, OIDL_C_Info *ci);
81 static void ch_output_const_dcl(IDL_tree tree, OIDL_Run_Info *rinfo, OIDL_C_Info *ci);
82 static void ch_prep(IDL_tree tree, OIDL_Run_Info *rinfo, OIDL_C_Info *ci);
84 //static void ch_type_alloc_and_tc(IDL_tree tree, OIDL_Run_Info *rinfo, OIDL_C_Info *ci, gboolean do_alloc);
87 ch_output_types (IDL_tree tree,
94 switch (IDL_NODE_TYPE (tree)) {
95 case IDLN_EXCEPT_DCL: {
98 id = IDL_ns_ident_to_qstring (
99 IDL_IDENT_TO_NS (IDL_EXCEPT_DCL (tree).ident), "_", 0);
101 fprintf (ci->fh, "#undef ex_%s\n", id);
102 fprintf (ci->fh, "#define ex_%s \"%s\"\n",
103 id, IDL_IDENT (IDL_EXCEPT_DCL (tree).ident).repo_id);
107 ch_output_type_struct (tree, rinfo, ci);
110 case IDLN_FORWARD_DCL:
112 ch_output_interface (tree, rinfo, ci);
114 case IDLN_TYPE_STRUCT:
115 ch_output_type_struct (tree, rinfo, ci);
118 ch_output_type_enum (tree, rinfo, ci);
121 ch_output_type_dcl (tree, rinfo, ci);
123 case IDLN_TYPE_UNION:
124 ch_output_type_union (tree, rinfo, ci);
127 ch_output_codefrag (tree, rinfo, ci);
130 if (rinfo->onlytop) {
131 char *idlfn = IDL_SRCFILE (tree).filename;
133 if (!IDL_SRCFILE (tree).seenCnt &&
134 !IDL_SRCFILE(tree).isTop &&
135 !IDL_SRCFILE(tree).wasInhibit) {
138 hfn = g_path_get_basename (idlfn);
139 htail = strrchr (hfn,'.');
141 g_assert (htail && strlen (htail) >= 2);
146 fprintf (ci->fh, "#include \"%s\"\n", hfn);
151 fprintf (ci->fh, "/* from IDL source file \"%s\" "
152 "(seen %d, isTop %d, wasInhibit %d) */ \n",
154 IDL_SRCFILE (tree).seenCnt,
155 IDL_SRCFILE (tree).isTop,
156 IDL_SRCFILE (tree).wasInhibit);
161 ch_output_const_dcl (tree, rinfo, ci);
164 ch_output_native (tree, rinfo, ci);
170 switch (IDL_NODE_TYPE (tree)) {
172 ch_output_types (IDL_MODULE (tree).definition_list, rinfo, ci);
177 for (sub = tree; sub; sub = IDL_LIST (sub).next) {
178 ch_output_types (IDL_LIST (sub).data, rinfo, ci);
183 ch_output_types (IDL_INTERFACE (tree).body, rinfo, ci);
191 ch_output_interface(IDL_tree tree, OIDL_Run_Info *rinfo, OIDL_C_Info *ci)
194 fullname = orte_cbe_get_typespec_str(tree);
195 fprintf(ci->fh, "#if !defined(ORTE_DECL_%s) && !defined(_%s_defined)\n#define ORTE_DECL_%s 1\n#define _%s_defined 1\n", fullname, fullname, fullname, fullname);
197 if ( tree->declspec & IDLF_DECLSPEC_PIDL ) {
198 /* PIDL interfaces are not normal CORBA Objects */
199 fprintf(ci->fh, "typedef struct %s_type *%s;\n", fullname, fullname);
200 fprintf(ci->fh, "#ifndef TC_%s\n", fullname);
201 fprintf(ci->fh, "# define TC_%s TC_CORBA_Object\n", fullname);
202 fprintf(ci->fh, "#endif\n");
204 fprintf(ci->fh, "#define %s__freekids CORBA_Object__freekids\n", fullname);
205 fprintf(ci->fh, "typedef CORBA_Object %s;\n", fullname);
206 fprintf(ci->fh, "extern CORBA_unsigned_long %s__classid;\n", fullname);
207 // ch_type_alloc_and_tc(tree, rinfo, ci, FALSE);
210 fprintf(ci->fh, "#endif\n");
215 ch_output_type_enum (IDL_tree tree,
216 OIDL_Run_Info *rinfo,
222 /* CORBA spec says to do
223 * typedef unsigned int enum_name;
224 * and then #defines for each enumerator.
225 * This works just as well and seems cleaner.
228 enumid = IDL_ns_ident_to_qstring (
229 IDL_IDENT_TO_NS (IDL_TYPE_ENUM (tree).ident), "_", 0);
230 fprintf (ci->fh, "#if !defined(_%s_defined)\n#define _%s_defined 1\n", enumid, enumid);
231 fprintf (ci->fh, "typedef enum {\n");
233 for (l = IDL_TYPE_ENUM (tree).enumerator_list; l; l = IDL_LIST (l).next) {
236 id = IDL_ns_ident_to_qstring (
237 IDL_IDENT_TO_NS (IDL_LIST (l).data), "_", 0);
239 fprintf (ci->fh, " %s%s\n", id, IDL_LIST (l).next ? "," : "");
244 fprintf (ci->fh, "} %s;\n", enumid);
246 // ch_type_alloc_and_tc (tree, rinfo, ci, FALSE);
248 fprintf (ci->fh, "#endif\n");
254 ch_output_type_dcl(IDL_tree tree, OIDL_Run_Info *rinfo, OIDL_C_Info *ci)
258 ch_prep (IDL_TYPE_DCL (tree).type_spec, rinfo, ci);
260 for (l = IDL_TYPE_DCL (tree).dcls; l; l = IDL_LIST (l).next) {
263 IDL_tree ent = IDL_LIST (l).data;
265 switch (IDL_NODE_TYPE(ent)) {
267 ctmp = IDL_ns_ident_to_qstring (
268 IDL_IDENT_TO_NS (ent), "_", 0);
270 case IDLN_TYPE_ARRAY:
271 ctmp = IDL_ns_ident_to_qstring (
272 IDL_IDENT_TO_NS (IDL_TYPE_ARRAY (ent).ident), "_", 0);
275 g_assert_not_reached ();
279 fprintf (ci->fh, "#if !defined(_%s_defined)\n#define _%s_defined 1\n", ctmp, ctmp);
280 fprintf (ci->fh, "typedef ");
281 orte_cbe_write_typespec (ci->fh, IDL_TYPE_DCL (tree).type_spec);
283 switch (IDL_NODE_TYPE (ent)) {
285 fprintf (ci->fh, " %s;\n", ctmp);
286 fprintf (ci->fh, "#define %s_serialize(x) ", ctmp);
287 orte_cbe_write_typespec (ci->fh, IDL_TYPE_DCL (tree).type_spec);
288 fprintf (ci->fh, "_serialize(x)\n");
290 fprintf (ci->fh, "#define %s_deserialize(x) ", ctmp);
291 orte_cbe_write_typespec (ci->fh, IDL_TYPE_DCL (tree).type_spec);
292 fprintf (ci->fh, "_deserialize(x)\n");
294 fprintf(ci->fh, "#define %s_get_max_size(x, num) ", ctmp);
295 orte_cbe_write_typespec (ci->fh, IDL_TYPE_DCL (tree).type_spec);
296 fprintf (ci->fh, "_get_max_size(x, num)\n");
298 case IDLN_TYPE_ARRAY: {
301 fprintf (ci->fh, " %s", ctmp);
302 for (sub = IDL_TYPE_ARRAY (ent).size_list; sub; sub = IDL_LIST (sub).next)
303 fprintf (ci->fh, "[%" IDL_LL "d]",
304 IDL_INTEGER (IDL_LIST (sub).data).value);
306 fprintf (ci->fh, ";\n");
307 fprintf (ci->fh, "typedef ");
308 orte_cbe_write_typespec (ci->fh, IDL_TYPE_DCL (tree).type_spec);
309 fprintf (ci->fh, " %s_slice", ctmp);
310 for (sub = IDL_LIST (IDL_TYPE_ARRAY (ent).size_list).next;
311 sub; sub = IDL_LIST (sub).next)
312 fprintf (ci->fh, "[%" IDL_LL "d]", IDL_INTEGER (IDL_LIST (sub).data).value);
313 fprintf(ci->fh, ";\n");
320 // ch_type_alloc_and_tc (ent, rinfo, ci, TRUE);
321 fprintf (ci->fh, "#endif\n");
327 ch_output_native(IDL_tree tree, OIDL_Run_Info *rinfo, OIDL_C_Info *ci)
330 IDL_tree id = IDL_NATIVE(tree).ident;
331 ctmp = IDL_ns_ident_to_qstring(IDL_IDENT_TO_NS(id), "_", 0);
332 fprintf(ci->fh, "#if !defined(_%s_defined)\n#define _%s_defined 1\n", ctmp, ctmp);
333 fprintf(ci->fh, "typedef struct %s_type *%s;\n", ctmp, ctmp);
334 /* Dont even think about emitting a typecode. */
335 fprintf(ci->fh, "#endif\n");
340 ch_output_type_struct(IDL_tree tree, OIDL_Run_Info *rinfo, OIDL_C_Info *ci)
343 IDL_tree cur, curmem;
345 id = IDL_ns_ident_to_qstring(IDL_IDENT_TO_NS(IDL_TYPE_STRUCT(tree).ident),
347 fprintf(ci->fh, "#if !defined(_%s_defined)\n#define _%s_defined 1\n", id, id);
348 /* put typedef out first for recursive seq */
349 fprintf(ci->fh, "typedef struct %s_type %s;\n", id, id);
351 /* Scan for any nested decls */
352 for(cur = IDL_TYPE_STRUCT(tree).member_list; cur; cur = IDL_LIST(cur).next) {
354 ts = IDL_MEMBER(IDL_LIST(cur).data).type_spec;
355 ch_prep(ts, rinfo, ci);
358 fprintf(ci->fh, "struct %s_type {\n", id);
360 for(cur = IDL_TYPE_STRUCT(tree).member_list; cur; cur = IDL_LIST(cur).next) {
361 for(curmem = IDL_MEMBER(IDL_LIST(cur).data).dcls; curmem; curmem = IDL_LIST(curmem).next) {
362 ch_output_var(IDL_MEMBER(IDL_LIST(cur).data).type_spec, IDL_LIST(curmem).data, ci);
365 if(!IDL_TYPE_STRUCT(tree).member_list)
366 fprintf(ci->fh, "int dummy;\n");
367 fprintf(ci->fh, "};\n\n");
369 // ch_type_alloc_and_tc(tree, rinfo, ci, TRUE);
371 fprintf(ci->fh, "#endif\n");
377 ch_output_type_union(IDL_tree tree, OIDL_Run_Info *rinfo, OIDL_C_Info *ci)
382 if (IDL_NODE_TYPE (IDL_TYPE_UNION (tree).switch_type_spec) == IDLN_TYPE_ENUM)
383 ch_output_type_enum (IDL_TYPE_UNION (tree).switch_type_spec, rinfo, ci);
385 id = IDL_ns_ident_to_qstring(IDL_IDENT_TO_NS(IDL_TYPE_UNION(tree).ident), "_", 0);
386 fprintf(ci->fh, "#if !defined(_%s_defined)\n#define _%s_defined 1\n", id, id);
387 fprintf(ci->fh, "typedef struct %s_type %s;\n", id, id);
389 /* Scan for any nested decls */
390 for(curitem = IDL_TYPE_UNION(tree).switch_body; curitem; curitem = IDL_LIST(curitem).next) {
391 IDL_tree member = IDL_CASE_STMT(IDL_LIST(curitem).data).element_spec;
392 ch_prep(IDL_MEMBER(member).type_spec, rinfo, ci);
395 fprintf(ci->fh, "struct %s_type {\n", id);
396 orte_cbe_write_typespec(ci->fh, IDL_TYPE_UNION(tree).switch_type_spec);
397 fprintf(ci->fh, " _d;\nunion {\n");
399 for(curitem = IDL_TYPE_UNION(tree).switch_body; curitem; curitem = IDL_LIST(curitem).next) {
402 member = IDL_CASE_STMT(IDL_LIST(curitem).data).element_spec;
403 ch_output_var(IDL_MEMBER(member).type_spec,
404 IDL_LIST(IDL_MEMBER(member).dcls).data,
408 fprintf(ci->fh, "} _u;\n};\n");
410 // ch_type_alloc_and_tc(tree, rinfo, ci, TRUE);
412 fprintf(ci->fh, "#endif\n");
418 ch_output_codefrag(IDL_tree tree, OIDL_Run_Info *rinfo, OIDL_C_Info *ci)
422 for(list = IDL_CODEFRAG(tree).lines; list;
423 list = g_slist_next(list)) {
424 if(!strncmp(list->data,
425 "#pragma include_defs",
426 sizeof("#pragma include_defs")-1)) {
428 ctmp = ((char *)list->data) + sizeof("#pragma include_defs");
429 while(*ctmp && (isspace((int)*ctmp) || *ctmp == '"')) ctmp++;
431 while(*cte && !isspace((int)*cte) && *cte != '"') cte++;
433 fprintf(ci->fh, "#include <%s>\n", ctmp);
435 fprintf(ci->fh, "%s\n", (char *)list->data);
440 ch_output_const_dcl(IDL_tree tree, OIDL_Run_Info *rinfo, OIDL_C_Info *ci)
446 ident = IDL_CONST_DCL (tree).ident;
447 id = IDL_ns_ident_to_qstring(IDL_IDENT_TO_NS (ident), "_", 0);
449 fprintf(ci->fh, "#ifndef %s\n", id);
450 fprintf(ci->fh, "#define %s ", id);
452 orte_cbe_write_const(ci->fh,
453 IDL_CONST_DCL(tree).const_exp);
455 typespec = orte_cbe_get_typespec (IDL_CONST_DCL(tree).const_type);
456 if (IDL_NODE_TYPE (typespec) == IDLN_TYPE_INTEGER &&
457 !IDL_TYPE_INTEGER (typespec).f_signed)
458 fprintf(ci->fh, "U");
460 fprintf(ci->fh, "\n");
461 fprintf(ci->fh, "#endif /* !%s */\n\n", id);
467 ch_prep_fixed(IDL_tree tree, OIDL_Run_Info *rinfo, OIDL_C_Info *ci)
471 ctmp = orte_cbe_get_typespec_str(tree);
473 "typedef struct { CORBA_unsigned_short _digits; CORBA_short _scale; CORBA_char _value[%d]; } %s;\n",
474 (int) (IDL_INTEGER(IDL_TYPE_FIXED(tree).positive_int_const).value + 2)/2,
478 // ch_type_alloc_and_tc(tree, rinfo, ci, TRUE);
482 ch_prep_sequence(IDL_tree tree, OIDL_Run_Info *rinfo, OIDL_C_Info *ci)
484 char *ctmp, *fullname, *fullname_def, *ctmp2;
486 gboolean separate_defs, fake_if;
487 IDL_tree fake_seq = NULL;
489 tts = orte_cbe_get_typespec(IDL_TYPE_SEQUENCE(tree).simple_type_spec);
490 ctmp = orte_cbe_get_typespec_str(IDL_TYPE_SEQUENCE(tree).simple_type_spec);
491 ctmp2 = orte_cbe_get_typespec_str(tts);
492 fake_if = (IDL_NODE_TYPE(tts) == IDLN_INTERFACE);
496 ctmp2 = g_strdup("CORBA_Object");
498 separate_defs = strcmp((const char *)ctmp, (const char*)ctmp2);
499 fullname = orte_cbe_get_typespec_str(tree);
504 tts = IDL_type_object_new();
505 fake_seq = IDL_type_sequence_new(tts, NULL);
506 IDL_NODE_UP(fake_seq) = IDL_NODE_UP(tree);
507 ch_prep_sequence(fake_seq, rinfo, ci);
508 fullname_def = g_strdup_printf("CORBA_sequence_%s", ctmp2);
510 IDL_TYPE_SEQUENCE(fake_seq).simple_type_spec = NULL;
513 fullname_def = g_strdup(fullname);
515 if(IDL_NODE_TYPE(IDL_TYPE_SEQUENCE(tree).simple_type_spec)
516 == IDLN_TYPE_SEQUENCE)
517 ch_prep_sequence(IDL_TYPE_SEQUENCE(tree).simple_type_spec, rinfo, ci);
519 /* NOTE: ORTE_DECL_%s protects redef of everything (struct,TC,externs)
520 * while _%s_defined protects only the struct */
522 fprintf(ci->fh, "#if !defined(ORTE_DECL_%s)\n#define ORTE_DECL_%s 1\n",
524 if ( ci->do_impl_hack )
525 orte_cbe_id_define_hack(ci->fh, "ORTE_IMPL", fullname, ci->c_base_name);
529 fprintf(ci->fh, "#if !defined(_%s_defined)\n#define _%s_defined 1\n",
531 if(!strcmp((const char *)ctmp, (const char*)"CORBA_RepositoryId"))
532 fprintf(ci->fh, "/* CRACKHEADS */\n");
533 fprintf(ci->fh, "typedef %s %s;\n", fullname_def, fullname);
534 fprintf(ci->fh, "#endif\n");
535 // ch_type_alloc_and_tc(tree, rinfo, ci, FALSE);
536 fprintf(ci->fh, "#define %s__alloc %s__alloc\n",
537 fullname, fullname_def);
538 fprintf(ci->fh, "#define %s__freekids %s__freekids\n",
539 fullname, fullname_def);
540 fprintf(ci->fh, "#define CORBA_sequence_%s_allocbuf CORBA_sequence_%s_allocbuf\n",
542 fprintf(ci->fh, "#define %s_serialize(x) %s_serialize(x)\n", fullname, fullname_def);
544 fprintf(ci->fh, "#define %s_deserialize(x) %s_deserialize(x)\n", fullname, fullname_def);
545 IDL_tree_free(fake_seq);
549 char *tc, *member_type;
551 fprintf(ci->fh, "#if !defined(_%s_defined)\n#define _%s_defined 1\n",
553 fprintf(ci->fh, "typedef struct { CORBA_unsigned_long _maximum, _length; ");
554 orte_cbe_write_typespec(ci->fh, IDL_TYPE_SEQUENCE(tree).simple_type_spec);
555 fprintf(ci->fh, "* _buffer; CORBA_boolean _release; } ");
556 orte_cbe_write_typespec(ci->fh, tree);
557 fprintf(ci->fh, ";\n#endif\n");
558 // ch_type_alloc_and_tc(tree, rinfo, ci, TRUE);
560 tc = orte_cbe_get_typecode_name (orte_cbe_get_typespec (tree));
561 member_type = orte_cbe_type_is_builtin (IDL_TYPE_SEQUENCE (tree).simple_type_spec) ?
562 ctmp + strlen ("CORBA_") : ctmp;
564 fprintf (ci->fh, "#define CORBA_sequence_%s_allocbuf(l) "
565 "((%s*)ORTE_small_allocbuf (%s, (l)))\n",
566 member_type, member_type, tc);
571 fprintf(ci->fh, "#endif\n");
576 g_free(fullname_def);
581 void ch_prep (IDL_tree tree,
582 OIDL_Run_Info *rinfo,
585 switch (IDL_NODE_TYPE (tree)) {
586 case IDLN_TYPE_SEQUENCE:
587 ch_prep_sequence (tree, rinfo, ci);
589 case IDLN_TYPE_FIXED:
590 ch_prep_fixed (tree, rinfo, ci);
592 case IDLN_TYPE_STRUCT:
593 ch_output_type_struct (tree, rinfo, ci);
596 ch_output_type_enum (tree, rinfo, ci);
604 ch_output_decl(IDL_tree tree, OIDL_Run_Info *rinfo, OIDL_C_Info *ci)
609 id = IDL_ns_ident_to_qstring(IDL_IDENT_TO_NS(IDL_TYPE_STRUCT(tree).ident),
611 fprintf(ci->fh, "void %s_serialize(CDR_Codec *cdrCodec,%s *object);\n", id, id);
612 fprintf(ci->fh, "void %s_deserialize(CDR_Codec *cdrCodec,%s *object);\n", id, id);
613 fprintf(ci->fh, "int %s_get_max_size(ORTEGetMaxSizeParam *gms, int num);\n", id);
614 fprintf(ci->fh, "Boolean %s_type_register(ORTEDomain *d);\n", id);
615 fprintf(ci->fh, "\n");
617 /* Scan for any nested decls */
618 for(cur = IDL_TYPE_STRUCT(tree).member_list; cur; cur = IDL_LIST(cur).next) {
620 ts = IDL_MEMBER(IDL_LIST(cur).data).type_spec;
621 switch (IDL_NODE_TYPE (ts)) {
622 case IDLN_TYPE_STRUCT:
623 ch_output_decl(ts, rinfo, ci);
635 ch_output_impls_decl (IDL_tree tree,
636 OIDL_Run_Info *rinfo,
642 switch (IDL_NODE_TYPE (tree)) {
643 case IDLN_TYPE_STRUCT:
644 ch_output_decl (tree, rinfo, ci);
650 switch (IDL_NODE_TYPE (tree)) {
652 ch_output_impls_decl (IDL_MODULE (tree).definition_list, rinfo, ci);
657 for (sub = tree; sub; sub = IDL_LIST (sub).next) {
658 ch_output_impls_decl (IDL_LIST (sub).data, rinfo, ci);
663 ch_output_impls_decl (IDL_INTERFACE (tree).body, rinfo, ci);