30 #define iflush(FD) (0) 31 #define ioset(FD, TTYB_P) (0) 32 #define iosetl(FD, BITS) (0) 33 #define ioget(FD, TTYB_P) (0) 34 #define iogetl(FD, BITS) (0) 35 #define iolitout(FD, CODE) (0) 36 #define iosetraw(TTYB) (0) 37 #define iosetmfb_flags(TTYB) (0) 44 #define iflush(FD) (ioctl(FD, TCFLSH, 0)) 45 #define ioset(FD, TTYB_P) (ioctl(FD, TCSETA, (char *) TTYB_P)) 46 #define iosetl(FD, BITS) (0) 47 #define ioget(FD, TTYB_P) (ioctl(FD, TCGETA, (char *) TTYB_P)) 48 #define iogetl(FD, BITS) (0) 49 #define iolitout(FD, TTYB) (TTYB.c_oflag &= ~OPOST, 0) 50 #define iosetraw(TTYB) (TTYB.c_lflag &= ~(ICANON | ECHO), \ 51 TTYB.c_cc[VMIN] = 1, \ 52 TTYB.c_cc[VTIME] = 0, 0) 53 #define iosetmfb_flags(TTYB) (0) 60 #define iflush(FD) (ioctl(FD, TIOCFLUSH, 0)) 61 #define ioset(FD, TTYB_P) (ioctl(FD, TIOCSETN, (char *) TTYB_P)) 62 #define iosetl(FD, BITS) (ioctl(FD, TIOCLSET, (char *) BITS)) 63 #define ioget(FD, TTYB_P) (ioctl(FD, TIOCGETP, (char *) TTYB_P)) 64 #define iogetl(FD, BITS) (ioctl(FD, TIOCLGET, (char *) BITS)) 65 #define iolitout(FD, CODE) (ioctl(FD,TIOCLBIS,(char *) LLITOUT)) 66 #define iosetraw(TTYB) (TTYB.sg_flags |= RAW, 0) 67 #define iosetmfb_flags(TTYB) ( TTYB.sg_flags &= (ALLDELAY & ~XTABS), \ 68 TTYB.sg_flags |= ODDP | EVENP | CBREAK) 79 #define MFBFORMAT MFBCurrent->strings 84 MFBBADMCF,
"Can't open or close mfbcap file",
98 MFBNOMASK,
"No defineable read or write masks",
99 MFBBADDEV,
"Can't open or close output device",
100 MFBBADOPT,
"Can't access or set device status",
103 MFBNOPTFT,
"No format specified for pointing device",
105 MFBNORBND,
"No Rubberbanding of pointing device",
110 #define NUMERRORS (sizeof(errors)/sizeof(struct err)) 242 #if defined(HAVE_SGTTY_H) || defined(HAVE_TERMIO_H) 276 (
void) putchar(
'\07' );
324 char buf[256], *
s, *
r;
348 if(DeviceName ==
NULL || *DeviceName == 0) {
350 dev_open(DeviceName,&mfb->
fileDesc);
354 mfb->
name = ttyname(2);
359 dev_open(DeviceName,&mfb->
fileDesc);
362 if(close(creat(DeviceName,0644)) < 0){
367 if((mfb->
fileDesc = open(DeviceName,2)) < 0){
372 mfb->
name = DeviceName;
809 #if defined(HAVE_SGTTY_H) || defined(HAVE_TERMIO_H) 893 #if defined(HAVE_SGTTY_H) || defined(HAVE_TERMIO_H) 944 int *x,*y,*key,*button;
1037 static char MFBTypeIn[161];
1066 MFBTypeIn[Int1] = 0;
1069 else if(*c == 8 || *c == 0177){
1083 else if(*c == 24 || *c == 21){
1099 MFBTypeIn[Int1++] = *
c;
1102 if(*c >=
' ' && *c <=
'~')
1119 MFBTypeIn[Int1] = 0;
1122 else if(*c == 8 || *c == 0177){
1132 else if(*c == 24 || *c == 21){
1133 for(; Int1 > 0; Int1--){
1146 MFBTypeIn[Int1++] = *
c;
1147 if(*c >=
' ' && *c <=
'~')
1182 static char result[200];
1184 if(errors[i].errnum == errnum) {
1189 (void) sprintf(result,
"Illegal Error Number %d in MFBError!",errnum);
static char buf[MAXPROMPT]
char ttyBuffer[TTYBUFSIZE]
struct mfbformatstrs strings
MFBPutstr(char *c, int n)
Bool linePatternDefineBool
char * MFBError(int errnum)
Bool textPositionableBool
void SetCurrentMFB(MFB *mfb)
MFB * MFBOpen(char *TerminalName, char *DeviceName, int *errorcode)
void MFBGenCode(char *PM)
int MFBPoint(int *x, int *y, int *key, int *button)
MFBSetFillPattern(int styleId)
static void message(char *instr, char *outstr)
Bool reissueLineStyleBool
char * MFBKeyboard(int x, int y, int background, int foreground)
Bool fillDefineRowMajorBool