/*

  P-Code interpreter (to run the apple pascal system)
  Copyright (C) 2000 Mario Klebsch

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

  $Log: Diskio.h,v $
  Revision 1.3  2001/05/21 19:06:48  mario
  Mode-Parameter bei den Disk-IO-Routinen entfernt

  Revision 1.2  2001/05/20 13:12:02  mario
  CVS-Idents und Logs eingefügt


*/

#define MAX_UNIT 20

enum DiskMode
{
  ReadOnly,
  Forget,
  ReadWrite
};

void DiskRead(word Unit, word Addr, Integer AddrOffset,
		  word Len, word BlockNo);
void DiskWrite(word Unit, word Addr, Integer AddrOffset,
		   word Len, word BlockNo);
void DiskClear(word Unit);
void DiskStat(word Unit);

int  DiskMount(word Unit, const char *FileName, enum DiskMode Mode);
void DiskUmount(word Unit);
void DiskInit(void);

#ifdef _AMIGA
#include "getopt.h"
#define vsnprintf(s,size,format,ap) vsprintf(s,format,ap)
#define snprintf(s,size,format,SegNumber,ProcNumber,CurrentIpc,Buffer)\
 sprintf(s,format,SegNumber,ProcNumber,CurrentIpc,Buffer)
#define popen fopen
#define pclose fclose 
#define rint(f) floor(f+.5)
#define dup(fd) fd
#endif
