/* @(#)lpireg.h	128.1 1/20/93 18:38:22 */
/************************************************************************\
Copyright (C) 1991 Lotus Development Corporation.  All rights reserved.
Name:    lpireg.h
Date:    12 Mar 1991
Description:  CAT @function and macro registration support
\************************************************************************/
#if !defined(LPIREG_H)
#define LPIREG_H

#if !defined(LTSDEFS_H)
#include "ltsdefs.h"
#endif /* !defined(LTSDEFS_H) */


/* 
**   Status value definition and the return codes for user-defined
**   @functions and macros
*/

typedef lushort LpiRegUserStatusType;

/*
**  Context type definition
*/

typedef  lptr(lptr(LNORETVAL)) LpiRegContextType;


/*  
**  Input argument definitions and processing 
*/

typedef lushort  LpiRegArgTypeType;
typedef lushort  LpiRegArgCountType; 
typedef lushort  LpiRegArgStatusType;

/*
**    Return value data 
*/

typedef lushort  LpiRegAtRetTypeType; 

/* 
**   Description byte for @ function 
*/

typedef lubyte   LpiRegAtDescType;


/* 
**  Description byte for macro function 
*/

typedef lubyte   LpiRegMacDescType;
typedef lushort  LpiRegStatusType;


/*
**   @ function registration support macros.  lpixport.h must be included
**   to use these macros.
*/

#if L_ANSI_C

#define LpiAtProto(name) \
	LpiRegUserStatusType name(void **, unsigned short int, lptr(LNORETVAL))
/*
#define LPI_AT_TYPE_DEF \
	LpiRegUserStatusType (*)(LpiRegContextType, LpiRegArgCountType,lptr(LNORETVAL))
*/
#define LPI_AT_TYPE_DEF \
	LpiRegUserStatusType (*)(void **, unsigned short int,lptr(LNORETVAL))

#else

#define LpiAtProto(name)	LpiRegUserStatusType name()
#define LPI_AT_TYPE_DEF		LpiRegUserStatusType (*)()

#endif /* L_ANSI_C */


/*
**   Macro registration support macros
*/

#if L_ANSI_C
#define LpiMacProto(name)	 \
	LpiRegUserStatusType name(void **, unsigned short int, lptr(LNORETVAL))
#define LPI_MAC_TYPE_DEF \
	LpiRegUserStatusType (*)(LpiRegContextType, LpiRegArgCountType,lptr(LNORETVAL))
#else
#define LpiMacProto(name)	LpiRegUserStatusType name()
#define LPI_MAC_TYPE_DEF	LpiRegUserStatusType (*)()
#endif /* L_ANSI_C */


#endif /* !defined(LPIREG_H) */





