home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / misc / emu / AROSdev.lha / AROS / compiler / alib / callhook.c < prev    next >
Encoding:
C/C++ Source or Header  |  1997-01-27  |  1.3 KB  |  68 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: callhook.c,v 1.2 1997/01/27 00:16:35 ldp Exp $
  4.  
  5.     Desc: amiga.lib function CallHook()
  6.     Lang: english
  7. */
  8. #include <aros/system.h>
  9. #include <stdarg.h>
  10. #include "alib_intern.h"
  11.  
  12. /******************************************************************************
  13.  
  14.     NAME */
  15. #include <proto/alib.h>
  16.  
  17.     IPTR CallHookA (
  18.  
  19. /*  SYNOPSIS */
  20.     struct Hook * hook,
  21.     APTR          object,
  22.     APTR          param)
  23.  
  24. /*  FUNCTION
  25.     Calls a hook with the specified object and parameters.
  26.  
  27.     INPUTS
  28.     hook - Call this hook.
  29.     object - This is the object which is passed to the hook. The valid
  30.         values for this parameter depends on the definition of the called
  31.         hook.
  32.     param - Pass these parameters to the specified object
  33.  
  34.     RESULT
  35.     The return value depends on the definition of the hook.
  36.  
  37.     NOTES
  38.  
  39.     EXAMPLE
  40.  
  41.     BUGS
  42.  
  43.     SEE ALSO
  44.     CallHook()
  45.  
  46.     HISTORY
  47.     22.11.96 digulla documented
  48.  
  49. ******************************************************************************/
  50. {
  51.     return CallHookPkt (hook, object, param);
  52. } /* CallHookA */
  53.  
  54. IPTR CallHook (struct Hook * hook, APTR object, ...)
  55. {
  56.     IPTR    retval;
  57.     va_list args;
  58.  
  59.     va_start (args, object);
  60.  
  61.     retval = CallHookPkt (hook, object, args);
  62.  
  63.     va_end (args);
  64.  
  65.     return retval;
  66. } /* CallHook */
  67.  
  68.