#include <stdio.h>
#include <stdlib.h>
#include <dos.h>
#include <exec/types.h>

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

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


BOOL RawDump(char *filename)

{char  *buffer;
 ULONG  size;
 USHORT pos;

 if (FileSize(filename,&size)==-1)  return(FALSE);

 if (!(buffer = malloc(size+1)))
    {AFPrintf(&StUser, Output(), SA[3583]);
     return(FALSE);
    }

 GetFirstStruct(filename, buffer, size);
 buffer[size] = 0;

 Chk_Abort();
 pos    = 0;
 DisplayBuffer(Output(),buffer,0,0,0,0,&pos,0,NULL,1,"\003");

 for(size--; buffer[size]!=10 && buffer[size]!=13 && size>0; size--);
 Chk_Abort();
 AFPrintf(NULL, Output(), "%s", buffer+size);

 free(buffer);
 return(TRUE);
}
