#include "defs.h"
#include <string.h>
+#ifdef ANSI_PROTOTYPES
+#include <stdarg.h>
+#else
#include <varargs.h>
+#endif
#include "symtab.h"
#include "gdbtypes.h"
printf_unfiltered ("c Use the C language\n");
printf_unfiltered ("c++ Use the C++ language\n");
printf_unfiltered ("chill Use the Chill language\n");
+ printf_unfiltered ("fortran Use the Fortran language\n");
printf_unfiltered ("modula-2 Use the Modula-2 language\n");
/* Restore the silly string. */
set_language(current_language->la_language);
#if 0 /* Currently unused */
struct type *
-binop_result_type(v1,v2)
- value v1,v2;
+binop_result_type (v1, v2)
+ value_ptr v1, v2;
{
int l1,l2,size,uns;
/* Returns non-zero if the value VAL represents a true value. */
int
value_true (val)
- value val;
+ value_ptr val;
{
/* It is possible that we should have some sort of error if a non-boolean
value is used in this context. Possibly dependent on some kind of
void
binop_type_check(arg1,arg2,op)
- value arg1,arg2;
+ value_ptr arg1,arg2;
int op;
{
struct type *t1, *t2;
return;
t1=VALUE_TYPE(arg1);
- if (arg2!=(value)NULL)
+ if (arg2 != NULL)
t2=VALUE_TYPE(arg2);
else
t2=NULL;
by the value of warning_pre_print and we do not return to the top level. */
void
+#ifdef ANSI_PROTOTYPES
+type_error (char *string, ...)
+#else
type_error (va_alist)
va_dcl
+#endif
{
va_list args;
+#ifdef ANSI_PROTOTYPES
+ va_start (args, string);
+#else
char *string;
+ va_start (args);
+ string = va_arg (args, char *);
+#endif
- if (type_check==type_check_warn)
- fprintf_unfiltered(gdb_stderr,warning_pre_print);
+ if (type_check == type_check_warn)
+ fprintf_filtered (gdb_stderr, warning_pre_print);
else
- target_terminal_ours();
+ error_begin ();
- va_start (args);
- string = va_arg (args, char *);
- vfprintf_unfiltered (gdb_stderr, string, args);
- fprintf_unfiltered (gdb_stderr, "\n");
+ vfprintf_filtered (gdb_stderr, string, args);
+ fprintf_filtered (gdb_stderr, "\n");
va_end (args);
- if (type_check==type_check_on)
- return_to_top_level (RETURN_ERROR);
+ if (type_check == type_check_on)
+ return_to_top_level (RETURN_ERROR);
}
void
+#ifdef ANSI_PROTOTYPES
+range_error (char *string, ...)
+#else
range_error (va_alist)
va_dcl
+#endif
{
va_list args;
+#ifdef ANSI_PROTOTYPES
+ va_start (args, string);
+#else
char *string;
+ va_start (args);
+ string = va_arg (args, char *);
+#endif
- if (range_check==range_check_warn)
- fprintf_unfiltered(gdb_stderr,warning_pre_print);
+ if (range_check == range_check_warn)
+ fprintf_filtered (gdb_stderr, warning_pre_print);
else
- target_terminal_ours();
+ error_begin ();
- va_start (args);
- string = va_arg (args, char *);
- vfprintf_unfiltered (gdb_stderr, string, args);
- fprintf_unfiltered (gdb_stderr, "\n");
+ vfprintf_filtered (gdb_stderr, string, args);
+ fprintf_filtered (gdb_stderr, "\n");
va_end (args);
- if (range_check==range_check_on)
- return_to_top_level (RETURN_ERROR);
+ if (range_check == range_check_on)
+ return_to_top_level (RETURN_ERROR);
}
\f
error ("internal error - unimplemented function unk_lang_val_print called.");
}
+int
+unk_lang_value_print (val, stream, format, pretty)
+ value_ptr val;
+ GDB_FILE *stream;
+ int format;
+ enum val_prettyprint pretty;
+{
+ error ("internal error - unimplemented function unk_lang_value_print called.");
+}
+
static struct type ** const (unknown_builtin_types[]) = { 0 };
static const struct op_print unk_op_print_tab[] = {
{NULL, OP_NULL, PREC_NULL, 0}
type_check_off,
unk_lang_parser,
unk_lang_error,
+ evaluate_subexp_standard,
unk_lang_printchar, /* Print character constant */
unk_lang_printstr,
unk_lang_create_fundamental_type,
unk_lang_print_type, /* Print a type using appropriate syntax */
unk_lang_val_print, /* Print a value using appropriate syntax */
- &builtin_type_error, /* longest signed integral type */
- &builtin_type_error, /* longest unsigned integral type */
- &builtin_type_error, /* longest floating point type */
+ unk_lang_value_print, /* Print a top-level value */
{"", "", "", ""}, /* Binary format info */
{"0%lo", "0", "o", ""}, /* Octal format info */
{"%ld", "", "d", ""}, /* Decimal format info */
{"0x%lx", "0x", "x", ""}, /* Hex format info */
unk_op_print_tab, /* expression operators for printing */
+ 1, /* c-style arrays */
+ 0, /* String lower bound */
+ &builtin_type_char, /* Type of string elements */
LANG_MAGIC
};
type_check_off,
unk_lang_parser,
unk_lang_error,
+ evaluate_subexp_standard,
unk_lang_printchar, /* Print character constant */
unk_lang_printstr,
unk_lang_create_fundamental_type,
unk_lang_print_type, /* Print a type using appropriate syntax */
unk_lang_val_print, /* Print a value using appropriate syntax */
- &builtin_type_error, /* longest signed integral type */
- &builtin_type_error, /* longest unsigned integral type */
- &builtin_type_error, /* longest floating point type */
+ unk_lang_value_print, /* Print a top-level value */
{"", "", "", ""}, /* Binary format info */
{"0%lo", "0", "o", ""}, /* Octal format info */
{"%ld", "", "d", ""}, /* Decimal format info */
{"0x%lx", "0x", "x", ""}, /* Hex format info */
unk_op_print_tab, /* expression operators for printing */
+ 1, /* c-style arrays */
+ 0, /* String lower bound */
+ &builtin_type_char, /* Type of string elements */
LANG_MAGIC
};
type_check_off,
unk_lang_parser,
unk_lang_error,
+ evaluate_subexp_standard,
unk_lang_printchar, /* Print character constant */
unk_lang_printstr,
unk_lang_create_fundamental_type,
unk_lang_print_type, /* Print a type using appropriate syntax */
unk_lang_val_print, /* Print a value using appropriate syntax */
- &builtin_type_error, /* longest signed integral type */
- &builtin_type_error, /* longest unsigned integral type */
- &builtin_type_error, /* longest floating point type */
+ unk_lang_value_print, /* Print a top-level value */
{"", "", "", ""}, /* Binary format info */
{"0%lo", "0", "o", ""}, /* Octal format info */
{"%ld", "", "d", ""}, /* Decimal format info */
{"0x%lx", "0x", "x", ""}, /* Hex format info */
unk_op_print_tab, /* expression operators for printing */
+ 1, /* c-style arrays */
+ 0, /* String lower bound */
+ &builtin_type_char, /* Type of string elements */
LANG_MAGIC
};
\f