/* Scheme/Guile language support routines for GDB, the GNU debugger.
- Copyright 1995 Free Software Foundation, Inc.
+
+ Copyright (C) 1995, 1996, 2000, 2003, 2005, 2008
+ Free Software Foundation, Inc.
This file is part of GDB.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
#include "symtab.h"
#define USE_EXPRSTRING 0
-static void scm_lreadparen PARAMS ((int));
-static int scm_skip_ws PARAMS ((void));
-static void scm_read_token PARAMS ((int, int));
-static LONGEST scm_istring2number PARAMS ((char *, int, int));
-static LONGEST scm_istr2int PARAMS ((char *, int, int));
-static void scm_lreadr PARAMS ((int));
+static void scm_lreadparen (int);
+static int scm_skip_ws (void);
+static void scm_read_token (int, int);
+static LONGEST scm_istring2number (char *, int, int);
+static LONGEST scm_istr2int (char *, int, int);
+static void scm_lreadr (int);
static LONGEST
-scm_istr2int (str, len, radix)
- char *str;
- int len;
- int radix;
+scm_istr2int (char *str, int len, int radix)
{
int i = 0;
LONGEST inum = 0;
}
static LONGEST
-scm_istring2number (str, len, radix)
- char *str;
- int len;
- int radix;
+scm_istring2number (char *str, int len, int radix)
{
int i = 0;
char ex = 0;
}
static void
-scm_read_token (c, weird)
- int c;
- int weird;
+scm_read_token (int c, int weird)
{
while (1)
{
}
static int
-scm_skip_ws ()
+scm_skip_ws (void)
{
- register int c;
+ int c;
while (1)
switch ((c = *lexptr++))
{
}
static void
-scm_lreadparen (skipping)
- int skipping;
+scm_lreadparen (int skipping)
{
for (;;)
{
}
static void
-scm_lreadr (skipping)
- int skipping;
+scm_lreadr (int skipping)
{
int c, j;
struct stoken str;
scm_lreadr (skipping);
if (!skipping)
{
- value_ptr val = scm_evaluate_string (str.ptr, lexptr - str.ptr);
- if (!is_scmvalue_type (VALUE_TYPE (val)))
+ struct value *val = scm_evaluate_string (str.ptr, lexptr - str.ptr);
+ if (!is_scmvalue_type (value_type (val)))
error ("quoted scm form yields non-SCM value");
- svalue = extract_signed_integer (VALUE_CONTENTS (val),
- TYPE_LENGTH (VALUE_TYPE (val)));
+ svalue = extract_signed_integer (value_contents (val),
+ TYPE_LENGTH (value_type (val)));
goto handle_immediate;
}
return;
}
int
-scm_parse ()
+scm_parse (void)
{
char *start;
while (*lexptr == ' ')