contrib/libg++-2.3/libiberty/strsignal.c
/*

NAME

	signo_max -- return the max signo value

SYNOPSIS

	int signo_max ();

DESCRIPTION

	Returns the maximum signo value for which a corresponding symbolic
	name or message is available.  Note that in the case where
	we use the sys_siglist supplied by the system, it is possible for
	there to be more symbolic names than messages, or vice versa.
	In fact, the manual page for psignal(3b) explicitly warns that one
	should check the size of the table (NSIG) before indexing it,
	since new signal codes may be added to the system before they are
	added to the table.  Thus NSIG might be smaller than value
	implied by the largest signo value defined in <signal.h>.

	We return the maximum value that can be used to obtain a meaningful
	symbolic name or message.

*/
NAME
signo_max -- return the max signo value

SYNOPSIS



DESCRIPTION

Returns the maximum signo value for which a corresponding symbolic
name or message is available.  Note that in the case where
we use the sys_siglist supplied by the system, it is possible for
there to be more symbolic names than messages, or vice versa.
In fact, the manual page for psignal(3b) explicitly warns that one
should check the size of the table (NSIG) before indexing it,
since new signal codes may be added to the system before they are
added to the table.  Thus NSIG might be smaller than value
implied by the largest signo value defined in .

We return the maximum value that can be used to obtain a meaningful
symbolic name or message.
NAME signo_max -- return the max signo value SYNOPSIS DESCRIPTION Returns the maximum signo value for which a corresponding symbolic name or message is available . Note that in the case where we use the sys_siglist supplied by the system it is possible for there to be more symbolic names than messages or vice versa . In fact the manual page for psignal ( 3b ) explicitly warns that one should check the size of the table ( NSIG ) before indexing it since new signal codes may be added to the system before they are added to the table . Thus NSIG might be smaller than value implied by the largest signo value defined in . We return the maximum value that can be used to obtain a meaningful symbolic name or message .
int
signo_max ()
{
  int maxsize;
  if (signal_names == NULL)
    {
      init_signal_tables ();
    }
  maxsize = MAX (sys_nsig, num_signal_names);
  return (maxsize - 1);
}
int signo_max ( ) { int maxsize ; if ( signal_names == NULL ) { init_signal_tables ( ) ; } maxsize = MAX ( sys_nsig , num_signal_names ) ; return ( maxsize - 1 ) ; }
NAME
signo_max -- return the max signo value
NAME signo_max -- return the max signo value