/* $Id$ */
/* riscos.h: Special functions for RISC OS support

   Copyright (C) 1998 Jakob Stoklund Olesen

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

   This library 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
   Library General Public License for more details.

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

#ifndef RISCOS_H
#define RISCOS_H

#include "kpathsea:riscos.h"

/* These are the registered filetypes we use */
#define riscosDUMPtype  0xffd	/* data type for memory dumps */
#define riscosDVItype   0xce4
#define riscosGFtype    0xca2	/* old type: 0x2aa */
#define riscosLATEXtype 0xaca	/* old type: 0x2a8 */
#define riscosMFtype    0xca0	/* old type: 0x2a9 */
#define riscosPKtype    0xca3	/* old type: 0x2ab */
#define riscosTEXTtype  0xfff
#define riscosTEXtype   0xce5	/* old type: 0x2a7 */
#define riscosTFMtype   0xca1	/* old type: 0x2ac */
#define riscosVFtype    0xac9
#define riscosPStype    0xff5
#define riscosMPtype    0xfff	/* .mp and .mpx files */

/* lib/riscos/RO-fopen.c */

/* Open a file in the current directory after filename translation.
   Don't return if the fopen() fails. */
FILE *riscos_fopen_input (const_string /* name */ );
FILE *riscos_fopen_output (const_string /* name */ , int /* type */ );

/* lib/riscos/dataopen.c */

/* Try to load the file given by FILENAME into an editor. Return true if
   message is broadcast */
boolean riscos_data_open (const_string /* filename */ );

/* lib/riscos/throwback.c */
#define THROWBACK_MAX 80	/* maximum error msg length */
/* Is throwback enabled? */
extern boolean throwback_flag;
/* Should printed output go to the throwback buffer? */
extern boolean throwback_selector;
/* The current line being built */
extern char throwback_line[];
/* index into throwback_line */
extern int throwback_pos;
/* Start building a throwback message */
#define throwbackstart() (throwback_selector=true, throwback_pos=0)
#define throwbackstop() (throwback_selector=false)
/* Add a char to the current message */
#define throwbackchar(C) do if(throwback_selector\
 && throwback_pos<THROWBACK_MAX)\
 throwback_line[throwback_pos++] = (C); while(0)
/* Send the current error.
   This function is called from throwbackxsend in texmfmp.c */
extern void throwback_send (const_string /* filename */ , int /* lineno */ );
/* Set the name of the primary input file */
extern void throwbackprimary (const_string /* filename */);

/* tangle removes underscores */
#define riscosdesktopflag riscos_desktop_flag
#define riscosinitialiseprefix riscos_initialise_prefix
#define riscossetoutputmode riscos_set_output_mode
#define throwbackflag throwback_flag

#endif /* not RISCOS_H */
