b) Add parameter names to declarations of TempSpace methods. It make sources much more readable, i believe, and allow IntelliSense to make useful hints
c) Reworked sort module to use more memory for merge buffers. It significantly increased speed of large sorts. Memory mostly reused from TempSpace memory blocks
2) Reworked error handling in SORT and its callers.
3) Replaced DLS+SortMem with the generic TempSpace class.
4) Replaced GDS temp file management with the TempFile class.
5) Various cleanup.