/***********************************************************************1* *2* This software is part of the ast package *3* Copyright (c) 1982-2011 AT&T Intellectual Property *4* and is licensed under the *5* Eclipse Public License, Version 1.0 *6* by AT&T Intellectual Property *7* *8* A copy of the License is available at *9* http://www.eclipse.org/org/documents/epl-v10.html *10* (with md5 checksum b35adb5213ca9657e911e9befb180842) *11* *12* Information and Software Systems Research *13* AT&T Research *14* Florham Park NJ *15* *16* David Korn <[email protected]> *17* *18***********************************************************************/19#pragma prototyped2021#include "defs.h"22/*23* This installs a hook to allow the processing of events when24* the shell is waiting for input and when the shell is25* waiting for job completion.26* The previous waitevent hook function is returned27*/282930void *sh_waitnotify(int(*newevent)(int,long,int))31{32int (*old)(int,long,int);33old = shgd->waitevent;34shgd->waitevent = newevent;35return((void*)old);36}3738#if __OBSOLETE__ < 2008010139/*40* this used to be a private symbol41* retain the old name for a bit for a smooth transition42*/4344#if defined(__EXPORT__)45#define extern __EXPORT__46#endif4748extern void *_sh_waitnotify(int(*newevent)(int,long,int))49{50return sh_waitnotify(newevent);51}5253#endif545556