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, "#define %s_serialize(codec, obj) CORBA_long_serialize((codec), (obj))\n", enumid);
250 "static inline void\n"
251 "%s_deserialize(CDR_Codec *codec, %s *object) {\n"
252 " CORBA_long_deserialize(codec, (CORBA_long*)object);\n"
253 "}\n", enumid, enumid);
254 fprintf(ci->fh, "#define %s_get_max_size(x, num) CORBA_long_get_max_size((x), (num))\n", enumid);
256 fprintf (ci->fh, "#endif\n");
262 ch_output_type_dcl(IDL_tree tree, OIDL_Run_Info *rinfo, OIDL_C_Info *ci)
266 ch_prep (IDL_TYPE_DCL (tree).type_spec, rinfo, ci);
268 for (l = IDL_TYPE_DCL (tree).dcls; l; l = IDL_LIST (l).next) {
271 IDL_tree ent = IDL_LIST (l).data;
273 switch (IDL_NODE_TYPE(ent)) {
275 ctmp = IDL_ns_ident_to_qstring (
276 IDL_IDENT_TO_NS (ent), "_", 0);
278 case IDLN_TYPE_ARRAY:
279 ctmp = IDL_ns_ident_to_qstring (
280 IDL_IDENT_TO_NS (IDL_TYPE_ARRAY (ent).ident), "_", 0);
283 g_assert_not_reached ();
287 fprintf (ci->fh, "#if !defined(_%s_defined)\n#define _%s_defined 1\n", ctmp, ctmp);
288 fprintf (ci->fh, "typedef ");
289 orte_cbe_write_typespec (ci->fh, IDL_TYPE_DCL (tree).type_spec);
291 switch (IDL_NODE_TYPE (ent)) {
293 fprintf (ci->fh, " %s;\n", ctmp);
294 fprintf (ci->fh, "#define %s_serialize(codec, obj) ", ctmp);
295 orte_cbe_write_typespec (ci->fh, IDL_TYPE_DCL (tree).type_spec);
296 fprintf (ci->fh, "_serialize(codec, obj)\n");
298 fprintf (ci->fh, "#define %s_deserialize(codec, obj) ", ctmp);
299 orte_cbe_write_typespec (ci->fh, IDL_TYPE_DCL (tree).type_spec);
300 fprintf (ci->fh, "_deserialize(codec, obj)\n");
302 fprintf(ci->fh, "#define %s_get_max_size(x, num) ", ctmp);
303 orte_cbe_write_typespec (ci->fh, IDL_TYPE_DCL (tree).type_spec);
304 fprintf (ci->fh, "_get_max_size(x, num)\n");
306 case IDLN_TYPE_ARRAY: {
309 fprintf (ci->fh, " %s", ctmp);
310 for (sub = IDL_TYPE_ARRAY (ent).size_list; sub; sub = IDL_LIST (sub).next)
311 fprintf (ci->fh, "[%" IDL_LL "d]",
312 IDL_INTEGER (IDL_LIST (sub).data).value);
314 fprintf (ci->fh, ";\n");
315 fprintf (ci->fh, "typedef ");
316 orte_cbe_write_typespec (ci->fh, IDL_TYPE_DCL (tree).type_spec);
317 fprintf (ci->fh, " %s_slice", ctmp);
318 for (sub = IDL_LIST (IDL_TYPE_ARRAY (ent).size_list).next;
319 sub; sub = IDL_LIST (sub).next)
320 fprintf (ci->fh, "[%" IDL_LL "d]", IDL_INTEGER (IDL_LIST (sub).data).value);
321 fprintf(ci->fh, ";\n");
328 // ch_type_alloc_and_tc (ent, rinfo, ci, TRUE);
329 fprintf (ci->fh, "#endif\n");
335 ch_output_native(IDL_tree tree, OIDL_Run_Info *rinfo, OIDL_C_Info *ci)
338 IDL_tree id = IDL_NATIVE(tree).ident;
339 ctmp = IDL_ns_ident_to_qstring(IDL_IDENT_TO_NS(id), "_", 0);
340 fprintf(ci->fh, "#if !defined(_%s_defined)\n#define _%s_defined 1\n", ctmp, ctmp);
341 fprintf(ci->fh, "typedef struct %s_type *%s;\n", ctmp, ctmp);
342 /* Dont even think about emitting a typecode. */
343 fprintf(ci->fh, "#endif\n");
348 ch_output_type_struct(IDL_tree tree, OIDL_Run_Info *rinfo, OIDL_C_Info *ci)
351 IDL_tree cur, curmem;
353 id = IDL_ns_ident_to_qstring(IDL_IDENT_TO_NS(IDL_TYPE_STRUCT(tree).ident),
355 fprintf(ci->fh, "#if !defined(_%s_defined)\n#define _%s_defined 1\n", id, id);
356 /* put typedef out first for recursive seq */
357 fprintf(ci->fh, "typedef struct %s_type %s;\n", id, id);
359 /* Scan for any nested decls */
360 for(cur = IDL_TYPE_STRUCT(tree).member_list; cur; cur = IDL_LIST(cur).next) {
362 ts = IDL_MEMBER(IDL_LIST(cur).data).type_spec;
363 ch_prep(ts, rinfo, ci);
366 fprintf(ci->fh, "struct %s_type {\n", id);
368 for(cur = IDL_TYPE_STRUCT(tree).member_list; cur; cur = IDL_LIST(cur).next) {
369 for(curmem = IDL_MEMBER(IDL_LIST(cur).data).dcls; curmem; curmem = IDL_LIST(curmem).next) {
370 ch_output_var(IDL_MEMBER(IDL_LIST(cur).data).type_spec, IDL_LIST(curmem).data, ci);
373 if(!IDL_TYPE_STRUCT(tree).member_list)
374 fprintf(ci->fh, "int dummy;\n");
375 fprintf(ci->fh, "};\n\n");
377 // ch_type_alloc_and_tc(tree, rinfo, ci, TRUE);
379 fprintf(ci->fh, "#endif\n");
385 ch_output_type_union(IDL_tree tree, OIDL_Run_Info *rinfo, OIDL_C_Info *ci)
390 if (IDL_NODE_TYPE (IDL_TYPE_UNION (tree).switch_type_spec) == IDLN_TYPE_ENUM)
391 ch_output_type_enum (IDL_TYPE_UNION (tree).switch_type_spec, rinfo, ci);
393 id = IDL_ns_ident_to_qstring(IDL_IDENT_TO_NS(IDL_TYPE_UNION(tree).ident), "_", 0);
394 fprintf(ci->fh, "#if !defined(_%s_defined)\n#define _%s_defined 1\n", id, id);
395 fprintf(ci->fh, "typedef struct %s_type %s;\n", id, id);
397 /* Scan for any nested decls */
398 for(curitem = IDL_TYPE_UNION(tree).switch_body; curitem; curitem = IDL_LIST(curitem).next) {
399 IDL_tree member = IDL_CASE_STMT(IDL_LIST(curitem).data).element_spec;
400 ch_prep(IDL_MEMBER(member).type_spec, rinfo, ci);
403 fprintf(ci->fh, "struct %s_type {\n", id);
404 orte_cbe_write_typespec(ci->fh, IDL_TYPE_UNION(tree).switch_type_spec);
405 fprintf(ci->fh, " _d;\nunion {\n");
407 for(curitem = IDL_TYPE_UNION(tree).switch_body; curitem; curitem = IDL_LIST(curitem).next) {
410 member = IDL_CASE_STMT(IDL_LIST(curitem).data).element_spec;
411 ch_output_var(IDL_MEMBER(member).type_spec,
412 IDL_LIST(IDL_MEMBER(member).dcls).data,
416 fprintf(ci->fh, "} _u;\n};\n");
418 // ch_type_alloc_and_tc(tree, rinfo, ci, TRUE);
420 fprintf(ci->fh, "#endif\n");
426 ch_output_codefrag(IDL_tree tree, OIDL_Run_Info *rinfo, OIDL_C_Info *ci)
430 for(list = IDL_CODEFRAG(tree).lines; list;
431 list = g_slist_next(list)) {
432 if(!strncmp(list->data,
433 "#pragma include_defs",
434 sizeof("#pragma include_defs")-1)) {
436 ctmp = ((char *)list->data) + sizeof("#pragma include_defs");
437 while(*ctmp && (isspace((int)*ctmp) || *ctmp == '"')) ctmp++;
439 while(*cte && !isspace((int)*cte) && *cte != '"') cte++;
441 fprintf(ci->fh, "#include <%s>\n", ctmp);
443 fprintf(ci->fh, "%s\n", (char *)list->data);
448 ch_output_const_dcl(IDL_tree tree, OIDL_Run_Info *rinfo, OIDL_C_Info *ci)
454 ident = IDL_CONST_DCL (tree).ident;
455 id = IDL_ns_ident_to_qstring(IDL_IDENT_TO_NS (ident), "_", 0);
457 fprintf(ci->fh, "#ifndef %s\n", id);
458 fprintf(ci->fh, "#define %s ", id);
460 orte_cbe_write_const(ci->fh,
461 IDL_CONST_DCL(tree).const_exp);
463 typespec = orte_cbe_get_typespec (IDL_CONST_DCL(tree).const_type);
464 if (IDL_NODE_TYPE (typespec) == IDLN_TYPE_INTEGER &&
465 !IDL_TYPE_INTEGER (typespec).f_signed)
466 fprintf(ci->fh, "U");
468 fprintf(ci->fh, "\n");
469 fprintf(ci->fh, "#endif /* !%s */\n\n", id);
475 ch_prep_fixed(IDL_tree tree, OIDL_Run_Info *rinfo, OIDL_C_Info *ci)
479 ctmp = orte_cbe_get_typespec_str(tree);
481 "typedef struct { CORBA_unsigned_short _digits; CORBA_short _scale; CORBA_char _value[%d]; } %s;\n",
482 (int) (IDL_INTEGER(IDL_TYPE_FIXED(tree).positive_int_const).value + 2)/2,
486 // ch_type_alloc_and_tc(tree, rinfo, ci, TRUE);
490 ch_prep_sequence(IDL_tree tree, OIDL_Run_Info *rinfo, OIDL_C_Info *ci)
492 char *ctmp, *fullname, *fullname_def, *ctmp2;
494 gboolean separate_defs, fake_if;
495 IDL_tree fake_seq = NULL;
497 tts = orte_cbe_get_typespec(IDL_TYPE_SEQUENCE(tree).simple_type_spec);
498 ctmp = orte_cbe_get_typespec_str(IDL_TYPE_SEQUENCE(tree).simple_type_spec);
499 ctmp2 = orte_cbe_get_typespec_str(tts);
500 fake_if = (IDL_NODE_TYPE(tts) == IDLN_INTERFACE);
504 ctmp2 = g_strdup("CORBA_Object");
506 separate_defs = strcmp((const char *)ctmp, (const char*)ctmp2);
507 fullname = orte_cbe_get_typespec_str(tree);
512 tts = IDL_type_object_new();
513 fake_seq = IDL_type_sequence_new(tts, NULL);
514 IDL_NODE_UP(fake_seq) = IDL_NODE_UP(tree);
515 ch_prep_sequence(fake_seq, rinfo, ci);
516 fullname_def = g_strdup_printf("CORBA_sequence_%s", ctmp2);
518 IDL_TYPE_SEQUENCE(fake_seq).simple_type_spec = NULL;
521 fullname_def = g_strdup(fullname);
523 if(IDL_NODE_TYPE(IDL_TYPE_SEQUENCE(tree).simple_type_spec)
524 == IDLN_TYPE_SEQUENCE)
525 ch_prep_sequence(IDL_TYPE_SEQUENCE(tree).simple_type_spec, rinfo, ci);
527 /* NOTE: ORTE_DECL_%s protects redef of everything (struct,TC,externs)
528 * while _%s_defined protects only the struct */
530 fprintf(ci->fh, "#if !defined(ORTE_DECL_%s)\n#define ORTE_DECL_%s 1\n",
532 if ( ci->do_impl_hack )
533 orte_cbe_id_define_hack(ci->fh, "ORTE_IMPL", fullname, ci->c_base_name);
537 fprintf(ci->fh, "#if !defined(_%s_defined)\n#define _%s_defined 1\n",
539 if(!strcmp((const char *)ctmp, (const char*)"CORBA_RepositoryId"))
540 fprintf(ci->fh, "/* CRACKHEADS */\n");
541 fprintf(ci->fh, "typedef %s %s;\n", fullname_def, fullname);
542 fprintf(ci->fh, "#endif\n");
543 // ch_type_alloc_and_tc(tree, rinfo, ci, FALSE);
544 fprintf(ci->fh, "#define %s__alloc %s__alloc\n",
545 fullname, fullname_def);
546 fprintf(ci->fh, "#define %s__freekids %s__freekids\n",
547 fullname, fullname_def);
548 fprintf(ci->fh, "#define CORBA_sequence_%s_allocbuf CORBA_sequence_%s_allocbuf\n",
550 fprintf(ci->fh, "#define %s_serialize(x) %s_serialize(x)\n", fullname, fullname_def);
552 fprintf(ci->fh, "#define %s_deserialize(x) %s_deserialize(x)\n", fullname, fullname_def);
553 IDL_tree_free(fake_seq);
557 char *tc, *member_type;
559 fprintf(ci->fh, "#if !defined(_%s_defined)\n#define _%s_defined 1\n",
561 fprintf(ci->fh, "typedef struct { CORBA_unsigned_long _maximum, _length; ");
562 orte_cbe_write_typespec(ci->fh, IDL_TYPE_SEQUENCE(tree).simple_type_spec);
563 fprintf(ci->fh, "* _buffer; CORBA_boolean _release; } ");
564 orte_cbe_write_typespec(ci->fh, tree);
565 fprintf(ci->fh, ";\n#endif\n");
566 // ch_type_alloc_and_tc(tree, rinfo, ci, TRUE);
568 tc = orte_cbe_get_typecode_name (orte_cbe_get_typespec (tree));
569 member_type = orte_cbe_type_is_builtin (IDL_TYPE_SEQUENCE (tree).simple_type_spec) ?
570 ctmp + strlen ("CORBA_") : ctmp;
572 fprintf (ci->fh, "#define CORBA_sequence_%s_allocbuf(l) "
573 "((%s*)ORTE_small_allocbuf (%s, (l)))\n",
574 member_type, member_type, tc);
579 fprintf(ci->fh, "#endif\n");
584 g_free(fullname_def);
589 void ch_prep (IDL_tree tree,
590 OIDL_Run_Info *rinfo,
593 switch (IDL_NODE_TYPE (tree)) {
594 case IDLN_TYPE_SEQUENCE:
595 ch_prep_sequence (tree, rinfo, ci);
597 case IDLN_TYPE_FIXED:
598 ch_prep_fixed (tree, rinfo, ci);
600 case IDLN_TYPE_STRUCT:
601 ch_output_type_struct (tree, rinfo, ci);
604 ch_output_type_enum (tree, rinfo, ci);
612 ch_output_decl(IDL_tree tree, OIDL_Run_Info *rinfo, OIDL_C_Info *ci)
617 id = IDL_ns_ident_to_qstring(IDL_IDENT_TO_NS(IDL_TYPE_STRUCT(tree).ident),
619 fprintf(ci->fh, "void %s_serialize(CDR_Codec *cdrCodec,%s *object);\n", id, id);
620 fprintf(ci->fh, "void %s_deserialize(CDR_Codec *cdrCodec,%s *object);\n", id, id);
621 fprintf(ci->fh, "int %s_get_max_size(ORTEGetMaxSizeParam *gms, int num);\n", id);
622 fprintf(ci->fh, "Boolean %s_type_register(ORTEDomain *d);\n", id);
623 fprintf(ci->fh, "\n");
625 /* Scan for any nested decls */
626 for(cur = IDL_TYPE_STRUCT(tree).member_list; cur; cur = IDL_LIST(cur).next) {
628 ts = IDL_MEMBER(IDL_LIST(cur).data).type_spec;
629 switch (IDL_NODE_TYPE (ts)) {
630 case IDLN_TYPE_STRUCT:
631 ch_output_decl(ts, rinfo, ci);
643 ch_output_impls_decl (IDL_tree tree,
644 OIDL_Run_Info *rinfo,
650 switch (IDL_NODE_TYPE (tree)) {
651 case IDLN_TYPE_STRUCT:
652 ch_output_decl (tree, rinfo, ci);
658 switch (IDL_NODE_TYPE (tree)) {
660 ch_output_impls_decl (IDL_MODULE (tree).definition_list, rinfo, ci);
665 for (sub = tree; sub; sub = IDL_LIST (sub).next) {
666 ch_output_impls_decl (IDL_LIST (sub).data, rinfo, ci);
671 ch_output_impls_decl (IDL_INTERFACE (tree).body, rinfo, ci);