/* Put Interface */
/* Copyright (C) 1998-1999 Edinburgh Portable Compilers Ltd. */
/* Copyright (C) 2000 Analog Devices Inc., All Rights Reserved.
*/


#ifndef _PUT_H
#define _PUT_H


#ifdef __cplusplus
extern "C"
{
#endif


/* memory management */

void *getspace(int);
void freespace(void *);
void *reallocspace(void *, int);

/* area initialisation and manipulation */

char *psectionname(int);
int pfindsection(char *);
int pareasection(int);
int psectionarea(int);
void ppushsection(int);
int ppopsection(void);
char *pgetbytes(int, int, int);
int preservespace(int, int, int, int);
int etempspace(int, int);
int epermspace(int, int);
int eworkspace(int, int, int, int *);
void pdinit(int, int, int);
void pcbytes(int, int, char *);
void pdbytes(int, int, int, char *);
void pdpattern(int, int, int, int, char *);
void pd(int, int, int);
void pd2(int, int, int);
void pd4(int, int, int);
void pcword(int, int);
void pasmstring(char *);
void pcomment(char *);
void pident(char *);
void preginfo(int, int);
void pfile(char *);
void plinestart(int, int, int, int);
char *pgetname(int, int);
char *pgivename(int);
int pgivecurrentsize(int);
int pstackmax(void);
int pstackoffset(int);
int pareaalign(int, int);
void paligncommon(int, int);
void pfiller(int, int);

/* relocations */

void pfixlabel3(int, int, int, char *, int, int, int);
void pfixlabel2(int, int, int, char *, int, int);
void pfixlabel(int, int, int, char *, int);
void pfix2(int, int, int, int, int);
void pfix(int, int, int, int);
void pdxref(int, int, int);

/* symbol declarations */

void pdataentry2(char *, int, int, int, int);
void pdataentry(char *, int, int, int);
int pnextsymbol(void);
int psection(char *, int, int, char *);
int pcdataarea2(int, int, int, int, char *);
int pcdataarea(int, int, int, char *);
int pcommon2(int, char *);
int pcommon(char *);
void pendcommon2(int, int, int, int);
void pendcommon(int, int);
int pdxname(int, char *);
int pxname(int, char *);
void pprocname(int, char *);
void pprocbounds(int, void **, void **);
int pprocnext(int);
void pproc(char *, int, int, int *);
void pprocend(int, int);
int pentry2(int, int, int, char *);
int pentry(int, int, char *);
void palias(int, char *, int);

/* code generation */

int psetfiles2(char *, char *, int);
void psetfiles(char *, char *, int);
void pinitialise(int, int, int);
void preinitialise(void);
void pterminate(int *);
void pgenerateobject(char *);
void premoveobject(void);

/* settings and control */

void psetoptions2(int, int, int, int);
void psetoptions(int);
int pdswapneeded(void);
void pexternalprefix(char *);
void pdefaultfiller(int);
void pfaulty(void);
void pmonon(void);
void pmonoff(void);


#ifdef __cplusplus
}
#endif


#endif /* _PUT_H */
