Dec 112017
CSAP is a program to sort directories in any of three orders and to write out the sorted directory. Includes C source code.
File CSAP310.ZIP from The Programmer’s Corner in
Category File Managers
CSAP is a program to sort directories in any of three orders and to write out the sorted directory. Includes C source code.
File Name File Size Zip Size Zip Type
CSAP.C 17544 5707 deflated
CSAP.DOC 8389 2974 deflated
CSAP.EXE 19892 11573 deflated
DOSSTRUC.H 3801 1098 deflated
GETDPB.C 774 461 deflated
ISDEV.C 866 458 deflated
MAKEFILE 652 229 deflated
READ.ME 4902 2202 deflated
SORTDIR.C 10359 2998 deflated
UZ.BAT 28 28 stored
ZIPLST 119 89 deflated

Download File CSAP310.ZIP Here

Contents of the READ.ME file

CSAP - Sort And Pack Directories [C source]

Author: Don A. Williams

Version: 3.1.0 Date: July 11, 1990

Repaired a rather major problem with the '-t', Truncate
Directories, option and empty directories. If there was a
directory consisting of nothing but erased files and CSAP was
executed WITHOUT the '-t' option and, later, CSAP was executed
WITH the '-t' option, many bad things including corruption of the
disk could occur!
Also corrected the count of freed clusters which was one too high
and added a count of the freed bytes to the message.

Version: 3.0.2 Date: June 20, 1990

Since the absread() and abswrite() functions provided with
version 1.0 of Borland International's Turbo C++ support the long
sector addresses required by partitions larger than 32 meg, the
special routines used by CSAP are no longer needed and have been
removed. The GetDPB() function was recoded to eliminate assembly
language at the same time.
Added a message showing the number of clusters freed by the
"Truncate Directories" option, '-t', and fixed a small bug in the
truncation routine.

Version: 3.0.1 Date: June 18, 1990

Version 3.0.1 of CSAP is nothing more than a recompilation of
CSAP using Turbo C++ 1.0. It is slightly smaller and slightly
faster than CSAP 3.0.0.

Version: 3.0.0 Date: May 11, 1990

Version 3.0.0 of CSAP can handle MS-DOS 4.xx and DR DOS 3.xx
large partitions. It also introduces the optional ability to
truncate directories, i.e. release unused directory disk space
back to the free space pool. CSAP now uses Chris Blum's Absolute
Disk I/O modifications but only the OBJ file for the Compact
model in included in the CSAP ZIP. The entire package is
available on CompuServ in IBMPRO Library #3 as ABRD40.ARC.
Version 3.0.0 of CSAP MUST be regarded as a "beta test" version -
there are now many different possible configurations and I have
not been able to test them all. It has been tested with MS-DOS
3.3 on the small partitions that 3.3 can handle and with MS-DOS
4.01 and DR DOS 3.41 on small partitions and on large partitions
up to 70 meg. I would highly recommend that you take a full save
of your hard disk before using CSAP 3.0.0 until you are sure that
it works with your particular setup.

Version 2.1.1 of CSAP corrects the incorrect sorting on Date/Time
that was reintroduced in CSAP 2.0.9 and later versions. Thanks
to David Klatzco for reporting it.

Version 2.1.0 of CSAP corrects the handling of the '.' and '..'
directory specifiers and adds the documentation of the '-V'
option to CSAP.DOC (the '-V' has been operative in the program
for some time but was left out of the documentation.)

CSAP is composed of 5 modules; CSAP.C, SORTDIR.C, ISDEV.C.C,
GETDPB.C, and ABSREAD.OBJ. The current version of CSAP, CSAP
3.0.0, has been designed for compilation with Borland
International's Turbo C 2.0. The module ISDEV.C could be
replaced by Turbo C's supplied function isatty(), however, I plan
to extend ISDEV.C to distinguish among files, CON, AUX, and the
printer. The function isatty() just distinguishes between files
and the others.

GETDPB.C cannot be compiled in Turbo C's interactive environment
(TC). It is primarily inline ASM code and requires the more
conventional environment provided by Turbo C's TCC command. As a
result, CSAP was designed to be compiled through the use of a
MAKEFILE and the MAKE facility of Turbo C.

CSAP currently compiles and executes correctly in any of Turbo
C's supported memory models except HUGE. The memory model is
defined as a macro in the MAKEFILE and is supplied on the MAKE
command line, i.e.:


to make a SMALL memory model version of CSAP (the "s" must be
lower case since it is a parameter to TCC and TCC is case
sensitive on its parameters). The resultant EXE file will be
named CSAPx.EXE where 'x' is C, S, M, or L depending upon the
memory model selected. The default memory model (if -DMDL is not
specified on the MAKE command) is the COMPACT model. The current
MAKEFILE will NOT work properly for the TINY memory model, the
library specifications in the MAKEFILE would have to be modified
to use the SMALL libraries for the TINY model and the effort is
probably not worth it. The command:

TCC -mt -G csap sortdir isdevice getdpb

would have to be used to produce a TINY memory model version of
CSAP and would produce an EXE file with the name CSAP.EXE.

The EXE and OBJ files in the CSAPxxx ZIP have been produced for
the COMPACT model which is probably the most general.

 December 11, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>