/**-- terminal driver for unix-like systems Copyright (C) Tektronix, Inc. 1998 - 2001. All rights reserved. @see GNU LGPL @author Tektronix CTE @(#) %derived_by: guidod % @version %version: bln_mpt1!5.16 % (%date_modified: Tue Sep 10 12:31:47 2002 %) @description Terminal driver for UNIX-like systems using termcap or the termcap emulation in curses. */ /* Refer to this file as an example of how to write such a driver, though other drivers for non-portable operating systems should be much simpler. E.g. on an IBM-PC you could do everything here with a few INT-10h calls. @{ */ #if defined(__version_control__) && defined(__GNUC__)static char* id __attribute__((unused)) = "@(#) $Id: %full_filespec: term-lib.c~bln_mpt1!5.16:csrc:bln_12xx!1 % $" #endif #define _P4_SOURCE 1 #include <pfe/pfe-base.h> #include <pfe/def-xtra.h> #include <stdio.h> /*; putchar() */ #include <stdlib.h> /*getenv() */ #include <string.h> /*strlen() */ #include <errno.h> /*EINTR */ #ifdef PFE_HAVE_UNISTD_H #include <unistd.h> #endif #ifdef PFE_HAVE_FCNTL_H #include <fcntl.h> #endif #include <pfe/term-sub.h> #include <pfe/_nonansi.h> #include <pfe/_missing.h> #if ! defined PFE_HAVE_FCNTL && defined F_GETFL && defined F_SETFL #define PFE_HAVE_FCNTL 1 /*should have been done by configure... */ #endif #ifdef PFE_HAVE_FCNTL #define P4_fcntl_F_GETFL(_FD_,_ARG_) (fcntl((_FD_),F_GETFL,(_ARG_))) #define P4_fcntl_F_SETFL(_FD_,_ARG_) (fcntl((_FD_),F_SETFL,(_ARG_))) #else
int P4_fcntl_F_GETFL(int fd, int arg)
|
int P4_fcntl_F_SETFL(int fd, int arg)
|
/* |
static int saved_fcntl[3] =
|
/* |
static void /*
|
/* |
/* |
int c_interrupt_key (char ch) /*
|
/* |
static void tty_interactive (void)
|
/* |
static struct
|
static int c_interrupt_key (char ch) /*
|
static void tty_interactive (void)
|
static int c_interrupt_key (char ch)
|
static void tty_interactive (void)
|
/* |
/* |
/*
|
/* |
static char tckeycode[][3] =
|
static char tcctlcode[][3] =
|
/* |
static void t_puts (int cap, int n)
|
static char * tparm (int cap, int x, int y) /*
|
|
|
/* |
static int query_database (void) /*
|
static int /*
|
static void t_puts (int tcidx, int n) /*
|
p4_term_struct p4_term_ios =
|
/* |
static int query_database (void)
|
static int /*
|
static void /*
|
p4_term_struct p4_term_ios =
|
static int /*
|
static void c_cleanup_terminal (void)
|
static void /*
|
static void /*
|
static void c_query_winsize (void)
|
static void c_query_winsize (void)
|
/* |
/* |
/* |
/* |
static int nextch (void) /*
|
static int c_keypressed (void) /*
|
static int c_getkey (void)
|
/* |
/* |
static void /*
|
static void c_put_flush (void)
|
static void c_putc (char c)
|
static void c_puts (const char *s)
|
static void c_gotoxy (int x, int y)
|
static void c_wherexy (int *x, int *y)
|
static void c_tput (int attr)
|
/* |