* inftarg.c (child_thread_alive): New function to see if a
[deliverable/binutils-gdb.git] / gdb / language.c
index 4a3b6a0ee6ae1d0b5f73f1b34cf88f42a43d33d6..f989cb2aec15b9e0eee0abf0cccdd75aa5d28aa9 100644 (file)
@@ -29,7 +29,11 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 #include "defs.h"
 #include <string.h>
+#ifdef ANSI_PROTOTYPES
+#include <stdarg.h>
+#else
 #include <varargs.h>
+#endif
 
 #include "symtab.h"
 #include "gdbtypes.h"
@@ -166,6 +170,7 @@ set_language_command (ignore, from_tty)
     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);
@@ -977,19 +982,27 @@ op_error (fmt,op,fatal)
    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_filtered (gdb_stderr, warning_pre_print);
    else
      error_begin ();
 
-   va_start (args);
-   string = va_arg (args, char *);
    vfprintf_filtered (gdb_stderr, string, args);
    fprintf_filtered (gdb_stderr, "\n");
    va_end (args);
@@ -998,19 +1011,27 @@ type_error (va_alist)
 }
 
 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_filtered (gdb_stderr, warning_pre_print);
    else
      error_begin ();
 
-   va_start (args);
-   string = va_arg (args, char *);
    vfprintf_filtered (gdb_stderr, string, args);
    fprintf_filtered (gdb_stderr, "\n");
    va_end (args);
@@ -1188,18 +1209,21 @@ const struct language_defn unknown_language_defn = {
   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 */
   unk_lang_value_print,                /* Print a top-level value */
-  &builtin_type_error,         /* longest floating point type */
   {"",      "",    "",   ""},  /* 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
 };
 
@@ -1212,18 +1236,21 @@ const struct language_defn auto_language_defn = {
   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 */
   unk_lang_value_print,                /* Print a top-level value */
-  &builtin_type_error,         /* longest floating point type */
   {"",      "",    "",   ""},  /* 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
 };
 
@@ -1235,18 +1262,21 @@ const struct language_defn local_language_defn = {
   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 */
   unk_lang_value_print,                /* Print a top-level value */
-  &builtin_type_error,         /* longest floating point type */
   {"",      "",    "",   ""},  /* 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
This page took 0.025059 seconds and 4 git commands to generate.