source: trunk/ncurses/tack/tack.h@ 2747

Last change on this file since 2747 was 2621, checked in by bird, 20 years ago

GNU ncurses 5.5

File size: 13.6 KB
Line 
1/*
2** Copyright (C) 1991, 1997 Free Software Foundation, Inc.
3**
4** This file is part of TACK.
5**
6** TACK is free software; you can redistribute it and/or modify
7** it under the terms of the GNU General Public License as published by
8** the Free Software Foundation; either version 2, or (at your option)
9** any later version.
10**
11** TACK is distributed in the hope that it will be useful,
12** but WITHOUT ANY WARRANTY; without even the implied warranty of
13** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14** GNU General Public License for more details.
15**
16** You should have received a copy of the GNU General Public License
17** along with TACK; see the file COPYING. If not, write to
18** the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19** Boston, MA 02110-1301, USA
20*/
21
22/* $Id: tack.h,v 1.14 2005/09/17 19:49:16 tom Exp $ */
23
24#ifndef NCURSES_TACK_H_incl
25#define NCURSES_TACK_H_incl 1
26
27/* terminfo action checker include file */
28
29#define MAJOR_VERSION 1
30#define MINOR_VERSION 1
31
32#ifdef HAVE_CONFIG_H
33#include <ncurses_cfg.h>
34#else
35#define RETSIGTYPE void
36#define GCC_UNUSED /*nothing*/
37#define HAVE_GETTIMEOFDAY 1
38#define HAVE_SELECT 1
39#define HAVE_SYS_TIME_H 1
40#define HAVE_SYS_TIME_SELECT 1
41#endif
42
43#include <sys/types.h>
44#include <stdlib.h>
45#include <unistd.h>
46#include <ctype.h>
47#include <string.h>
48
49#include <curses.h>
50#include <term_entry.h>
51
52#if USE_RCS_IDS
53#define MODULE_ID(id) static const char Ident[] = id;
54#else
55#define MODULE_ID(id) /*nothing*/
56#endif
57
58#if !HAVE_STRSTR
59extern char *_nc_strstr(const char *, const char *);
60#define strstr(h,n) _nc_strstr(h,n)
61#endif
62
63#define UChar(c) ((unsigned char)(c))
64
65extern FILE *log_fp;
66extern FILE *debug_fp;
67extern int debug_level;
68extern char temp[];
69extern char tty_basename[];
70extern char tty_shortname[];
71
72#define SYNC_FAILED 0
73#define SYNC_TESTED 1
74#define SYNC_NOT_TESTED 2
75#define SYNC_NEEDED 3
76
77extern int tty_can_sync;
78extern int total_pads_sent; /* count pad characters sent */
79extern int total_caps_sent; /* count caps sent */
80extern int total_printing_characters; /* count printing characters sent */
81extern int no_alarm_event; /* TRUE if the alarm has not gone off yet */
82extern unsigned long usec_run_time; /* length of last test in microseconds */
83extern int raw_characters_sent; /* Total output characters */
84
85/* Stopwatch event timers */
86#define TIME_TEST 0
87#define TIME_SYNC 1
88#define TIME_FLUSH 2
89#define MAX_TIMERS 3
90
91/* definitions for pad.c */
92
93#define EXIT_CONDITION (no_alarm_event && (tt_delay_used < tt_delay_max))
94#define SLOW_TERMINAL_EXIT if (!test_complete && !EXIT_CONDITION) { break; }
95#define CAP_NOT_FOUND if (auto_pad_mode) return
96
97extern char letters[26+1];
98#define NEXT_LETTER letter = letters[letter_number =\
99 letters[letter_number + 1] ? letter_number + 1 : 0]
100
101extern int test_complete; /* counts number of tests completed */
102extern char letter;
103extern int letter_number;
104extern int augment, repeats;
105extern long char_sent;
106extern const char *pad_repeat_test; /* commands that force repeat */
107
108extern int replace_mode;
109extern int char_count, line_count, expand_chars;
110extern int can_go_home, can_clear_screen;
111
112extern int translate_mode, scan_mode;
113extern int auto_pad_mode; /* TRUE for auto time tests */
114extern int char_mask;
115extern int hex_out; /* Display output in hex */
116
117/* Parity bit macros */
118#define STRIP_PARITY 0x7f
119#define ALLOW_PARITY 0xff
120
121/* select_delay_type: 0 -> reset all delays
122 1 -> force long delays
123 2 -> do not change the delays */
124extern int select_delay_type;
125
126/* select_xon_xoff: 0 -> reset xon/xoff
127 1 -> set xon/xoff
128 2 -> do not change xon/xoff */
129extern int select_xon_xoff;
130
131extern int tty_frame_size;
132extern unsigned tty_baud_rate;
133extern unsigned long tty_cps; /* The number of characters per second */
134extern int not_a_tty, nodelay_read;
135extern int send_reset_init;
136