1 /***********************************************************************
2 * *
3 * This software is part of the ast package *
4 * Copyright (c) 1982-2011 AT&T Intellectual Property *
5 * and is licensed under the *
6 * Eclipse Public License, Version 1.0 *
7 * by AT&T Intellectual Property *
8 * *
9 * A copy of the License is available at *
10 * http://www.eclipse.org/org/documents/epl-v10.html *
11 * (with md5 checksum b35adb5213ca9657e911e9befb180842) *
12 * *
13 * Information and Software Systems Research *
14 * AT&T Research *
15 * Florham Park NJ *
16 * *
17 * David Korn <dgk@research.att.com> *
18 * *
19 ***********************************************************************/
20 #pragma prototyped
21
22 #include "defs.h"
23 /*
24 * This installs a hook to allow the processing of events when
25 * the shell is waiting for input and when the shell is
26 * waiting for job completion.
27 * The previous waitevent hook function is returned
28 */
29
30
sh_waitnotify(int (* newevent)(int,long,int))31 void *sh_waitnotify(int(*newevent)(int,long,int))
32 {
33 int (*old)(int,long,int);
34 old = shgd->waitevent;
35 shgd->waitevent = newevent;
36 return((void*)old);
37 }
38
39 #if __OBSOLETE__ < 20080101
40 /*
41 * this used to be a private symbol
42 * retain the old name for a bit for a smooth transition
43 */
44
45 #if defined(__EXPORT__)
46 #define extern __EXPORT__
47 #endif
48
_sh_waitnotify(int (* newevent)(int,long,int))49 extern void *_sh_waitnotify(int(*newevent)(int,long,int))
50 {
51 return sh_waitnotify(newevent);
52 }
53
54 #endif
55