/*
 * local.h - RISC OS localization of ispell.
 *
 * This file contains all the localization of ispell for RISCOS
 * that can be factorted out of the program.  There is an accompainying
 * 'local.c' file to provide definitons for the Unix system call
 * prototypes given here.
 *
 * This isn't all of the neccessary adjustments.  The rest of
 * them had to be put into the source files.  All changes with
 * the exception of terminal handling are bracketted with
 * '#ifdef RISCOS'/'#endif' or '#ifndef RISCOS'/'#endif'.
 *
 * Hence the line,
 */
#define RISCOS
/*
 * The terminal handling source file 'term.c' has just simply
 * been replaced in its entirity by 'roterm.c'.
 *
 * David Bryan
 */




/*
 * The options below are part of the standard ispell set up mechanism.
 */

#define YYDEBUG            0
#define CBREAK             1
#define GENERATE_LIBRARY_PROTOS
#define USESH
#define TRUNCATEBAK
#define MINIMENU	/* Display a mini-menu at the bottom of the screen */
#define NO8BIT		/* Remove this for non-English installations */
#define BAKEXT             "!"
#define MASKTYPE_STRING    ""
#define SIGNAL_TYPE_STRING ""
#define BINDIR             "Ispell:Library"
#define LIBDIR             "Ispell:Resources"
#define MASTERHASH         "English"
#define DEFHASH            "English"
#define DEFPAFF            "English"
#define OLDPDICT           "!I_"
#define DEFPDICT           "!I_"
#define TEMPNAME           "System provided."
#define TERMLIB	           "Home brewed."
#define EMACS              "None."
#define YACC               "bison"
#define ELISPDIR           ""
#define TEXINFODIR         ""
#define MAN1DIR            "Ispell:Documents"
#define MAN4DIR            "Ispell:Documents"
#define LANGUAGES          "{English,MASTERDICTS=English.med+,HASHFILES=English}"
#define MSGLANG            "English"
#define SORTTMP            ""
#define MAKE_SORTTMP       ""
#define PDICTVAR           "ISpell$WordList"
#define WORDS              ""
#define MAXPATHLEN         256
#define MAXNAMLEN          10
#define EGREPCMD           "%.egrep"
#define CFLAGS             "-Ospace -f"


/*
 * Extra messages.
 */

#define TERM_C_TO_LEAVE_SUPERVISOR "\nType 'quit' to leave supervisor.\r\n\n"




/*
 * Include all the bits needed to pretend we're a Unix box.
 */

#include <stdio.h>
#include <string.h>
#include <time.h>

/* Unix string handling. */
#define index(s,c) strchr(s,c)
#define rindex(s,c) strrchr(s,c)

/* Unix memory. */
#define bcopy(s1,s2,n) memmove(s2,s1,n)
#define bzero(s,n) memset(s,0,n)

/* Unix file system. */
struct stat
{
  time_t	st_mtime;
};
extern char _open_mode[][4];
extern FILE *_open_temp;
int access (const char *, register int);
int stat (const char *, struct stat *);
int fstat (const FILE *, struct stat *);
#define _iob __iob
#define read(fd,buf,siz) fread(buf, 1, siz, &_iob[fd])
#define open(name,mode) \
  ((_open_temp = fopen(name,_open_mode[mode]))!=0 ? _open_temp - _iob : -1)
#define close(fd) fclose(&_iob[fd])
#define lseek(fd,pos,org) fseek(&_iob[fd],pos,org)
#define link(name1,name2) (rename ((name1), (name2)))
#define unlink(name) remove(name)

/* Unix sleep. */
int sleep (time_t);

/* Unix error handling. */
#define ENOENT -1

/* Unix ctype. */
#define isascii(c)	((unsigned int)(c) < 0x80)


/*
 *  Handles on dynamic memory areas.
 */

void *get_memory_area (int, char *,int *);
void destroy_memory_area (int);
extern int hash_table_area, lexicon_area;

/* The following SWI numbers are not define in the file
   'swi.h' that comes with Acorn C v4, so we define them
   here. */

#ifndef OS_ChangeDynamicArea
#define OS_ChangeDynamicArea 0x0000002A
#endif
#ifndef OS_ReadDynamicArea
#define OS_ReadDynamicArea 0x0000005C
#endif
#ifndef OS_DynamicArea
#define OS_DynamicArea 0x00000066
#endif



