3 * $Id: sig.h,v 1.3 2004/04/08 01:36:13 mdw Exp $
7 * (c) 1999 Straylight/Edgeware
10 /*----- Licensing notice --------------------------------------------------*
12 * This file is part of the mLib utilities library.
14 * mLib is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU Library General Public License as
16 * published by the Free Software Foundation; either version 2 of the
17 * License, or (at your option) any later version.
19 * mLib is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU Library General Public License for more details.
24 * You should have received a copy of the GNU Library General Public
25 * License along with mLib; if not, write to the Free
26 * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
37 /*----- Header files ------------------------------------------------------*/
43 /*----- Data structures ---------------------------------------------------*/
49 void (*proc
)(int /*n*/, void */
*p*/
);
53 /*----- Functions provided ------------------------------------------------*/
55 /* --- @sig_add@ --- *
57 * Arguments: @sig *s@ = pointer to signal handler block
58 * @int n@ = number of the signal
59 * @void (*proc)(int n, void *p)@ = signal handler function
60 * @void *p@ = argument to pass to handler
64 * Use: Adds a signal handler.
67 extern void sig_add(sig */
*s*/
, int /*n*/,
68 void (*/
*proc*/
)(int /*n*/, void */
*p*/
), void */
*p*/
);
70 /* --- @sig_remove@ --- *
72 * Arguments: @sig *s@ = pointer to signal handler block
76 * Use: Removes the signal handler from the list.
79 extern void sig_remove(sig */
*s*/
);
81 /* --- @sig_init@ --- *
83 * Arguments: @sel_state *s@ = pointer to select state
87 * Use: Initializes the signal handling system ready for use.
90 extern void sig_init(sel_state */
*s*/
);
92 /*----- That's all, folks -------------------------------------------------*/