-/* Convert between signal names and numbers.
- Copyright (C) 1990 Free Software Foundation, Inc.
+/* Convert between signal names and numbers, for GDB.
+ Copyright 1990, 1991 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 1, or (at your option)
-any later version.
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with this program; see the file COPYING. If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <stdio.h>
#include <signal.h>
#include "signame.h"
+/* GDB-specific, FIXME. (This is for the SYS_SIGLIST_MISSING define). */
+#include "defs.h"
+
#ifdef __STDC__
#define CONST const
#else
static CONST char undoc[] = "unknown signal";
+/* We'd like to make this const char*[], but whoever's using it might
+ want to assign from it to a char*. */
char *sys_siglist[NSIG];
#endif /* SYS_SIGLIST_MISSING */
static int sig_table_nelts = 0;
/* Enter signal number NUMBER into the tables with ABBREV and NAME. */
+/* ARGSUSED */
static void
init_sig (number, abbrev, name)
int number;
CONST char *name;
{
#if SYS_SIGLIST_MISSING
- sys_siglist[number] = name;
+ sys_siglist[number] = (char *) name;
#endif
sig_table[sig_table_nelts].number = number;
sig_table[sig_table_nelts++].abbrev = abbrev;
/* Initialize signal names. */
for (i = 0; i < NSIG; i++)
- sys_siglist[i] = undoc;
+ sys_siglist[i] = (char *) undoc;
#endif /* SYS_SIGLIST_MISSING */
/* Initialize signal names. */