extern void _pascal qsort(
void *array,
word count,
word elementSize,
PCB(int, compare, (const void *, const void *)));
This is a standard quicksort routine. The callback routine must be decared _pascal.
EventHandle QueueGetMessage(
QueueHandle qh); /* queue to query */
This routine returns the next message on the given queue, blocking if the queue is empty. When a new message is added to the empty queue, this routine will unblock the thread and return the message. This routine is used almost exclusively by the kernel.
Include: geode.h
void QueuePostMessage(
QueueHandle qh, /* queue to add event to */
EventHandle event, /* event to be added to queue */
MessageFlags flags); /* MF_INSERT_AT_FRONT or zero */
This routine adds the specified
event
to the passed
queue
. The only valid flag for this routine is MF_INSERT_AT_FRONT, which will put the event in the first spot of the queue.
Include: geode.h
Boolean RangeEnum(
CellFunctionParameters * cfp, /* cell function parameters */
RangeEnumParams * params); /* special other parameters */
This routine calls a callback routine for each cell in a specified range. This routine is passed pointers to two structures, both of which are shown below. It returns false if all the cells were processed, true if any of the cells caused the routine to abort before the end of the range was reached.
Callback Parameters:
The callback routine, which must be declared _pascal, receives a
RangeEnumCallbackParams
structure, which has the following definition:
typedef struct {
RangeEnumParams *RECP_params; /* see below */
/* current row, column, and cell data of cell */
word RECP_row;
word RECP_column;
word RECP_cellData;
} RangeEnumCallbackParams;
The callback routine can do anything with the cell information. It should return
false
after successfully processing the cell; if an error occurs, or if it wants to abort the
RangeEnum()
, it should return
true
.
Include: cell.h
Boolean RangeExists( /* returns non-zero if there are cells in range */
CellFunctionParameters * cfp, /* see RangeEnum() */
word firstRow, /* range delimiters */
byte firstColumn,
word lastRow,
byte lastColumn);
This routine returns
true
if there are any cells in the specified range. It is passed a pointer to the
CellFunctionParameters
structure for the cell file, as well as the indices of the first and last row, and the first and last column, of the range to check.
Include: cell.h
void RangeInsert(
CellFunctionParameters * cfp, /* see RangeEnum() */
RangeInsertParams * rep); /* parameters structure */
This routine shifts existing cells to make room for new ones. (It does not actually create new cells.) Which cells are shifted, and in what direction, is specified by the
RangeInsertParams
structure:
RIP_bounds
Rectangle
structure which specifies which cells should be shifted. The cells currently in this range will be shifted across or down, depending on the value of
RIP_delta
; the shifted cells displace more cells, and so on, to the edge of the visible portion of the cell file. To insert an entire row (which is much faster than inserting a partial row), set RIP
_bounds.
R
_left
= 0 and RIP
_bounds.
R
_right =
LARGEST_COLUMN
.
RIP_delta
Point
structure which specifies how far the cells should be shifted and in which direction. If the range of cells is to be shifted horizontally,
RIP_delta.
P
_x
should specify how far the cells should be shifted over, and
RIP_delta.
P
_y
should be zero. If the cells are to be shifted vertically,
RIP_delta.
P
_y
should specify how far the cells should be shifted over, and
RIP_delta.
P
_x
should be zero.
RIP_cfp
CellFunctionParameters
structure. You don't have to initialize this; the routine will do so automatically.Include: cell.h
Warnings: If cells are shifted off the "visible" portion of the cell file, you will be unable to access them by row or column numbers; but they will not be deleted. For this reason, you should free all such cells
before
calling
RangeInsert()
. (You can find out if there are any cells at the edges by calling
RangeExists()
.) For an explanation of the "visible" and "scratch-pad" portions of a cell file, see the Cell library documentation.
GEOS SDK TechDocs
|
|
PCCOMABORT() ...
|
realloc() ...