|
Needed Object Files
To link FATS to your programs you will need the following object modules:
fats.obj The FATS module for DOS fats_wcs.obj Interface / small-model fats_wcm.obj Interface / medium-model fats_wcc.obj Interface / Compact-model fats_wcl.obj Interface / Large-model
The following libraries are included on the distribution diskette to call the FATS Workstation Engine:
fatswcsr.lib Interface / Small-model fatswcmr.lib Interface / Medium-model fatswccr.lib Interface / Compact-model fatswclr.lib Interface / Large-model
If you want to make calls to the extended version of FATS (FATSXWE.EXE), you have to use the libraries fatsxcsr.lib (small), fatsxcmr.lib (medium), fatsxccr.lib (compact) or fatsxclr.lib (large).
Linking a Watcom C Program with FATS
To compile and link a application that calls FATS, use ONE of the following methods:
1. METHOD: Linking FATS to the program
WCL /m[?] /l=dos /bt=dos tst1_eng.c fats_wc[?].obj fats.obj
[?] == s (small model), m (medium), c (compact), l (large)
2. METHOD: Calling the Workstation Engine (FATS_WE.EXE)
WCL /m[?] /l=dos /bt=dos tst1_eng.c fatswc[?]r.libor if you own the extended version of FATS: (FATSXWE.EXE)
WCL /m[?] /l=dos /bt=dos tst1_eng.c fatsxc[?]r.lib
Calling FATS
FATS commands are executed with the function FATSCALL:
unsigned long __cdecl FATSCALL(char *szCmnd,unsigned short *nErrorcode, char *szFatsKey);
Parameter Usage:
szCmnd Command string (input) nErrorcode Errorcode (output) szFatsKey Key value (output) Return Value: Record Number
Testprograms
The FATS distribution disk for PC-DOS/MS-DOS contains some test programs in the directory DOS_16I\C\WATCOM that illustrate how you can use the FATS commands in your programs:
tst1_eng.c Test program for Watcom-C Compiler rebuild.c Re-Indexing a Data File (commands 'BK', 'DL')
The extended version of FATS contains the following additional test programs:
tst2_eng.c Introduction to the Matchcode Functions mcsort.c Use of the key-flag with command 'MC' reindex.c Fast Re-Indexing with the command 'XB'
© 2008 GCS Software, Udo Gertz