#ifndef osargs_H
#define osargs_H

/*OSLib---efficient, type-safe, transparent, extensible,\n"
   register-safe A P I coverage of RISC O S*/
/*Copyright  1994 Jonathan Coxhead*/

/*
      OSLib 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 1, or (at your option)
   any later version.

      OSLib 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 programme; if not, write to the Free Software
   Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, U S A.
*/

#ifndef types_H
   #include "types.h"
#endif

#ifndef fileswitch_H
   #include "oslib/fileswitch.h"
#endif

#ifndef os_H
   #include "os.h"
#endif

#define OSArgs_ReadPtr 0x0
#define OSArgs_ReadTemporaryFS 0x0
#define OSArgs_SetPtr 0x1
#define OSArgs_ReadExt 0x2
#define OSArgs_SetExt 0x3
#define OSArgs_ReadAllocation 0x4
#define OSArgs_ReadEOFStatus 0x5
#define OSArgs_SetAllocation 0x6
#define OSArgs_ReadPath 0x7
#define OSArgs_ImageStamped 0x8
#define OSArgs_ReadInfo 0xFE
#define OSArgs_Ensure 0xFF

#define osargs_STREAM_INTERACTIVE ((bits) 0x8u)
#define osargs_STREAM_SUPPORTS_GBPB ((bits) 0x10u)
#define osargs_STREAM_DIRECTORY ((bits) 0x20u)
#define osargs_STREAM_READABLE ((bits) 0x40u)
#define osargs_STREAM_WRITABLE ((bits) 0x80u)
#define osargs_STREAM_WRITTEN ((bits) 0x100u)
#define osargs_STREAM_EOF_ERROR_ON_NEXT_READ ((bits) 0x200u)
#define osargs_STREAM_UNBUFFERED ((bits) 0x400u)
#define osargs_STREAM_UNALLOCATED ((bits) 0x800u)
#define osargs_STREAM_CRITICAL ((bits) 0x1000u)
#define osargs_STREAM_DATA_LOST ((bits) 0x2000u)
#define osargs_STREAM_IMAGE_FILE_BUSY ((bits) 0x4000u)

#define xosargs_ensure(file) _swix (OS_Args, _IN (0) | _IN (1), \
      OSArgs_Ensure, (os_f) (file))

#endif
