/* Multiple source language support for GDB.
- Copyright 1991, 1992 Free Software Foundation, Inc.
+ Copyright 1991, 1992, 2000 Free Software Foundation, Inc.
Contributed by the Department of Computer Science at the State University
of New York at Buffalo.
static void
set_type_range PARAMS ((void));
-static void
-unk_lang_emit_char PARAMS ((int c, GDB_FILE * stream, int quoter));
+static void unk_lang_emit_char (int c, struct ui_file *stream, int quoter);
-static void
-unk_lang_printchar PARAMS ((int c, GDB_FILE * stream));
+static void unk_lang_printchar (int c, struct ui_file *stream);
-static void
-unk_lang_printstr PARAMS ((GDB_FILE * stream, char *string, unsigned int length, int width, int force_ellipses));
+static void unk_lang_printstr (struct ui_file * stream, char *string,
+ unsigned int length, int width,
+ int force_ellipses);
static struct type *
unk_lang_create_fundamental_type PARAMS ((struct objfile *, int));
-static void
-unk_lang_print_type PARAMS ((struct type *, char *, GDB_FILE *, int, int));
+static void unk_lang_print_type (struct type *, char *, struct ui_file *,
+ int, int);
-static int
-unk_lang_val_print PARAMS ((struct type *, char *, int, CORE_ADDR, GDB_FILE *,
- int, int, int, enum val_prettyprint));
+static int unk_lang_val_print (struct type *, char *, int, CORE_ADDR,
+ struct ui_file *, int, int, int,
+ enum val_prettyprint);
-static int
-unk_lang_value_print PARAMS ((value_ptr, GDB_FILE *, int, enum val_prettyprint));
+static int unk_lang_value_print (value_ptr, struct ui_file *, int, enum val_prettyprint);
/* Forward declaration */
extern const struct language_defn unknown_language_defn;
{
char *prefix = "";
- free (language);
+ if (language)
+ free (language);
if (language_mode == language_mode_auto)
prefix = "auto; currently ";
{
char *tmp = NULL, *prefix = "";
- free (type);
+ if (type)
+ free (type);
if (type_mode == type_mode_auto)
prefix = "auto; currently ";
error ("Unrecognized range check setting.");
}
- free (range);
+ if (range)
+ free (range);
range = concat (pref, tmp, NULL);
}
return form;
}
+#if 0
+/* FIXME: cagney/2000-03-04: This function does not appear to be used.
+ It can be deleted once 5.0 has been released. */
+/* FIXME: cagney/2000-03-04: This code assumes that the compiler
+ supports ``long long''. */
/* Converts a number to hexadecimal (without leading "0x") and stores it in a
static string. Returns a pointer to this string. */
sprintf (res_longest_raw_hex_string, "%llx", ll);
return res_longest_raw_hex_string;
}
+#endif
/* Converts a number to hexadecimal and stores it in a static
string. Returns a pointer to this string. */
can use local_hex_string_custom
*/
return local_hex_string_custom ((unsigned long) num, width);
-#endif
-
-#if defined (PRINTF_HAS_LONG_LONG)
+#elif defined (PRINTF_HAS_LONG_LONG)
/* Just use printf. */
strcpy (format, local_hex_format_prefix ()); /* 0x */
strcat (format, "%");
static void
unk_lang_emit_char (c, stream, quoter)
register int c;
- GDB_FILE *stream;
+ struct ui_file *stream;
int quoter;
{
error ("internal error - unimplemented function unk_lang_emit_char called.");
static void
unk_lang_printchar (c, stream)
register int c;
- GDB_FILE *stream;
+ struct ui_file *stream;
{
error ("internal error - unimplemented function unk_lang_printchar called.");
}
static void
unk_lang_printstr (stream, string, length, width, force_ellipses)
- GDB_FILE *stream;
+ struct ui_file *stream;
char *string;
unsigned int length;
int width;
unk_lang_print_type (type, varstring, stream, show, level)
struct type *type;
char *varstring;
- GDB_FILE *stream;
+ struct ui_file *stream;
int show;
int level;
{
char *valaddr;
int embedded_offset;
CORE_ADDR address;
- GDB_FILE *stream;
+ struct ui_file *stream;
int format;
int deref_ref;
int recurse;
static int
unk_lang_value_print (val, stream, format, pretty)
value_ptr val;
- GDB_FILE *stream;
+ struct ui_file *stream;
int format;
enum val_prettyprint pretty;
{