view msdos/sigaction.c @ 30406:4fe5cb975331

(c-indent-new-comment-line): Added a kludge similar to the one in c-fill-paragraph to check the fill prefix from the adaptive fill function for sanity. (c-electric-brace): Fixed some bugs in the state handling that caused class open lines to be recognized as statement-conts in some cases. (c-indent-new-comment-line): Keep the fill prefix guessed by the adaptive fill function unless point is on the first line of a block comment. (c-indent-command): Obey c-syntactic-indentation. (c-electric-brace, c-electric-slash, c-electric-star, c-electric-semi&comma, c-electric-colon, c-electric-lt-gt, c-electric-paren): Don't reindent old lines when c-syntactic-indentation is nil. (c-fill-paragraph): Keep one or two spaces between the text and the block comment ender when it hangs, depending on how many there are before the fill. (c-indent-new-comment-line): Always break multiline comments in multiline mode, regardless of comment-multi-line.
author Gerd Moellmann <gerd@gnu.org>
date Mon, 24 Jul 2000 11:12:07 +0000
parents 354e0c45cedf
children 695cf19ef79e
line wrap: on
line source

/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#include <signal.h>
#include <errno.h>

int
sigaction(int _sig, const struct sigaction *_act, struct sigaction *_oact)
{
  int retval = 0;

  if (_oact)
  {
    void (*installed_sig)(int) = signal (_sig, SIG_IGN);

    /* FIXME */
    if (installed_sig == SIG_ERR)
    {
      retval = -1;
      errno = EINVAL;
    }
    else
      signal (_sig, installed_sig);
    _oact->sa_handler = installed_sig;
    retval = sigemptyset (&_oact->sa_mask);
    _oact->sa_flags = 0;
  }
  if (_act)
  {
    if (signal (_sig, _act->sa_handler) == SIG_ERR)
    {
      retval = -1;
      errno = EINVAL;
    }
  }
  return 0;
}