home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hall of Fame
/
HallofFameCDROM.cdr
/
prog1
/
tchk21.lzh
/
TCHK.DOC
< prev
next >
Wrap
Text File
|
1989-06-06
|
128KB
|
4,357 lines
TCHK 2.1 Page 1
TCHK - a Turbo C library
Version 2.10
Documentation for TCHK
by
Howard Kapustein
Howard Kapustein
1695 Barbara Lane
East Meadow, NY 11554
(516) 481-9612
(c) Copyright 1987, 1988, 1989 All rights reserved
TCHK 2.1 Page 2
Table of Contents
COPYRIGHT AND DISCLAIMER ........................................... 4
TRADEMARKS ......................................................... 4
LICENSE ............................................................ 4
REGISTRATION AND ORDERING INFORMATION .............................. 5
QUANTITY DISCOUNTS ................................................. 6
BACKGROUND ......................................................... 6
FILES .............................................................. 7
IN THE BEGINNING.. ................................................. 8
FEATURES ........................................................... 9
CREDIT ............................................................. 10
FUNCTIONS .......................................................... 10
TIPS AND CAVEATS ................................................... 12
#DEFINES ........................................................... 12
Ansihk.h ...................................................... 12
Color.h ....................................................... 12
Chiphk.h ...................................................... 12
Datehk.h ...................................................... 13
Doshk.h ....................................................... 13
Filehk.h ...................................................... 14
Finance.h ..................................................... 15
Howard.h ...................................................... 15
Ibm.h ......................................................... 15
Keyboard.h .................................................... 16
Keycode.h ..................................................... 16
Math.h ........................................................ 17
Menuhk.h ...................................................... 17
Mousehk.h ..................................................... 19
Multihk.h ..................................................... 20
Printhk.h ..................................................... 20
Real.h ........................................................ 20
Sound.h ....................................................... 21
Statehk.h ..................................................... 21
Timehk.h ...................................................... 21
Video.h ....................................................... 21
Zip.h ......................................................... 22
VARIABLE TYPES ..................................................... 23
TCHK 2.1 Page 3
GLOBAL VARIABLES ................................................... 24
Date variables: ............................................... 24
Keyboard variables: ........................................... 24
Menu variables: ............................................... 25
Mouse variables: .............................................. 25
Multitasking variables: ....................................... 25
Real (simulated FP) variables: ................................ 25
State/Zip code variables: ..................................... 25
TCHK version variables: ....................................... 26
Video variables: .............................................. 26
REVISION HISTORY ................................................... 28
FUTURE ENHANCEMENTS ................................................ 35
OTHER PRODUCTS ..................................................... 38
SUPPORT ............................................................ 39
APPENDIX A - DATE FORMATS .......................................... 40
APPENDIX B - date_convert() FORMATS ................................ 41
APPENDIX C - time_convert() FORMATS ................................ 43
APPENDIX D - SIMULATED FP MATH ..................................... 44
APPENDIX E - MOUSE FUNCTIONS ....................................... 46
APPENDIX F - REGISTRATION FORM ..................................... 49
APPENDIX G - BUG REPORT FORM ....................................... 52
Index .............................................................. 56
TCHK 2.1 Page 4
COPYRIGHT AND DISCLAIMER
This library and documentation are Copyrighted (C) 1987, 1988,
1989 by Howard Kapustein, All Rights Reserved.
Use of this library acknowledges this disclaimer of warranty:
"This library is supplied as-is. The author disclaims all
warranties, expressed or implied, including, without limitation,
the warranties of merchantability and of fitness of this product
for any purpose. The author assumes no liability for damages
direct or consequential, which may result from the use of this
product."
TRADEMARKS
CLIPPER is a trademark of Nantucket Corporation.
dBASE and dBase III Plus is a registered trademark of Ashton-Tate
Incorporated.
DESQview is a registered trademark of Quarterdeck Office Systems.
GEnie is a trademark of GE Information Services.
IBM is a registered trademark of International Business Machines.
LIM and EMS are trademarks of Lotus, Intel, and Microsoft
Corporations.
Lotus and Symphony are registered trademarks of Lotus Corp.
Macintosh is a registered trademark of Apple Incorporated.
Microsoft and Quick C are registered trademarks of Microsoft
Corporation.
TLIB, Turbo Assembler and Turbo C are registered trademarks of
Borland International.
LICENSE
TCHK is NOT, nor has it ever been, public domain or free software.
TCHK is being distributed under the User Supported software
concept. Nonregistered users are granted a limited license to use
TCHK for a trial period, in order to determine if it suits their
needs. Any other use of TCHK or use past this period requires
registration. Any use of non-registered copies of TCHK by a
business, organization, or any kind of institution is forbidden.
A registered copy of TCHK must be treated like a book, in that the
same registered copy of TCHK may not be used by more than one
person nor on more than one machine at the same time.
Non-registered users are granted a limited license to make an
evaluation copy for trial use on a private, non-commercial basis,
for the express purpose of determining whether TCHK is suitable
TCHK 2.1 Page 5
for their needs. After this trial period, you should either
register your copy or discontinue using TCHK. Registering your
copy of the software helps the author continue to provide
professional-quality software at very reasonable prices.
All corporate, business, government or other commercial users of
TCHK MUST be registered.
All users are granted a limited license to copy TCHK only for the
trial use of others and subject to the above limitations. This
license does NOT include distribution or copying of this software
package:
1 - In connection with any other product or service.
2 - For general use within a company or institution.
3 - For any consideration or 'disk fee'.
4 - In modified form, i.e. the file containing this license
information MUST be included, along with the full
documentation, demos and any other files distributed
with TCHK.
Operators of electronic bulletin board systems (Sysops) are
encouraged to post TCHK for downloading by their users, as long as
the above considerations are met.
If you are a distributor of a public domain or user-supported
software library, you may be eligible to distribute copies of
TCHK. You must meet all of the above conditions and acquire
written permission from me, the author (Howard Kapustein) before
doing so. Such permission is usually granted. Please call or write
for details.
Distribution of a program incorporating an unregistered version of
TCHK, in part or whole, is a violation of the law.
REGISTRATION AND ORDERING INFORMATION
Users may become REGISTERED owners for the small pittance of $20.
Registering has the following benefits:
Registered owners will receive TCHK compiled for use with all
memory models (not just the small memory model distributed
here.)
Registered owners will receive a disk supplied version of the
TCHK manual formatted for printing on an HP Laserjet.
Registered owners have a royalty-free runtime license, and
are entitled to utilize TCHK in distributed applications.
Registered owners can update their registration to the newest
version of TCHK for a nominal fee to cover diskette(s),
shipping and handling.
TCHK 2.1 Page 6
REGISTERED owners may purchase the source code to TCHK for $40.
All materials are shipped on 5.25-inch floppy diskettes.
Unfortunately, I do not yet have a 3.5-inch floppy drive, but it
is on my list of "Uses for registration monies". Sorry, but for
now, 3.5-inch disk versions of TCHK are not available. Yet...
An evaluation disk with the current copy of TCHK on it is
available for $10. This is to be used to try out TCHK, and does
not include registration. The fee covers the cost of postage,
diskette(s), and handling.
Non-U.S. orders need to include $5.00 extra to cover additional
shipping and handling charges. Checks and money orders must be
drawn on a U.S. bank. Please send all payments payable in U.S.
Dollars.
To place an order, please use the order form distributed with TCHK
(REGISTER.DOC). If by chance, you don't have the REGISTER.DOC
file, a copy of the registration form is available in Appendix F.
QUANTITY DISCOUNTS
Quantity discounts are available starting at the 11th copy, as
follows:
0-10 copies: no discount
11-15 copies: 5% discount
16-20 copies: 10% discount
21+ copies: 15% discount
ALL PRICES AND DISCOUNTS ARE SUBJECT TO CHANGE WITHOUT NOTICE.
Discounts are not cumulative; they apply to single orders of like
products only.
BACKGROUND
I am a recent graduate of Rensselaer Polytechnic Institute (May
'89) with a B.S. in Computer Science and a minor in Accounting.
I also do consulting/programming work as a sideline (hint hint.)
Currently, I'm working full time with Shared Medical Systems (SMS)
in Malvern, PA. When I purchased Turbo C (way back at version
1.0), I wanted to do more than bare bones printf(). I was also
engaged in designing some software requiring the use of dates, and
some other unusual functions. Thus, after several months of
testing and use, I developed a rather useful collection of
functions. After some requests from other programmers, I decided
to bundle most of them together and <gasp> document them. Since
then, my library has grown, and so has TCHK. This library is a
collection of most of these functions.
TCHK 2.1 Page 7
FILES
You may not distribute TCHK except in unmodified form, and it must
be distributed with all the following files:
PACKING.LST - list of distributed files
READ.ME - last minute notes
BUG.DOC - TCHK bug report form
REGISTER.DOC - TCHK registration form
TCHK.GEN - TCHK file description for GEnie
TCHK.MSG - brief description of TCHK
TCHK.PRO - TCHK BBS file description for ProDoor
TCHK.ZDR - TCHK BBS file description for ZDoor
TCHK.DOC - TCHK documentation
TCHK.FNC - TCHK function documentation
TCHKS.TC - Turbo C configuration file (Small)
TCHKS.LIB - small memory model library
ANSIHK.H - header file for ANSI functions
CHIPHK.H - header file for chip id routines
COLOR.H - color definitions
COMM.H - header file for communications functions
DATEADV.H - header file for advanced date routines
DATECONV.H - header file for date conversion routines
DATEHK.H - header file for date routines
DOSHK.H - header file for DOS routines
FILEHK.H - header file for file routines
FINANCE.H - header file for financial routines
HOWARD.H - header file for miscellanoues definitions
IBM.H - header file for misc. IBM routines
KEYBOARD.H - header file for keyboard routines
KEYCODE.H - keyboard key codes
MATHHK.H - header file of math routines
MENUHK.H - header file for menu routines
MOUSEHK.H - header file for mouse routines
MULTIHK.H - header file for multi-tasking routines
NETWORK.H - header file for network routines
PRINTHK.H - header file for print routines
REAL.H - header file for simulated FP functions
SOUND.H - header file for sound routines
STATEHK.H - header file for state/zip code functions
STRINGHK.H - header file for string routines
TIMEHK.H - header file for time routines
VIDEO.H - header file for video routines
ZIP.H - header file for .ZIP file format support
TCHK 2.1 Page 8
DEMO.ZIP - archive of TCHK demo programs:
DEMOADV.C - date conversion functions
DEMOADV.EXE
DEMOADV.PRJ
DEMODATE.C - date functions
DEMODATE.EXE
DEMODATE.PRJ
DEMODISK.C - disktype function
DEMODISK.EXE
DEMODISK.PRJ
DEMOLITE.C - litebar menu functions
DEMOLITE.EXE
DEMOLITE.PRJ
DEMONUM.C - number functions (math/financial)
DEMONUM.EXE
DEMONUM.PRJ
DEMOPARS.C - DOS parsing functions
DEMOPARS.EXE
DEMOPARS.PRJ
DEMOPOP.C - popup menu functions
DEMOPOP.EXE
DEMOPOP.PRJ
DEMOTIME.C - time conversion functions
DEMOTIME.EXE
DEMOTIME.PRJ
To compile the demo programs, use the configuration file TCHK.TC
and the appropriate project file. Make sure you check the Turbo C
directories before compiling. See Tips and Caveats for more
information.
IN THE BEGINNING...
Except where explicitly stated, all of these functions have been
compiled and tested on my system:
- IBM PC
- 640K memory
- (CGA) Color Graphics Adapter
- DOS 3.2
- AST SixPakPremium w/1 MB EEMS (REMM.SYS 3.1 and 4.3)
- Microsoft Mouse (MOUSE.COM 6.24)
- IBM Proprinter XL
- NEC V20 cpu
- PC Sprint (dandy little speed up plug in. No slot,
hardware switch for normal (4.77) and fast (~7) MHz speeds
and reboot. Between the board and the NEC my machine plods
TCHK 2.1 Page 9
along almost 2x as fast as a normal PC. At only $95, I
highly recommend it. Call these guys for more info:
Product: PC Sprint and/or NEC V20
Exec-PC, Inc.
PO BOX 11268
Shorewood, WI 53211
VOICE: (414) 963-2880
MODEM: (414) 964-5160
TCHK was compiled from the interactive environment of Turbo C,
with the following options changed from the default:
Memory model: SMALL
Optimize on: SPEED
Full optimization (Register/Jump)
No debug information
Standard stack frame Off
For more info, check out the configuration file TCHK.TC.
This library was written in 100% Turbo C, except for a couple of
TASM modules which were originally inline Assembly. All C code was
compiled with Turbo C 2.0, all Assembly was compiled with Turbo
Assembler 1.0 and TCHK created with TLIB 2.0.
FEATURES
TCHK sports many useful features not found in other shareware
packages. Aside from many input and output routines, TCHK provides
many functions dealing with dates, time, strings, popup and
litebar menus, DESQview support, and much more.
Many of the functions requiring output as a side effect (most
noticeably the keyboard and menu functions) make use of some of
the output routines prototyped in VIDEO.H or some of the console
i/o functions by Borland (i.e. cputs(), putch(), etc.). If you use
almost any of the keyboard routines, also expect some video
routines to be linked into your program. This is true of some
other functions as well (the popup menus use Borland's gettext()
and cputs() routines.) If you really want to change the library,
you can always purchase the source code...
For a quick synopsis of TCHK, check out the file TCHK.MSG.
TCHK 2.1 Page 10
CREDIT
The following people deserve credit for their help:
James Arnold for helping with optimizing the direct video access
functions.
Darius Thabit for his help with the reboot function.
Mark Seyden, Sysop of The BOSS (201-568-7293), for allowing me
to use his bbs as a base for TCHK.
Robert Blacher, Sysop of Computer Connections (202-547-2008),
for his comments regarding my license information and for
running an excellent BBS
Robert Mason, my college roomate, for his uncanny knack at finding
bugs within the first 30 seconds of use, no matter how clean
the code.
FUNCTIONS
Most of the functions are documented well enough below, although I
feel a few more explanations are necessary:
In the interactive environment you can #define one item in
terms of another, including spaces. If anyone knows how to do
this with the command line version, please let me know. The
variable type byte is just an unsigned char. If you use the
command line version of TC you will have to change some of
the header files of TCHK.
Beginning with TCHK 2.0, unless otherwise noted, all
functions asking for screen coordinates comply with Borland's
format (x,y). The top left corner of the screen is (1,1).
This is highly different from previous versions of TCHK.
Many functions rely on interrupts and low memory addresses
(400:xxxx) to comply with the IBM standard. Certain values
(for instance, the current video page) can be found by an
interrupt or by peeking at the value stored in low memory.
Many of the video functions especially require these values
to be found at the proper places. If your clone is radically
different from the IBM standard some of these functions may
not work properly. I didn't want to have to write a million
small functions that are just background support for the
functions found here (like current page number, etc.) so I
used the #defines found in the headers (see video.h for more
details.)
TCHK considers "key codes", "scan codes" and "ascii codes" as
different animals. Via the BIOS, any key pressed returns a
word (2-byte) value. If a 'normal' key is pressed (i.e. a
letter, space, etc.) the low order byte contains the letter.
When the low order byte is zero, an unusual key has been
pressed (i.e. Alt combinations, arrows, grey +, etc.) This 2
TCHK 2.1 Page 11
byte word as returned by the BIOS is called a scan code. For
ease of use, several functions convert this "scan code" to a
value from 0-511, called a "key code", where 0-255 are
'normal' ascii codes, as per the IBM ASCII character set, and
256-511 are the unusual keys. Many of the popular key codes
are listed in KEYCODE.H. To determine a key code, if the low
order byte is zero, take the high order byte as a number
0-255 and add 256. If the low order byte is non-zero, take
the low order byte as a number from 0-255. Note that although
the regular plus key and the grey plus key (on the numeric
keypad) return different scan codes, their key code is the
same. So, briefly, an "ascii code" is a char (value of
0-255), a "scan code" is a 2-byte word returned from the
BIOS, and a "key code" is a value 0-511. "Scan codes" and
"key codes" are both 2 bytes long (unsigned int and int,
respectively).
There are several functions that refer to a DOS file name. A
'file name' is a generic term for any possible name for a
file (drive, path and even filename.ext are optional). A
'filename' refers to a DOS filename.ext, no drive or path
(sometimes referred to with 'filename.ext'). A 'filepathname'
refers to a full file name, including drive, path and
filename.ext (some parts may be optional.) A 'filespec' is
similiar to a 'filename', but does not necessarily refer to a
specific file (i.e. D:\TURBOC is actually D:\TURBOC\*.*. See
how DIR parses filespecs for more details.)
TCHK has not been tested on a Hercules or MDA video card
since I do not have access to either piece of hardware,
although the methods I used are well documented and should
cause no problems.
All functions that use my direct screen access routines have
built-in snow control. On CGA monitors, the snow was
horrendous without it. Unless I code these routines in
assembler, I won't be able to squeeze any more optimization
out of these routines. Since Borland now provides acceptable
console i/o functions, I doubt I shall bother to recode these
in Assembler.
One type of command you will NOT find in TCHK are windowing
commands. There are plenty of windowing libraries available. You
should not try to make your poor IBM into a Mac, it won't cut it.
Splurge for the Mac, you'll be happier. If you really want windows
on your IBM-type machine, use DESQview. Yes, I know, a 'windowing'
interface is nicer. I use 'windows' too, although mine are just
boxes. Given the overhead needed for windows (in memory and
performance) I find my method more than acceptable for my current
needs.
The functions are listed in the same manner as the Turbo C manual,
in alphabetical order. Due to the size of the documentation, the
functions appear in a separate file TCHK.FNC.
TCHK 2.1 Page 12
TIPS AND CAVEATS
You really should check the settings in TCHK.TC before trying to
use TCHK. Here are a few things you might want to be aware of:
Nested Comments: I use them. Some of the header files have
nested comments in them. If you do not tell the compiler that
nested comments are ok, you may get strange and usually
untraceable error messages when compiling TCHK demos or
source code.
Command Line Compiler: byte, word and bboolean can only be
#defined in the interactive environment. If you use the
command line compiler you may have to change some header
files.
DESQview/EMS: I plan on expanding the support for DESQview
and EMS in the near future. Several functions may seem
useless or nearly so right now. Due to time constraints,
there is only so much I can do at a time, but rest assured
there is more in the works. If you really can't wait, you
could always purchase the source code and putter around
yourself...
#DEFINES
Most of these #defines are self-explanatory. All can be found in
the appropriate header files:
Ansihk.h
--------
Ansi color definitions. See ansihk.h for more details
Color.h
-------
DOS color definitions. See color.h for more details.
Chiphk.h
--------
Cpu types recognized by cpu_id(). See chiphk.h for more details.
Math coprocessor types recognized by ndp_id(). See chiphk.h for
more details.
TCHK 2.1 Page 13
Datehk.h
--------
Date types:
typedef enum { Sun, Mon, Tues, Wed, Thrus, Fri, Sat } days;
typedef enum { Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep,
Oct, Nov, Dec } months;
My date structure:
typedef struct ddate {
int dyear; /* Year - 1900 */
int dday; /* Day of month (1-31) */
months dmon; /* Month (Jan = 0) */
};
Note: the year is stored as Year - 1900. For example, if you
wanted to store 1987 in the variable d (of type struct
ddate), you would: d.dyear = 87;
Note: the months start with January as zero.
Date constants:
#define DATENULL " - - " /* empty date string */
#define DATECHAR '-' /* date delimiter char */
#define DATECHARSTR "-" /* date delim. string */
#define DATECHARTEST "/- " /* all date delimiters */
#define BASE_LEAP_YEAR 1980 /* base year for leap
year calculations */
#define BASE_JUL_YEAR 1720982.0 /* base day for Julian
Type E calcs */
Date macros:
#define isleap(yr) isleapyear(yr)
Doshk.h
-------
DOS types:
typedef struct BIOSParmBlock {
unsigned int BytesPerSector;
byte SectorsPerAllocUnit;
unsigned int ReservedSectors;
byte numberFATs;
unsigned int numberRootDirEntries;
unsigned int TotalSectors;
byte MediaDescriptor;
unsigned int SectorsPerFAT;
};
TCHK 2.1 Page 14
typedef struct BootBlock {
byte JumpInstr[3];
byte OEMinfo[8];
struct BIOSParmBlock BPB;
unsigned int SectorsPerTrack;
unsigned int numberHeads;
unsigned int numberHiddenSectors;
};
typedef struct BootBlock4 {
byte JumpInstr[3];
byte OEMinfo[8];
struct BIOSParmBlock BPB;
unsigned int SectorsPerTrack;
unsigned int numberHeads;
unsigned long numberHiddenSectors;
unsigned long TotalnumberSectors;
byte Physicaldrive;
byte reserved1[1];
byte Signaturebyte;
unsigned long VolumeSerialNumber;
char VolumeLabel[11];
byte reserved2[8];
};
Filehk.h
--------
File types:
typedef struct filespec {
char drive;
char path[81];
char filename[13];
};
typedef struct fnameext {
char filename[9];
char ext[4];
};
File constants:
#define FNAMESIZE 96
#define PATHSIZE 100
#define MAXFNAME 13
TCHK 2.1 Page 15
Finance.h
---------
Finance macros:
#define SLD(c,s,l) straight_line_dep(c,s,l)
#define SYD(c,s,l,p) sum_year_digits_dep(c,s,l,p)
#define DDB(c,l,p) double_decline_bal_dep(c,l,p)
#define ACC_SLD(c,s,l) accum_dep(c,s,l,0,1)
#define ACC_SYD(c,s,l,p) accum_dep(c,s,l,p,2)
#define ACC_DDB(c,l,p) accum_dep(c,0,l,p,3)
Howard.h
--------
Boolean constants and macros:
#define boolean char
#define FALSE 0
#define TRUE (!FALSE)
#define EQU(b1,b2) (((b1)&&(b2)) || ((!b1)&&(!b2)))
#define NEQ(b1,b2) (((b1)&&(!b2)) || ((!b1)&&(b2)))
#define BINV(b1) (b1 ? FALSE : TRUE)
Text justification:
#define NONE 0
#define LEFT 1
#define CENTER 2
#define RIGHT 3
Turbo C version numbers
#define _TCmajor ((__TURBOC__&0xFF00)>>8)
#define _TCminor ((__TURBOC__&0x00FF)>>4)
Other
#define OFF 0
#define ON 1
Ibm.h
-----
IBM types:
typedef struct EMSrecord {
unsigned int handle;
unsigned int totalpages;
unsigned int availpages;
byte version;
byte emserror;
};
TCHK 2.1 Page 16
IBM constants:
Rom id constants. See ibm.h for more details.
Machine id constants. See ibm.h for more details.
Memory strategy constants. See ibm.h for more details.
Disk id byte constants. See ibm.h for more details.
EMS constants. See ibm.h for more details.
IBM macros:
#define TIMER_TICKS *((long far *) 0x46Clu)
Keyboard.h
----------
Keyboard constants:
#define SHIFT_STATUS *((byte far *) 0x417lu)
#define WAITFORKEY 1
getget() flags:
#define UDFIDLE 0x0080
#define DVFREESLICE 0x0040
#define JCENTER 0x0030
#define JLEFT 0x0020
#define JRIGHT 0x0010
#define JNONE 0x0000
#define BELL 0x0008
#define TRIMLEFT 0x0004
#define TRIMRIGHT 0x0002
#define INSERTMODE 0x0001
#define TRIMALL TRIMLEFT|TRIMRIGHT
#define NOFLAGS 0x0000
Keycode.h
---------
Keycode constants:
Key shift status constants. See keycode.h for more details.
Key code constants. See keycode.h for more details.
TCHK 2.1 Page 17
Math.h
------
Math constants:
#define SQRT2 1.41421356237309504880
#define PI 3.141592653589793238462643
#define E 2.7182818284590452353602874
#define MAXFLOAT 3.4E+38
#define MAXDOUBLE 1.7E+308
#define MAXLONG 2147483647
#define MAXLONG_UNSIGNED 4294967295
Menuhk.h
--------
Menuhk types:
typedef struct popup_field {
char *command;
int y;
char flag;
char key;
char offset;
int retval;
struct popup_header *submenu;
struct popup_field *next;
struct popup_field *previous;
};
typedef struct popup_header {
char *videosave;
struct text_info inforec;
int left, top, right, bottom;
int margc;
struct popup_field *margv;
struct popup_field *current;
char *menusave;
int colnorm;
int colcmdkey;
int colhilite;
int coldisabled;
int coldishilite;
unsigned flags;
char internal;
};
TCHK 2.1 Page 18
typedef struct litebar_field {
char *command;
int x, y;
char flag;
char key;
char offset;
char *message;
int retval;
struct litebar_header *submenu;
struct litebar_field *next;
struct litebar_field *previous;
struct litebar_field *left;
struct litebar_field *right;
struct litebar_field *up;
struct litebar_field *down;
};
typedef struct litebar_header {
char *videosave;
struct text_info inforec;
int left, top, right, bottom;
int margc;
struct litebar_field *margv;
struct litebar_field *current;
int msgx, msgy;
char *menusave;
struct keylist *quitkey;
int colnorm;
int colcmdkey;
int colhilite;
int coldisabled;
int coldishilite;
int colmessage;
unsigned flags;
char internal;
};
typedef struct keylist {
int keyval;
struct keylist *next;
};
TCHK 2.1 Page 19
Menu flags:
#define QUITMENU 0x8000
#define ESCQUIT 0x4000
#define FREEMENU 0x2000
#define HIERARCHIAL 0x0100
#define UDFIDLE 0x0080
#define DVFREESLICE 0x0040
#define CASEINDEP 0x0020
#define RESTORECURSOR 0x0010
#define CURSORON 0x0008
#define ERASEMENU 0x0004
#define DISABLENOHILITE 0x0002
#define WRAPAROUND 0x0001
Internal menu flags:
#define FIRSTTIME 0x01
Menu command flags:
#define ENABLED 0x01
#define DISABLED 0x02
#define NOTOPTION 0x04
#define STATICTEXT NOTOPTION
Mousehk.h
---------
Mousehk constants:
#define MOUSEINT 0x33
#define MOUSE_INSTALLED -1
#define NO_MOUSE 0
#define TWOBUTTONS -1
#define XBUTTONS 0
#define MSYSMOUSE 3
#define LEFTBUTTON 0
#define RIGHTBUTTON 1
#define MIDDLEBUTTON 2
#define LBPRESSED 0x01
#define RBPRESSED 0x02
#define MBPRESSED 0x04
TCHK 2.1 Page 20
Multihk.h
---------
Multihk types:
typedef struct DESQmemory {
int memavail;
int largestblockavail;
int totalmem;
};
Multihk constants:
#define DVERROR_BEEP 0x8000
#define DVERROR_LEFT 0x2000
#define DVERROR_RIGHT 0x4000
#define DVERROR_EITHER 0x0000
Printhk.h
---------
Printhk constants:
Print Screen constants. See printhk.h for more details.
Print.com constants. See printhk.h for more details.
Print.com error codes. See printhk.h for more details.
#define PRTSC_STATUS *((byte far *) 0x500lu)
Real.h
------
Real types:
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 = '▒';
char _shadowcolor = LBLACK | B_BLACK;
TCHK 2.1 Page 28
REVISION HISTORY
Version 2.1 - 4-1-89
-----------
New:
- ON and OFF are defined in howard.h
- isNovellNetavail()
- resolvepath()
- getBootBlock4(), getVolSerialNum()
- getAssignmemseg()
- isScrnSav2()
- isAutoPark(), setAutoPark()
- commit()
- isXMSinstalled()
- isCEDavail(), CEDadd(), CEDremove()
- nmid(), iseven(), isodd()
- Tone()
- iscdevicemoderaw(), setcdevicemoderaw()
- isremoveable()
- isdrivelocal(), ishandlelocal()
- isRedirectStdin(), isRedirectStdout()
- fileexist()
- new header file STATEHK.H for state and zip code information:
isstate(), iszip(), stateindex()
- Checksum_block(), CRC16_block(), CRC16tupdate(),
CRC16update(), CRC32tupdate()
- header file ZIP.H, containing support for .ZIP files
- joystickAx(), joystickAy(), joystickBx(), joystickBy(),
joysticksettings()
- center()
- dostimetolong(), longtodostime()
- isallalpha(), isallalphanum(), isalllower(), isallupper()
- iswildcarded()
- strpadleft(), strpadright()
- strspace2tab(), strtabexpand()
- soundex()
- bitrevb(), bitrevl(), bitrevw()
- new header file REAL.H for real (simulated fp) math: radd(),
rsub(), rdiv(), rceil(), rfloor(), rsign(), rnegate(),
rnormalize(), lpow() and Appendix D
- isdate(), isfilename(), ispathname()
- isHiliteable()
- shadow()
- ispcAnywhere(), SetpcAnywhere()
- DESQapilevel(), DESQappnum(), DESQbeginc(), DESQdisperror(),
DESQendc(), DESQgetbuf(), DESQgetmem(), DESQiskmouse(),
DESQjustify(), DESQkmouse_off(), DESQkmouse_on(),
DESQposttask(), DESQpushkey(), DESQputmem(), DESQstart(),
DESQstop()
- getpw()
- initkeyvars()
- keyclick()
- is2nd8259(), isrealtimeclock(), isMCA()
- isDoubleDOS(), isInvisible()
TCHK 2.1 Page 29
- GetTypePointDevice(), ResetPointDevice(), SetPointDevice(),
SetRatePointDevice(), SetResPointDevice()
- CompaqExternalMonitorType(), CompaqInternalMonitorType(),
CompaqGetMasterMode(), CompaqSetMasterMode(),
CompaqGetMonitor(), CompaqSelectMonitor(),
CompaqModeSwitchDelay()
- isDriverSys(), isNLSFuncCom()
- isWhoa(), setWhoa(), uninstallWhoa()
- isAnarkey()
- Compaq386GetCpuSpeed(), Compaq386SetCpuSpeed(),
Compaq386KbdType()
- menu_litebar()
- all menu functions now have the bit flag DVFREESLICE to free
up time slices if running under DESQview
- all menu functions support a user-defined function during
idle keyboard waits via the _idle_menu() function
- getget() now supports type Hexadecimal (Hh), DOS Filename
(Ff) and Pathname (Pp) and Date (Dd)
- getget() now has the bit flag DVFREESLICE to free up time
slices if running under DESQview
- getget() supports a user-defined function during idle
keyboard waits via the _idle_get() function
- boxwindow() now supports NONE for title justification (like
the popup...() and litebar...() functions)
- new header file MOUSEHK.H for mouse functions: ismouse(),
MButtonPress(), MButtonRelease(), MButtonStatus(),
MMickeysMovedx(), MMickeysMovedy(), MCursorOff(),
MCursorOn(), MCursorRangex(), MCursorRangey(),
MCursorGraphic(), MCursorText(), MGotoxy(), MDriverSize(),
MGetDriver(), MPutDriver(), MouseReset(), MGetVerType(),
MGetDisplayPage(), MSetDisplayPage(), MUpdateScreen(),
MEmulateLightpenOff(), MEmulateLightpenOn(), MSetRatio(),
MSetThreshold(), MGetSensitivity(), MSetSensitivity() and
Appendix E
- new demos: demomous.c,
- all demos now distributed with executable file (.EXE)
- several new small files now distributed with TCHK (TCHK.ZDR,
BUG.DOC, etc.)
Changes:
- iskey102() renamed to isEnhanceKbd()
- isNetwork() moved to network.h
- beep() moved to sound.h
- TRUE now defined as (!FALSE) in howard.h
- OEMinfo[] in struct BootBlock is now OEMinfo[8]. Previously
OEMinfo was defined as OEMinfo[9] with OEMinfo[8] as '\0'.
OEMinfo is no longer null terminated.
- several DESQview functions have been renamed to conform to
the naming conventions by Quarterdeck in their API toolkits.
DESQfreeCPU() has been renamed to DESQpause(), DESQMakeTone()
has been renamed to DESQsound(), DESQInternalStack() has been
renamed to DESQostack(), DESQProgramStack() has been renamed
TCHK 2.1 Page 30
to DESQustack(), and DESQdispchar() has been renamed to
DESQpoke()
- all menu functions command flags changed (STATICTEXT, etc.
have been renumbered), if you relink any of your existing
compiled code that uses TCHK menus you must recompile it too
- getEMSstatus() renamed to EMSGetStatus(), and type renamed
from byte to unsigned char
- getget() no longer supports justification in pattern. Use
flags field/#defines instead
- flags parameter in getget() changed from char (1 byte) to
unsigned int (2 bytes)
- getget() uses global variables _cursorinsert and
_cursoroverwrite to define the cursor size
- isdate() has been renamed to isvaliddate()
- all menu functions now handle DISABLED fields slightly
differently. Disabled fields are normally hiliteable unless
the flag DISABLENOHILITE is set. Note that this is exactly
opposite to previous operation. Changed for several reasons,
foremost clarity and this was how I originally intended it to
work.
- totally removed the Lotus...() menu functions. They are not
currently worth the effort to recode, since the litebar...()
menu functions can be made to emulate Lotus-style menus, but
with much greater power. Currently, I plan on working on
other menu formats (pulldown, hierarchial). If you have any
particular types of menus, or specific enhancements to the
current menu functions, let me know. It's a lot easier to
make changes to code-in-progress than to alter existing
(released) code.
Fixed:
- ndp() works properly now. I was misaligning an instruction by
a byte. Oops
- #define bboolean was inadvertently left out of the Compiler
Defines in TURBOC.TC
- keyboard.h listed a prototype for a function inkeyscan().
There is no such function. It was under development, but did
not make it into the release and I forgot to remove it from
the header file
The manual has had several errors, typos and omissions corrected.
Version 2.0 - 12-3-88
-----------
Compiled with Turbo C 2.0
New functions:
- ansiback(), ansifore()
- DESQcommonmem(), DESQconvenmem(), DESQdispchar(), DESQexit(),
DESQexpandedmem(), DESQInternalStack(), DESQMakeTone(),
DESQProgramStack()
- DoubleDOSGetVirtual()
- EMSinfo(), EMSpages(), EMSwarmbootprep(), getEMSstatus()
TCHK 2.1 Page 31
- inkeyc()
- strclean(), strcapital(), strfill(), stroccur(),
strtocomma(), strwcmp(), strwicmp()
- cpu_id(), ndp_id() (ndp_id() is not 100% bug free yet)
- diskchanged()
- isBlogical(), isgameport(), iskey102()
- CapsLock(), InsLock(), NumLock(), ScrollLock()
- tocapkey()
- accum_dep(), depreciation(), double_decline_bal_dep(),
striaght_line_dep(), sum_year_digits_dep()
- FV(), FVa(), PMT(), PV(), PVa()
- average(), factorial(), stddev(), summation(), variance()
- frac(), round()
- expandfilespec(), fncmp(), getfilespec(), isdir(),
parsefilename(), parsefnameext()
- beep()
- boxwindow()
- isPM(), to24hour(), tohour()
- time_convert()
- getcursor(), setcursor()
- color()
- read_attrib(), read_char()
- settextinfo()
- endstri(), endstrp()
- pause()
- print_screen()
- isPRINTavail(), PRINTadd(), PRINThold(), PRINTpurge(),
PRINTremove(), PRINTresume()
- isAssignavail(), isAppendavail(), isShareavail(),
isVidclock()
- getBootBlock(), getBPB()
- menu_popup(), popup_alloc(), popup_free(), popup_get()
- popup_restore(), popup_setcurrent(), pophilite(), popunlite()
- litebar_alloc(), litebar_free(), litebar_get()
- changelitebar(), litehilite(), litemessage(), liteunhilite()
- dosday(), doshour(), dosmonth(), dosmin(), dossec(),
dosyear(), todosdate(), todostime()
- mid(), sqr(), swap()
- fsgn(), isgn(), lsgn()
- framebox[], emptystring[], _dvmajor, _dvminor, _TCHKversion,
_TCHKmajor and _TCHKminor variables
Changes:
- screen coordinates format now (x,y) starting at (1,1)
- atrim(), ltrim() and rtrim() now modify the string passed to
them
- box(), clear(), cls()
- ddatetolong() renamed to ddatetofull()
- EMMversion() modified
- getc_match(), getci_match() previously were getk_match() and
getc_match()
- virtually all get...() functions now use Borland's console
i/o routines
TCHK 2.1 Page 32
- gotoxy() renamed to gotohv()
- isBREAKon(), isVERIFYon(), setBREAK(), setVERIFY() are now
#defines
Removed:
- delay() removed
- isleap() removed
- restore_box(), restore_screen(), save_box(), save_screen()
removed
- max() and min() #defines removed (Borland now supplies them)
If I've missed a couple, forgive me. I think I got them all down,
but with all the changes and additions, it's hard to be 100% sure.
Note: The ndp(), menu_lotus() and lotus_setup() functions are not
fully implemented yet. The ndp() seems to crash the machine,
and I found something grievously wrong with the lotus
functions while testing the demo. Due to previous
commitments, I am forced to release the library with these
defective functions. Look for the working versions in the
next release.
Version 1.5 - Internal release only
-----------
Version 1.0 - Internal release only
-----------
Version 0.70 - 2-17-88
------------
New functions:
- date_convert()
- machine_id()
- fname_match()
I rewrote the License agreement after several conversations with
Robert Blacher. He pointed out, rightly so, that the old
licensing information was a bit confusing.
Fixed a bug in shorttoddate() and fulltoddate(). These functions
required a proper month abbreviation. If you had "Mau 12,
1987" instead of "May 12, 1987" it would get stuck in an
endless loop.
Fixed a bug in some of the date conversion functions. A few
functions refer to a list of the day number at the end of a
month. This list (daylist[] in this version) listed Jun 30 as
the 182nd day of the year instead of the 181st day of the
year. The only inaccurate dates would be those occurring
between July 1 and July 30, inclusive, and these would only
be ahead by 1 day. Only those date functions with english in
them (shorttoddate(), ddatetofull(), etc.) are affected.
TCHK 2.1 Page 33
Found the proper way to check for DESQview. DESQversion() now
returns the version of DESQview in the high and low order
bytes. See DESQversion() for more details.
Changed the #define BASE_JUL_YR to a double to prevent loss of
significant digits warning message.
Restructured the global variables. With version 0.70, most
of the global variables are declared separately from the code
itself. If you use, say, Months[], but nothing else, only
Months[] will get linked in to your program instead of
pulling a whole bunch of functions with it. When I get TC 1.5
I hope to break up the functions even more.
Added MonthAbbr[] and DayList[] global variables
Fixed the disktype() function. It would plain not work. It would
get a word and return a byte (the wrong byte, of course.) God
curse all typos.
Changed the DemoDisk sample program as well (no more DISK_ERROR,
now it's DISK_INVALID. See the #define section for more
details.)
Expanded the list of Rom id bytes. See the #define section for
more details.
Cleaned up some typos in the documentation.
Version 0.60 - 1-15-88
------------
Over 30 new functions added:
- Cal...(), Greg...(), Jul...(), fulltoddate(), shorttoddate()
- dayofweek()
- isBREAKon(), setBREAK()
- isVERIFYon(), setVERIFY()
- reboot()
- isExtended(), Extendedtotal(), EMMversion()
- isNetwork()
- memory_strategy()
- disktype()
- set_handles()
- DESQversion(), DESQfreeCPU()
- isDoubleDOS(), DoubleDOSTaskSwitch(), DoubleDOSfreeCPU()
- scrbuff()
- cursor_blink()
- ansi_call()
Fixed a bug in isleapyear(). Previously, isleapyear() would
determine years ending in 00 that were evenly divisible by 4
to be leap years (i.e. 1600). The gregorian calendar (you
know, 30 days hath September...) doesn't count those as leap
years.
Optimized the direct video access routines as well as possible
using 100% C code. Previously they checked for vertical
retrace. Now all direct accesses play with the video
registers and other fun things, basically turning off the
screen for a fraction of a second, performing the access,
then turning the screen back on again. In the longer access
functions (save_screen() to name one) I found changing 30
bytes between screen blankings to be optimal. These changes
TCHK 2.1 Page 34
have sped up the direct video access functions (putsay(),
save_...(), restore_...()) by a factor or 3! These functions
now take 1/3 the time they used to. If you find the screen to
blink, or that there is snow (putsay() may experience
miniscule snow when outputting long strings) please let me
know and I'll see what I can do.
Version 0.50 - 11-18-87
------------
Initial release of TCHK
TCHK 2.1 Page 35
FUTURE ENHANCEMENTS
There are more functions on the way. If you have any favorites you
would like to see, or need, drop me a line. In future releases,
look for the following features:
- I'd hoped to have a family of functions to access dBASE
files (.DBF and .NDX) ready for this version, but due to
time constraints and the enormous complexity of index
files, I decided to get this version out the door and
smooth out some of the rough spots in the code I have.
Look for the dBASE file functions in the next release of
TCHK
- enhancement of the get and put routines to support all
features found in the @...SAY...GET commands of dBase III+
- keyboard routines using scan codes
- more menu interfaces (pulldown, hierarchial)
- more EMS functions. Since I recently acquired an EMS card,
I can do more experimenting. I'd like to have a set of
functions to access EMS as if it were dynamic memory
(xmalloc(), xcalloc(), xfree(), etc.) but doing it right
can be tricky. We shall see...
- functions to access XMS (non-EMS memory above 640K on
286/386 machines). When dynamic EMS access is implemented,
I will try to have equivalent XMS functions
- several math functions (integration, numerical methods, +)
- some more accounting functions to have a well rounded
accounting library
- software id functions (TSR, ANSI.SYS, VDISK.SYS, etc.)
- more mouse functions
- more DESQview functions
- more sound functions
- expansion of the functions dealing with simulated reals
(more precision, more functions, etc.)
- direct screen accesses coded in assembler
- enhancement of the put routines to support the 'backslash'
control characters like printf does (\n, \t, etc.)
- some more video routines
Here's some ideas I've had regarding TCHK. Let me know what you
think:
- Laser Printers ______________
I use OfficeWriter 5.0 for the documentation and several
laser printers are supported, but I don't have access to a
laser printer so I'm not sure which one to support.
Currently, registered users receive a disk version of the
manual formatted for an HP LaserJet. Is this the best one
to support? What font? Etc.
- Norton Guides _____________
Converting the documentation to a Norton Guide is a LOT of
work. NG is an excellent tool, but do the benefits (having
TCHK 2.1 Page 36
a Guide for TCHK) outweigh the disadvantages (time
needed) ? Are people out there using NG? Are you
interested in a NG database for TCHK?
- 286 Libraries _____________
- Turbo C can generate 80186/80286 code. Are people
interested in 286 generated code?
- Menu Generator ______________
- I'd like to write a program that lets you 'paint' menus,
and then let the program chug through and generate all the
code (variables, function calls, etc.). Right now most of
the menu work is drudge work, where you have to code all
the coordinates, the commands, etc. I don't know about
you, but I hate drudge work. However, this is no small
undertaking. Are you interested in such a program?
And the big question: what other compilers will I support?
The major contenders right now are Turbo C, MSC, Quick C, Watcom
C, Zortech C++ and Power C (I think I got all the popular ones).
Power C is intended for the inexpensive C programmer (at a list
price of $20, it can't be beat. The manual alone is worth it...)
Zortech has a very promising compiler, and the price is right. I'm
awaiting their next significant release, or user requests, before
looking further. Although supposedly the best micro C compiler
available, Watcom's price and lack of market penetration makes a
shareware Watcom library impractical at this time. Currently, I
have no plans to support any of these compilers. Are you
interested? Let me know...
Of course, we now have the big three. I purchased Turbo C
when it first came out (1.0) and I've been very pleased ever
since. The price is good, and the performance is top notch. I'm
aware that many users would like MSC and QC compatible libraries.
This has 2 major problems: I do not own either compiler, and
certain conventions are different. I've toyed with Quick C 2.0 and
it shows promise. However, I can't afford to buy it and hope
someone likes QCHK (TCHK for Quick C). Aside from the money, it's
a question of time. For me, this is a hobby. A serious hobby, but
still a hobby (lord knows I'm not in it for the money). Although
most of the code for TCHK is ANSI C, enough is Turbo C specific
(i.e. pseudo registers, console i/o, many structures, etc.) that
just converting to another compiler would take a good chunk of
time. Let's not forget the learning curve needed to get the hang
of the new compiler's syntax. Right now I think enhancing the
existing library is more productive than producing libraries for
other compilers.
Am I wrong? I've only had 2 people ask me about MSC/QC
versions of TCHK, and one of them purchased the source code with
plans to convert it himself. Like I said, converting most of the
code is just a matter of recompiling. However, if I were to offer
TCHK 2.1 Page 37
other compiler versions I would have to convert all the code,
which is just not practical right now. If you want to use TCHK
with another compiler, you can always purchase the source code.
It's not expensive, and most of the changes would be simple
renames of function calls. If you would like to see a version of
TCHK for another compiler, let me know. If I think people are
interested, I'll give it a shot.
Last minute rumors: the next version of Turbo C will NOT generate
80386 code, is highly unlikely to support overlays, and OS/2 is a
very popular phrase with Borland. What does this mean? A special
386 version of TCHK will not be available in the forseeable future
(don't blame me, blame Borland). As for the rest, only time will
tell...
TCHK 2.1 Page 38
OTHER PRODUCTS
I am also the author of the following products:
COOKIE 1.2 - Fortune cookie, gives you a random fortune from a
cookie file. Lots of options and distributed with
2800 cookies of mixed content (rated G - X)
DCOUNT 1.2 - Document/Text file info, find out all kinds of
information like # words, lines, pages, control
characters, etc. A small program, but it suited a
small need. Several options.
FREE 1.7 - Free disk space, with options. Network compatbile,
search multiple drives, DESQview friendly + more.
Distributed with full Turbo C source.
SF 3.32 - Subtree Find, a powerful directory searcher. SF's
main claim to fame is being able to search a branch
of a disk directory, from a single directory to an
entire disk, 5%-250% faster than the leading file
finders! (Compared with Norton's and Graham's
programs). Other features include displaying more
information than DIR (attributes, disk space used,
etc.), delete files, touch date and/or time, modify
attributes, color output, pause during display,
permanently configure options, search inside .ARC
and .ZIP files, network compatible, and much much
more. Written in Turbo C 2.0 and linked with TCHK
2.1.
TCHK 2.1 Page 39
SUPPORT
Thanks to the graciousness of the sysops at The BOSS and Computer
Connections, I have easier access to their BBSes. The latest
versions of my software can be found there. However, due to
current PC Pursuit restrictions, I am unable to reach The BOSS via
PCP. As a result, I can quite often be found on Computer
Connections, but only infrequently at The BOSS. Hopefully, Telenet
will implement better 201 access before the turn of the century
and I will be back on The BOSS on a regular basis.
If there are some features you would like to see implemented, or
you have any questions or comments, please contact me. I can be
reached at the following:
Howard Kapustein
1695 Barbara Lane
East Meadow, NY 11554
Phone: (516) 481-9612
*** If I have to call you I'll have to call collect ***
or at the following electronic services/bulletin boards:
The Boss dBBS (201) 568-7293 *** Support BBS ***
Software Society (201) 729-7410 Distribution BBS
Computer Connection (202) 547-2008 *** Support BBS ***
The Tool Shop (602) 279-2673 Distribution BBS
GEnie H. Kapustein
Also: IBM RT, SET 4, TOPIC # 25
Borland RT, SET 2, TOPIC # 55
These are the places I can be reached by modem. TCHK (and all
other software I release) is supported through The BOSS and
Computer Connections.
TCHK 2.1 Page 40
APPENDIX A - DATE FORMATS
The following date formats are supported by TCHK:
TCHK Reference Date Type Format
-------------- --------- ------
Greg Gregorian (US) MM-DD-YY
GregEuro Gregorian (European) DD-MM-YY
GregJap Gregorian (Japan) YY-MM-DD
Cal Calendar YYMMDD
CalCent Calendar (w/Century) YYYYMMDD
Jul Julian (Type E) special hashed number
JulA Julian (Type A) YYDDD
JulB Julian (Type B) YYYYDDD
full English (Full) Month DD, YYYY
short English (Short) Mon DD, YYYY
ddate struct ddate see datehk.h
- Gregorian units are common shorthand dates (in string format)
with all leading zeros preserved
- Calendar units are numeric representations (double)
- Julian Type E is a special "magic" hashed number (double)
representing the number of elapsed days since an initial date.
Julian Type E numbers are valid for the years 1900-2100 (give
or take a couple of months)
- Julian Type A and B are ANSI defined formats (double)
containing year (and century for type B) and the day of the
year
- full are strings of the date with the full name of the month
- short are strings of the date with the short abbreviation of
the month
- ddate is my own date structure defined in datehk.h
In some instances date formats not specifically designed to hold
the century may overflow. For example, converting CalCent
formatted 20220401 (April 1, 2022) to Greg (MM-DD-YY) would
result in the string "04-01-122". Be aware.
! ! ! WARNING ! ! !
Unless otherwise specified, date format conversion functions
(GregtoCal, JulAtoddate, etc.) do NOT perform error checking. If
you pass an invalid date (March 32, 1988) your result may be
logically incorrect even though syntactically correct (Gregorian
date of 03/32/88) or be totally corrupted.
Julian Type E numbers are valid for the years 1900-2100 (give or
take a couple of months.)
TCHK 2.1 Page 41
APPENDIX B - date_convert() FORMATS
The following formats are supported by date_convert():
Type (id) Data Type Format Notes
--------- --------- ------ -----
1 char MM-DD-YY US
2 " DD-MM-YY Europe
3 " YY-MM-DD Japan
4 double YYMMDD Calendar
5 " YYYYMMDD " w/cent
6 " hashed Julian Type E
7 " YYDDD " Type A
8 " YYYYDDD " Type B
9 struct date see dos.h
10 struct ddate see datehk.h
11 char Mon DD, YYYY short, no lead 0
12 " Month DD, YYYY full, no lead 0
13 " MM/DD/YY US
14 " DD/MM/YY Europe
15 " YY/MM/DD Japan
16 " MM-DD-YY no lead 0
17 " DD-MM-YY "
18 " YY-MM-DD "
19 " MM/DD/YY no lead 0
20 " DD/MM/YY "
21 " YY/MM/DD "
22 " MM-DD-YYYY century
23 " DD-MM-YYYY "
24 " YYYY-MM-DD "
25 " MM/DD/YYYY century
26 " DD/MM/YYYY "
27 " YYYY/MM/DD "
28 " MM-DD-YYYY century, no lead 0
29 " DD-MM-YYYY "
30 " YYYY-MM-DD "
31 " MM/DD/YYYY century, no lead 0
32 " DD/MM/YYYY "
33 " YYYY/MM/DD "
34 char DD-MON-YY
35 " DD-MON-YY no lead 0
TCHK 2.1 Page 42
36 " DD-MON-YYYY century
37 " DD-MON-YYYY " no lead 0
38 " Mon DD, YYYY short
39 " Month DD, YYYY full
40 " DD MON YY
41 " DD MON YY no lead 0
42 " DD MON YYYY century
43 " DD MON YYYY " no lead 0
Unless otherwise specified, a date format contains leading zeros.
Refer to date_convert() for further specifications.
TCHK 2.1 Page 43
APPENDIX C - time_convert() FORMATS
The following formats are supported by time_convert():
Type (id) Data Type Format Notes
--------- --------- ------ -----
1 char HH:MM AM 12-hour (h,m)
2 " HH:MM 24-hour (h,m)
3 " HH:MM:SS AM 12-hour (h,m,s)
4 " HH:MM:SS 24-hour (h,m,s)
5 " HH:MM:SS:CC AM 12-hour (h,m,s,u)
6 " HH:MM:SS:CC 24-hour (h,m,s,u)
7 struct time see dos.h
8 double 1/100 seconds
9 " seconds
10 " minutes
11 " hours
12 " days
13 char HHhMMm no leading zeros
14 " HHhMMmSSs no leading zeros
15 " HHhMMmSSsCCc no leading zeros
16 " 0HH:MM AM 12-hour (0h,m)
17 " 0HH:MM 24-hour (0h,m)
18 " 0HH:MM:SS AM 12-hour (0h,m,s)
19 " 0HH:MM:SS 24-hour (0h,m,s)
20 " 0HH:MM:SS:CC AM 12-hour (0h,m,s,u)
21 " 0HH:MM:SS:CC 24-hour (0h,m,s,u)
22 " 0HHhMMm all leading zeros
23 " 0HHhMMmSSs all leading zeros
24 " 0HHhMMmSSsCCc all leading zeros
The notation H:M:S:C stands for hours:minutes:seconds:centiseconds
(1/100 secs). The notation AM stands for AM or PM, as is
appropriate.
Unless otherwise specified, a time string contains leading zeros
for all values except the hour. The notation 0H stands for hours
containing leading zeros.
Refer to time_convert() for further specifications.
TCHK 2.1 Page 44
APPENDIX D - SIMULATED FP MATH
When I was working on my Free disk space program, I could not get
it to link as a Tiny program, no matter what I did. Even if I
compiled it with the Small memory model, it would not run without
65K RAM available. After exhaustive testing, I realized what the
problem was: I was trying to link in Borland's FP Emulation. If
you use FP Emulation, you will NOT be able to generate a .COM
file. This was a significant problem. Who wants a free disk space
program requiring 65K?
Unfortunately, I had but two options: leave out all real math,
which was totally unacceptable, or write my own FP functions. With
great trepidation I wrote a division function which more than fit
my needs. The real division found in the source distributed with
my free program is far simpler than the rdiv() function in TCHK,
fulfilling a far simpler need.
Consider yourself warned right now. My real functions are NOT a
complete substitute for Borland's FP Emulation library. However,
if you only need accuracy up to 8 decimal places for numbers with
integer portions less than 2 billion and change, or plan on using
the Tiny memory model, they are acceptable.
A REAL number is defined as:
typedef struct REAL {
long rint; /* real - integer */
long rfrac; /* real - fraction */
int precision; /* (# of decimal places) */
};
A picture is worth a thousand words, so here are some sample REALs
and the real numbers they represent:
{ 402, 17, 2 } = 402.17
{ 12, 2, 3 } = 12.002
{ 0, 0, 0 } = 0.0
{ -8356, 286, 3 } = -8356.286
{ 0, -3, 1 } = -0.3
REALs obey certain rules:
Sign: If rint is non-zero, it will contain the sign of the
REAL and rfrac will be positive. If rint is zero,
rfrac will contain the sign of the REAL
Precision: always ranging from 0 to MAXPRECISION, it will
NEVER be negative
Decimal: the decimal portion of a REAL is always represented
as a value displayed to the right of the decimal
TCHK 2.1 Page 45
point. For instance, { 3, 6, 4 } is the REAL
representation of 3.0006, which could also be
expressed as { 3, 0006, 4 }. Note that a long with
a value of 0006 is the same as a long with a value
of 6. It is only because longs are used to store
the value of REALs that the precision plays such a
crucial role
To calculate the value of a REAL, use the following formula:
value = rint + rfrac * 10^(-precision)
which is read as "value equals rint plus rfrac times ten raised to
the negative precision power".
Error trapping for such things as division by zero, overflow,
underflow, etc. as listed in REAL.H is provided.
Planned for some future release is a facility for a user-defined
rmatherr() function, much like Borland's facility for a user-
-defined matherr(), and a method of handling larger (> LONG_MAX)
numbers, probably through the use of negative precision values.
Perhaps at an even later date there will be a true set of real
math functions, done the right way with mantissas and exponents
via bit encoding. This would require a significant amount of
effort, since I would basically be rewriting Borland's EMU.LIB, so
don't get your hopes up too high. With sufficient user response or
personal need, I may give it a shot. However, due to the great
complexity of such a project, you will understand if I don't rush
right out and whip up said emulation functions.
TCHK 2.1 Page 46
APPENDIX E - MOUSE FUNCTIONS
A mickey is the smallest increment the mouse can sense, named,
appropriately enough, after Mickey Mouse.
Many of the mouse functions return multiple pieces of information.
The mouse driver can use the AX, BX, CX and DX registers to return
information, but repeating a function call to return another piece
of information already provided is ridiculous. If used, the global
variables _mouse1, _mouse2, _mouse3 and _mouse4 will usually, but
not always, correspond to the AX, BX, CX and DX registers,
respectively. MButtonPress() is an example of a mouse function
that returns extra information via the _mouse# variables.
MMickeysMovedx() is an example of a function that does the work of
multiple functions via the _mouse# variables.
The MCursorGraphic() function requires a pointer to a bitmap,
which consists of a 16 word screen mask and a 16 word cursor mask
(64 bytes in total). The global variables listed below are bitmaps
available for your use, listed here for you reference. Each global
variable bitmap contains the horizontal and vertical hot spots
(hotx and hoty) as _Bitmap...[0] and _Bitmap...[1] elements,
respectively, and _Bitmap...+2 pointing to the bitmap itself.
Thus, each of these global variables is 68 bytes, 4 for hot spots
and 64 for the bitmap. Note that the hot spots are signed values
ranging from -16 to 16.
unsigned int _Bitmap_StandardCursor[] =
{ (unsigned int) -1, (unsigned int) -1,
0x3FFF, 0x1FFF, 0x0FFF, 0x07FF,
0x03FF, 0x01FF, 0x00FF, 0x007F,
0x003F, 0x001F, 0x01FF, 0x10FF,
0x30FF, 0xF87F, 0xF87F, 0xFC3F,
0x0000, 0x4000, 0x6000, 0x7000,
0x7800, 0x7C00, 0x7E00, 0x7F00,
0x7F80, 0x78C0, 0x7C00, 0x4600,
0x0600, 0x0300, 0x0300, 0x0180 };
unsigned int _Bitmap_UpArrow[] =
{ (unsigned int) 5, (unsigned int) 0,
0xF9FF, 0xF0FF, 0xE07F, 0xE07F,
0xC03F, 0x801F, 0x801F, 0x000F,
0x000F, 0x000F, 0xF0FF, 0xF0FF,
0xF0FF, 0xF0FF, 0xF0FF, 0xF0FF,
0x0000, 0x0600, 0x0F00, 0x0F00,
0x1F80, 0x1F80, 0x3FC0, 0x3FC0,
0x7FE0, 0x0600, 0x0600, 0x0600,
0x0600, 0x0600, 0x0600, 0x0000 };
TCHK 2.1 Page 47
unsigned int _Bitmap_LeftArrow[] =
{ (unsigned int) 0, (unsigned int) 3,
0xFE1F, 0xF01F, 0x0000, 0x0000,
0x0000, 0xF01F, 0xFE1F, 0xFFFF,
0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF,
0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF,
0x0000, 0x00C0, 0x07C0, 0x7FFE,
0x07C0, 0x00C0, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000 };
unsigned int _Bitmap_CheckMark[] =
{ (unsigned int) 6, (unsigned int) 7,
0xFFF0, 0xFFE0, 0xFFC0, 0xFF81,
0xFF03, 0x0607, 0x000F, 0x001F,
0xC03F, 0xF07F, 0xFFFF, 0xFFFF,
0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF,
0x0000, 0x0006, 0x000C, 0x0018,
0x0030, 0x0060, 0x70C0, 0x1D80,
0x0700, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000 };
unsigned int _Bitmap_PointingHand[] =
{ (unsigned int) 5, (unsigned int) 0,
0xE1FF, 0xE1FF, 0xE1FF, 0xE1FF,
0xE1FF, 0xE000, 0xE000, 0xE000,
0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000,
0x1E00, 0x1200, 0x1200, 0x1200,
0x1200, 0x13FF, 0x1249, 0x1249,
0xF249, 0x9001, 0x9001, 0x9001,
0x8001, 0x8001, 0x8001, 0xFFFF };
unsigned int _Bitmap_DiagonalCross[] =
{ (unsigned int) 7, (unsigned int) 4,
0x07E0, 0x0180, 0x0000, 0xC003,
0xF00F, 0xC003, 0x0000, 0x0180,
0x07E0, 0xFFFF, 0xFFFF, 0xFFFF,
0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF,
0x0000, 0x700E, 0x1C38, 0x0660,
0x03C0, 0x0660, 0x1C38, 0x700E,
0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000 };
unsigned int _Bitmap_RectangularCross[] =
{ (unsigned int) 7, (unsigned int) 4,
0xFC3F, 0xFC3F, 0xFC3F, 0x0000,
0x0000, 0x0000, 0xFC3F, 0xFC3F,
0xFC3F, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0180, 0x0180, 0x0180,
0x7FFE, 0x0180, 0x0180, 0x0180,
0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000 };
TCHK 2.1 Page 48
unsigned int _Bitmap_Hourglass[] =
{ (unsigned int) 7, (unsigned int) 7,
0x0000, 0x0000, 0x0000, 0x0000,
0x8001, 0xC003, 0xE007, 0xF00F,
0xE007, 0xC003, 0x8001, 0x0000,
0x0000, 0x0000, 0x0000, 0xFFFF,
0x0000, 0x7FFE, 0x6006, 0x300C,
0x1818, 0x0C30, 0x0660, 0x03C0,
0x0660, 0x0C30, 0x1998, 0x33CC,
0x67E6, 0x7FFE, 0x0000, 0x0000 };
TCHK 2.1 Page 49
APPENDIX F - REGISTRATION FORM
This page intentionally left blank
TCHK 2.1 Page 50
Quick Registration for TCHK Version 2.1 TCHK210/BBS
------------------------------------------------------------------------
Please answer as many questions as possible and return this form with
your registration cash, check or money order to :
Howard Kapustein
1695 Barbara Lane
East Meadow, NY 11554
Phone: (516) 481-9612
Name ____________________________________ Sex _________ Age _________
Address _______________________________________________________________
_______________________________________________________________
_______________________________________________________________
_______________________________________________________________
Phone (_____)_____-______ Occupation _________________________________
Type of computer(s) you own ___________________________________________
Operating System (circle): DOS DESQview Windows OS/2 Unix Other
Operating System version ______ DOS version (if OpSys not DOS) _____
Type of modem you own (if any) ______________________ Max Speed _______
Where did you get TCHK 2.1 from:
BBS Name ________________________________ Number (_____)_____-______
Other electronic service (Compuserve, GEnie, etc.) _________________
Other ______________________________________________________________
Are you a SYSOP or CO-SYSOP (circle) NO - YES ________________________
How would you rate TCHK (circle) 1 - 2 - 3 - 4 - 5
Excellent Garbage
____ TCHK Registration ......................... @ $ 20.00 ea $ _______
(Includes latest version of program diskette, with
all memory models and documentation on the disk.)
____ TCHK Source Code .......................... @ $ 40.00 ea $ _______
(REGISTERED users ONLY)
____ TCHK Registration and Source Code.......... @ $ 55.00 ea $ _______
(As above with source code.)
____ TCHK Sampler Disk ......................... @ $ 10.00 ea $ _______
(Does NOT include registration)
Non-US Shipping ...............................@ $ 5.00 $ _______
(Payments must be in US Dollars, US bank)
TOTAL Enclosed ......................................... $ ____________
Non-U.S. orders need to include $5.00 extra to cover additional
shipping and handling charges. Checks and money orders must be
drawn on a U.S. bank. Please send all payments payable in U.S. Dollars
TCHK 2.1 Page 51
------------------------- User comments --------------------------------
I would also appreciate any input you would care to give concerning
TCHK. If you have any ideas or comments that would make TCHK a better
program, then please let me know.
What features do you find most useful:
____________________________________________________________________
____________________________________________________________________
____________________________________________________________________
____________________________________________________________________
What features do you find least useful:
____________________________________________________________________
____________________________________________________________________
____________________________________________________________________
____________________________________________________________________
Features you would like to see added (use additional pages, if necessary):
____________________________________________________________________
____________________________________________________________________
____________________________________________________________________
____________________________________________________________________
____________________________________________________________________
-------------------------------------------------------
THANK YOU for supporting Shareware and TCHK
TCHK 2.1 Page 52
APPENDIX G - BUG REPORT FORM
This page intentionally left blank
TCHK 2.1 Page 53
Bug Report for TCHK Version 2.1 TCHK210/BBS
-----------------------------------------------------------------------
Please use the following form to report any bugs or discrepancies
you find with TCHK 2.1.
Please take the time to fill out as much information in the following
form as possible. I know it's a lot, but it helps if I know what the
system looked like when the error occurred. At the minimum, make sure
you fill in your name, address, TCHK serial number, operating system
(with version!), compiler, and the list of any TSRs, device drivers,
or anything else in memory when the error occurred.
Return this form, and any necessary additional papers to:
Howard Kapustein
1695 Barbara Lane
East Meadow, NY 11554
Phone: (516) 481-9612
Name ____________________________________ TCHK Serial # ______________
Address _______________________________________________________________
_______________________________________________________________
_______________________________________________________________
_______________________________________________________________
Phone (_____)_____-______
Please describe the system you found the error on in as much detail as
possible. This will help me to determine the exact nature of the error:
Computer Model ________________________________________________________
Cpu (circle): 8086/8088 V20/V30 80186 80286 80386 Other _________
Cpu speed: __________MHz
Math Coprocessor (circle): None 8087 80287 80387 Other ___________
Memory: Conventional _____K EMS/EEMS _____K Extended (>640K) _____K
If EMS/EEMS: Product _________________________________________________
Product manufacturer ____________________________________
Which (circle): EMS EEMS Version: _______________
TCHK 2.1 Page 54
Video Adapter (circle): MDA Hercules CGA EGA VGA 8514 Other_____
Drive letter _____ Size __________ Brand/Model ___________________
Type (circle): 5.25" Floppy 3.5" Floppy Hard drive Other _______
Drive letter _____ Size __________ Brand/Model ___________________
Type (circle): 5.25" Floppy 3.5" Floppy Hard drive Other _______
Drive letter _____ Size __________ Brand/Model ___________________
Type (circle): 5.25" Floppy 3.5" Floppy Hard drive Other _______
# Serial ports ____ # Parallel ports ____ Joystick (circle): Yes No
Operating System (circle): DOS DESQview Windows OS/2 Unix Other
Operating System version ______ DOS version (if OpSys not DOS) _____
Compiler (circle): Turbo C 1.5 Turbo C 2.0 Other _________________
TSRs, device drivers, or any other memory resident software:
____________________________________________________________________
____________________________________________________________________
____________________________________________________________________
____________________________________________________________________
TCHK 2.1 Page 55
--------------------------- Bug report ---------------------------------
Please list the steps necessary for me to discover and duplicate
the error. Try to be as explicit as possible when detailing the
steps leading to the problem. Include any screen dumps, file lists,
source code, or other information necessary. Use additional pages
if necessary:
____________________________________________________________________
____________________________________________________________________
____________________________________________________________________
____________________________________________________________________
____________________________________________________________________
____________________________________________________________________
____________________________________________________________________
____________________________________________________________________
____________________________________________________________________
____________________________________________________________________
____________________________________________________________________
____________________________________________________________________
____________________________________________________________________
____________________________________________________________________
____________________________________________________________________
____________________________________________________________________
____________________________________________________________________
____________________________________________________________________
____________________________________________________________________
-------------------------------------------------------
THANK YOU for supporting Shareware and TCHK
TCHK 2.1 Page 56
Index
_cursorinsert 24, 30
_cursoroverwrite 24, 30
_dvmajor 25, 31
_dvminor 25, 31
_mouse1 25, 46
_mouse2 25, 46
_mouse3 25, 46
_mouse4 25, 46
_rmatherror 25
_rmexcep 20
_r_maximum 25
_r_maxpre 25
_r_minpre 25
_shadowchar 27
_shadowcolor 27
_shadowstyle 27
_TCHK 26, 31
_TCHKdate 26
_TCHKmajor 26, 31
_TCHKminor 26, 31
_TCHKversion 26, 31
_TCmajor 15
_TCminor 15
_ZIPmajor 23
_ZIPminor 23
A
Accum_dep 15, 31
ACC_DDB 15
ACC_SLD 15
ACC_SYD 15
Ansiback 30
Ansifore 30
Ansi_call 33
Atrim 31
Average 31
B
BASE_JUL_YEAR 13
BASE_LEAP_YEAR 13
Bboolean 12, 23, 30
Beep 20, 29, 31
BELL 16
BINV 15
Bitrevb 28
Bitrevl 28
Bitrevw 28
Box 9, 11, 29, 31, 32
Boxwindow 29, 31
TCHK 2.1 Page 57
C
Cal... 33
CapsLock 31
CASEINDEP 19
CEDadd 28
CEDremove 28
Center 15, 28
Changelitebar 31
CHARHEIGHT 21
Char_attribute 26
Checksum_block 28
Clear 31
Cls 31
Color 7, 8, 12, 25, 26, 31, 38
Commit 28, 32
Compaq386GetCpuSpeed 29
Compaq386GetCpuSpeed 29
Compaq386KbdType 29
CompaqExternalMonitorType 29
CompaqGetMasterMode 29
CompaqGetMonitor 29
CompaqInternalMonitorType 29
CompaqModeSwitchDelay 29
CompaqSelectMonitor 29
CompaqSetMasterMode 29
Cpu_id 12, 31
CRC16tupdate 28
CRC16update 28
CRC16_block 28
CRC32tupdate 28
CURSORON 19
Cursor_blink 33
CURSOR_HALFBLOCK 21
CURSOR_UNDERBAR 21
D
DATECHAR 13
DATECHARSTR 13
DATECHARTEST 13
DATENULL 13
Date_convert 32, 41, 42
Daylist 24, 32, 33
Dayofweek 33
Ddatetofull 31, 32
DDB 15
Depreciation 31
DESQapilevel 28
DESQappnum 28
DESQbeginc 28
DESQcommonmem 30
DESQconvenmem 30
TCHK 2.1 Page 58
DESQdisperror 28
DESQendc 28
DESQexit 30
DESQexpandedmem 30
DESQgetbuf 28
DESQgetmem 28
DESQiskmouse 28
DESQjustify 28
DESQkmouse_off 28
DESQkmouse_on 28
DESQostack 29
DESQpause 29
DESQpoke 30
DESQposttask 28
DESQpushkey 28
DESQputmem 28
DESQsound 29
DESQstart 28
DESQstop 28
DESQustack 30
DESQversion 33
DISABLED 19, 30
DISABLENOHILITE 19, 30
Diskchanged 31
Disktype 8, 33
Dosday 31
Doshour 31
Dosmin 31
Dosmonth 31
Dossec 31
Dostimetolong 28
Dosyear 31
DoubleDOSfreeCPU 33
DoubleDOSGetVirtual 30
DoubleDOSTaskSwitch 33
Double_decline_bal_dep 15, 31
DVERROR_BEEP 20
DVERROR_EITHER 20
DVERROR_LEFT 20
DVERROR_RIGHT 20
DVFREESLICE 16, 19, 29
E
EMMversion 31, 33
Emptystring 26, 31
EMSGetStatus 30
EMSinfo 30
EMSpages 30
EMSwarmbootprep 30
ENABLED 19
Endstri 31
Endstrp 31
EQU 15
TCHK 2.1 Page 59
ERASEMENU 19
ESCQUIT 19
Expandfilespec 31
Extendedtotal 33
F
Factorial 31
Fileexist 28
FIRSTTIME 19
FNAMESIZE 14
Fname_match 32
Fncmp 31
Frac 31, 33, 44
FREEMENU 19
Fsgn 31
Fulltoddate 32, 33
FV 31
FVa 31
G
GetAssignmemseg 28
GetBootBlock 28, 31
GetBootBlock4 28
GetBPB 31
Getci_match 31
Getcursor 31
Getc_match 31
Getfilespec 31
Getget 16, 24, 29, 30
Getk 24, 31
Getpw 28
Getstr 24
GetTypePointDevice 29
GetVolSerialNum 28
Gotohv 32
Greg... 33
H
HIERARCHIAL 19
I
Initkeyvars 28
Inkey 30, 31
Inkeyc 31
Insertmode 16, 24
INSERTMODE 16
InsLock 31
Is2nd8259 28
Isallalpha 28
Isallalphanum 28
TCHK 2.1 Page 60
Isalllower 28
Isallupper 28
IsAnarkey 29
IsAppendavail 31
IsAssignavail 31
IsAutoPark 28
IsBlogical 31
IsBREAKon 32, 33
Iscdevicemoderaw 28
IsCEDavail 28
Isdate 28, 30
Isdir 31
IsDoubleDOS 28, 33
Isdrivelocal 28
IsDriverSys 29
IsEnhanceKbd 29
Iseven 28
IsExtended 33
Isfilename 28
Isgameport 31
Isgn 31
Ishandlelocal 28
IsHiliteable 28
IsInvisible 28
Isleapyear 13, 33
IsMCA 28
Ismouse 29
IsNetwork 29, 33
IsNLSFuncCom 29
IsNovellNetavail 28
Isodd 28
Ispathname 28
IspcAnywhere 28
IsPM 31
IsPRINTavail 31
Isrealtimeclock 28
IsRedirectStdin 28
IsRedirectStdout 28
Isremoveable 28
IsScrnSav2 28
IsShareavail 31
Isstate 28
IsVERIFYon 32, 33
IsVidclock 31
IsWhoa 29
Iswildcarded 28
IsXMSinstalled 28
Iszip 28
J
JCENTER 16
JLEFT 16
JNONE 16
TCHK 2.1 Page 61
JoystickAx 28
JoystickAy 28
JoystickBx 28
JoystickBy 28
Joysticksettings 28
JRIGHT 16
Jul... 33
K
Keyclick 28
Key_extended 24
Key_status 24
L
LBPRESSED 19
LEFTBUTTON 19
Litebarerrno 25
Litebar_alloc 31
Litebar_free 31
Litebar_get 31
Litehilite 31
Litemessage 31
Longtodostime 28
Lpow 28
Lsgn 31
Ltrim 31
M
Machine_id 32
MAXDOUBLE 17
MAXFLOAT 17
MAXFNAME 14
MAXLONG 17, 21
MAXLONGTIME 21
MAXLONG_UNSIGNED 17
MAXRPRECISION 21
MAXSTATES 21
MAX_ZIP_VERSION 23
MBPRESSED 19
MButtonPress 29, 46
MButtonRelease 29
MButtonStatus 29
MCursorGraphic 29, 46
MCursorOff 29
MCursorOn 29
MCursorRangex 29
MCursorRangey 29
MCursorText 29
MDriverSize 29
Memory_strategy 33
MEmulateLightpenOff 29
TCHK 2.1 Page 62
MEmulateLightpenOn 29
Menu_litebar 29
Menu_popup 31
MGetDisplayPage 29
MGetDriver 29
MGetSensitivity 29
MGetVerType 29
MGotoxy 29
Mid 19, 31
MIDDLEBUTTON 19
MMickeysMovedx 29, 46
MMickeysMovedy 29
MODE 9, 21
MOUSEINT 19
MouseReset 29
MOUSE_INSTALLED 19
MPutDriver 29
MSetDisplayPage 29
MSetRatio 29
MSetSensitivity 29
MSetThreshold 29
MSYSMOUSE 19
MUpdateScreen 29
N
Ndp_id 12, 31
NEQ 15
NextZIPlocal 23
Nmid 28
NOFLAGS 16
NOTOPTION 19
NO_MOUSE 19
NumLock 31
P
PAGE 21
PAGELEN 21
Parsefilename 31
Parsefnameext 31
PATHSIZE 14
Pause 31, 38
PI 17
PMT 31
Pophilite 31
Popunlite 31
Popuperrno 25
Popup_alloc 31
Popup_free 31
Popup_get 31
Popup_restore 31
Popup_setcurrent 31
PRINTadd 31
TCHK 2.1 Page 63
PRINThold 31
PRINTpurge 31
PRINTremove 31
PRINTresume 31
Print_screen 31
PRTSC_STATUS 20
Putsay 34
Putstr 26
PV 31
PVa 31
Q
QUITMENU 19
R
Radd 28
RBPRESSED 19
Rceil 28
Rdiv 20, 28, 44
Read_attrib 31
Read_char 31
Reboot 8, 10, 33
ResetPointDevice 29
Resolvepath 28
RESTORECURSOR 19
Rfloor 28
RIGHTBUTTON 19
Rnegate 28
Rnormalize 28
Round 31, 35
ROWCOUNT 21
Rsign 28
Rsub 28
Rtrim 31
S
Scrbuff 33
ScrollLock 31
SetAutoPark 28
SetBREAK 32, 33
Setcdevicemoderaw 28
Setcursor 31
SetpcAnywhere 28
SetPointDevice 29
SetRatePointDevice 29
SetResPointDevice 29
Settextinfo 31
SetVERIFY 32, 33
SetWhoa 29
Set_color 26
Set_handles 33
TCHK 2.1 Page 64
Shadow 21, 22, 27, 28
SHADOW_B 21, 22, 27
SHADOW_BL 21, 22
SHADOW_BOTTOM 22
SHADOW_BR 21, 22, 27
SHADOW_L 21, 22
SHADOW_LEFT 22
SHADOW_R 21, 22, 27
SHADOW_RIGHT 22
SHADOW_T 21, 22
SHADOW_TL 21, 22
SHADOW_TOP 22
SHADOW_TR 21, 22
SHIFT_STATUS 16
Shorttoddate 32, 33
SLD 15
Soundex 28
Sqr 17, 31
SQRT2 17
Stateindex 28
StateName 25
StateName 25
States 25
STATICTEXT 19, 30
Stddev 31
Straight_line_dep 15
Strcapital 31
Strclean 31
Strfill 31
Stroccur 31
Strpadleft 28
Strpadright 28
Strspace2tab 28
Strtabexpand 28
Strtocomma 31
Struct BIOSParmBlock 13, 14
Struct BootBlock 14, 23, 29
Struct BootBlock4 14, 23
Struct ddate 13, 23, 40, 41
Struct DESQmemory 20, 23
Struct EMSrecord 15, 23
Struct filespec 14, 23
Struct fnameext 14, 23
Struct keylist 18, 23
Struct litebar_field 18, 23
Struct litebar_header 18, 23
Struct popup_field 17, 23
Struct popup_header 17, 23
Struct REAL 20, 44
Struct ZIP_central_record 22, 23
Struct ZIP_end_central_record 22, 23
Struct ZIP_local_header 22, 23
Strwcmp 31
Strwicmp 31
TCHK 2.1 Page 65
Summation 31
Sum_year_digits_dep 15, 31
Swap 31
SYD 15
T
TIMER_TICKS 16
Time_convert 31, 43
To24hour 31
Tocapkey 31
Todosdate 31
Todostime 31
Tohour 31
Tone 21, 28
TRIMALL 16
TRIMLEFT 16
TRIMRIGHT 16
TWOBUTTONS 19
U
UDFIDLE 16, 19
UninstallWhoa 29
V
Variance 31
VIDEO 7, 9, 21
VIDOFFSET 21
W
WAITFORKEY 16
WRAPAROUND 19
X
XBUTTONS 19
Z
ZipMax 26
ZipMin 26
ZIPSignatureCentral 23
ZIPSignatureEndCentral 23
ZIPSignatureLocal 23
ZIPversion 23