view msdos/sigaction.c @ 47134:c524e83e83c5

(Qbar, Qhbar, Qbox, Qhollow, Vblink_cursor_alist): Variables consolidated here. (Valternate_cursor_type, Qalternate_cursor_type): New variables. (Vcursor_in_non_selected_windows): Renamed from cursor_in_non_selected_windows and changed to Lisp_Object. (syms_of_xdisp): Define and staticpro new and moved variables. (get_specified_cursor_type): Renamed from x_specified_cursor_type; consolidated here. Recognize Qhollow setting. (set_frame_cursor_types): New function to set frame cursor types based on the frame parameters. (get_window_cursor_type): New function to calculate new cursor type and width for the specified window. Based on duplicated code consolidated here. Enhancements: cursor-in-non-selected-windows may be a cursor type, check buffer-local alternate-cursor-type and blink-cursor-alist before using built-in blink off methods.
author Kim F. Storm <storm@cua.dk>
date Fri, 30 Aug 2002 12:00:12 +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;
}