1999-01-19 Fernando Nasser <fnasser@totem.to.cygnus.com>
[deliverable/binutils-gdb.git] / gdb / scm-lang.c
index f651ece8880ef6d0f4cd073ac6ed15f4b551fd3c..7f31ba434833276118e3a115b93790379a1489b4 100644 (file)
@@ -27,10 +27,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "c-lang.h"
 #include "scm-lang.h"
 #include "scm-tags.h"
+#include "gdb_string.h"
+#include "gdbcore.h"
 
-extern struct type ** const (c_builtin_types[]);
-extern value_ptr value_allocate_space_in_inferior PARAMS ((int));
-extern value_ptr find_function_in_inferior PARAMS ((char*));
+static value_ptr evaluate_subexp_scm PARAMS ((struct type *, struct expression *,
+                                             int *, enum noside));
+static value_ptr scm_lookup_name PARAMS ((char *));
+static int in_eval_c PARAMS ((void));
+static void scm_printstr PARAMS ((GDB_FILE *stream, char *string, unsigned int length, int width, int force_ellipses));
+
+extern struct type ** CONST_PTR (c_builtin_types[]);
 
 struct type *builtin_type_scm;
 
@@ -43,10 +49,11 @@ scm_printchar (c, stream)
 }
 
 static void
-scm_printstr (stream, string, length, force_ellipses)
+scm_printstr (stream, string, length, width, force_ellipses)
      GDB_FILE *stream;
      char *string;
      unsigned int length;
+     int width;
      int force_ellipses;
 {
   fprintf_filtered (stream, "\"%s\"", string);
@@ -72,7 +79,6 @@ scm_get_field (svalue, index)
      LONGEST svalue;
      int index;
 {
-  value_ptr val;
   char buffer[20];
   read_memory (SCM2PTR (svalue) + index * TYPE_LENGTH (builtin_type_scm),
               buffer, TYPE_LENGTH (builtin_type_scm));
@@ -99,7 +105,7 @@ scm_unpack (type, valaddr, context)
          else
            return 1;
        }
-      switch (7 & svalue)
+      switch (7 & (int) svalue)
        {
        case 2:  case 6: /* fixnum */
          return svalue >> 2;
@@ -108,7 +114,7 @@ scm_unpack (type, valaddr, context)
            return SCM_ICHR (svalue);
          else if (SCM_IFLAGP (svalue))
            {
-             switch (svalue)
+             switch ((int) svalue)
                {
 #ifndef SICP
                case SCM_EOL:
@@ -147,13 +153,13 @@ in_eval_c ()
    First lookup in Scheme context (using the scm_lookup_cstr inferior
    function), then try lookup_symbol for compiled variables. */
 
-value_ptr
+static value_ptr
 scm_lookup_name (str)
      char *str;
 {
   value_ptr args[3];
   int len = strlen (str);
-  value_ptr symval, func, val;
+  value_ptr func, val;
   struct symbol *sym;
   args[0] = value_allocate_space_in_inferior (len);
   args[1] = value_from_longest (builtin_type_int, len);
@@ -240,9 +246,10 @@ const struct language_defn scm_language_defn = {
   scm_parse,
   c_error,
   evaluate_subexp_scm,
-  scm_printchar,                       /* Print a character constant */
+  scm_printchar,               /* Print a character constant */
   scm_printstr,                        /* Function to print string constant */
-  NULL,        /* Create fundamental type in this language */
+  NULL,                                /* Function to print a single character */
+  NULL,                                /* Create fundamental type in this language */
   c_print_type,                        /* Print a type using appropriate syntax */
   scm_val_print,               /* Print a value using appropriate syntax */
   scm_value_print,             /* Print a top-level value */
This page took 0.024891 seconds and 4 git commands to generate.