File: hook.h

package info (click to toggle)
tirc 1.2-10
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,388 kB
  • ctags: 1,909
  • sloc: ansic: 19,264; sh: 2,671; makefile: 222; awk: 14
file content (35 lines) | stat: -rw-r--r-- 809 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*-
 * tirc -- client for the Internet Relay Chat
 *
 *	Copyright (c) 1996, 1997, 1998
 *		Matthias Buelow.  All rights reserved.
 *
 *	See the file ``COPYRIGHT'' for the usage and distribution
 *	license and warranty disclaimer.
 *
 * $Id: hook.h,v 1.5 1998/01/20 01:16:22 token Exp $
 */

#ifndef TIRC_HOOK_H
#define TIRC_HOOK_H	1

/* Definition of a function pointer for use with the hooks. */
typedef	void (*hookfunptr)();

struct hook_entry {
	hookfunptr hook_fun;
	LIST_ENTRY(hook_entry) hook_entries;
};


/* Definition of a function call hook. */
typedef	LIST_HEAD(, hook_entry) defhook;

/* hook utilities */
void	create_hook __P((defhook *));
void	add_to_hook __P((defhook *, hookfunptr));
int	del_from_hook __P((defhook *, hookfunptr));
int	run_hooks __P((defhook *));

#endif	/* ! TIRC_HOOK_H */