* ada-lang.c: Re-indent file, with some massaging to help indent

a bit when the result is otherwise really too ugly.
This commit is contained in:
Joel Brobecker 2004-06-28 18:59:14 +00:00
parent c279b077e0
commit 06d5cf63af
2 changed files with 28 additions and 31 deletions

View File

@ -1,3 +1,8 @@
2004-06-28 Joel Brobecker <brobecker@gnat.com>
* ada-lang.c: Re-indent file, with some massaging to help indent
a bit when the result is otherwise really too ugly.
2004-06-27 Ulrich Weigand <uweigand@de.ibm.com> 2004-06-27 Ulrich Weigand <uweigand@de.ibm.com>
* frame.h (struct frame_id): Change bit field type of stack_addr_p, * frame.h (struct frame_id): Change bit field type of stack_addr_p,

View File

@ -993,8 +993,9 @@ ada_decode (const char *encoded)
for (k = 0; ada_opname_table[k].encoded != NULL; k += 1) for (k = 0; ada_opname_table[k].encoded != NULL; k += 1)
{ {
int op_len = strlen (ada_opname_table[k].encoded); int op_len = strlen (ada_opname_table[k].encoded);
if (strncmp (ada_opname_table[k].encoded + 1, encoded + i + 1, if ((strncmp (ada_opname_table[k].encoded + 1, encoded + i + 1,
op_len - 1) == 0 && !isalnum (encoded[i + op_len])) op_len - 1) == 0)
&& !isalnum (encoded[i + op_len]))
{ {
strcpy (decoded + j, ada_opname_table[k].decoded); strcpy (decoded + j, ada_opname_table[k].decoded);
at_start_name = 0; at_start_name = 0;
@ -2688,11 +2689,10 @@ resolve_subexp (struct expression **expp, int *pos, int deprocedure_p,
else if (deprocedure_p else if (deprocedure_p
&& !is_nonfunction (candidates, n_candidates)) && !is_nonfunction (candidates, n_candidates))
{ {
i = ada_resolve_function (candidates, n_candidates, NULL, 0, i = ada_resolve_function
SYMBOL_LINKAGE_NAME (exp-> (candidates, n_candidates, NULL, 0,
elts[pc + SYMBOL_LINKAGE_NAME (exp->elts[pc + 2].symbol),
2].symbol), context_type);
context_type);
if (i < 0) if (i < 0)
error ("Could not find a match for %s", error ("Could not find a match for %s",
SYMBOL_PRINT_NAME (exp->elts[pc + 2].symbol)); SYMBOL_PRINT_NAME (exp->elts[pc + 2].symbol));
@ -2740,13 +2740,11 @@ resolve_subexp (struct expression **expp, int *pos, int deprocedure_p,
i = 0; i = 0;
else else
{ {
i = ada_resolve_function (candidates, n_candidates, i = ada_resolve_function
argvec, nargs, (candidates, n_candidates,
SYMBOL_LINKAGE_NAME (exp-> argvec, nargs,
elts[pc + SYMBOL_LINKAGE_NAME (exp->elts[pc + 5].symbol),
5]. context_type);
symbol),
context_type);
if (i < 0) if (i < 0)
error ("Could not find a match for %s", error ("Could not find a match for %s",
SYMBOL_PRINT_NAME (exp->elts[pc + 5].symbol)); SYMBOL_PRINT_NAME (exp->elts[pc + 5].symbol));
@ -3097,9 +3095,9 @@ user_select_syms (struct ada_symbol_info *syms, int nsyms, int max_results)
find_function_start_sal (syms[i].sym, 1); find_function_start_sal (syms[i].sym, 1);
printf_unfiltered ("[%d] %s at %s:%d\n", i + first_choice, printf_unfiltered ("[%d] %s at %s:%d\n", i + first_choice,
SYMBOL_PRINT_NAME (syms[i].sym), SYMBOL_PRINT_NAME (syms[i].sym),
sal.symtab == (sal.symtab == NULL
NULL ? "<no source file available>" : sal. ? "<no source file available>"
symtab->filename, sal.line); : sal.symtab->filename), sal.line);
continue; continue;
} }
else else
@ -6994,13 +6992,10 @@ ada_search_struct_field (char *name, struct value *arg, int offset,
else if (ada_is_wrapper_field (type, i)) else if (ada_is_wrapper_field (type, i))
{ {
struct value *v = ada_search_struct_field (name, arg, struct value *v = /* Do not let indent join lines here. */
offset + ada_search_struct_field (name, arg,
TYPE_FIELD_BITPOS (type, offset + TYPE_FIELD_BITPOS (type, i) / 8,
i) / TYPE_FIELD_TYPE (type, i));
8,
TYPE_FIELD_TYPE (type,
i));
if (v != NULL) if (v != NULL)
return v; return v;
} }
@ -7013,13 +7008,10 @@ ada_search_struct_field (char *name, struct value *arg, int offset,
for (j = TYPE_NFIELDS (field_type) - 1; j >= 0; j -= 1) for (j = TYPE_NFIELDS (field_type) - 1; j >= 0; j -= 1)
{ {
struct value *v = ada_search_struct_field (name, arg, struct value *v = ada_search_struct_field /* Force line break. */
var_offset (name, arg,
+ var_offset + TYPE_FIELD_BITPOS (field_type, j) / 8,
TYPE_FIELD_BITPOS TYPE_FIELD_TYPE (field_type, j));
(field_type, j) / 8,
TYPE_FIELD_TYPE
(field_type, j));
if (v != NULL) if (v != NULL)
return v; return v;
} }