view msdos/sigaction.c @ 89610:3aa74296be55

(fontset_face): Create a fallback fontset on demand (make_fontset): Don't create a fallback fontset here. (free_face_fontset): Free a fallback fontset (if any) too. (n_auto_fontsets): Delete this variable. (auto_fontset_alist): New variable. (new_fontset_from_font_name): Check auto_fontset_alist. (dump_fontset) [FONTSET_DEBUG]: Fully re-written. (Ffontset_list_all) [FONTSET_DEBUG]: New function. (syms_of_fontset): Initialize and staticpro auto_fontset_alist. Defsubr Sfontset_list_all.
author Kenichi Handa <handa@m17n.org>
date Wed, 29 Oct 2003 11:51:42 +0000
parents 375f2633d815
children 68c22ea6027c
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;
}