X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fbase%2Fsigaction.c;h=36442e090a410f6e28e4a90868e79aa3b3988efb;hp=8ba8629a4f509dea884c15631354a6dc818bdd55;hb=603f0cb25b7acc8f04f4b18d2a2fe6f90039829a;hpb=46722468f47c2b77b3987729b4bcf2321cccfd01 diff --git a/ncurses/base/sigaction.c b/ncurses/base/sigaction.c index 8ba8629a..36442e09 100644 --- a/ncurses/base/sigaction.c +++ b/ncurses/base/sigaction.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. * + * Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -29,37 +29,29 @@ /**************************************************************************** * Author: Zeyd M. Ben-Halim 1992,1995 * * and: Eric S. Raymond * + * and: Thomas E. Dickey 1996-2003 * ****************************************************************************/ -#include - -#include - /* This file provides sigaction() emulation using sigvec() */ /* Use only if this is non POSIX system */ -#if !HAVE_SIGACTION && HAVE_SIGVEC +MODULE_ID("$Id: sigaction.c,v 1.14 2003/12/07 01:06:52 tom Exp $") -MODULE_ID("$Id: sigaction.c,v 1.13 2002/05/18 19:56:26 tom Exp $") - -NCURSES_EXPORT(int) -sigaction -(int sig, sigaction_t * sigact, sigaction_t * osigact) +static int +_nc_sigaction(int sig, sigaction_t * sigact, sigaction_t * osigact) { return sigvec(sig, sigact, osigact); } -NCURSES_EXPORT(int) -sigemptyset -(sigset_t * mask) +static int +_nc_sigemptyset(sigset_t * mask) { *mask = 0; return 0; } -NCURSES_EXPORT(int) -sigprocmask -(int mode, sigset_t * mask, sigset_t * omask) +static int +_nc_sigprocmask(int mode, sigset_t * mask, sigset_t * omask) { sigset_t current = sigsetmask(0); @@ -77,41 +69,31 @@ sigprocmask return 0; } -NCURSES_EXPORT(int) -sigsuspend(sigset_t * mask) +static int +_nc_sigaddset(sigset_t * mask, int sig) { - return sigpause(*mask); + *mask |= sigmask(sig); + return 0; } -NCURSES_EXPORT(int) -sigdelset -(sigset_t * mask, int sig) +/* not used in lib_tstp.c */ +#if 0 +static int +_nc_sigsuspend(sigset_t * mask) { - *mask &= ~sigmask(sig); - return 0; + return sigpause(*mask); } -NCURSES_EXPORT(int) -sigaddset -(sigset_t * mask, int sig) +static int +_nc_sigdelset(sigset_t * mask, int sig) { - *mask |= sigmask(sig); + *mask &= ~sigmask(sig); return 0; } -NCURSES_EXPORT(int) -sigismember -(sigset_t * mask, int sig) +static int +_nc_sigismember(sigset_t * mask, int sig) { return (*mask & sigmask(sig)) != 0; } - -#else -extern -NCURSES_EXPORT(void) -_nc_sigaction(void); /* quiet's gcc warning */ -NCURSES_EXPORT(void) -_nc_sigaction(void) -{ -} /* nonempty for strict ANSI compilers */ #endif