#include <ebss.h>
struct rqb *Res_pdequeue();
struct rqb *pdequeue();		/* @0310 */
portmsg()                       /* @0201 *//* @0308 *//* @0310 */
{				/* @0201 */
struct rqb * rp;		/* @0310 */
short msgno;			/* @0310 */
short pno;			/* @0310 */
short *pp;			/* @0310 */
#if (OVL_TYPE==1 && RESIDENT==0)
  rp=Res_pdequeue(&(avt->msgq));	/* @0310 */
#else				/* @0310 */
  rp=pdequeue((struct rqb *)0,&(avt->msgq));	/* @0310 */
#endif
  msgno=rp->th.ra.rparm.parm.parm1;	/* @0310 */
  pno=rp->th.ra.rparm.parm.parm2;	/* @0310 */
  pp=rp->th.ra.wa.rqba.area1;	/* @0310 */
#if (OVL_TYPE==1 && RESIDENT==0)	/* @0310 */
  Res_prelrq(rp);			/* @0310 */
#else                                   /* @0310 */
  prelrq(rp);                     /* @0310 */
#endif					/* @0310 */
#if (OVL_TYPE && RESIDENT==1)		/* @0310 */
  Trn_psmsgop(msgno,pno,pp);	/* @0201 *//* @0308 *//* @0310 */
#else					/* @0310 */
  psmsgop(msgno,pno,pp);	/* @0201 *//* @0308 *//* @0310 */
#endif					/* @0310 */
  if (avt->msgq!=0)			/* @0310 */
    return 1;				/* @0310 */
  else					/* @0310 */
    return 0;				/* @0310 */
}				/* @0201 *//* @0308 */
