#include <dlg/resman.h>
#include <stdio.h>
#include <proto/dlg.h>
#include <proto/dos.h>

#include <link/io.h>

#include <pragmas/dlg.h>

extern char           **SA;
extern struct Library  *DLGBase;
extern struct USER_DATA UserDat;

BYTE _EnterArea(long area,UBYTE flag,UBYTE mode)

{struct DLGAreaInfo Info;

 if (EnterArea(area, flag) != RMNOERR)
    {Info.area = area;
     if (GetAreaInfo(&Info,flag) == RMNOERR)
        {if (mode)  AFPrintf(&UserDat,Output(),SA[3428],Info.reason);
         FreeAreaInfo(&Info);
        }
      
     return(-1);
    }

 return(0);
}
