COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

	Copyright (c) GeoWorks 1992 -- All Rights Reserved

PROJECT:	PC GEOS	
MODULE:		
FILE:		chunkut.def

AUTHOR:		Lea Fester, Dec  2, 1992

MACROS:
	Name			Description
	----			-----------

REVISION HISTORY:
	Name	Date		Description
	----	----		-----------
	leaf	12/ 2/92   	Initial revision


DESCRIPTION:
	
		
	$Id: chunkut.def,v 1.1 97/04/04 14:25:08 newdeal Exp $

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
;	Merged arrays
; 
; A merged array is the merger of two or more chunk arrays.  A merged array
; preserves the structure of a chunkarray (i.e. ChunkArrayMerge maps 
; ChunkArray x ChunkArray x ChunkArray... -> ChunkArray) while simultaneously
; capturing all the information from each original single chunk array.
; 
; The Merge Array's element set just contains all the elements from each
; of the original chunk arrays.  These are appended in no specified order -
; since a MergeArray is also a ChunkArray, the user can create a MergeArray
; and subsequently sort it as desired.
; The merged array header is laid out as follows:
; first, a word containing the number of arrays that were merged to form
; this array.  Then, n copies of a MergeArrayHeader structure, where n is
; that number of original arrays.  A MergeArrayHeader structure has the
; following fields
;
MergeArrayHeader  struct
    MAH_arrayID	   		   optr
    MAH_originalHeaderOffset	   word
MergeArrayHeader  ends
;
; The arrayId is a field that identifies the original array.  The user can
; set this ID field by passing its value in a MergeArrayArg structure
; (defined below); if the user instead passes a zero in the MAA_arrayID.
; segment field, the Header's ID field is set to the chunk:handle of the
; original array.
; The originalHeaderOffset is an offset into the new merged array that
; specifies where a copy of the original chunk array's header can be found.
; In cases where the original array had no extra stuff in the header, this
; offset field is set to zero.
; After all the MergeArrayHeader structures come copies of all extra
; header stuff from the chunk arrays that were merged.
;
; The MergeArrayArg structure is defined as
;
MergeArrayArg	struct
    MAA_arrayRef  optr
    MAA_arrayID	  optr
MergeArrayArg	ends
;
; and is the structure passed to the ChunkArrayMerge routine.  The arrayRef
; field has the optr to the chunk array being merged, and the arrayID field
; has 4 bytes available for specifying some kind of identification for that
; chunk array.  As mentioned above, if the first word of that field is set
; to 0, the arrayRef is used as the ID field to be written into the merged
; array's header.


global ChunkArrayMerge:far
global ChunkArrayCopyRange:far

