45#define ROUND_SIZE(size, alignment) (((size) + ((alignment) - 1)) & ~((alignment) - 1))
47#define ROUNDING(size, alignment) (((alignment) - 1) - (((size) + ((alignment) - 1)) & ((alignment) - 1)))
75static const unsigned short IsPipe = 0x0004;
76static const unsigned short IsIn = 0x0008;
77static const unsigned short IsOut = 0x0010;
88 const char *
name,
unsigned int *typestring_offset);
91 const char *
name,
int write_ptr,
unsigned int *tfsoff);
95 const char *
name,
unsigned int *typestring_offset);
105 case FC_BYTE:
return "FC_BYTE";
106 case FC_CHAR:
return "FC_CHAR";
112 case FC_LONG:
return "FC_LONG";
121 case FC_RP:
return "FC_RP";
122 case FC_UP:
return "FC_UP";
123 case FC_OP:
return "FC_OP";
124 case FC_FP:
return "FC_FP";
151 case FC_IP:
return "FC_IP";
170 case FC_PP:
return "FC_PP";
179 case FC_END:
return "FC_END";
180 case FC_PAD:
return "FC_PAD";
186 error(
"string_of_type: unknown type 0x%02x\n",
type);
398 unsigned short offset = 0;
399 unsigned int salign = 1;
408 unsigned int align = 0;
421 unsigned int stack_size;
440 if (by_value) *by_value = by_val;
447 unsigned char flags = 0;
468 unsigned int flags = 0;
481 int has_conformance = 0;
482 int has_variance = 0;
515 error_loc(
"field '%s' deriving from a conformant array must be the last field in the structure\n",
562 error_loc(
"field '%s' deriving from a conformant array must be the last field in the structure\n",
570 error_loc(
"field '%s' deriving from a conformant array must be the last field in the structure\n",
579 error_loc(
"Unknown struct member %s with type (0x%02x)\n",
field->name,
fc);
603 if ( has_conformance )
608 if( has_conformance && has_pointer )
610 if( has_conformance )
807 unsigned short off = 0;
814 error(
"user_type_offset: couldn't find type (%s)\n",
name);
829 if (
type->typestring_offset)
832 type->typestring_offset = 1;
862#define WRITE_FCTYPE(file, fctype, typestring_offset) \
865 fprintf(file, "/* %2u */\n", typestring_offset); \
866 print_file((file), 2, "0x%02x,\t/* " #fctype " */\n", fctype); \
896 local_var_prefix,
n, local_var_prefix,
n);
943 print_file(
f,
indent,
"static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString;\n");
944 print_file(
f,
indent,
"static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString;\n");
959 unsigned int *stack_size,
unsigned int *typestring_offset )
962 unsigned char fc = 0;
967 if (is_return) is_out =
TRUE;
968 else if (!is_in && !is_out) is_in =
TRUE;
972 *typestring_offset =
var->typestring_offset;
1012 *typestring_offset =
var->type->typestring_offset;
1022 else *typestring_offset += 2;
1028 *typestring_offset += 4;
1064 *typestring_offset =
ref->typestring_offset;
1080 *typestring_offset =
ref->typestring_offset;
1109 server_size = (server_size + 7) / 8;
1110 if (server_size < 8) *
flags |= server_size << 13;
1120 unsigned char oi2_flags = 0x40;
1121 unsigned short flags;
1122 unsigned int stack_size, typestring_offset;
1147 unsigned int stack_size, typestring_offset;
1148 unsigned short flags;
1173 typestring_offset, typestring_offset );
1179 int is_return,
int is_interpreted)
1186 if (!is_in && !is_out) is_in =
TRUE;
1216 unsigned short offset =
var->typestring_offset;
1220 var->type->details.array.ptr_tfsoff)
1225 else if (is_in && is_out)
1292 unsigned short num_proc )
1296 unsigned char explicit_fc, implicit_fc;
1297 unsigned char handle_flags;
1301 unsigned int nb_args = 0;
1302 unsigned int stack_size = 0;
1303 unsigned short param_num = 0;
1304 unsigned short handle_stack_offset = 0;
1305 unsigned short handle_param_num = 0;
1317 if (
var == handle_var)
1319 handle_stack_offset = stack_size;
1320 handle_param_num = param_num;
1340 print_file(
file,
indent,
"NdrFcShort(0x%x),\t/* stack size = %u */\n", stack_size, stack_size );
1345 switch (explicit_fc)
1352 handle_stack_offset, handle_stack_offset );
1360 handle_stack_offset, handle_stack_offset );
1370 handle_stack_offset, handle_stack_offset );
1381 unsigned char ext_flags = 0;
1386 if (iface == iface->
details.
iface->async_iface) oi2_flags |= 0x20;
1402 unsigned short pos = 0, fpu_mask = 0;
1417 if (
pos >= 16)
break;
1427 unsigned short num_proc )
1433 unsigned char explicit_fc, implicit_fc;
1491 iface = stmt->
u.
type;
1492 if (!pred(iface))
continue;
1566 *typestring_offset += 1;
1575 unsigned char operator_type = 0;
1577 const char *conftype_string =
"field";
1591 error(
"write_conf_or_var_desc: constant value %d is greater than "
1592 "the maximum constant size of %d\n",
expr->cval,
1595 print_file(
file, 2,
"0x%x, /* Corr desc: constant, val = %d */\n",
1606 conftype_string =
"parameter";
1617 conftype_string =
"field pointer";
1622 switch (subexpr->
type)
1625 subexpr = subexpr->
ref;
1631 subexpr = subexpr->
ref;
1638 subexpr = subexpr->
ref;
1645 subexpr = subexpr->
ref;
1652 subexpr = subexpr->
ref;
1663 unsigned char param_type = 0;
1678 correlation_variable =
var->type;
1694 correlation_variable =
var->type;
1701 if (!correlation_variable)
1702 error(
"write_conf_or_var_desc: couldn't find variable %s in %s\n", subexpr->
u.
sval,
name);
1734 error(
"write_conf_or_var_desc: conformance variable type not supported 0x%x\n",
1754 error(
"write_conf_or_var_desc: non-arithmetic type used as correlation variable %s\n",
1768 unsigned int callback_offset = 0;
1788 eval =
xmalloc (
sizeof(*eval));
1798 error(
"Maximum number of callback routines reached\n");
1800 print_file(
file, 2,
"0x%x,\t/* Corr desc: %s in %s */\n", conftype, conftype_string,
name);
1802 print_file(
file, 2,
"NdrFcShort(0x%hx),\t/* %u */\n", (
unsigned short)callback_offset, callback_offset);
1816 unsigned int align = 0;
1825 unsigned int size = 0;
1826 unsigned int max_align;
1832 unsigned int falign = 0;
1848 unsigned int size, maxs = 0;
1849 unsigned int align = *pmaxa;
1868 unsigned int size = 0;
1921 error(
"type_memsize: Unknown enum type\n");
1977 unsigned int align = 0;
2023 error(
"type_buffer_alignment: Unknown enum type\n");
2030 if (!
var->type)
continue;
2039 if (!
var->type)
continue;
2048 if (!
var->type)
continue;
2090 print_file(
file,
indent,
"__frame->_StubMsg.FullPtrXlatTables = NdrFullPointerXlatInit(0,%s);\n",
2091 is_server ?
"XLAT_SERVER" :
"XLAT_CLIENT");
2105 unsigned int *typeformat_offset)
2107 unsigned int start_offset = *typeformat_offset;
2108 short reloff =
offset - (*typeformat_offset + 2);
2109 int in_attr, out_attr;
2111 unsigned char flags = 0;
2117 if (!in_attr && !out_attr) in_attr = 1;
2121 if (out_attr && !in_attr && pointer_type ==
FC_RP)
2137 if (in_attr && out_attr)
2151 if (pointer_type !=
FC_RP) {
2174 *typeformat_offset += 4;
2176 return start_offset;
2183 unsigned char pointer_fc;
2192 error(
"write_simple_pointer: can't handle type %s which is a string type\n",
type->name);
2204 if (out_attr && !in_attr && pointer_fc ==
FC_RP)
2213 print_file(
file, 2,
"0x%02x, 0x%x,\t/* %s %s[simple_pointer] */\n",
2231 unsigned int *typestring_offset)
2233 unsigned int offset = *typestring_offset;
2256 return type->typestring_offset && !
type->tfswrite;
2332 print_file(
file, 2,
"NdrFcShort(0x%hx),\t/* Function offset= %hu */\n", funoff, funoff);
2334 print_file(
file, 2,
"NdrFcShort(0x%hx),\t/* %u */\n", (
unsigned short)usize, usize);
2336 reloff = absoff - *tfsoff;
2337 print_file(
file, 2,
"NdrFcShort(0x%hx),\t/* Offset= %hd (%u) */\n", reloff, reloff, absoff);
2345 unsigned int *tfsoff)
2349 unsigned int absoff;
2359 absoff =
type->typestring_offset;
2361 reloff = absoff - (*tfsoff + 2);
2368 print_file(
file, 2,
"NdrFcShort(0x%hx),\t/* Offset= %hd (%u) */\n",
2369 reloff, reloff, absoff);
2383 int cont_is_complex,
unsigned int *tfsoff)
2394 ref->typestring_offset, tfsoff);
2414 if (*tfsoff % 2 == 0)
2439 reloff = absoff - (*tfsoff + 6);
2445 print_file(
file, 2,
"NdrFcShort(0x%hx),\t/* Offset= %hd (%u) */\n",
2446 (
unsigned short)reloff, reloff, absoff);
2455 unsigned int *offset_in_memory,
unsigned int *offset_in_buffer,
2456 unsigned int *typestring_offset)
2463 if (offset_in_memory && offset_in_buffer)
2465 unsigned int memsize;
2472 print_file(
file, 2,
"NdrFcShort(0x%hx),\t/* Memory offset = %d */\n", (
unsigned short)*offset_in_memory, *offset_in_memory);
2473 print_file(
file, 2,
"NdrFcShort(0x%hx),\t/* Buffer offset = %d */\n", (
unsigned short)*offset_in_buffer, *offset_in_buffer);
2476 *offset_in_memory += memsize;
2479 *offset_in_buffer += memsize;
2481 *typestring_offset += 4;
2491 ref->typestring_offset, typestring_offset);
2495 error(
"write_pointer_description_offsets: type format string unknown\n");
2499 unsigned int offset =
type->typestring_offset;
2514 offset_in_buffer, typestring_offset);
2522 if (offset_in_memory && offset_in_buffer)
2525 unsigned int align = 0;
2532 file,
v->attrs,
v->type, offset_in_memory, offset_in_buffer,
2538 if (offset_in_memory && offset_in_buffer)
2541 *offset_in_memory += memsize;
2544 *offset_in_buffer += memsize;
2553 unsigned int *offset_in_memory,
unsigned int *offset_in_buffer,
2554 unsigned int *typestring_offset)
2563 *typestring_offset += 2;
2566 offset_in_memory, offset_in_buffer, typestring_offset);
2574 if (offset_in_memory && offset_in_buffer)
2577 unsigned int align = 0;
2585 offset_in_memory, offset_in_buffer, typestring_offset);
2591 *offset_in_memory += memsize;
2594 *offset_in_buffer += memsize;
2604 unsigned int *offset_in_memory,
unsigned int *offset_in_buffer,
2605 unsigned int *typestring_offset)
2607 int pointer_count = 0;
2612 unsigned int temp = 0;
2617 if (pointer_count > 0)
2619 unsigned int increment_size;
2620 unsigned int offset_of_array_pointer_mem = 0;
2621 unsigned int offset_of_array_pointer_buf = 0;
2628 print_file(
file, 2,
"NdrFcShort(0x%hx),\t/* Increment = %d */\n", (
unsigned short)increment_size, increment_size);
2629 print_file(
file, 2,
"NdrFcShort(0x%hx),\t/* Offset to array = %d */\n", (
unsigned short)*offset_in_memory, *offset_in_memory);
2630 print_file(
file, 2,
"NdrFcShort(0x%hx),\t/* Number of pointers = %d */\n", (
unsigned short)pointer_count, pointer_count);
2631 *typestring_offset += 10;
2634 file, attrs,
type, &offset_of_array_pointer_mem,
2635 &offset_of_array_pointer_buf, typestring_offset);
2643 if (offset_in_memory && offset_in_buffer)
2646 unsigned int align = 0;
2653 file,
v->attrs,
v->type, offset_in_memory, offset_in_buffer,
2659 if (offset_in_memory && offset_in_buffer)
2661 unsigned int memsize;
2663 *offset_in_memory += memsize;
2666 *offset_in_buffer += memsize;
2670 return pointer_count;
2677 unsigned int offset_in_memory,
unsigned int *typestring_offset)
2679 int pointer_count = 0;
2683 unsigned int temp = 0;
2688 if (pointer_count > 0)
2690 unsigned int increment_size;
2691 unsigned int offset_of_array_pointer_mem = offset_in_memory;
2692 unsigned int offset_of_array_pointer_buf = offset_in_memory;
2697 error(
"array size of %u bytes is too large\n", increment_size);
2701 print_file(
file, 2,
"NdrFcShort(0x%hx),\t/* Increment = %d */\n", (
unsigned short)increment_size, increment_size);
2702 print_file(
file, 2,
"NdrFcShort(0x%hx),\t/* Offset to array = %d */\n", (
unsigned short)offset_in_memory, offset_in_memory);
2703 print_file(
file, 2,
"NdrFcShort(0x%hx),\t/* Number of pointers = %d */\n", (
unsigned short)pointer_count, pointer_count);
2704 *typestring_offset += 8;
2708 &offset_of_array_pointer_mem, &offset_of_array_pointer_buf,
2713 return pointer_count;
2720 unsigned int *offset_in_memory,
unsigned int *offset_in_buffer,
2721 unsigned int *typestring_offset)
2723 int pointer_count = 0;
2727 unsigned int temp = 0;
2732 if (pointer_count > 0)
2734 unsigned int increment_size;
2739 error(
"array size of %u bytes is too large\n", increment_size);
2743 print_file(
file, 2,
"NdrFcShort(0x%hx),\t/* Increment = %d */\n", (
unsigned short)increment_size, increment_size);
2744 print_file(
file, 2,
"NdrFcShort(0x%hx),\t/* Offset to array = %d */\n", (
unsigned short)*offset_in_memory, *offset_in_memory);
2745 print_file(
file, 2,
"NdrFcShort(0x%hx),\t/* Number of pointers = %d */\n", (
unsigned short)pointer_count, pointer_count);
2746 *typestring_offset += 8;
2750 offset_in_buffer, typestring_offset);
2758 if (offset_in_memory && offset_in_buffer)
2764 *offset_in_buffer =
ROUND_SIZE(*offset_in_buffer, 4);
2766 *offset_in_buffer += 8;
2775 file,
v->attrs,
v->type, offset_in_memory, offset_in_buffer,
2781 if (offset_in_memory && offset_in_buffer)
2784 *offset_in_memory += memsize;
2787 *offset_in_buffer += memsize;
2791 return pointer_count;
2795 unsigned int *typestring_offset)
2797 unsigned int offset_in_buffer;
2798 unsigned int offset_in_memory;
2804 offset_in_memory = 0;
2805 offset_in_buffer = 0;
2808 &offset_in_memory, &offset_in_buffer, typestring_offset);
2812 offset_in_memory = 0;
2813 offset_in_buffer = 0;
2816 &offset_in_memory, &offset_in_buffer, typestring_offset);
2823 file, attrs,
type, 0, typestring_offset);
2833 offset_in_memory = 0;
2834 offset_in_buffer = 0;
2837 &offset_in_memory, &offset_in_buffer, typestring_offset);
2842 const char *
name,
unsigned int *typestring_offset)
2844 unsigned int start_offset;
2845 unsigned char rtype;
2849 start_offset = *typestring_offset;
2856 pointer_type =
FC_RP;
2860 flag ?
" [simple_pointer]" :
"");
2861 *typestring_offset += 2;
2865 *typestring_offset += 2;
2867 is_processed =
FALSE;
2880 error(
"write_string_tfs: Unimplemented for non-basic type %s\n",
name);
2881 return start_offset;
2887 error(
"write_string_tfs: Unimplemented for type 0x%x of name: %s\n", rtype,
name);
2888 return start_offset;
2895 if (is_processed)
return start_offset;
2899 error(
"array size for parameter %s exceeds %u bytes by %u bytes\n",
2900 name, 0xffffu, dim - 0xffffu);
2907 *typestring_offset += 2;
2909 print_file(
file, 2,
"NdrFcShort(0x%hx),\t/* %d */\n", (
unsigned short)dim, dim);
2910 *typestring_offset += 2;
2913 return start_offset;
2922 *typestring_offset += 2;
2932 return start_offset;
2936 if (is_processed)
return start_offset;
2943 *typestring_offset += 2;
2946 return start_offset;
2951 const char *
name,
unsigned int *typestring_offset)
2957 unsigned int start_offset;
2966 pointer_type =
FC_RP;
2975 start_offset = *typestring_offset;
2980 *typestring_offset += 2;
2988 *typestring_offset += 4;
2993 *typestring_offset += 2;
3009 *typestring_offset += 4;
3013 print_file(
file, 2,
"NdrFcShort(0x%hx),\t/* %u */\n", (
unsigned short)dim, dim);
3014 *typestring_offset += 2;
3017 print_file(
file, 2,
"NdrFcShort(0x%hx),\t/* %u */\n", (
unsigned short)elsize, elsize);
3018 *typestring_offset += 2;
3031 *typestring_offset += 2;
3034 *typestring_offset += 1;
3043 print_file(
file, 2,
"NdrFcShort(0x%hx),\t/* %u */\n", (
unsigned short)dim, dim);
3044 *typestring_offset += 2;
3056 return start_offset;
3062 const var_t *last_field;
3069 ft = last_field->
type;
3081 int is_complex,
unsigned int *corroff,
3082 unsigned int *typestring_offset)
3085 unsigned short offset = 0;
3086 unsigned int salign = 1;
3093 unsigned int align = 0;
3102 unsigned char fc = 0;
3119 *typestring_offset += 1;
3133 *typestring_offset += 1;
3140 const char *
name,
unsigned int *tfsoff)
3143 unsigned int total_size;
3145 unsigned int start_offset;
3147 unsigned int corroff;
3160 error(
"structure size for %s exceeds %d bytes by %d bytes\n",
3178 start_offset = *tfsoff;
3183 print_file(
file, 2,
"NdrFcShort(0x%hx),\t/* %d */\n", (
unsigned short)total_size, total_size);
3188 unsigned int absoff =
array->type->typestring_offset;
3189 short reloff = absoff - *tfsoff;
3190 print_file(
file, 2,
"NdrFcShort(0x%hx),\t/* Offset= %hd (%u) */\n",
3191 reloff, reloff, absoff);
3205 unsigned int absoff =
type->ptrdesc ?
type->ptrdesc : *tfsoff;
3206 int reloff = absoff - *tfsoff;
3208 print_file(
file, 2,
"NdrFcShort(0x%hx),\t/* Offset= %d (%u) */\n",
3209 (
unsigned short)reloff, reloff, absoff);
3231 type->ptrdesc = *tfsoff;
3264 if (
type->ptrdesc == *tfsoff)
3269 return start_offset;
3287 print_file(
file, 2,
"NdrFcShort(0x80%02x),\t/* Simple arm type: %s */\n",
3290 else if (
t->typestring_offset)
3292 short reloff =
t->typestring_offset - *tfsoff;
3293 print_file(
file, 2,
"NdrFcShort(0x%hx),\t/* Offset= %d (%d) */\n",
3294 reloff, reloff,
t->typestring_offset);
3306 unsigned int start_offset;
3309 unsigned int nbranch = 0;
3311 short nodeftype = 0xffff;
3317 return type->typestring_offset;
3334 start_offset = *tfsoff;
3341 unsigned int align = 0;
3361 error(
"union switch type must be an integer, char, or enum\n");
3367 error(
"union switch type must be an integer, char, or enum\n");
3404 error(
"union switch type must be an integer, char, or enum\n");
3410 error(
"union switch type must be an integer, char, or enum\n");
3417 print_file(
file, 2,
"NdrFcShort(0x2),\t/* Offset= 2 (%u) */\n", *tfsoff + 2);
3423 print_file(
file, 2,
"NdrFcShort(0x%hx),\t/* %d */\n", (
unsigned short)nbranch, nbranch);
3433 if (cases ==
NULL && !deflt)
3434 error(
"union field %s with neither case nor default attribute\n",
f->name);
3466 return start_offset;
3470 unsigned int *typeformat_offset)
3473 unsigned int start_offset = *typeformat_offset;
3501 for (
i = 0;
i < 8; ++
i)
3507 *typeformat_offset += 18;
3509 return start_offset;
3516 unsigned int *typeformat_offset)
3518 unsigned int start_offset = *typeformat_offset;
3526 if (!pointer_type) pointer_type =
FC_RP;
3527 *typeformat_offset += 4;
3529 print_file(
file, 2,
"NdrFcShort(0x2),\t /* Offset= 2 (%u) */\n", *typeformat_offset);
3544 if ((
flags & 0x21) == 0x20)
3546 if ((
flags & 0x21) == 0x21)
3555 *typeformat_offset += 4;
3558 return start_offset;
3563 unsigned int *typeformat_offset)
3566 unsigned int start_offset = *typeformat_offset;
3584 *typeformat_offset += 10;
3586 return start_offset;
3593 unsigned int *typeformat_offset)
3625 unsigned int absoff =
type->typestring_offset;
3626 short reloff = absoff - (*typeformat_offset + 2);
3627 off = *typeformat_offset;
3631 print_file(
file, 2,
"NdrFcShort(0x%hx),\t/* Offset= %hd (%u) */\n",
3632 reloff, reloff, absoff);
3634 *typeformat_offset += 4;
3636 type->details.array.ptr_tfsoff = off;
3660 unsigned int toplevel_offset = *typeformat_offset;
3682 ref_context, typeformat_offset);
3695 const char *
name,
int write_ptr,
unsigned int *tfsoff)
3737 for (type_entry = stmt->
u.
type_list; type_entry; type_entry = type_entry->
next)
3755 unsigned int typeformat_offset = 2;
3757 return typeformat_offset + 1;
3792 const char *uname =
NULL;
3835 error(
"get_required_buffer_size: unknown basic type 0x%02x\n",
3901 if (!in_attr && !out_attr)
3948 const var_t *
var,
unsigned int type_offset)
3950 const char *function;
3954 function =
"BufferSize";
3957 function =
"Marshall";
3960 function =
"Unmarshall";
3974 (phase ==
PHASE_UNMARSHAL) ?
"(unsigned char **)" :
"(unsigned char *)",
3988 const char *varname)
4058 error(
"print_phase_basetype: Unsupported type: %s (0x%02x, ptr_level: 0)\n",
4064 print_file(
file,
indent,
"__frame->_StubMsg.Buffer = (unsigned char *)(((ULONG_PTR)__frame->_StubMsg.Buffer + %u) & ~0x%x);\n",
4082 fprintf(
file,
") > __frame->_StubMsg.BufferEnd)\n");
4088 local_var_prefix, varname);
4121 error(
"%s: multidimensional conformant"
4122 " arrays not supported at the top level\n",
4204 int in_attr, out_attr, pointer_type;
4205 const char *type_str =
NULL;
4207 unsigned int alignment, start_offset =
type->typestring_offset;
4216 if (!in_attr && !out_attr)
4223 if (!in_attr)
return;
4226 if (!out_attr)
return;
4260 print_file(
file,
indent + 1,
"(PFORMAT_STRING)&__MIDL_TypeFormatString.Format[%d]);\n", start_offset);
4278 print_file(
file,
indent + 1,
"(PFORMAT_STRING)&__MIDL_TypeFormatString.Format[%d]);\n", start_offset);
4287 pointer_type !=
FC_RP)
4293 phase,
var, start_offset);
4304 unsigned int real_start_offset = start_offset;
4309 real_start_offset += 4;
4311 real_start_offset += 2;
4315 local_var_prefix, phase,
var,
4319 phase,
var, real_start_offset);
4325 const char *array_type =
NULL;
4338 array_type =
"FixedArray";
4342 array_type =
"VaryingArray";
4345 array_type =
"ConformantArray";
4348 array_type =
"ConformantVaryingArray";
4351 array_type =
"ComplexArray";
4355 if (pointer_type !=
FC_RP) array_type =
"Pointer";
4368 type->details.array.ptr_tfsoff);
4437 const char *union_type =
NULL;
4440 union_type =
"NonEncapsulatedUnion";
4442 union_type =
"EncapsulatedUnion";
4445 phase,
var, start_offset);
4471 type_str =
"SimpleStruct";
4481 type_str =
"SimpleStruct";
4485 type_str =
"ConformantStruct";
4488 type_str =
"ConformantVaryingStruct";
4491 type_str =
"ComplexStruct";
4500 type_str =
"Pointer";
4502 start_offset =
ref->typestring_offset;
4508 type_str =
"Pointer";
4512 type_str =
"NonEncapsulatedUnion";
4514 type_str =
"EncapsulatedUnion";
4516 start_offset =
ref->typestring_offset;
4520 phase,
var, start_offset);
4525 type_str =
"UserMarshal";
4526 start_offset =
ref->typestring_offset;
4528 else type_str =
"Pointer";
4604 unsigned int size = 1;
4617 int in_attr, out_attr;
4636 if (!out_attr && !in_attr)
4650 type_to_print =
var->type;
4678 int in_attr, out_attr;
4690 if (!out_attr && !in_attr)
4700 fprintf(
file,
" = NdrContextHandleInitialize(\n");
4703 var->typestring_offset);
4711 fprintf(
file,
" = NdrAllocate(&__frame->_StubMsg, ");
4752 local_var_prefix,
i, local_var_prefix,
i);
4766 local_var_prefix,
i, local_var_prefix,
i);
4790 const char *var_decl,
int add_retval )
4796 unsigned int align = 0;
4841 if (needs_packing)
print_file(
file, 0,
"#include <poppack.h>\n" );
4859 static const char *var_name =
"pS";
4860 static const char *var_name_expr =
"pS->";
4863 unsigned short callback_offset = 0;
4870 print_file(
file, 0,
"static void __RPC_USER %s_%sExprEval_%04u(PMIDL_STUB_MESSAGE pStubMsg)\n",
4876 "*pS = (struct _PARAM_STRUCT *)pStubMsg->StackTop",
FALSE );
4900 unsigned short callback_offset = 0;
4902 fprintf(
file,
"static const EXPR_EVAL ExprEvalRoutines[] =\n");
4925 fprintf(
file,
"static const USER_MARSHAL_ROUTINE_QUADRUPLE UserMarshalRoutines[] =\n");
4932 print_file(
file, 2,
"(USER_MARSHAL_MARSHALLING_ROUTINE)%s_UserMarshal,\n", ut->
name);
4933 print_file(
file, 2,
"(USER_MARSHAL_UNMARSHALLING_ROUTINE)%s_UserUnmarshal,\n", ut->
name);
4946 print_file(
f, 0,
"static const unsigned char * const %s__RpcProtseqEndpoint[][2] =\n{\n",
prefix );
4949 print_file(
f, 1,
"{ (const unsigned char *)\"" );
4952 if (*
p ==
'"' || *
p ==
'\\')
fputc(
'\\',
f );
4956 if (
p[1] !=
'[')
goto error;
4958 fprintf(
f,
"\", (const unsigned char *)\"" );
4959 for (
p += 2; *
p && *
p !=
']';
p++)
4961 if (*
p ==
'"' || *
p ==
'\\')
fputc(
'\\',
f );
4964 if (*
p !=
']')
goto error;
4975 const char *
prefix,
unsigned int proc_offset )
4978 int has_ret = !
is_void( rettype );
4981 int len, needs_params = 0;
4989 if (has_ret)
print_file(
file, 1,
"%s",
"CLIENT_CALL_RETURN _RetVal;\n" );
4996 else if (has_ret)
print_file(
file, 1,
"%s",
"CLIENT_CALL_RETURN _RetVal;\n\n" );
4999 has_ret ?
"_RetVal = " :
"",
5002 fprintf(
file,
"\n%*s&__MIDL_ProcFormatString.Format[%u]",
len,
"", proc_offset );
5035 fprintf(
file,
"#ifndef USE_COMPILER_EXCEPTIONS\n");
5037 fprintf(
file,
"#include \"wine/exception.h\"\n");
5045 fprintf(
file,
"#undef RpcAbnormalTermination\n");
5048 fprintf(
file,
"typedef int (*__filter_func)(struct __exception_frame *);\n");
5049 fprintf(
file,
"typedef void (*__finally_func)(struct __exception_frame *);\n");
5051 fprintf(
file,
"#define __DECL_EXCEPTION_FRAME \\\n");
5052 fprintf(
file,
" EXCEPTION_REGISTRATION_RECORD frame; \\\n");
5057 fprintf(
file,
" unsigned char abnormal_termination; \\\n");
5058 fprintf(
file,
" unsigned char filter_level; \\\n");
5059 fprintf(
file,
" unsigned char finally_level;\n");
5065 fprintf(
file,
"static inline void __widl_unwind_target(void)\n" );
5067 fprintf(
file,
" struct __exception_frame *exc_frame = (struct __exception_frame *)__wine_get_frame();\n" );
5068 fprintf(
file,
" if (exc_frame->finally_level > exc_frame->filter_level)\n" );
5070 fprintf(
file,
" exc_frame->abnormal_termination = 1;\n");
5071 fprintf(
file,
" exc_frame->finally( exc_frame );\n");
5072 fprintf(
file,
" __wine_pop_frame( &exc_frame->frame );\n");
5074 fprintf(
file,
" exc_frame->filter_level = 0;\n");
5075 fprintf(
file,
" siglongjmp( exc_frame->jmp, 1 );\n");
5078 fprintf(
file,
"static DWORD __widl_exception_handler( EXCEPTION_RECORD *record,\n");
5079 fprintf(
file,
" EXCEPTION_REGISTRATION_RECORD *frame,\n");
5081 fprintf(
file,
" EXCEPTION_REGISTRATION_RECORD **pdispatcher )\n");
5083 fprintf(
file,
" struct __exception_frame *exc_frame = (struct __exception_frame *)frame;\n");
5085 fprintf(
file,
" if (record->ExceptionFlags & (EH_UNWINDING | EH_EXIT_UNWIND | EH_NESTED_CALL))\n");
5087 fprintf(
file,
" if (exc_frame->finally_level && (record->ExceptionFlags & (EH_UNWINDING | EH_EXIT_UNWIND)))\n");
5089 fprintf(
file,
" exc_frame->abnormal_termination = 1;\n");
5090 fprintf(
file,
" exc_frame->finally( exc_frame );\n");
5092 fprintf(
file,
" return ExceptionContinueSearch;\n");
5094 fprintf(
file,
" exc_frame->code = record->ExceptionCode;\n");
5095 fprintf(
file,
" if (exc_frame->filter_level && exc_frame->filter( exc_frame ) == EXCEPTION_EXECUTE_HANDLER)\n" );
5096 fprintf(
file,
" __wine_rtl_unwind( frame, record, __widl_unwind_target );\n");
5097 fprintf(
file,
" return ExceptionContinueSearch;\n");
5101 fprintf(
file,
" if (!sigsetjmp( __frame->jmp, 0 )) \\\n");
5103 fprintf(
file,
" if (!__frame->finally_level) \\\n" );
5104 fprintf(
file,
" __wine_push_frame( &__frame->frame ); \\\n");
5105 fprintf(
file,
" __frame->filter_level = __frame->finally_level + 1;\n" );
5108 fprintf(
file,
" if (!__frame->finally_level) \\\n" );
5109 fprintf(
file,
" __wine_pop_frame( &__frame->frame ); \\\n");
5110 fprintf(
file,
" __frame->filter_level = 0; \\\n" );
5116 fprintf(
file,
"#define RpcExceptionCode() (__frame->code)\n");
5119 fprintf(
file,
" if (!__frame->filter_level) \\\n");
5120 fprintf(
file,
" __wine_push_frame( &__frame->frame ); \\\n");
5121 fprintf(
file,
" __frame->finally_level = __frame->filter_level + 1;\n");
5124 fprintf(
file,
" if (!__frame->filter_level) \\\n");
5125 fprintf(
file,
" __wine_pop_frame( &__frame->frame ); \\\n");
5130 fprintf(
file,
"#define RpcAbnormalTermination() (__frame->abnormal_termination)\n");
5132 fprintf(
file,
"#define RpcExceptionInit(filter_func,finally_func) \\\n");
5134 fprintf(
file,
" __frame->frame.Handler = __widl_exception_handler; \\\n");
5135 fprintf(
file,
" __frame->filter = (__filter_func)(filter_func); \\\n" );
5136 fprintf(
file,
" __frame->finally = (__finally_func)(finally_func); \\\n");
5137 fprintf(
file,
" __frame->abnormal_termination = 0; \\\n");
5138 fprintf(
file,
" __frame->filter_level = 0; \\\n");
5139 fprintf(
file,
" __frame->finally_level = 0; \\\n");
5142 fprintf(
file,
"#else /* USE_COMPILER_EXCEPTIONS */\n");
5144 fprintf(
file,
"#define RpcExceptionInit(filter_func,finally_func) \\\n");
5145 fprintf(
file,
" do { (void)(filter_func); } while(0)\n");
5147 fprintf(
file,
"#define __DECL_EXCEPTION_FRAME \\\n");
5150 fprintf(
file,
"#endif /* USE_COMPILER_EXCEPTIONS */\n");
int strcmp(const char *String1, const char *String2)
ACPI_SIZE strlen(const char *String)
_Check_return_ _Ret_maybenull_ _In_ size_t alignment
char * xstrdup(const char *s)
static void list_remove(struct list_entry *entry)
static int list_empty(struct list_entry *head)
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
static const int carray[3]
static const WCHAR indent[]
int align(int length, int align)
int compare_expr(const expr_t *a, const expr_t *b)
const type_t * expr_resolve_type(const struct expr_loc *expr_loc, const type_t *cont_type, const expr_t *expr)
void write_expr(FILE *h, const expr_t *e, int brackets, int toplevel, const char *toplevel_prefix, const type_t *cont_type, const char *local_var_prefix)
GLint GLint GLint GLint GLint x
GLuint GLuint GLsizei count
GLuint GLuint GLsizei GLenum type
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean flag
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
_Check_return_opt_ _CRTIMP int __cdecl vfprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format, va_list _ArgList)
_Check_return_opt_ _CRTIMP int __cdecl fputc(_In_ int _Ch, _Inout_ FILE *_File)
#define sprintf(buf, format,...)
static const DWORD padding[]
static uint64_t range_max(IN const pnfs_layout *layout)
#define FC_TOP_LEVEL_CONFORMANCE
#define FC_POINTER_CONFORMANCE
#define NDR_CONTEXT_HANDLE_CANNOT_BE_NULL
#define FC_ALLOCATE_ALL_NODES
#define NDR_CONTEXT_HANDLE_SERIALIZE
@ FC_NON_ENCAPSULATED_UNION
#define FC_NORMAL_CONFORMANCE
#define Oi_USE_NEW_INIT_ROUTINES
#define FC_SIMPLE_POINTER
#define NDR_CONTEXT_HANDLE_NOSERIALIZE
#define Oi_OBJ_USE_V2_INTERPRETER
#define FC_CONSTANT_CONFORMANCE
#define FC_ALLOCED_ON_STACK
#define NDR_STRICT_CONTEXT_HANDLE
__WINE_SERVER_LIST_INLINE unsigned int list_count(const struct list *list)
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
__WINE_SERVER_LIST_INLINE struct list * list_next(const struct list *list, const struct list *elem)
__WINE_SERVER_LIST_INLINE struct list * list_tail(const struct list *list)
wchar_t const *const size_t const buffer_size
union _statement_t::@5190 u
struct _type_list_t * next
unsigned int typestring_offset
union _type_t::@5189 details
struct iface_details * iface
enum storage_class stgclass
Character const *const prefix
static void write_proc_func_header(FILE *file, int indent, const type_t *iface, const var_t *func, unsigned int *offset, unsigned short num_proc)
static int cant_be_null(const var_t *v)
static const unsigned short IsReturn
static unsigned int field_memsize(const type_t *type, unsigned int *offset)
static unsigned int write_range_tfs(FILE *file, const attr_list_t *attrs, type_t *type, expr_list_t *range_list, unsigned int *typeformat_offset)
@ TYPE_CONTEXT_CONTAINER_NO_POINTERS
@ TYPE_CONTEXT_TOPLEVELPARAM
static int is_conformance_needed_for_phase(enum remoting_phase phase)
static int write_pointer_description_offsets(FILE *file, const attr_list_t *attrs, type_t *type, unsigned int *offset_in_memory, unsigned int *offset_in_buffer, unsigned int *typestring_offset)
static const unsigned short IsBasetype
static type_t * get_user_type(const type_t *t, const char **pname)
static const unsigned short IsSimpleRef
static unsigned int get_stack_size(const var_t *var, int *by_value)
static unsigned int get_required_buffer_size(const var_t *var, unsigned int *alignment, enum pass pass)
static unsigned int get_required_buffer_size_type(const type_t *type, const char *name, const attr_list_t *attrs, int toplevel_param, unsigned int *alignment)
void write_pointer_checks(FILE *file, int indent, const var_t *func)
void declare_stub_args(FILE *file, int indent, const var_t *func)
enum typegen_type typegen_detect_type(const type_t *type, const attr_list_t *attrs, unsigned int flags)
static unsigned int fields_memsize(const var_list_t *fields, unsigned int *align)
static unsigned int write_simple_pointer(FILE *file, const attr_list_t *attrs, const type_t *type, enum type_context context)
static const unsigned short IsOut
static void * get_aliaschain_attrp(const type_t *type, enum attr_type attr)
static void write_branch_type(FILE *file, const type_t *t, unsigned int *tfsoff)
static int write_base_type(FILE *file, const type_t *type, unsigned int *typestring_offset)
static unsigned char get_pointer_fc_context(const type_t *type, const attr_list_t *attrs, enum type_context context)
static const unsigned short MustSize
static void write_procformatstring_func(FILE *file, int indent, const type_t *iface, const var_t *func, unsigned int *offset, unsigned short num_proc)
static void write_remoting_arg(FILE *file, int indent, const var_t *func, const char *local_var_prefix, enum pass pass, enum remoting_phase phase, const var_t *var)
void write_procformatstring(FILE *file, const statement_list_t *stmts, type_pred_t pred)
static const char * string_of_type(unsigned char type)
static unsigned int write_nonsimple_pointer(FILE *file, const attr_list_t *attrs, const type_t *type, enum type_context context, unsigned int offset, unsigned int *typeformat_offset)
static const var_t * find_array_or_string_in_struct(const type_t *type)
static unsigned int write_array_tfs(FILE *file, const attr_list_t *attrs, type_t *type, const char *name, unsigned int *typestring_offset)
unsigned int get_size_typeformatstring(const statement_list_t *stmts, type_pred_t pred)
static int write_embedded_types(FILE *file, const attr_list_t *attrs, type_t *type, const char *name, int write_ptr, unsigned int *tfsoff)
void write_parameters_init(FILE *file, int indent, const var_t *func, const char *local_var_prefix)
static void get_size_procformatstring_iface(type_t *iface, FILE *file, int indent, unsigned int *size)
static struct list expr_eval_routines
static void write_formatdesc(FILE *f, int indent, const char *str)
static unsigned int write_pointer_tfs(FILE *file, const attr_list_t *attrs, type_t *type, unsigned int ref_offset, enum type_context context, unsigned int *typestring_offset)
void write_endpoints(FILE *f, const char *prefix, const str_list_t *list)
static unsigned char get_basic_fc_signed(const type_t *type)
static const unsigned short MustFree
static unsigned int write_user_tfs(FILE *file, type_t *type, unsigned int *tfsoff)
void write_user_quad_list(FILE *file)
void print_phase_basetype(FILE *file, int indent, const char *local_var_prefix, enum remoting_phase phase, enum pass pass, const var_t *var, const char *varname)
static unsigned int write_type_tfs(FILE *file, int indent, const attr_list_t *attrs, type_t *type, const char *name, enum type_context context, unsigned int *typeformat_offset)
static void guard_rec(type_t *type)
expr_t * get_size_is_expr(const type_t *t, const char *name)
static void write_pointer_description(FILE *file, const attr_list_t *attrs, type_t *type, unsigned int *typestring_offset)
static int is_user_type(const type_t *t)
static unsigned int get_function_buffer_size(const var_t *func, enum pass pass)
static int type_has_full_pointer(const type_t *type, const attr_list_t *attrs, int toplevel_param)
static unsigned int write_old_procformatstring_type(FILE *file, int indent, const var_t *var, int is_return, int is_interpreted)
static unsigned char get_func_oi2_flags(const var_t *func)
void write_full_pointer_init(FILE *file, int indent, const var_t *func, int is_server)
void print(FILE *file, int indent, const char *format, va_list va)
void write_func_param_struct(FILE *file, const type_t *iface, const type_t *func, const char *var_decl, int add_retval)
static int write_no_repeat_pointer_descriptions(FILE *file, const attr_list_t *attrs, type_t *type, unsigned int *offset_in_memory, unsigned int *offset_in_buffer, unsigned int *typestring_offset)
static unsigned int write_conf_or_var_desc(FILE *file, const type_t *cont_type, unsigned int baseoff, const type_t *type, const expr_t *expr)
unsigned char get_pointer_fc(const type_t *type, const attr_list_t *attrs, int toplevel_param)
static unsigned int write_union_tfs(FILE *file, const attr_list_t *attrs, type_t *type, unsigned int *tfsoff)
static int write_varying_array_pointer_descriptions(FILE *file, const attr_list_t *attrs, type_t *type, unsigned int *offset_in_memory, unsigned int *offset_in_buffer, unsigned int *typestring_offset)
void write_expr_eval_routine_list(FILE *file, const char *iface)
static unsigned char get_array_fc(const type_t *type)
static unsigned short user_type_offset(const char *name)
static unsigned char get_contexthandle_flags(const type_t *iface, const attr_list_t *attrs, const type_t *type)
int decl_indirect(const type_t *t)
void write_typeformatstring(FILE *file, const statement_list_t *stmts, type_pred_t pred)
#define ROUND_SIZE(size, alignment)
static const unsigned short IsByValue
void write_exceptions(FILE *file)
static int is_embedded_complex(const type_t *type)
static int is_non_complex_struct(const type_t *type)
unsigned char get_struct_fc(const type_t *type)
void write_remoting_arguments(FILE *file, int indent, const var_t *func, const char *local_var_prefix, enum pass pass, enum remoting_phase phase)
static void write_array_element_type(FILE *file, const attr_list_t *attrs, const type_t *type, int cont_is_complex, unsigned int *tfsoff)
int is_full_pointer_function(const var_t *func)
static unsigned char get_parameter_fc(const var_t *var, int is_return, unsigned short *flags, unsigned int *stack_size, unsigned int *typestring_offset)
static unsigned int write_ip_tfs(FILE *file, const attr_list_t *attrs, type_t *type, unsigned int *typeformat_offset)
unsigned int get_size_procformatstring_func(const type_t *iface, const var_t *func)
static unsigned int write_new_procformatstring_type(FILE *file, int indent, const var_t *var, int is_return, unsigned int *stack_offset)
unsigned char get_basic_fc(const type_t *type)
void write_client_call_routine(FILE *file, const type_t *iface, const var_t *func, const char *prefix, unsigned int proc_offset)
unsigned int type_memsize(const type_t *t)
static int get_padding(const var_list_t *fields)
static const unsigned short IsIn
int is_interpreted_func(const type_t *iface, const var_t *func)
static int write_fixed_array_pointer_descriptions(FILE *file, const attr_list_t *attrs, type_t *type, unsigned int *offset_in_memory, unsigned int *offset_in_buffer, unsigned int *typestring_offset)
static void write_end(FILE *file, unsigned int *tfsoff)
int write_expr_eval_routines(FILE *file, const char *iface)
static const char * get_context_handle_type_name(const type_t *type)
void write_parameter_conf_or_var_exprs(FILE *file, int indent, const char *local_var_prefix, enum remoting_phase phase, const var_t *var, int valid_variance)
static int processed(const type_t *type)
static const type_t * current_iface
unsigned int get_size_procformatstring(const statement_list_t *stmts, type_pred_t pred)
#define ROUNDING(size, alignment)
void write_procformatstring_offsets(FILE *file, const type_t *iface)
static void print_file(FILE *file, int indent, const char *format,...) __attribute__((format(printf
static void write_iface_procformatstring(type_t *iface, FILE *file, int indent, unsigned int *offset)
static void write_var_init(FILE *file, int indent, const type_t *t, const char *n, const char *local_var_prefix)
static unsigned int write_contexthandle_tfs(FILE *file, const attr_list_t *attrs, type_t *type, int toplevel_param, unsigned int *typeformat_offset)
static void print_start_tfs_comment(FILE *file, type_t *t, unsigned int tfsoff)
static void write_member_type(FILE *file, const type_t *cont, int cont_is_complex, const attr_list_t *attrs, const type_t *type, unsigned int *corroff, unsigned int *tfsoff)
static void for_each_iface(const statement_list_t *stmts, void(*proc)(type_t *iface, FILE *file, int indent, unsigned int *offset), type_pred_t pred, FILE *file, int indent, unsigned int *offset)
static unsigned char get_enum_fc(const type_t *type)
static unsigned int clamp_align(unsigned int align)
static void process_tfs_iface(type_t *iface, FILE *file, int indent, unsigned int *offset)
static unsigned int process_tfs(FILE *file, const statement_list_t *stmts, type_pred_t pred)
static int user_type_has_variable_size(const type_t *t)
static int write_conformant_array_pointer_descriptions(FILE *file, const attr_list_t *attrs, type_t *type, unsigned int offset_in_memory, unsigned int *typestring_offset)
static unsigned int write_struct_tfs(FILE *file, type_t *type, const char *name, unsigned int *tfsoff)
unsigned int type_memsize_and_alignment(const type_t *t, unsigned int *align)
void write_full_pointer_free(FILE *file, int indent, const var_t *func)
static int type_has_pointers(const type_t *type)
static void write_descriptors(FILE *file, type_t *type, unsigned int *tfsoff)
static unsigned int write_string_tfs(FILE *file, const attr_list_t *attrs, type_t *type, enum type_context context, const char *name, unsigned int *typestring_offset)
static const type_t * current_structure
void write_formatstringsdecl(FILE *f, int indent, const statement_list_t *stmts, type_pred_t pred)
static void write_struct_members(FILE *file, const type_t *type, int is_complex, unsigned int *corroff, unsigned int *typestring_offset)
static void update_tfsoff(type_t *type, unsigned int offset, FILE *file)
static void print_phase_function(FILE *file, int indent, const char *type, const char *local_var_prefix, enum remoting_phase phase, const var_t *var, unsigned int type_offset)
static const unsigned short IsPipe
static unsigned int union_memsize(const var_list_t *fields, unsigned int *pmaxa)
void assign_stub_out_args(FILE *file, int indent, const var_t *func, const char *local_var_prefix)
#define WRITE_FCTYPE(file, fctype, typestring_offset)
static const var_t * current_func
static unsigned int type_buffer_alignment(const type_t *t)
static unsigned int get_rpc_flags(const attr_list_t *attrs)
int(* type_pred_t)(const type_t *)
@ TGT_CTXT_HANDLE_POINTER
static int type_array_is_decl_as_ptr(const type_t *type)
static enum type_type type_get_type(const type_t *type)
static unsigned char type_pointer_get_default_fc(const type_t *type)
static unsigned char type_array_get_ptr_default_fc(const type_t *type)
static int type_basic_get_sign(const type_t *type)
static var_t * type_union_get_switch_value(const type_t *type)
static type_t * type_function_get_rettype(const type_t *type)
static expr_t * type_array_get_variance(const type_t *type)
static int type_array_has_conformance(const type_t *type)
static var_list_t * type_union_get_cases(const type_t *type)
static enum type_basic_type type_basic_get_type(const type_t *type)
static type_t * type_alias_get_aliasee(const type_t *type)
static var_t * type_function_get_retval(const type_t *type)
static expr_t * type_array_get_conformance(const type_t *type)
static var_list_t * type_struct_get_fields(const type_t *type)
static var_list_t * type_encapsulated_union_get_fields(const type_t *type)
static int type_is_alias(const type_t *type)
static type_t * type_iface_get_inherit(const type_t *type)
static type_t * type_array_get_element(const type_t *type)
static unsigned int type_array_get_dim(const type_t *type)
static statement_list_t * type_iface_get_stmts(const type_t *type)
static type_t * type_pointer_get_ref(const type_t *type)
static int type_array_has_variance(const type_t *type)
static unsigned stack_offset(compile_ctx_t *ctx)
unsigned int pointer_size
enum stub_mode get_stub_mode(void)
void set_all_tfswrite(int val)
@ TYPE_ENCAPSULATED_UNION
void clear_all_offsets(void)
@ ATTR_STRICTCONTEXTHANDLE
static enum type_type type_get_type_detect_alias(const type_t *type)
static var_list_t * type_get_function_args(const type_t *func_type)
@ TYPE_BASIC_ERROR_STATUS_T
#define STATEMENTS_FOR_EACH_FUNC(stmt, stmts)