Remove ARI problems:
* ada-exp.y (write_var_from_sym): Reformat to put operator at beginning of line. * ada-lang.c (MAX_OF_SIZE): Rename max_of_size. Add comment. Add comment concerning MAX_OF_TYPE and MIN_OF_TYPE. (MIN_OF_SIZE): Rename min_of_size. Add comment. (UMAX_OF_SIZE): Renmae umax_of_size. Add comment. (UMIN_OF_SIZE): Remove. (max_of_type): New function to replace orphan macro in gdbtypes.h (min_of_type): Ditto. (discrete_type_high_bound): Use max_of_type. (discrete_type_low_bound): Use min_of_type. (possible_user_operator_p): Move operator to beginning of line. (ada_is_variant_part): Ditto. (ensure_lval): Rewrite to avoid deprecated operations. (ada_finish_decode_line_1): Use gdbarch_convert_from_func_ptr_addr rather than adding DEPRECATED_FUNCTION_START_OFFSET. (ada_enum_name): Remove assignments in 'if' statements. (build_ada_types): Add gdbarch parameter. (_initialize_ada_language): Replace deprecated_register_gdbarch_swap with gdbarch_data_register_post_init. Use add_setshow_uinteger_cmd rather than add_set_cmd and add_show_from_set. * ada-valprint.c (inspect_it): Remove declaration. (repeat_count_threshold): Remove declaration. (ada_print_floating): Remove assignments in 'if' statements. (print_str): Move operator to beginning of line.
This commit is contained in:
parent
e525914fa7
commit
c3e5cd34c6
4 changed files with 142 additions and 60 deletions
|
@ -48,9 +48,6 @@ struct ada_val_print_args
|
|||
enum val_prettyprint pretty;
|
||||
};
|
||||
|
||||
extern int inspect_it;
|
||||
extern unsigned int repeat_count_threshold;
|
||||
|
||||
static void print_record (struct type *, char *, struct ui_file *, int,
|
||||
int, enum val_prettyprint);
|
||||
|
||||
|
@ -317,21 +314,34 @@ ada_print_floating (char *valaddr, struct type *type, struct ui_file *stream)
|
|||
len = strlen (result);
|
||||
|
||||
/* Modify for Ada rules. */
|
||||
if ((s = strstr (result, "inf")) != NULL
|
||||
|| (s = strstr (result, "Inf")) != NULL
|
||||
|| (s = strstr (result, "INF")) != NULL)
|
||||
|
||||
s = strstr (result, "inf");
|
||||
if (s == NULL)
|
||||
s = strstr (result, "Inf");
|
||||
if (s == NULL)
|
||||
s = strstr (result, "INF");
|
||||
if (s != NULL)
|
||||
strcpy (s, "Inf");
|
||||
else if ((s = strstr (result, "nan")) != NULL
|
||||
|| (s = strstr (result, "NaN")) != NULL
|
||||
|| (s = strstr (result, "Nan")) != NULL)
|
||||
|
||||
if (s == NULL)
|
||||
{
|
||||
s[0] = s[2] = 'N';
|
||||
if (result[0] == '-')
|
||||
result += 1;
|
||||
s = strstr (result, "nan");
|
||||
if (s == NULL)
|
||||
s = strstr (result, "NaN");
|
||||
if (s == NULL)
|
||||
s = strstr (result, "Nan");
|
||||
if (s != NULL)
|
||||
{
|
||||
s[0] = s[2] = 'N';
|
||||
if (result[0] == '-')
|
||||
result += 1;
|
||||
}
|
||||
}
|
||||
else if (strchr (result, '.') == NULL)
|
||||
|
||||
if (s == NULL && strchr (result, '.') == NULL)
|
||||
{
|
||||
if ((s = strchr (result, 'e')) == NULL)
|
||||
s = strchr (result, 'e');
|
||||
if (s == NULL)
|
||||
fprintf_filtered (stream, "%s.0", result);
|
||||
else
|
||||
fprintf_filtered (stream, "%.*s.0%s", (int) (s-result), result, s);
|
||||
|
@ -460,9 +470,9 @@ printstr (struct ui_file *stream, char *string, unsigned int length,
|
|||
|
||||
rep1 = i + 1;
|
||||
reps = 1;
|
||||
while (rep1 < length &&
|
||||
char_at (string, rep1, type_len) == char_at (string, i,
|
||||
type_len))
|
||||
while (rep1 < length
|
||||
&& char_at (string, rep1, type_len) == char_at (string, i,
|
||||
type_len))
|
||||
{
|
||||
rep1 += 1;
|
||||
reps += 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue