📄 tchk.doc
字号:
typedef enum {
RDOMAIN = 1,
RSING,
ROVERFLOW,
RUNDERFLOW,
RTLOSS,
RPLOSS,
RFRACOVER,
RFRACUNDER,
RDIVBYZERO,
} _rmexcep;
typedef struct REAL {
long rint;
long rfrac;
int precision;
};
TCHK 2.1 Page 21
Real constants:
#define MAXRPRECISION 8
Sound.h
-------
Sound constants:
Tone constants: see sound.h for mode details.
Statehk.h
---------
Statehk constants:
#define MAXSTATES 55
Timehk.h
--------
Timehk constants:
#define MAXLONGTIME 8640000l
Video.h
-------
Video constants:
#define VIDEO 0x10
#define MODE *((byte far *) 0x449lu)
#define PAGE *((byte far *) 0x462lu)
#define PAGELEN *((unsigned int far *) 0x44Clu)
#define VIDOFFSET *((unsigned int far *) 0x44Elu)
#define ROWCOUNT *((byte far *) 0x484lu)
#define CHARHEIGHT *((unsigned int far *) 0x485lu)
#define CURSOR_UNDERBAR (MODE==7)?0x0B0C:0x0607
#define CURSOR_HALFBLOCK (MODE==7)?0x070C:0x0407
#define SHADOW_TL 0x0080
#define SHADOW_T 0x0040
#define SHADOW_TR 0x0020
#define SHADOW_R 0x0010
#define SHADOW_BR 0x0008
#define SHADOW_B 0x0004
#define SHADOW_BL 0x0002
#define SHADOW_L 0x0001
TCHK 2.1 Page 22
#define SHADOW_TOP (SHADOW_TL|SHADOW_T|SHADOW_TR)
#define SHADOW_BOTTOM (SHADOW_BL|SHADOW_B|SHADOW_BR)
#define SHADOW_LEFT (SHADOW_TL|SHADOW_L|SHADOW_BL)
#define SHADOW_RIGHT (SHADOW_TR|SHADOW_R|SHADOW_BR)
Zip.h
-----
Zip types:
typedef struct ZIP_local_header {
long Signature;
int version;
int BitFlag;
int CompressionMethod;
unsigned int FileTime;
unsigned int FileDate;
long CRC32;
long CompressedSize;
long UnCompressedSize;
int FileNameLength;
int ExtraFieldLength;
};
typedef struct ZIP_central_record {
long Signature;
int VersionMadeBy;
int VersionNeeded;
int BitFlag;
int CompressionMethod;
unsigned int FileTime;
unsigned int FileDate;
long CRC32;
long CompressedSize;
long UnCompressedSize;
int FileNameLength;
int CommentFieldLength;
int DiskStartNumber;
int InternalAttributes;
long ExternalAttributes;
long LocalHeaderOffset;
};
typedef struct ZIP_end_central_record {
long Signature;
int ThisDiskNumber;
int CentralDiskNumber;
int EntriesCentral;
long SizeCentral;
long OffsetCentral;
int ZipfileCommentLength;
};
TCHK 2.1 Page 23
Zip constants:
#define MAX_ZIP_VERSION 10
#define ZIPSignatureLocal 0x04034B50l
#define ZIPSignatureCentral 0x02014B50l
#define ZIPSignatureEndCentral 0x06054B50l
Zip macros:
#define nextZIPlocal(Z) (Z.FileNameLength +
Z.ExtraFieldLength +
Z.CompressedSize)
#define ZIPversion(Zversion) (Zversion & 0x00FF)
#define _ZIPmajor(Zversion) (ZIPversion(Zversion) / 10)
#define _ZIPminor(Zversion) (ZIPversion(Zversion) % 10)
VARIABLE TYPES
The following variable types have been defined:
bboolean = unsigned int defined in TC.EXE. See Features.
boolean = char Howard.h
byte = unsigned char defined in TC.EXE. See Features.
word = unsigned int defined in TC.EXE. See Features.
struct ddate Datehk.h
struct BiosParmBlock Doshk.h
struct BootBlock Doshk.h
struct BootBlock4 Doshk.h
struct filespec Filehk.h
struct fnameext Filehk.h
struct EMSrecord Ibm.h
struct keylist Menuhk.h
struct litebar_field Menuhk.h
struct litebar_header Menuhk.h
struct popup_field Menuhk.h
struct popup_header Menuhk.h
struct DESQmemory Multihk.h
struct ZIP_local_header Zip.h
struct ZIP_central_record Zip.h
struct ZIP_end_central_record Zip.h
TCHK 2.1 Page 24
GLOBAL VARIABLES
These variables are defined for one reason or another and used
internally. None of these variables have to be initialized (see
insertmode.) They are mainly used to return extra values found in
certain functions or needed globally by other functions.
Date variables:
char *Days[7] = { "Sunday","Monday","Tuesday","Wednesday",
"Thursday","Friday","Saturday" };
char *Months[12] = { "January","February","March","April",
"May","June","July","August",
"September","October","November",
"December" };
char *MonthAbbr[12] = { "Jan","Feb","Mar","Apr","May",
"Jun","Jul","Aug","Sep","Oct",
"Nov","Dec" };
int daylist[13] = { 0, 31, 59, 90, 120, 151, 181, 212,
243, 273, 304, 334, 365 };
Note: daylist is a list of the day number of the year at the end
of each month (i.e. April 1st is the 91st (Mar 31 = 90, +1)
day of the year.)
Keyboard variables:
boolean key_extended; /* TRUE if special key pressed,
i.e. Alt-X, etc. */
int key_status; /* shift key status byte */
Note: these variables are set by getk(), and are checked by many
other keyboard routines.
boolean insertmode; /* insert or overwrite mode? */
Note: This variable is used internally by getstr() and getget().
Although getget() initializes this variable, getstr does
NOT. You MUST set insertmode to TRUE or FALSE before
calling getstr() or unpredictable results may occur. Upon
completion of this function, testing this variable will
determine the input mode last used. Future versions will
default insertmode to some value if it has not been set.
unsigned _cursorinsert;
unsigned _cursoroverwrite;
Note: Cursor used in insert and overwrite modes during keyboard
input. Currently only supported by getget().
TCHK 2.1 Page 25
Menu variables:
int litebarerrno;
int popuperrno;
Mouse variables:
int _mouse1, _mouse2, _mouse3, _mouse4;
Multitasking variables:
char _dvmajor;
char _dvminor;
Real (simulated FP) variables:
int _r_minpre, _r_maxpre;
boolean _r_maximum = FALSE;
int _rmatherror;
State/Zip code variables:
const char *States[] =
{ "AL","AK","AZ","AR","CA","CO","CT","CZ","DE","DC",
"FL","GA","GU","HI","ID","IL","IN","IA","KS","KY",
"LA","ME","MD","MA","MI","MN","MS","MO","MT","NE",
"NV","NH","NJ","NM","NY","NC","ND","OH","OK","OR",
"PA","PR","RI","SC","SD","TN","TX","UT","VT","VA",
"VI","WA","WV","WI","WY" };
const char *StateName[] =
{ "Alabama","Alaska","Arizona","Arkansas",
"California","Colorodo", "Connecticut",
"Canal Zone","Delaware","District of Columbia",
"Florida","Georgia","Guam","Hawaii","Idaho",
"Illinois","Indiana","Iowa","Kansas","Kentucky",
"Louisiana","Maine","Maryland","Massachussetts",
"Michigan","Minnesota","Mississippi","Missouri",
"Montana","Nebraska", "Nevada","New Hampshire",
"New Jersey","New Mexico","New York",
"North Carolina","North Dakota","Ohio","Oklahoma",
"Oregon","Pennsylvania","Puerto Rico",
"Rhode Island","South Carolina","South Dakota",
"Tennessee","Texas","Utah","Vermont","Virginia",
"Virgin Islands","Washington","West Virginia",
"Wisconsin", "Wyoming" };
TCHK 2.1 Page 26
const long ZipMin[] =
{ 99500l, 35000l, 71500l, 85000l, 90000l, 80000l,
06000l, LONG_MIN, 20000l, 19700l, 32000l, 30000l,
96900l, 96700l, 50000l, 83200l, 60000l, 46000l,
66000l, 40000l, 70000l, 01000l, 20600l, 03900l,
48000l, 55000l, 63000l, 38600l, 59000l, 68000l,
27000l, 58000l, 03000l, 07000l, 87000l, 88900l,
09000l, 43000l, 73000l, 97000l, 15000l, 00600l,
02800l, 29000l, 57000l, 37000l, 75000l, 84000l,
22000l, 00800l, 05000l, 24700l, 98000l, 53000l,
82000l };
const long ZipMax[] =
{ 99999l, 36999l, 72899l, 86599l, 96699l, 81699l,
06999l LONG_MAX, 20599l, 19999l, 34299l, 31999l,
96999l, 96899l, 52699l, 83899l, 62999l, 47999l,
67999l, 42799l, 71499l, 02799l, 21999l, 04999l,
49999l, 56799l, 65899l, 39799l, 59999l, 69399l,
28999l, 58899l, 03899l, 08999l, 88499l, 89899l,
14999l, 45899l, 74999l, 97999l, 19699l, 00999l,
02999l, 29999l, 57799l, 38599l, 79999l, 84799l,
24699l, 00899l, 05999l, 26899l, 99499l, 54999l,
83199l };
TCHK version variables:
unsigned int _TCHKversion = 0x0210;
unsigned char _TCHKmajor = 2;
unsigned char _TCHKminor = 10;
char *_TCHKdate = "06/06/89";
char *_TCHK = "TCHK is Copyright (C) 1988,1989 by Howard
Kapustein. All rights reserved.";
Video variables:
FRAMES: see video.h for frame[] declarations.
const char emptystring[] = " ";
Note: Do NOT alter this variable. emptystring[] is defined
as a string of 15 spaces and is used internally by
several functions. Altering this function can lead to
wildly unpredictable results.
byte char_attribute;
Note: This variable is used by many output functions to set
the attribute byte. For functions such as putstr() you
can either call set_color() with the attribute desired
or declare char_attribute as an extern and then set it
yourself.
TCHK 2.1 Page 27
int _shadowstyle = SHADOW_B | SHADOW_BR | SHADOW_R;
char _shadowchar = '
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -