/* Generated by CMunge 0.37 - JOTY - (28 Jul 2002)
 * CMunge Copyright (c) 1999-2002 Robin Watts/Justin Fletcher */

#ifndef _CMUNGE_H_
#define _CMUNGE_H_

#include "kernel.h"

#define CMUNGE_VERSION (37)

#define Module_Title		"SysLogD"
#define Module_Help		"SysLogD		0.03 (22 Jan 2003) (c) 1999-2003 John Tytgat / BASS"
#define Module_VersionString	"0.03"
#define Module_Version		3
#ifndef Module_Date
#define Module_Date		"22 Jan 2003"
#endif

#ifdef __cplusplus
extern "C" {
#endif


/***************************************************************************
 * Function:     SysLogD_Init
 * Description:  Initialise the module, setting up vectors, callbacks and
 *               any other parts of the system necessary for the module to
 *               function.
 * Parameters:   tail        = pointer to command line (control terminated)
 *               podule_base = address of podule module was started from, or
 *                             NULL if none
 *               pw          = private word for module
 * On exit:      Return NULL for successful initialisation, or a pointer to
 *               an error block if the module could not start properly.
 **************************************************************************/
_kernel_oserror *SysLogD_Init(const char *tail, int podule_base, void *pw);


/***************************************************************************
 * Function:     SysLogD_Final
 * Description:  Finalise the module, shutting down any systems necessary,
 *               freeing vectors and releasing workspace
 * Parameters:   fatal       = fatality indicator; 1 if fatal, 0 if
 *                             reinitialising
 *               podule_base = address of podule module was started from, or
 *                             NULL if none
 *               pw          = private word for module
 * On exit:      Return 0 for successful finalisation, or a pointer to an
 *               error block if module was not shutdown properly.
 **************************************************************************/
_kernel_oserror *SysLogD_Final(int fatal, int podule_base, void *pw);


/***************************************************************************
 * Function:     eventv_handler_entry
 * Description:  Symbol for entry point to module - NOT a C function.
 *               This name should be used as an argument to
 *               OS_Claim/OS_Release as required, but should never be called
 *               from C.
 **************************************************************************/
extern void eventv_handler_entry(void);


/***************************************************************************
 * Function:     eventv_handler
 * Description:  Event handler routine. Events will be passed to this
 *               routine if they are in the accept list (or all, if no list
 *               was provided).
 * Parameters:   r  = pointer to register block on entry
 *               pw = private word for module
 * On exit:      Update r to alter return values.
 *               Return 0 to claim event (pulling return address from the
 *               stack).
 *               Return non-0 to pass on (returning via r14).
 **************************************************************************/
int eventv_handler(_kernel_swi_regs *r, void *pw);


/***************************************************************************
 * Function:     callback_handler_entry
 * Description:  Symbol for entry point to module - NOT a C function.
 *               This name should be used as an argument to
 *               OS_Claim/OS_Release as required, but should never be called
 *               from C.
 **************************************************************************/
extern void callback_handler_entry(void);


/***************************************************************************
 * Function:     callback_handler
 * Description:  IRQ handler function
 * Parameters:   r  = pointer to register block on entry
 *               pw = private word for module
 * On exit:      Update r to alter return values
 *               Return 0 to claim (return via stack)
 *               Return non-0 to pass on (return via r14)
 **************************************************************************/
int callback_handler(_kernel_swi_regs *r, void *pw);

#ifdef __cplusplus
}
#endif

#endif
