home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
pmos2002.zip
/
DEF
/
FILESORT.DEF
< prev
next >
Wrap
Text File
|
1996-10-02
|
1KB
|
36 lines
DEFINITION MODULE FileSort;
(********************************************************)
(* *)
(* In-place file sort using the QuickSort method *)
(* *)
(* Programmer: P. Moylan *)
(* Last edited: 2 October 1996 *)
(* Status: Porting to XDS *)
(* *)
(********************************************************)
FROM SYSTEM IMPORT
(* type *) ADDRESS;
FROM QuickSortModule IMPORT
(* type *) CompareProc;
FROM Files IMPORT
(* type *) File;
TYPE
RecordNumber = CARDINAL;
PROCEDURE InplaceSort (f: File; from, to: RecordNumber;
EltSize, offset: CARDINAL; GE: CompareProc);
(* In-place sort of part of a file. We sort record numbers *)
(* from..to inclusive. EltSize is the element size; offset is the *)
(* number of bytes (zero, in most cases) before record number 0 in *)
(* the file; and GE is a user-supplied function to compare elements *)
(* at two specified addresses. *)
END FileSort.