Lines 1126-1137
Link Here
|
1126 |
if (constant) |
1126 |
if (constant) |
1127 |
{ |
1127 |
{ |
1128 |
request->append_number(gds_dyn_trg_sequence, |
1128 |
request->append_number(gds_dyn_trg_sequence, |
1129 |
(SSHORT)(SLONG) (constant ? constant->nod_arg[0] : 0)); |
1129 |
(SSHORT)(SLONG)(IPTR) (constant ? constant->nod_arg[0] : 0)); |
1130 |
} |
1130 |
} |
1131 |
|
1131 |
|
1132 |
if ((constant = node->nod_arg[e_cnstr_type]) != NULL) |
1132 |
if ((constant = node->nod_arg[e_cnstr_type]) != NULL) |
1133 |
{ |
1133 |
{ |
1134 |
const SSHORT type = (SSHORT)(SLONG) constant->nod_arg[0]; |
1134 |
const SSHORT type = (SSHORT)(SLONG)(IPTR) constant->nod_arg[0]; |
1135 |
request->append_number(gds_dyn_trg_type, type); |
1135 |
request->append_number(gds_dyn_trg_type, type); |
1136 |
} |
1136 |
} |
1137 |
|
1137 |
|
Lines 1270-1276
Link Here
|
1270 |
|
1270 |
|
1271 |
switch (element->nod_type) { |
1271 |
switch (element->nod_type) { |
1272 |
case nod_file_length: |
1272 |
case nod_file_length: |
1273 |
start = (SLONG) (element->nod_arg[0]) + 1; |
1273 |
start = (SLONG) (IPTR) (element->nod_arg[0]) + 1; |
1274 |
break; |
1274 |
break; |
1275 |
|
1275 |
|
1276 |
default: |
1276 |
default: |
Lines 1336-1360
Link Here
|
1336 |
|
1336 |
|
1337 |
case nod_group_commit_wait: |
1337 |
case nod_group_commit_wait: |
1338 |
request->append_uchar(gds_dyn_log_group_commit_wait); |
1338 |
request->append_uchar(gds_dyn_log_group_commit_wait); |
1339 |
temp_long = (SLONG) (element->nod_arg[0]); |
1339 |
temp_long = (SLONG) (IPTR) (element->nod_arg[0]); |
1340 |
request->append_ulong_with_length(temp_long); |
1340 |
request->append_ulong_with_length(temp_long); |
1341 |
break; |
1341 |
break; |
1342 |
|
1342 |
|
1343 |
case nod_check_point_len: |
1343 |
case nod_check_point_len: |
1344 |
request->append_uchar(gds_dyn_log_check_point_length); |
1344 |
request->append_uchar(gds_dyn_log_check_point_length); |
1345 |
temp_long = (SLONG) (element->nod_arg[0]); |
1345 |
temp_long = (SLONG) (IPTR) (element->nod_arg[0]); |
1346 |
request->append_ulong_with_length(temp_long); |
1346 |
request->append_ulong_with_length(temp_long); |
1347 |
break; |
1347 |
break; |
1348 |
|
1348 |
|
1349 |
case nod_num_log_buffers: |
1349 |
case nod_num_log_buffers: |
1350 |
request->append_uchar(gds_dyn_log_num_of_buffers); |
1350 |
request->append_uchar(gds_dyn_log_num_of_buffers); |
1351 |
temp_short = (SSHORT)(SLONG) (element->nod_arg[0]); |
1351 |
temp_short = (SSHORT)(SLONG) (IPTR) (element->nod_arg[0]); |
1352 |
request->append_ushort_with_length(temp_short); |
1352 |
request->append_ushort_with_length(temp_short); |
1353 |
break; |
1353 |
break; |
1354 |
|
1354 |
|
1355 |
case nod_log_buffer_size: |
1355 |
case nod_log_buffer_size: |
1356 |
request->append_uchar(gds_dyn_log_buffer_size); |
1356 |
request->append_uchar(gds_dyn_log_buffer_size); |
1357 |
temp_short = (SSHORT)(SLONG) (element->nod_arg[0]); |
1357 |
temp_short = (SSHORT)(SLONG) (IPTR) (element->nod_arg[0]); |
1358 |
request->append_ushort_with_length(temp_short); |
1358 |
request->append_ushort_with_length(temp_short); |
1359 |
break; |
1359 |
break; |
1360 |
|
1360 |
|
Lines 1637-1647
Link Here
|
1637 |
request->append_number(gds_dyn_def_dimension, position); |
1637 |
request->append_number(gds_dyn_def_dimension, position); |
1638 |
DSQL_NOD element = *ptr++; |
1638 |
DSQL_NOD element = *ptr++; |
1639 |
request->append_uchar(gds_dyn_dim_lower); |
1639 |
request->append_uchar(gds_dyn_dim_lower); |
1640 |
SLONG lrange = (SLONG) (element->nod_arg[0]); |
1640 |
SLONG lrange = (SLONG) (IPTR) (element->nod_arg[0]); |
1641 |
request->append_ulong_with_length(lrange); |
1641 |
request->append_ulong_with_length(lrange); |
1642 |
element = *ptr; |
1642 |
element = *ptr; |
1643 |
request->append_uchar(gds_dyn_dim_upper); |
1643 |
request->append_uchar(gds_dyn_dim_upper); |
1644 |
SLONG hrange = (SLONG) (element->nod_arg[0]); |
1644 |
SLONG hrange = (SLONG) (IPTR) (element->nod_arg[0]); |
1645 |
request->append_ulong_with_length(hrange); |
1645 |
request->append_ulong_with_length(hrange); |
1646 |
request->append_uchar(gds_dyn_end); |
1646 |
request->append_uchar(gds_dyn_end); |
1647 |
if (lrange >= hrange) |
1647 |
if (lrange >= hrange) |
Lines 2062-2070
Link Here
|
2062 |
request->append_cstring(gds_dyn_def_filter, |
2062 |
request->append_cstring(gds_dyn_def_filter, |
2063 |
((STR) (ptr[e_filter_name]))->str_data); |
2063 |
((STR) (ptr[e_filter_name]))->str_data); |
2064 |
request->append_number(gds_dyn_filter_in_subtype, |
2064 |
request->append_number(gds_dyn_filter_in_subtype, |
2065 |
(SSHORT)(SLONG) ((ptr[e_filter_in_type])->nod_arg[0])); |
2065 |
(SSHORT)(SLONG) (IPTR) ((ptr[e_filter_in_type])->nod_arg[0])); |
2066 |
request->append_number(gds_dyn_filter_out_subtype, |
2066 |
request->append_number(gds_dyn_filter_out_subtype, |
2067 |
(SSHORT)(SLONG) ((ptr[e_filter_out_type])->nod_arg[0])); |
2067 |
(SSHORT)(SLONG) (IPTR) ((ptr[e_filter_out_type])->nod_arg[0])); |
2068 |
request->append_cstring(gds_dyn_func_entry_point, |
2068 |
request->append_cstring(gds_dyn_func_entry_point, |
2069 |
((STR) (ptr[e_filter_entry_pt]))->str_data); |
2069 |
((STR) (ptr[e_filter_entry_pt]))->str_data); |
2070 |
request->append_cstring(gds_dyn_func_module_name, |
2070 |
request->append_cstring(gds_dyn_func_module_name, |
Lines 2670-2685
Link Here
|
2670 |
gds_arg_gds, gds_dsql_shadow_number_err, 0); |
2670 |
gds_arg_gds, gds_dsql_shadow_number_err, 0); |
2671 |
} |
2671 |
} |
2672 |
|
2672 |
|
2673 |
request->append_number(gds_dyn_def_shadow, (SSHORT)(SLONG) (ptr[e_shadow_number])); |
2673 |
request->append_number(gds_dyn_def_shadow, (SSHORT)(SLONG) (IPTR) (ptr[e_shadow_number])); |
2674 |
request->append_cstring(gds_dyn_def_file, ((STR) (ptr[e_shadow_name]))->str_data); |
2674 |
request->append_cstring(gds_dyn_def_file, ((STR) (ptr[e_shadow_name]))->str_data); |
2675 |
request->append_number(gds_dyn_shadow_man_auto, |
2675 |
request->append_number(gds_dyn_shadow_man_auto, |
2676 |
(SSHORT)(SLONG) ((ptr[e_shadow_man_auto])->nod_arg[0])); |
2676 |
(SSHORT)(SLONG) (IPTR) ((ptr[e_shadow_man_auto])->nod_arg[0])); |
2677 |
request->append_number(gds_dyn_shadow_conditional, |
2677 |
request->append_number(gds_dyn_shadow_conditional, |
2678 |
(SSHORT)(SLONG) ((ptr[e_shadow_conditional])->nod_arg[0])); |
2678 |
(SSHORT)(SLONG) (IPTR) ((ptr[e_shadow_conditional])->nod_arg[0])); |
2679 |
|
2679 |
|
2680 |
request->append_file_start(0); |
2680 |
request->append_file_start(0); |
2681 |
|
2681 |
|
2682 |
SLONG length = (SLONG) ptr[e_shadow_length]; |
2682 |
SLONG length = (SLONG) (IPTR) ptr[e_shadow_length]; |
2683 |
request->append_file_length(length); |
2683 |
request->append_file_length(length); |
2684 |
|
2684 |
|
2685 |
request->append_uchar(gds_dyn_end); |
2685 |
request->append_uchar(gds_dyn_end); |
Lines 2806-2820
Link Here
|
2806 |
|
2806 |
|
2807 |
if (constant = node->nod_arg[e_trg_active]) |
2807 |
if (constant = node->nod_arg[e_trg_active]) |
2808 |
request->append_number(gds_dyn_trg_inactive, |
2808 |
request->append_number(gds_dyn_trg_inactive, |
2809 |
(SSHORT)(SLONG) constant->nod_arg[0]); |
2809 |
(SSHORT)(SLONG) (IPTR) constant->nod_arg[0]); |
2810 |
|
2810 |
|
2811 |
if (constant = node->nod_arg[e_trg_position]) |
2811 |
if (constant = node->nod_arg[e_trg_position]) |
2812 |
request->append_number(gds_dyn_trg_sequence, |
2812 |
request->append_number(gds_dyn_trg_sequence, |
2813 |
(SSHORT)(SLONG) constant->nod_arg[0]); |
2813 |
(SSHORT)(SLONG) (IPTR) constant->nod_arg[0]); |
2814 |
|
2814 |
|
2815 |
if (constant = node->nod_arg[e_trg_type]) { |
2815 |
if (constant = node->nod_arg[e_trg_type]) { |
2816 |
request->append_number(gds_dyn_trg_type, (SSHORT)(SLONG) constant->nod_arg[0]); |
2816 |
request->append_number(gds_dyn_trg_type, (SSHORT)(SLONG) (IPTR) constant->nod_arg[0]); |
2817 |
trig_type = (USHORT)(ULONG) constant->nod_arg[0]; |
2817 |
trig_type = (USHORT)(ULONG) (IPTR) constant->nod_arg[0]; |
2818 |
} |
2818 |
} |
2819 |
else { |
2819 |
else { |
2820 |
assert(node->nod_type == nod_mod_trigger); |
2820 |
assert(node->nod_type == nod_mod_trigger); |
Lines 2893-2899
Link Here
|
2893 |
for (DSQL_NOD* ptr = temp->nod_arg; ptr < end; ++ptr) |
2893 |
for (DSQL_NOD* ptr = temp->nod_arg; ptr < end; ++ptr) |
2894 |
{ |
2894 |
{ |
2895 |
DSQL_NOD message = *ptr; |
2895 |
DSQL_NOD message = *ptr; |
2896 |
SSHORT number = (SSHORT)(SLONG) message->nod_arg[e_msg_number]; |
2896 |
SSHORT number = (SSHORT)(SLONG) (IPTR) message->nod_arg[e_msg_number]; |
2897 |
if (message->nod_type == nod_del_trigger_msg) |
2897 |
if (message->nod_type == nod_del_trigger_msg) |
2898 |
{ |
2898 |
{ |
2899 |
request->append_number(gds_dyn_delete_trigger_msg, number); |
2899 |
request->append_number(gds_dyn_delete_trigger_msg, number); |
Lines 2954-2960
Link Here
|
2954 |
// CVC: This is case of "returns <type> [by value|reference]" |
2954 |
// CVC: This is case of "returns <type> [by value|reference]" |
2955 |
/* Some data types can not be returned as value */ |
2955 |
/* Some data types can not be returned as value */ |
2956 |
|
2956 |
|
2957 |
if (((int)(SLONG) (ret_val_ptr[1]->nod_arg[0]) == FUN_value) && |
2957 |
if (((int)(SLONG) (IPTR) (ret_val_ptr[1]->nod_arg[0]) == FUN_value) && |
2958 |
(field->fld_dtype == dtype_text || |
2958 |
(field->fld_dtype == dtype_text || |
2959 |
field->fld_dtype == dtype_varying || |
2959 |
field->fld_dtype == dtype_varying || |
2960 |
field->fld_dtype == dtype_cstring || |
2960 |
field->fld_dtype == dtype_cstring || |
Lines 2998-3004
Link Here
|
2998 |
// CVC: This is case of "returns parameter <N>" |
2998 |
// CVC: This is case of "returns parameter <N>" |
2999 |
|
2999 |
|
3000 |
|
3000 |
|
3001 |
position = (SSHORT)(SLONG) (ret_val_ptr[1]->nod_arg[0]); |
3001 |
position = (SSHORT)(SLONG) (IPTR) (ret_val_ptr[1]->nod_arg[0]); |
3002 |
/* Function modifies an argument whose value is the function return value */ |
3002 |
/* Function modifies an argument whose value is the function return value */ |
3003 |
|
3003 |
|
3004 |
if (!arguments || position > arguments->nod_count || position < 1) { |
3004 |
if (!arguments || position > arguments->nod_count || position < 1) { |
Lines 3024-3030
Link Here
|
3024 |
if (field->fld_dtype == dtype_blob) |
3024 |
if (field->fld_dtype == dtype_blob) |
3025 |
{ |
3025 |
{ |
3026 |
/* CVC: I need to test returning blobs by descriptor before allowing the change there. For now, I ignore the return type specification. */ |
3026 |
/* CVC: I need to test returning blobs by descriptor before allowing the change there. For now, I ignore the return type specification. */ |
3027 |
BOOLEAN free_it = ((SSHORT)(SLONG) ret_val_ptr[1]->nod_arg[0] < 0); |
3027 |
BOOLEAN free_it = ((SSHORT)(SLONG) (IPTR) ret_val_ptr[1]->nod_arg[0] < 0); |
3028 |
request->append_number(gds_dyn_def_function_arg, blob_position); |
3028 |
request->append_number(gds_dyn_def_function_arg, blob_position); |
3029 |
request->append_number(gds_dyn_func_mechanism, |
3029 |
request->append_number(gds_dyn_func_mechanism, |
3030 |
(SSHORT)(SLONG) ((free_it ? -1 : 1) * FUN_blob_struct)); |
3030 |
(SSHORT)(SLONG) ((free_it ? -1 : 1) * FUN_blob_struct)); |
Lines 3035-3041
Link Here
|
3035 |
{ |
3035 |
{ |
3036 |
request->append_number(gds_dyn_def_function_arg, (SSHORT) 0); |
3036 |
request->append_number(gds_dyn_def_function_arg, (SSHORT) 0); |
3037 |
request->append_number(gds_dyn_func_mechanism, |
3037 |
request->append_number(gds_dyn_func_mechanism, |
3038 |
(SSHORT)(SLONG) (ret_val_ptr[1]->nod_arg[0])); |
3038 |
(SSHORT)(SLONG) (IPTR) (ret_val_ptr[1]->nod_arg[0])); |
3039 |
} |
3039 |
} |
3040 |
|
3040 |
|
3041 |
request->append_cstring(gds_dyn_function_name, udf_name); |
3041 |
request->append_cstring(gds_dyn_function_name, udf_name); |
Lines 3070-3076
Link Here
|
3070 |
request->append_number(gds_dyn_def_function_arg, (SSHORT) position); |
3070 |
request->append_number(gds_dyn_def_function_arg, (SSHORT) position); |
3071 |
|
3071 |
|
3072 |
if (param_node [e_udf_param_type]) { |
3072 |
if (param_node [e_udf_param_type]) { |
3073 |
SSHORT arg_mechanism = (SSHORT)(SLONG) (param_node [e_udf_param_type]->nod_arg [0]); |
3073 |
SSHORT arg_mechanism = (SSHORT)(SLONG) (IPTR) (param_node [e_udf_param_type]->nod_arg [0]); |
3074 |
request->append_number(gds_dyn_func_mechanism, arg_mechanism); |
3074 |
request->append_number(gds_dyn_func_mechanism, arg_mechanism); |
3075 |
} |
3075 |
} |
3076 |
else if (field->fld_dtype == dtype_blob) { |
3076 |
else if (field->fld_dtype == dtype_blob) { |
Lines 3677-3689
Link Here
|
3677 |
if (constant) |
3677 |
if (constant) |
3678 |
{ |
3678 |
{ |
3679 |
request->append_number(gds_dyn_trg_sequence, |
3679 |
request->append_number(gds_dyn_trg_sequence, |
3680 |
(SSHORT)(SLONG) (constant ? constant->nod_arg[0] : 0)); |
3680 |
(SSHORT)(SLONG) (IPTR) (constant ? constant->nod_arg[0] : 0)); |
3681 |
} |
3681 |
} |
3682 |
|
3682 |
|
3683 |
constant = node->nod_arg[e_cnstr_type]; |
3683 |
constant = node->nod_arg[e_cnstr_type]; |
3684 |
if (constant) |
3684 |
if (constant) |
3685 |
{ |
3685 |
{ |
3686 |
trig_type = (USHORT)(ULONG) constant->nod_arg[0]; |
3686 |
trig_type = (USHORT)(ULONG)(IPTR) constant->nod_arg[0]; |
3687 |
request->append_number(gds_dyn_trg_type, trig_type); |
3687 |
request->append_number(gds_dyn_trg_type, trig_type); |
3688 |
} |
3688 |
} |
3689 |
else |
3689 |
else |
Lines 4173-4179
Link Here
|
4173 |
|
4173 |
|
4174 |
case nod_del_shadow: |
4174 |
case nod_del_shadow: |
4175 |
request->append_number(gds_dyn_delete_shadow, |
4175 |
request->append_number(gds_dyn_delete_shadow, |
4176 |
(SSHORT)(SLONG) (node->nod_arg[0])); |
4176 |
(SSHORT)(SLONG) (IPTR) (node->nod_arg[0])); |
4177 |
request->append_uchar(gds_dyn_end); |
4177 |
request->append_uchar(gds_dyn_end); |
4178 |
break; |
4178 |
break; |
4179 |
|
4179 |
|
Lines 4611-4635
Link Here
|
4611 |
|
4611 |
|
4612 |
case nod_group_commit_wait: |
4612 |
case nod_group_commit_wait: |
4613 |
request->append_uchar(gds_dyn_log_group_commit_wait); |
4613 |
request->append_uchar(gds_dyn_log_group_commit_wait); |
4614 |
temp_long = (SLONG) (element->nod_arg[0]); |
4614 |
temp_long = (SLONG)(IPTR) (element->nod_arg[0]); |
4615 |
request->append_ulong_with_length(temp_long); |
4615 |
request->append_ulong_with_length(temp_long); |
4616 |
break; |
4616 |
break; |
4617 |
|
4617 |
|
4618 |
case nod_check_point_len: |
4618 |
case nod_check_point_len: |
4619 |
request->append_uchar(gds_dyn_log_check_point_length); |
4619 |
request->append_uchar(gds_dyn_log_check_point_length); |
4620 |
temp_long = (SLONG) (element->nod_arg[0]); |
4620 |
temp_long = (SLONG)(IPTR) (element->nod_arg[0]); |
4621 |
request->append_ulong_with_length(temp_long); |
4621 |
request->append_ulong_with_length(temp_long); |
4622 |
break; |
4622 |
break; |
4623 |
|
4623 |
|
4624 |
case nod_num_log_buffers: |
4624 |
case nod_num_log_buffers: |
4625 |
request->append_uchar(gds_dyn_log_num_of_buffers); |
4625 |
request->append_uchar(gds_dyn_log_num_of_buffers); |
4626 |
temp_short = (SSHORT)(SLONG) (element->nod_arg[0]); |
4626 |
temp_short = (SSHORT)(SLONG)(IPTR) (element->nod_arg[0]); |
4627 |
request->append_ushort_with_length(temp_short); |
4627 |
request->append_ushort_with_length(temp_short); |
4628 |
break; |
4628 |
break; |
4629 |
|
4629 |
|
4630 |
case nod_log_buffer_size: |
4630 |
case nod_log_buffer_size: |
4631 |
request->append_uchar(gds_dyn_log_buffer_size); |
4631 |
request->append_uchar(gds_dyn_log_buffer_size); |
4632 |
temp_short = (SSHORT)(SLONG) (element->nod_arg[0]); |
4632 |
temp_short = (SSHORT)(SLONG)(IPTR) (element->nod_arg[0]); |
4633 |
request->append_ushort_with_length(temp_short); |
4633 |
request->append_ushort_with_length(temp_short); |
4634 |
break; |
4634 |
break; |
4635 |
case nod_drop_log: |
4635 |
case nod_drop_log: |
Lines 5095-5101
Link Here
|
5095 |
const_node = element->nod_arg[e_mod_fld_pos_new_position]; |
5095 |
const_node = element->nod_arg[e_mod_fld_pos_new_position]; |
5096 |
|
5096 |
|
5097 |
/* CVC: Since now the parser accepts pos=1..N, let's subtract one here. */ |
5097 |
/* CVC: Since now the parser accepts pos=1..N, let's subtract one here. */ |
5098 |
constant = (SSHORT)(SLONG) const_node->nod_arg [0] - 1; |
5098 |
constant = (SSHORT)(SLONG) (IPTR) const_node->nod_arg [0] - 1; |
5099 |
|
5099 |
|
5100 |
request->append_cstring(gds_dyn_rel_name, |
5100 |
request->append_cstring(gds_dyn_rel_name, |
5101 |
relation_name->str_data); |
5101 |
relation_name->str_data); |