/* @(#)lpimemm.h	128.1 1/20/93 17:56:57 */
/************************************************************************\
   Copyright (C) 1990 Lotus Development Corporation.  All rights reserved.
   Name:    lpimemm.h
   Date:    15 Mar 1989
   Description:  LPI memory allocation function prototypes
\************************************************************************/

#if !defined(LPIMEMM_H)
#define LPIMEMM_H

#if !defined(LPIMEMM_T)
#include "lpimemm.t"
#endif

#if L_ANSI_C

#if !C_PROGRAMMABILITY
/* copy an area < 64K to an allocated memory block */
lexportf(lbool) pl_mk_mptr (lptr(LCONSTANT envblk),lptr(lmhdl(void)),
                            lptr(void),lushort);
#endif /* !C_PROGRAMMABILITY */

#if (LPI_ENVIRONMENT == LPI_123R3PC)
/*  automap routines */
extern lsshort        AMPautoMapInit(lsshort,lptr(void));    /* initialize,
                          specifying number of registers available  */
extern lmhdl(void)    AMPgetMem(lulong);          /* allocate memory       */
extern lptr(void)     AMPmap(lmhdl(void));        /* map a mem. handle     */
extern lptr(void)     AMPmapLock(lmhdl(void));    /* map and lock reg.     */
extern void           AMPunMap(lmhdl(void));      /* unmap a mapped handle */
                       /* above will automatically unlock if appropriate */
extern void           AMPunMapAll(void);          /* unmap all handles     */
extern lbool          AMPfree(lmhdl(void),lulong);/* free allocated memory */
#endif  /* LPI_123R3PC */

#else /* !L_ANSI_C */

#if !C_PROGRAMMABILITY
/* copy an area < 64K to an allocated memory block */
lexportf(lbool) pl_mk_mptr ();
#endif /* !C_PROGRAMMABILITY */

#if (LPI_ENVIRONMENT == LPI_123R3PC)
/*  automap routines */
extern lsshort     AMPautoMapInit (); /* initialize, specifying number
                                         of registers available */
extern lmhdl(void) AMPgetMem ();      /* allocate memory */
extern lptr(void)  AMPmap ();         /* map a mem. handle */
extern lptr(void)  AMPmapLock ();     /* map and lock reg. */
extern void        AMPunMap ();       /* unmap a mapped handle (automatically
                                         unlocks if appropriate) */
extern void        AMPunMapAll ();    /* unmap all handles */
extern lbool       AMPfree ();        /* free allocated memory */
#endif  /* LPI_123R3PC */

#endif /* L_ANSI_C */

#endif /* LPIMEMM_H */
