#ifndef __ttyio_h
#define __ttyio_h
#ifndef __crypt_h
# include "crypt.h"
#endif
#if (CRYPT || (defined(UNZIP) && !defined(FUNZIP)))
#ifndef __G
# define __G
# define __G__
# define __GDEF
# define __GPRO void
# define __GPRO__
#endif
#ifndef ZCONST
# define ZCONST const
#endif
#if (defined(MSDOS) || defined(OS2) || defined(WIN32))
# ifndef DOS_OS2_W32
# define DOS_OS2_W32
# endif
#endif
#if (defined(DOS_OS2_W32) || defined(__human68k__))
# ifndef DOS_H68_OS2_W32
# define DOS_H68_OS2_W32
# endif
#endif
#if (defined(DOS_OS2_W32) || defined(FLEXOS))
# ifndef DOS_FLX_OS2_W32
# define DOS_FLX_OS2_W32
# endif
#endif
#if (defined(DOS_H68_OS2_W32) || defined(FLEXOS))
# ifndef DOS_FLX_H68_OS2_W32
# define DOS_FLX_H68_OS2_W32
# endif
#endif
#if (defined(VM_CMS) || defined(MVS))
# ifndef CMS_MVS
# define CMS_MVS
# endif
#endif
#ifdef AMIGA
# define echoff(f)
# define echon()
# define getch() Agetch()
# define HAVE_WORKING_GETCH
#endif
#ifdef ATARI
# define echoff(f)
# define echon()
# include <osbind.h>
# define getch() (Cnecin() & 0x000000ff)
# define HAVE_WORKING_GETCH
#endif
#ifdef MACOS
# define echoff(f)
# define echon()
# define getch() macgetch()
# define HAVE_WORKING_GETCH
#endif
#ifdef NLM
# define echoff(f)
# define echon()
# define HAVE_WORKING_GETCH
#endif
#ifdef QDOS
# define echoff(f)
# define echon()
# define HAVE_WORKING_GETCH
#endif
#ifdef RISCOS
# define echoff(f)
# define echon()
# define getch() SWI_OS_ReadC()
# define HAVE_WORKING_GETCH
#endif
#ifdef DOS_H68_OS2_W32
# define echoff(f)
# define echon()
# ifdef WIN32
# ifndef getch
# define getch() getch_win32()
# endif
# else
# ifdef __EMX__
# ifndef getch
# define getch() _read_kbd(0, 1, 0)
# endif
# else
# ifdef __GO32__
# include <pc.h>
# define getch() getkey()
# else
# include <conio.h>
# endif
# endif
# endif
# define HAVE_WORKING_GETCH
#endif
#ifdef FLEXOS
# define echoff(f)
# define echon()
# define getch() getchar()
# define HAVE_WORKING_GETCH
#endif
#ifdef CMS_MVS
# define echoff(f)
# define echon()
#endif
#ifdef TANDEM
# define echoff(f)
# define echon()
# define getch() zgetch()
# define HAVE_WORKING_GETCH
#endif
#ifdef THEOS
# define echoff(f)
# define echon()
# define HAVE_WORKING_GETCH
#endif
#ifdef VMS
# define echoff(f) echo(0)
# define echon() echo(1)
# define getch() tt_getch()
# define FGETCH(f) tt_getch()
int echo OF((int));
int tt_getch OF((void));
#endif
#ifndef echoff
# define echoff(f) Echoff(__G__ f)
# define echon() Echon(__G)
void Echoff OF((__GPRO__ int f));
void Echon OF((__GPRO));
#endif
#if (defined(UNZIP) && !defined(FUNZIP))
# ifdef HAVE_WORKING_GETCH
# define FGETCH(f) getch()
# endif
# ifndef FGETCH
int zgetch OF((__GPRO__ int f));
# define FGETCH(f) zgetch(__G__ f)
# endif
#endif
#if (CRYPT && !defined(WINDLL))
char *getp OF((__GPRO__ ZCONST char *m, char *p, int n));
#endif
#else
#define echoff(f)
#define echon()
#endif
#endif