daily update
[deliverable/binutils-gdb.git] / gdb / ch-lang.c
index 44e621e1b644d66bd1d8becc7ba0fa473453abeb..b46dce014542e07047e865119e860d8f50bde8d9 100644 (file)
@@ -1,5 +1,6 @@
 /* Chill language support routines for GDB, the GNU debugger.
-   Copyright 1992, 1995, 1996, 2000 Free Software Foundation, Inc.
+   Copyright 1992, 1993, 1994, 1995, 1996, 2000, 2001, 2002
+   Free Software Foundation, Inc.
 
    This file is part of GDB.
 
 
 extern void _initialize_chill_language (void);
 
-static value_ptr
-evaluate_subexp_chill (struct type *, struct expression *, int *,
-                      enum noside);
+static struct value *evaluate_subexp_chill (struct type *, struct expression *,
+                                           int *, enum noside);
 
-static value_ptr value_chill_max_min (enum exp_opcode, value_ptr);
+static struct value *value_chill_max_min (enum exp_opcode, struct value *);
 
-static value_ptr value_chill_card (value_ptr);
+static struct value *value_chill_card (struct value *);
 
-static value_ptr value_chill_length (value_ptr);
+static struct value *value_chill_length (struct value *);
 
 static struct type *chill_create_fundamental_type (struct objfile *, int);
 
@@ -53,8 +53,7 @@ static void chill_printchar (int, struct ui_file *);
    characters to derive the demangled form. */
 
 char *
-chill_demangle (mangled)
-     const char *mangled;
+chill_demangle (const char *mangled)
 {
   const char *joiner = NULL;
   char *demangled;
@@ -81,9 +80,7 @@ chill_demangle (mangled)
 }
 
 static void
-chill_printchar (c, stream)
-     register int c;
-     struct ui_file *stream;
+chill_printchar (register int c, struct ui_file *stream)
 {
   c &= 0xFF;                   /* Avoid sign bit follies */
 
@@ -112,12 +109,8 @@ chill_printchar (c, stream)
  */
 
 static void
-chill_printstr (stream, string, length, width, force_ellipses)
-     struct ui_file *stream;
-     char *string;
-     unsigned int length;
-     int width;
-     int force_ellipses;
+chill_printstr (struct ui_file *stream, char *string, unsigned int length,
+               int width, int force_ellipses)
 {
   register unsigned int i;
   unsigned int things_printed = 0;
@@ -228,9 +221,7 @@ chill_printstr (stream, string, length, width, force_ellipses)
 }
 
 static struct type *
-chill_create_fundamental_type (objfile, typeid)
-     struct objfile *objfile;
-     int typeid;
+chill_create_fundamental_type (struct objfile *objfile, int typeid)
 {
   register struct type *type = NULL;
 
@@ -331,7 +322,7 @@ struct type *builtin_type_chill_long;
 struct type *builtin_type_chill_ulong;
 struct type *builtin_type_chill_real;
 
-struct type **CONST_PTR (chill_builtin_types[]) =
+struct type **const (chill_builtin_types[]) =
 {
   &builtin_type_chill_bool,
     &builtin_type_chill_char,
@@ -346,10 +337,8 @@ struct type **CONST_PTR (chill_builtin_types[]) =
    *RESULT_TYPE is the appropriate type for the result. */
 
 LONGEST
-type_lower_upper (op, type, result_type)
-     enum exp_opcode op;       /* Either UNOP_LOWER or UNOP_UPPER */
-     struct type *type;
-     struct type **result_type;
+type_lower_upper (enum exp_opcode op,  /* Either UNOP_LOWER or UNOP_UPPER */
+                 struct type *type, struct type **result_type)
 {
   LONGEST low, high;
   *result_type = type;
@@ -399,9 +388,8 @@ type_lower_upper (op, type, result_type)
   error ("unknown mode for LOWER/UPPER builtin");
 }
 
-static value_ptr
-value_chill_length (val)
-     value_ptr val;
+static struct value *
+value_chill_length (struct value *val)
 {
   LONGEST tmp;
   struct type *type = VALUE_TYPE (val);
@@ -428,9 +416,8 @@ value_chill_length (val)
   return value_from_longest (builtin_type_int, tmp);
 }
 
-static value_ptr
-value_chill_card (val)
-     value_ptr val;
+static struct value *
+value_chill_card (struct value *val)
 {
   LONGEST tmp = 0;
   struct type *type = VALUE_TYPE (val);
@@ -453,10 +440,8 @@ value_chill_card (val)
   return value_from_longest (builtin_type_int, tmp);
 }
 
-static value_ptr
-value_chill_max_min (op, val)
-     enum exp_opcode op;
-     value_ptr val;
+static struct value *
+value_chill_max_min (enum exp_opcode op, struct value *val)
 {
   LONGEST tmp = 0;
   struct type *type = VALUE_TYPE (val);
@@ -508,18 +493,16 @@ value_chill_max_min (op, val)
                             tmp);
 }
 
-static value_ptr
-evaluate_subexp_chill (expect_type, exp, pos, noside)
-     struct type *expect_type;
-     register struct expression *exp;
-     register int *pos;
-     enum noside noside;
+static struct value *
+evaluate_subexp_chill (struct type *expect_type,
+                      register struct expression *exp, register int *pos,
+                      enum noside noside)
 {
   int pc = *pos;
   struct type *type;
   int tem, nargs;
-  value_ptr arg1;
-  value_ptr *argvec;
+  struct value *arg1;
+  struct value **argvec;
   enum exp_opcode op = exp->elts[*pos].opcode;
   switch (op)
     {
@@ -534,7 +517,8 @@ evaluate_subexp_chill (expect_type, exp, pos, noside)
       if (nargs == 1 && TYPE_CODE (type) == TYPE_CODE_INT)
        {
          /* Looks like string repetition. */
-         value_ptr string = evaluate_subexp_with_coercion (exp, pos, noside);
+         struct value *string = evaluate_subexp_with_coercion (exp, pos,
+                                                               noside);
          return value_concat (arg1, string);
        }
 
@@ -552,7 +536,8 @@ evaluate_subexp_chill (expect_type, exp, pos, noside)
 
          /* Allocate arg vector, including space for the function to be
             called in argvec[0] and a terminating NULL */
-         argvec = (value_ptr *) alloca (sizeof (value_ptr) * (nargs + 2));
+         argvec = (struct value **) alloca (sizeof (struct value *)
+                                            * (nargs + 2));
          argvec[0] = arg1;
          tem = 1;
          for (; tem <= nargs && tem <= TYPE_NFIELDS (type); tem++)
@@ -572,7 +557,8 @@ evaluate_subexp_chill (expect_type, exp, pos, noside)
 
       while (nargs-- > 0)
        {
-         value_ptr index = evaluate_subexp_with_coercion (exp, pos, noside);
+         struct value *index = evaluate_subexp_with_coercion (exp, pos,
+                                                              noside);
          arg1 = value_subscript (arg1, index);
        }
       return (arg1);
@@ -625,6 +611,7 @@ const struct language_defn chill_language_defn =
   chill_builtin_types,
   range_check_on,
   type_check_on,
+  case_sensitive_on,
   chill_parse,                 /* parser */
   chill_error,                 /* parser error function */
   evaluate_subexp_chill,
@@ -649,7 +636,7 @@ const struct language_defn chill_language_defn =
 /* Initialization for Chill */
 
 void
-_initialize_chill_language ()
+_initialize_chill_language (void)
 {
   builtin_type_chill_bool =
     init_type (TYPE_CODE_BOOL, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
This page took 0.027134 seconds and 4 git commands to generate.