tldm-universe/Ardent/UV/gcidir/include/term.h

218 lines
5.1 KiB
C
Raw Permalink Normal View History

2024-09-09 21:51:08 +00:00
#ifndef h_term
#define h_term
/******************************************************************************
*
* Terminal I/O function delcarations
*
* Module %M% Version %I% Date %H%
*
* (c) Copyright 1998 Ardent Software Inc. - All Rights Reserved
* This is unpublished proprietary source code of Ardent Software Inc.
* The copyright notice above does not evidence any actual or intented
* publication of such source code.
*
*******************************************************************************
*
* Maintenence log - insert most recent change descriptions at top
*
* Date.... GTAR# WHO Description.........................................
* 10/14/98 23801 SAP Change copyrights.
* 04/07/98 22583 RJE Added definition of cronly in crmode
* 01/05/96 17705 PGW Changed TTYPROT structure slightly for MSWIN
* 08/23/95 17242 AGM Replace COMPUTER==WINNT test by MSWIN test
* 05/15/95 16523 SJM Added CHAN_TYPE_* defines
* 02/11/95 15740 JC Added AUX map information to tty structure.
* 11/24/94 15740 JC Added map information to tty structure
* 10/21/94 15166 GMM ifdefed some BAUD and PARITY defs for NT
* 11/12/92 10001 WLC Add CC_TMC (text mark) & CC_SQLNULL constants.
* 10002
* 07/26/90 6272 JWT Add U6072 & U9072 per Ken Pike of Ultimate
* 07/24/89 6157 TJR fixed stty setting save (see ttysetget.c)
* 07/25/88 - - Maintenence log purged at 5.2.1, see release 5.1.10.
*
*****************************************************************************/
#include "NLS.h"
/* NT cannot differentiate between different types of channel simply
by file descriptor alone, hence an extra argument is needed when
calling ttyset/get. These are the defines for this argument */
#define CHAN_TYPE_CRT 0
#define CHAN_TYPE_FILE 1
#define CHAN_TYPE_LPTR 2
#define CHAN_TYPE_MTU 3
#define MODE_LINE 0
#define MODE_RAW 1
#define MODE_CHAR 2
#define MODE_EMULATE 3
#define CC_INTR 0
#define CC_QUIT 1
#define CC_SUSP 2
#define CC_DSUSP 3
#define CC_SWITCH 4
#define CC_ERASE 5
#define CC_WERASE 6
#define CC_KILL 7
#define CC_LNEXT 8
#define CC_REPRINT 9
#define CC_EOF 10
#define CC_EOL 11
#define CC_EOL2 12
#define CC_FLUSH 13
#define CC_START 14
#define CC_STOP 15
#define CC_LCONT 16
#define CC_FMC 17
#define CC_VMC 18
#define CC_SMC 19
#define CC_TMC 20
#define CC_SQLNULL 21
#define CC_CCDEL 22
#define CC_ARRAY_SIZE 23 /* size of cc array in TTYDEF stucture defined below
All CC_xx define must be less than this value */
#define BAUD_0 0
#define BAUD_50 1
#define BAUD_75 2
/*
* the following set of definitions are defined out for NT as they are
* already define in WINBASE.H
*/
#ifndef MSWIN
#define BAUD_110 3
#define BAUD_134 4
#define BAUD_150 5
#define BAUD_200 6
#define BAUD_300 7
#define BAUD_600 8
#define BAUD_1200 9
#define BAUD_1800 10
#define BAUD_2400 11
#define BAUD_4800 12
#define BAUD_9600 13
#define BAUD_19200 14
#define BAUD_38400 15
#endif
#define BAUD_EXTA BAUD_19200
#define BAUD_EXTB BAUD_38400
#define BREAK_IGNORE 0
#define BREAK_INTR 1
#define BREAK_NUL 2
#define FILL_DELAY 0
#define FILL_NUL 1
#define FILL_DEL 2
#define ECHOE_ERASE 0
#define ECHOE_BS 1
#define ECHOE_BSB 2
#define ECHOE_PRINTER 3
#define ECHOK_KILL 0
#define ECHOK_LF 1
#define ECHOK_BSB 2
#ifndef MSWIN
#define PARITY_NONE 0
#define PARITY_EVEN 1
#define PARITY_ODD 2
#endif
#define PARITY_DISABLE 0
#define PARITY_ERRIGN 1
#define PARITY_ERRMRK 2
#define PARITY_ERRNUL 3
typedef struct
{
BITMAP inlcr:1, igncr:1, icrnl:1, onlcr:1, ocrnl:1, onocr:1, onlret:1, cronly:1;
} TTYCR;
typedef struct
{
BITMAP type:2, min:8, time:8;
} TTYMODE;
typedef struct
{
BITMAP ucin:1, ucout:1, xcase:1, invert:1;
} TTYCASE;
typedef struct
{
BITMAP on:1, erase:2, kill:2, ctrl:1, lf:1;
} TTYECHO;
typedef struct
{
BITMAP xon:1, startany:1, tandem:1, dtr:1;
} TTYHAND;
typedef struct
{
BITMAP enable:1, flush:1;
int brkkey;
} TTYSIG;
typedef struct
{
BITMAP bs:1, cr:2, ff:1, lf:2, vt:1, tab:2, fill:2;
} TTYDEL;
typedef struct
{ int line;
int baud;
#ifdef MSWIN
BITMAP data:4, stop:2, output:4, input:4, strip:1;
char errorchar;
#else
BITMAP data:4, stop:2, outenp:1, outodd:1, inipck:1, inmark:1,
inigp:1, strip:1;
#endif
} TTYPROT;
typedef struct
{
BITMAP post:1, tilde:1, bg:1, cs:1, tab:1;
} TTYOUT;
typedef struct
{
BITMAP local:1, receive:1, hangup:1;
} TTYCAR;
typedef struct
{
STRING mapname; /* Used to hold the text for map name */
CMAP* ipmap; /* Used to hold a pointer to the input map */
STRING auxmapname; /* Used to hold the text for AUX map name */
} TTYMAP;
typedef struct
{ TTYMODE mode;
char cc[CC_ARRAY_SIZE];
TTYPROT protocol;
TTYOUT output;
TTYCAR carrier;
TTYCR crmode;
TTYDEL delay;
TTYECHO echo;
TTYHAND handshake;
TTYSIG signals;
TTYCASE ucase;
TTYMAP map;
} TTYDEF;
EXTERN int ttyset(), ttyget();
EXTERN void terminit(),ttyunix(),ttyuv(),termset();
EXTERN void DATAadd();
EXTERN int DATAclear();
#endif /* end of term.h */