DITECT Software Installation
§ 10 DITECT installation
Before you start installing DITECT programs on your system, please proceed
as follows:
Upper-/lowercase file name writing may be different on some systems !
Define pathname wanted by you for all DITECT runtime files
in file DTDEF.C array "dtpath[]", in DTEXD.BAT and DTEXA.BAT
Default pathname is \DITECT\ . All default values may be redefined during
runtime by user and TT-program (see file: DTDFLT.cfg)
(TT = text/typesetting) (nn = 2-digits language-no.).
Create "pathname" directory as defined and
copy all runtime files (see §15) into it.
Convert all ASCII-files to your system (but file DTnn.BIN is binary and
must not to be changed or converted !).
ASCII-files (DTCOnn, DTCRnn, DTnn.TXT) possibly contain character codes
(accented letters etc.) unknown or coded differently on your system (e.g.:
ÄÖÜäöüß = [\]{|}~ etc.). Adapt these character codes to your system !
printf - statements in C-sources are never active ( ! ) except for testing
purposes switched on by special command. So don't erase them !
C-source statements commented with "!!!!!"
possibly have to be adapted to your system.
If function "coreleft( )" is not available, it may be replaced by value 40000,
but anyhow "coreleft" is not used at all in DITECT (only in DHEXCAT.C).
On UNIX systems :
- end-of-line codes hex. '0D0A' have to be changed to hex. '0A'.
- end-of-file code ^Z has to be deleted.
- change following DHCFUNCT.C-expressions:
sys\types.h to sys/types.h
sys\stat.h to sys/stat.h
nendchar = 2; to nendchar = 1;
Adapt your TT-program to automatically
set DITECT default values as defined by user
set DITECT calling-parameters
evaluate DITECT return-array "charr" (see: Interfacing § 7).
Do not strip out special characters except TT-commands as DITECT
is capable of handling these characters, if program DHTCMD.C has
been adapted by us following your specifications.
Compile all DITECT files.c on your system.
Link compiled files.obj as shown in file DTTEST.LNK (or: DMTEST.LNK)
and DHEXCAT.LNK
Adapt DTEX?.BAT files for later exception dictionary updating
to your system (editor "PE" [or "PE2"], pathname \DITECT\
and other statements).
DIHYPH sources
DITECT is using some DIHYPH-modules. These modules must have version-no.
Jun95 or later in source file header.
§ 11 C-library-functions
used in module DHCFUNCT.C :
C-Compiler Purpose: Function
Function: call:
_____________________________________________________________________
malloc Allocate memory DHMALL
coreleft get as much RAM as left (unused !)
free FREE memory allocated before
free FREE all memory allocations DHFREEAL
open OPEN file DHOPEN
fopen FOPEN file DHFOPEN
close CLOSE file DHCLOSE
fclose FCLOSE file
close CLOSE close all open DHCLOSAL
fclose FCLOSE DIHYPH-/ DITECT-files
rename RENAME file (old - new) DHRENAME
remove REMOVE file DHDELET
tell Get file size DHFSIZE
stat Get file status DHSTAT
rewind Reset to start of file DHSETF
lseek Set file pointer
fgetc FGETC file DHREAD
read READ file
fprintf print to file DHWRITE
write WRITE file
§ 12 Error messages in file "dmessage"
Following error messages may only occur in case of incorrect installation !
DHFOPEN: No free file index found ! Abort.
It is only possible to open max. 15 files simultaneously.
"progname" -Error( 0): Can't open file : "filename"
Prog.module "progname" can't open file "filename".
Language defined by user possibly is not installed !?
"progname" -Error( 1): Unsufficient memory allocation.
Prog.module "progname" is unable to allocate enough memory.
Progname = "dhrcof ": Variable 'codspac' defined too small.
Progname = "dhexcfh": Variable 'excspac' defined too small,
and program continues without exceptions !
"progname" -Error( 3): 'exdspac' defined too small.
Prog.module "progname": Value of global variable 'exdspac' (defined in
DHDEF.C / redefined in DHDFLT.CFG and DTDFLT.CFG) must be big enough
to hold largest exception-record and DITECT base-record.
Enlarge 'exdspac' in DTDFLT.CFG !
DITECT-Error: 999 short-/medium-term-files used !
Please add "DTnnEXC.*"-files to permanent file by calling:
DHEXA nn (nn = 2-digits-language-no.)
After that all short-/medium-term-files are erased and can be filled again.
DMFRAM-Error: Not enough RAM to hold tables permanently. Overlay !
There is not enough RAM available to hold all the different DITECT- and/or
DIHYPH- program-tables in RAM permanently. Always the last is overlaid !
§ 13 DITECT testprogram
After installation and linkage of testprogram "DTTEST" (see: § 14)
it is started as follows:
DTTEST nn DTnn.TXT
| |____ Testfile
|__________ Language-No. (e.g.: 01 =German)
If results on screen are identical with those in file "DTnn.RES", your program
is working correctly.
Now you may link DITECT with your program system without following programs:
"DTTEST", "DXTIME", "DXDATE", "DHKEY" and "DTEDL" .
At first call to DITECT RAM-space of about 20000 bytes is allocated for
runtime-files and temporary buffers.
§ 13.1 DITECT / DIHYPH combination testprogram
If you want to install DITECT together with DIHYPH in one system, use test-
program "DMTEST" instead of "DTTEST". For linkage, see "DMTEST.LNK" !
DMTEST.EXE is started as follows:
DMTEST nn tt (f:) <DH01.TXT
| | | |____ Option: Input file with testwords.
| | | Else: Input words via keyboard.
| | |
| | |_____________ Option: DITECT only displays
| | erroneous words.
| | Else: All words are displayed.
| |
| |__________________ Option: h = hyphenation only.
| s = spelling check only.
| hs = hyphenation followed
| by spelling check.
| Else: hs is default.
|
|______________________ Language-no. (e.g. 01 = German)
§ 14 DITECT is linked with following programs:
Prog.name Meaning
___________________________________________
DTTEST Test program | These five programs are
DXTIMED " " (Time-Dummy) | used for testprogram only.
DXDATED " " (Date-Dummy) |-
DTEDL " " DOS-lineeditor | They must be left away for
DHKEY " " " " | typesetting-system linkage.
DHDEF see: DIHYPH !
DHYPH " "
DHTCMD " "
DHEXCFH " "
DHCUPP " "
DHCFUNCT " "
DHRCOF " "
DTDFLT Read config. file "dtdflt.cfg"
DTFRAM Holds prog-files in RAM **)
DTEXCFS Seek exceptions **)
DTDEF Globale Definitions
DTINT Interfacing
DTCAPS Capital-/small conversion
DTFILSS Tmp. files handling
DTEXCW Prepare word for tmp-storage
DTCHECK Checking-logic
DTBINH Search DTnn.BIN file
DTBINW " " "
DTSTIC4 4 char.-/int. conversion
DTSTIC 2 char.-/int. conversion
DTECT DITECT main program
DTMATCH Proposal logic
**) For DIHYPH and DITECT together in one program, replace
DHFRAM and DTFRAM by DMFRAM,
DHEXCFS and DTEXCFS by DMEXCFS and
link test-program DMTEST (see: DMTEST.LNK) !
§ 15 DITECT uses following run time files:
Code created by
File name Meaning dependent DITECT User
______________________________________________________________________
DTnn.BIN Binary word dictionary
DTnn.PRL Proposal list start letters
DTnn.CUT Suffix combinations
DTnn.PFX Prefix combinations x
DTCOnn Code file x
DTCRnn Code-Replace file (nn = language) x
DTCRNN Code-Replace file (standard) x
DTEXPR.SKP ignored (parts of) expressions
DTDFLT.CFG Configuration File
DTnnTMP.* short -term word storage file. x
DTnnEXC.* medium-term word storage file. x
DTEXnn.TXT permanent word storage file. x x
DTEXnn.CAT " " " catalogue x x
(x) DTnn.CUT is automatically adapted internally.
( nn = 2-digits-language-no. )
If a specific file-no. (1 - 999) is not defined in int-variable 'usef',
DITECT automatically assigns an unused number to every workstation
for short- or medium-term files to avoid network-file-problems.
After a couple of days it may be possible that all 999 numbers are used.
In that case DITECT displays an error-message and continues without short-
or medium-term file storage.
System-supervisor has to take care that by calling programs
DTALLMED nn or
DTEXA nn (nn =language-no.)
Program-call DTALLMED nn copies all medium-term files DTnnEXC.*
into file DTnnEXC and releases the file-numbers for later use.
Program-call DTEXA nn adds all medium-term files DTnnEXC.*
to permanent word file and releases the file-numbers 01-999 for later use.
§ 16 Frequent changes between programs
Every time DITECT changes to another language or switches over to DIHYPH
or back, the new program opens and reads some files into RAM, which will
result in decrease of program speed.
To avoid this DITECT automatically tries to hold all tables in RAM permanently,
if enough free RAM is available.
To do this, program values 'exdspac' and 'excspac' have to be set correctly
in configuration file "dtdflt.cfg" as basic default values (DT00) by that being
valid for all languages, but 'excspac' may be defined language dependant (DHnn)
instead as well.
First method needs more RAM as it allocates same RAM size for every language.
Using second method the values may be defined tailor-made for every language.
If there is not enough RAM available, a message is written into error-file
"dmessage" and always the last language tables are overlaid by the new ones.
If DIHYPH and DITECT are linked together in one program-system, use sources
DMEXCFS and DMFRAM instead of DHEXCFS, DTEXCFS, DHFRAM and DTFRAM
(see link-file "DMTEST.LNK"), and variable 'hynr' has to be set to zero (hynr=0;)
before switching over from DITECT to DIHYPH or vice versa (but only then) !
All sources must be compiled with large compiler model !
§ 17 Redefinition of default values
using file DTDFLT.CFG
When different users are working with DITECT simultaneously e.g. in a net,
configuration file "dtdflt.cfg" is on the server and so all values defined in
this file are automatically valid for every user.
So user dependant values like 'usef', 'csch', 'ftmp', 'minwl' and 'mexsw'
should be set user-defined via calling system but then these values must be
erased from file "dtdflt.cfg" else the definitions would overwrite the ones
set by calling-system before !
Description of DITECT configuration file "dtdflt.cfg"
§ 18 Batch-files "DTEX?.BAT"
may be used for exception-word handling:
DTEXD.BAT is used to display, correct and/or
delete words in permanent file.
DTEXA.BAT is used to add medium-term file(s)
to permanent file.
After that it works like DTEXD.BAT
Please note that in both files pathname \DITECT\ is used which perhaps has
to be changed to pathname used on your system !
For more information please read:
Exception Dictionary
DITECT Interfacing
Contact