#define GIO_G
#include "GIO.h"
#include "GExceptn.h"
#include <fcntl.h>

#ifdef __MSDOS__
#  include <io.h>
#else
#  include <unistd.h>
#endif

/*****
*****/

int c_file_mode ( TStreamMode mode )
{
  return mode ;
}

VIOstream * OPENFILE (Name * name, TStreamMode mode)
{
  VIOstream *S ;
  int handle=open (name,c_file_mode(mode)) ;
  if (handle==-1) Raise (Err_SystemFailure) ;
  else {
    /* S=NewObject(TD_IOStream,handle) ; */
  }
  return S ;
}
