Zinc It!
Table of Contents
1.) Overview
1.1) Scope of This Book
1-1
1.2) Designer Naming Standards
1-3
Designer Rule of Sanity
#1
1-4
Designer Rule of Sanity
#2
1-5
Designer Rule of Sanity
#3
1-6
1.3) Application Design Standards
1-7
1.4)
Pitfalls of XBASE Products in General
1-8
1.5) Tools Used in This Book
1-11
2.) Boosting DOS performance
2.1) The Performance Problem
2-1
2.2) The Solution for ZAF Users
2-2
2.3) The Promised Code
2-4
x32lib.mak
2-5
x32_fg.wcc
2-7
x32fgzil.wcc
2-7
testxfg.cpp
2-8
fg_cstm.c
2-9
2.4) Follow Up
2-9
3.) Tricks You Should Already Have
3.1) My Personal Library of Tricks
3-1
3.2) The Old Template
3-1
3.3) trim_str() Subroutine
3-4
3.4) Error Message Routines
3-4
system_error_msg()
3-5
system_error_msg_exit()
3-6
ls_error_msg()
3-7
3.5) exit_program() Function
3-7
3.6) not_blank() Function
3-8
3.7) locate_lb_elm() Function
3-11
3.8) Z_TRACE Debugging Tool
3-12
3.9) file_browse_routine()
3-17
cancel_fle_browse_function()
3-18
cancel_print_win()
3-19
dos_print_file_function()
3-20
file_browse_routine()
3-21
local_dos_print_file_function()
3-25
local_os2_print_file_function()
3-25
local_print_file_function()
3-27
local_net_print_file_function()
3-32
net_print_file_function()
3-32
print_file_function()
3-33
save_edit_file_function()
3-34
3.10) ls_lib.hpp The Library Header
File 3-35
3.11) Library Make File
3-40
LS_D32.RSP
3-42
LS_X32.RSP
3-42
LS_WIN.RSP
3-42
LS_OS2.RSP
3-43
3.12) Demonstration Application
3-43
figure 3-1
3-45
figure 3-2
3-45
ch3_.hpp
3-46
ch3_.cpp
3-46
ch3.cpp
3-47
ch3a.cpp
3-49
ch3.lbl
3-51
ch3.mak
3-57
4.) Developing with CodeBase
4.1) Pitfalls of Using CodeBase
4-1
4.2) File handles in DLL's
4-4
4.3) Building the CodeBase
libraries
4-4
4.4) The sample database
4-5
Figure 4.1
4-7
Figure 4.2
4-7
Figure 4.3
4-8
Figure 4.4
4-8
4.5) The Code
4-9
CH4_.HPP
4-9
CH4_.CPP
4-10
CH4.CPP
4-12
CH4A.CPP
4-14
CH4.MAK
4-28
4.6) Explanation
4-30
5.) Developing with GreenLeaf Data Base
5.1) What is GDB?
5-1
5.2) Pitfalls of Developing with
GDB
5-1
5.3) Building the Libraries
5-4
BUILDW10.INI
5-4
5.4) The Code
5-4
CH5_.CPP
5-6
CH5_.HPP
5-7
CH5.CPP
5-8
CH5A.CPP
5-9
CH5.MAK
5-23
5.5) Follow Up
5-25
6.) Developing with Btrv++ and BtrvGen++
6.1)
Strengths of Btrieve Over XBASE File Systems
6-1
6.2) Pitfalls of Developing Btrieve
Software
6-3
6.3) The Cheapest Way to Get Into Btrieve Development 6-4
6.4) The Interface Function
6-5
BTRV.CPP
6-5
6.5) Building the Libraries
6-14
XBTRVOBJ.MK
6-14
XBTRVOBJ.LNK
6-16
WBTRVOBJ.MK
6-16
WBTRVOBJ.LNK
6-18
OBTRVOBJ.MK
6-19
OBTRVOBJ.LNK
6-20
6.6) The Code
6-21
INV.H
6-21
INV.CPP
6-25
SINV.H
6-28
SINV.CPP
6-44
CH6_.HPP
6-74
CH6_.CPP
6-75
CH6.CPP
6-77
CH6A.CPP
6-78
T6.CPP
6-93
CH6.MAK
6-93
WCH6.RSP
6-94
XCH6.RSP
6-94
OCH6.RSP
6-94
TCH6.RSP
6-95
6.7) Follow Up
6-95
7.) Developing with ODBC
7.1) Pitfalls of ODBC
7-1
7.2) The Cheapest way Into ODBC
7-4
7.3) The Test Program
7-6
TEST.CPP
7-6
TEST1.CPP
7-7
TEST.MAK
7-19
TEST.RSP
7-19
7.4) Explaination of Test
7-20
7.5) Small Inventory System
7-23
CH7_.HPP
7-23
CH7_.CPP
7-24
CH7.CPP
7-26
CH7A.CPP
7-29
CH7.MAK
7-51
CH7.RSP
7-51
7.6) Follow Up
7-51
8.) Developing with Poet
8.1) Pitfalls of POET
8-1
8.2) The Cheapest Way Into POET
8-5
8.3) Dealing with Visual C++
8-5
FB_E.CPP
8-6
ZT.CPP
8-6
LSM_LIB.MAK
8-7
LSM_LIB.RSP
8-8
8.4) First Sample Application
8-8
INV.HCD
8-9
INV.PTX
8-12
INV.CXX
8-14
PTASSOC.CXX
8-17
POPULT.CPP
8-17
POPULT.MAK
8-24
POPULT.DEF
8-25
8.5) Small Inventory System
8-28
CH8.HPP
8-28
CH8.CPP
8-28
8.6) CH8.CPP Follow Up
8-31
CH8A.CPP
8-33
8.7) CH8A.CPP Follow Up
8-49
CH8.MAK
8-52
CH8.DEF
8-53
CH8_2.DEF
8-53
8.8) Conclusion
8-53
9.) Developing with GreenLeaf CommLib
9.1) What is CommLib?
9-1
9.2) Pitfalls of CommLib
9-2
9.3) Scenario for the sample program
9-4
9.4) What kind of scale do I want?
9-5
9.5) The scale packet
9-6
9.6) Generating scale weights
9-7
SREAD.CPP
9-7
SREAD.MAK
9-13
SCALE.INI
9-14
9.7) Our databases
9-15
Main Window 1
9-17
Main Window 2
9-17
Truck Window 1
9-17
Truck Window 2
9-18
Truck Window 3
9-18
Ticket Window 1
9-19
Ticket Window 2
9-19
Ticket Window 3
9-19
9.8) The "Holy Sh*t" example
9-20
CH9_.HPP
9-21
CH9_.CPP
9-22
HS.HPP
9-25
HS.CPP
9-26
HSA.CPP
9-30
HSB.CPP
9-55
HS.MAK
9-67
9.9) "Holy Sh*t" follow up
9-67
9.10) The derived object method
9-70
CH9.HPP
9-70
CH9.CPP
9-72
CH9A.CPP
9-73
CH9B.CPP
9-97
CH9.MAK
9-98
9.11) Derived object follow up
9-98
10.) Ponderings
10.1) Getting Warped - One Soldiers Tour of
Carnage 10-1
11.2) Microsoft's Armageddon
10-4
11.3) Our Database and Design
Choices
10-7
10.4) The Myth of Code Generators
10-10
10.5) Where Do We Go From Here?
10-12
10.6) Contacting the Author
10-13