
			TibEasy

	       Text Viewer for the IBM PC

`		       Ver. 1.0

	
		   TECHNICAL OVERVIEW



      The purpose of TibEasy is to provide computer
novices with an easy to use tool to view and search
ACIP-transliterated Tibetan Texts. Both the Tibetan
and transliteration are provided grouped together to
allow nonfluent students to follow the text.
	It is designed to work on the any PC compatible
machine with any graphics adapter, any version of DOS
2.0 or later, and any disk drive, so that  many users
overseas without advanced equipment may make some use of
it.  The program does not need to be configured for the
machine, but only requires access to two files in its
startup directory.
	The text display is filled but not formatted in
order to permit the greatest number of words to appear
on the screen at once on a low-resolution screen.

	Since most of the
distributed texts are classic works, editing is not
needed, and can in any case be performed in any ordinary
text editor.  Printing at this time can be accomplsihed
with the system printscreen untility set for graphics mode.



		MAINTAINENCE INFORMATION

	This program was built with the Zinc Interface
Library ver 2.0, a C++ windowing interface library that
supports DOS and Windows 3.0 applications from a single
source code.  Though the windows version has not been
implemented here, there are only two source changes needed
to port it. One is sto close the text file between accesses
to prevent a sharing violation, and the other is to eliminate
the BIOS read of the floppy drive to detect drive readiness.
The ZINC source code was not modified for this project.
	The program was compiled with Borland C++ ver 2.0 in the
IDE. Compiler configuration information is contained in the
project file VWIN.PRJ.  Other project files ar for module test
shells.
	Mortice Kern Systems LEX for DOS was  used to
generate the Transliteration and Display interpreters for the
Tibetan language.  One modification to the prototye scanner
included in MKS LEX was necessary in order to prevent a call
the the C library function memmove() with a negative size
argument.


	APPLICATION SOURCE CODE FILES
===========================================

SAMPLE   ACI     10159 09-05-92  11:31a	Sample ACIP text for testing

B        BAT        20 05-24-92   4:42a Batch files for Compiling and
C        BAT        23 05-24-92   8:40a debugging
M        BAT        41 04-03-92  11:44a
BAK      BAT       173 07-20-92   7:34a for backing up

LEXMAIN  C         606 05-24-92   7:38a lex interpreter text shell

TIB5     C       23521 09-04-92   9:35p lex interpreters
TIB6A    C       29943 09-04-92   9:35p

VWIN     CFG       102 05-24-92   8:41a compiler project config file

SYL      CPP       542 02-29-92   2:29p

CHARACTR CPP       985 12-03-91   1:23p Character class functions

TIBVIEW  CPP       993 09-05-92  10:45a Resource file constant definitions

FONT     CPP      1551 07-23-91   3:22a Font class funcs
ERRMSG   CPP      1785 09-05-92  12:09p Error msg strings
ERROR    CPP      1811 03-09-92  11:24p Memory error monitor class function

BITMASK0 CPP      1956 03-27-92  12:44p Bitmask class funcs

LEXMAIN  CPP      2400 03-30-92   7:35p lex test shell
TIBFONT  CPP      2790 02-29-92   2:48p Tibetan font class functions
RADIO    CPP      4628 03-02-92   5:59p radio button class functions
LOADSYL  CPP      4662 04-01-92  10:07a syllable init function
EDTWEVT  CPP      4903 09-05-92   5:09p main window event proc
VALIDATE CPP      5498 09-05-92   5:10p input validation funcs
MAIN     CPP      5694 09-05-92  11:57a main program
HPFONT   CPP      5843 07-29-91   1:17p HP soft font format font class funcs
DRAWNCH  CPP      7086 05-24-92  12:34a Zinc-displayable char class funcs
EDITWN1  CPP      7318 09-05-92   4:58p userfunction for menu items
FILELIST CPP     10651 05-24-92   2:47a file selection window functions
EDITSTAT CPP     12908 09-05-92   5:11p Search functions
VWIN     CPP     14943 09-04-92   8:36a Tibetan window class funcs

TIBVIEW  DAT     17400 09-05-92  10:45a resource file containing
					main window, word and page search
					dialog boxes, icon and intro window

VWIN     DSK     27131 09-05-92   5:12p compiler IDE desktop settings

VWIN     EXE    539841 09-05-92   5:12p the executable

HEADER   H         144 01-17-92   5:54p header template
F        H         186 02-02-92   6:26p
SYL      H         900 02-16-92   2:48a Syllabe structure declarations


LEX      H        2978 08-20-92   5:47p #defines OF PRINTED TIBETAN LETTERS


CHARVAL  H        3779 08-20-92   7:01p #defines of TIBETAN
						LETTERS

TIBVIEW  HLH      1273 09-05-92  10:45a resource file help contexts

ITEMID   HPP       295 03-28-92   6:13p

ERRMSG   HPP       339 03-28-92   6:04p CLASS DECLARATIONS
BITMASK  HPP       579 12-03-91   2:18p
TIBFONT  HPP       648 02-29-92   1:38a
CHARACTR HPP       814 08-30-91   2:11a
RADIO    HPP       819 02-29-92   8:02p
ERROR    HPP       823 07-19-92  11:41a
SYLLABLE HPP       911 02-28-92  12:08a
FILELIST HPP       989 02-29-92   6:34p
SYL      HPP      1070 02-29-92   2:28p
FONT     HPP      1223 01-30-92   7:04p

HCONTXT  HPP      1322 09-05-92  10:54a table of help context called by
					menu or button

TIBWIN   HPP      1671 02-08-92  12:49p more class declarations
DRAWNCH  HPP      1718 04-04-92   1:28p
TIBVIEW  HPP      2272 09-05-92  10:45a resource file const #defines

VWIN     HPP      2591 04-09-92   9:19p more class delc.
EDITWIN  HPP      2666 07-22-92   1:57a
HPFONT   HPP      3121 07-29-91   1:47a

TIB5     L        6256 07-21-92  12:05a INPUT FOR LEX INTERPETERS
TIB6A    L        8134 08-20-92   6:41p

VWIN     MAK      2052 05-24-92   8:39a MAKEFILE


ZLEX     PRJ      4171 02-19-92   9:00a lex test shell project files
ALEX     PRJ      6387 03-30-92   9:10p

VWIN     PRJ     11623 09-05-92   5:12p MAIN PROJECT FILE

TDCONFIG TD       1266 07-18-92   8:57p debugger config file

TEST     TIB      5116 09-05-92   5:16p TIBETAN FONT FILE



		FONT GENERATION


	Several homegrown utilities work togethere under the
direction of the batch file MKFONT2.BAT to produce a font file
in the HP soft font format from a set of .PCX monochrome bitmaps
generated under windows 3.0 paintbrush. The font file is named
TEST.TIB.
	MKFONT.EXE generates the font file base without any
character information.  ADDCHAR0.EXE is run once for each char,
converts the .PCX file into HP soft font format and appends it
to the end of the font file along with character number and
character displacement (offset) information.  The first command
line argument of ADDCHAR0.EXE is the name of the .PCX file.
Teh second is the number associated with the
character, a value that must match the one given in the C header
file LEX.H (see above).  The third value is the left offset, and
the fourth is the top offset, both in pixels.  The last argument is
the delta_x (kerning) of the character, and may be ommitted
in order to set it equal to the character width.
	The other files are the source and project files used
to build the font generating programs.  These should not need
t be touched in order to regerate a font.

	To regenerat a font, first backup the current TEST.TIB,
then modify the .PCX files as needed.  If the positioning of on
or more characters requires adjustment, change the offset
parameters in MKFONT2.BAT for the character(s) a small amount,
and then type MKFONT2 at the DOS prompt, and press the spacebar
repeatedly to see the program build the font, one character at a
time.  The new  font is the file TEST.TIB.



	FONT GENERATION UTILITIES AND ORIGINAL BITMAPS FILES
================================================================

MKFONT2  BAT      2133 09-05-92   5:16p  THE MAIN BATCH FILE

MKFONT   CPP      2347 08-12-91   7:11p source for the fontfile program

READPCX1 CPP      3243 07-26-91   3:17a source for the program that adds
READPCX  CPP      3285 07-28-91   8:10p a character to the font file
ADDCHAR0 CPP      6802 07-04-92  11:13a

ADDCHAR0 DSK       580 07-04-92  11:20a compiler desktop settings

MKFONT   EXE     12340 08-12-91   1:56a this writes the base part of the font
READPCX  EXE     47079 07-28-91   8:10p not used
ADDCHAR0 EXE     55441 07-04-92  11:14a this adds one char to the font

SUP_RA   PCX       148 08-12-91   1:29a THE INVIDUAL CHARACTERS...
SUB_RA   PCX       150 08-12-91   1:34a
SUB_WA   PCX       150 08-12-91   1:35a
E        PCX       153 08-12-91   1:36a
I        PCX       156 08-12-91   1:36a
M_       PCX       159 08-12-91  12:49a
EE       PCX       162 08-12-91   1:36a
OO       PCX       163 08-11-91   9:17p
VIRAMA   PCX       163 08-20-92   4:51p
DOT1     PCX       166 12-05-91   2:49a
SUB_YA   PCX       167 08-12-91   1:16a
SUP_LA   PCX       167 08-12-91   1:20a
SUP_SA   PCX       169 08-11-91   9:09p
ZA       PCX       172 08-12-91   1:03a
O        PCX       174 08-11-91   9:20p
I_       PCX       175 08-12-91  12:50a
SUB_A_   PCX       176 08-11-91   9:26p
DOT      PCX       176 11-28-91   3:49p
_3       PCX       178 11-28-91   3:37p
U        PCX       182 08-11-91   9:17p
2WAVES   PCX       182 08-20-92   4:50p
_2WAVES  PCX       182 08-20-92   5:04p
PHA      PCX       187 08-11-91   9:03p
LA       PCX       188 08-12-91   1:22a
JA       PCX       189 08-11-91   9:04p
AA       PCX       190 08-11-91   9:17p
PA       PCX       191 08-12-91   1:03a
_1       PCX       191 11-28-91   3:33p
_9       PCX       193 11-28-91   3:47p
_6       PCX       196 11-28-91   3:41p
RA       PCX       197 08-11-91   9:04p
CHA      PCX       197 08-11-91   9:14p
CA       PCX       197 08-11-91   9:15p
_2       PCX       197 11-28-91   3:35p
A_       PCX       198 08-11-91   9:25p
TZA      PCX       198 08-12-91   1:10a
NGA      PCX       199 08-12-91  12:59a
KHA2     PCX       199 08-20-92   4:16p
RTZA     PCX       199 08-20-92   4:22p
_8       PCX       199 11-28-91   3:45p
THA      PCX       200 08-12-91   1:09a
RDZA     PCX       200 08-20-92   4:20p
COLON    PCX       200 08-20-92   5:13p
_7       PCX       200 11-28-91   3:43p
SA       PCX       201 08-11-91   9:07p
BA       PCX       201 08-11-91   9:16p
DZA      PCX       201 08-20-92   4:19p
_4       PCX       202 11-28-91   3:38p
ZHA      PCX       203 08-12-91   1:12a
_5       PCX       203 11-28-91   3:39p
YA       PCX       205 08-12-91   1:11a
MA       PCX       206 08-12-91  12:58a
LINE     PCX       208 11-28-91   3:53p
_0       PCX       211 11-28-91   3:28p
TH_A     PCX       213 08-12-91   1:07a
TSA      PCX       215 08-12-91   1:10a
T_A      PCX       222 08-11-91   9:05p
NYA      PCX       224 08-12-91   1:02a
WA       PCX       225 08-12-91   1:10a
KHA      PCX       227 08-11-91   8:48p
HA       PCX       227 08-11-91   9:01p
SH_A     PCX       227 08-11-91   9:11p
SHA      PCX       230 08-11-91   8:52p
DA       PCX       230 08-12-91   1:37a
NA       PCX       231 08-12-91  12:59a
GA       PCX       234 08-12-91  12:52a
DHA      PCX       237 04-09-92  11:15p
N_A      PCX       239 08-12-91  12:59a
DH_A     PCX       240 08-12-91  12:56a
TA       PCX       241 08-12-91   1:04a
DZHA     PCX       247 08-12-91  12:54a
D_A      PCX       249 08-11-91   9:13p
BHA      PCX       250 08-11-91   9:15p
KA       PCX       251 08-12-91   1:27a
JHA      PCX       254 08-11-91   9:06p
A        PCX       256 08-10-91  11:34a
RNYA     PCX       258 08-20-92   4:43p
GHA      PCX       269 08-12-91  12:52a
_3WAVES  PCX       284 08-20-92   5:06p
LOTUS    PCX       297 08-20-92   5:08p
BUD      PCX       336 08-20-92   5:12p
GONGSA   PCX       402 08-20-92   4:53p
ARCHES   PCX       652 08-20-92   5:17p

FAX7852  PCX     12036 07-22-91   3:47p SOURCE MATERIAL USED TO CREATE THE
TIBALPH  PCX     15170 08-11-91   9:11p INDIVIDUAL CHARACTERS
PAGE1    PCX     42971 11-28-91   3:43p
PAGE3    PCX     53064 08-10-91   8:01p
PAGE2    PCX     58592 11-28-91   3:50p
PAGE4    PCX     85580 08-20-92   5:02p

ADDCHAR0 PRJ      5092 07-04-92  11:17a  project file to build ADDCHAR0.EXE

TEST     TIB      5116 09-05-92   5:16p   ***  THE FONT  ***




		FUNCTIONAL  OVERVIEW



	The function of the program is based on the conventions 
for data display, program control, message passing, and object
ownership used in Zinc ver 2.0.  
	There are several classes derived from Zinc classes with 
the additional functionality  for Tibetan.  They are

	EDIT_WINDOW (poorly named, for lack of editing) is derived from
UIW_WINDOW, with the additional functions which are attached to its
menu.  It opens and closes files, creates and destrtoys a Tibetan
text window, and initiates searchs. It passes the file pointer to
TIB_WIN to be displayed.

	TIB_WIN is concerned with reading text from the file, 
maintaining a list of syllables (of class DRAWN_SYL)and displaying 
them in itself in different formats.  It reads directly from the file
to create syllables and then displays them.

	DRAWN_SYL  is the class for a single Tibetan syllable object,
with the ability to display Tibetan with or without transliteration.
It makes use of the the LEX  C source to interpret the transliteration
and to format it correctly for display.

	Classes Bitmask, Character, Font, HpFont, and TibFont are all
concerned with Displaying characters in graphics form from an installed
font and (except for TibFont, which makes modifications for charcter 
stacking ) are fully documented in the article on C++ fonts in the 
June/July '91 issuer of PC Techniques.



Ed Softky
9-6-92
