]>
git.saurik.com Git - wxWidgets.git/blob - utils/Install/inczip/ttyio.h
5 #ifndef __ttyio_h /* don't include more than once */
9 # include "crypt.h" /* ensure that encryption header file has been seen */
12 #if (CRYPT || (defined(UNZIP) && !defined(FUNZIP)))
14 * Non-echo keyboard/console input support is needed and enabled.
17 #ifndef __G /* UnZip only, for now (DLL stuff) */
25 #ifndef ZCONST /* UnZip only (until have configure script like Zip) */
29 #if (defined(MSDOS) || defined(OS2) || defined(WIN32))
35 #if (defined(DOS_OS2_W32) || defined(__human68k__))
36 # ifndef DOS_H68_OS2_W32
37 # define DOS_H68_OS2_W32
41 #if (defined(DOS_OS2_W32) || defined(FLEXOS))
42 # ifndef DOS_FLX_OS2_W32
43 # define DOS_FLX_OS2_W32
47 #if (defined(DOS_H68_OS2_W32) || defined(FLEXOS))
48 # ifndef DOS_FLX_H68_OS2_W32
49 # define DOS_FLX_H68_OS2_W32
53 #if (defined(VM_CMS) || defined(MVS))
60 /* Function prototypes */
62 /* The following systems supply a `non-echo' character input function "getch()"
63 * (or an alias) and do not need the echoff() / echon() function pair.
68 # define getch() Agetch()
69 # define HAVE_WORKING_GETCH
76 # define getch() (Cnecin() & 0x000000ff)
77 # define HAVE_WORKING_GETCH
83 # define getch() macgetch()
84 # define HAVE_WORKING_GETCH
90 # define HAVE_WORKING_GETCH
96 # define getch() SWI_OS_ReadC()
97 # define HAVE_WORKING_GETCH
100 #ifdef DOS_H68_OS2_W32
105 # define getch() getch_win32()
110 # define getch() _read_kbd(0, 1, 0)
112 # else /* !__EMX__ */
115 # define getch() getkey()
116 # else /* !__GO32__ */
118 # endif /* ?__GO32__ */
119 # endif /* ?__EMX__ */
121 # define HAVE_WORKING_GETCH
122 #endif /* DOS_H68_OS2_W32 */
127 # define getch() getchar() /* not correct, but may not be on a console */
128 # define HAVE_WORKING_GETCH
131 /* For VM/CMS and MVS, we do not (yet) have any support to switch terminal
132 * input echo on and off. The following "fake" definitions allow inclusion
133 * of crypt support and UnZip's "pause prompting" features, but without
134 * any echo suppression.
141 /* VMS has a single echo() function in ttyio.c to toggle terminal
142 * input echo on and off.
145 # define echoff(f) echo(0)
146 # define echon() echo(1)
150 /* For all other systems, ttyio.c supplies the two functions Echoff() and
151 * Echon() for suppressing and (re)enabling console input echo.
154 # define echoff(f) Echoff(__G__ f)
155 # define echon() Echon(__G)
156 void Echoff
OF((__GPRO__
int f
));
157 void Echon
OF((__GPRO
));
160 /* this stuff is used by MORE and also now by the ctrl-S code; fileio.c only */
161 #if (defined(UNZIP) && !defined(FUNZIP))
162 # ifdef HAVE_WORKING_GETCH
163 # define FGETCH(f) getch()
166 /* default for all systems where no getch()-like function is available */
167 int zgetch
OF((__GPRO__
int f
));
168 # define FGETCH(f) zgetch(__G__ f)
170 #endif /* UNZIP && !FUNZIP */
172 #if (CRYPT && !defined(WINDLL))
173 char *getp
OF((__GPRO__ ZCONST
char *m
, char *p
, int n
));
176 #else /* !(CRYPT || (UNZIP && !FUNZIP)) */
179 * No need for non-echo keyboard/console input; provide dummy definitions.
184 #endif /* ?(CRYPT || (UNZIP && !FUNZIP)) */
186 #endif /* !__ttyio_h */