+ fprintfi_filtered (level, stream, "}");
+ }
+}
+
+/* Print the name of the type (or the ultimate pointer target,
+ function value or array element), or the description of a structure
+ or union.
+
+ SHOW positive means print details about the type (e.g. enum
+ values), and print structure elements passing SHOW - 1 for show.
+
+ SHOW negative means just print the type name or struct tag if there
+ is one. If there is no name, print something sensible but concise
+ like "struct {...}".
+
+ SHOW zero means just print the type name or struct tag if there is
+ one. If there is no name, print something sensible but not as
+ concise like "struct {int x; int y;}".
+
+ LEVEL is the number of spaces to indent by.
+ We increase it for some recursive calls. */
+
+static void
+c_type_print_base_1 (struct type *type, struct ui_file *stream,
+ int show, int level,
+ enum language language,
+ const struct type_print_options *flags,
+ struct print_offset_data *podata)
+{
+ int i;
+ int len;
+
+ QUIT;
+
+ if (type == NULL)
+ {
+ fputs_styled (_("<type unknown>"), metadata_style.style (), stream);
+ return;
+ }
+
+ /* When SHOW is zero or less, and there is a valid type name, then
+ always just print the type name directly from the type. */
+
+ if (show <= 0
+ && type->name () != NULL)
+ {
+ c_type_print_modifier (type, stream, 0, 1, language);
+
+ /* If we have "typedef struct foo {. . .} bar;" do we want to
+ print it as "struct foo" or as "bar"? Pick the latter for
+ C++, because C++ folk tend to expect things like "class5
+ *foo" rather than "struct class5 *foo". We rather
+ arbitrarily choose to make language_minimal work in a C-like
+ way. */
+ if (language == language_c || language == language_minimal)
+ {
+ if (type->code () == TYPE_CODE_UNION)
+ fprintf_filtered (stream, "union ");
+ else if (type->code () == TYPE_CODE_STRUCT)
+ {
+ if (TYPE_DECLARED_CLASS (type))
+ fprintf_filtered (stream, "class ");
+ else
+ fprintf_filtered (stream, "struct ");
+ }
+ else if (type->code () == TYPE_CODE_ENUM)
+ fprintf_filtered (stream, "enum ");