void * realloc(
void * blockPtr, /* address of memory to resize */
size_t newSize); /* New size of memory in bytes */
The
malloc()
family of routines is provided for Standard C compatibility. If a geode needs a small amount of fixed memory, it can call one of the routines. The kernel will allocate a fixed block to satisfy the geode's
malloc()
requests; it will allocate memory from this block. When the block is filled, it will allocate another fixed malloc-block. When all the memory in the block is freed, the memory manager will automatically free the block.
If a geode needs to change the size of a section of memory assigned to it by the
malloc()
family of routines, it should use
realloc()
.
realloc()
resizes the piece of memory specified and returns the memory's new base address.
If the new size is smaller then the previous size, bytes will be cut off from the end. The request is guaranteed to succeed. Furthermore, the memory will not be moved; the address returned will be the same as the address passed.
If the new size is larger than the previous size,
realloc()
may move the data to accommodate the request. If so, it will return the new address. The new memory added will
not
be zero-initialized. If
realloc()
cannot fulfill the request, it will return a null pointer, and the memory will not be altered.
Resizing a stretch of memory down to zero bytes is exactly the same as freeing it with
free()
. If you pass a null address to
realloc()
, it will allocate the memory the same way
malloc()
does.
The memory must be in a malloc-block assigned to the geode calling
realloc()
. If you want to resize memory in another geode's malloc-block, call
GeoReAlloc()
.
Warnings: Pass exactly the same address as the one returned to you when you allocated the memory. If you pass a different address, the results are undefined.
See Also: calloc(),
free(),
malloc(),
GeoReAlloc().
BooleanRecentContactsEraseStack(
RecentContactsType rcType);
This function erases all log entries of a certain type from the log. It returns zero if there was no error, non-zero otherwise. Pass one of RC_SENT_CALLS, RC_RECEIVED_CALLS, RC_MISSED_CALLS, RC_SENT_FAXES, RC_RECEIVED_FAXES, RC_SENT_SMS, or RC_RECEIVED_SMS.
Include: contlog.goh
word RecentContactsGetCount(
RecentContactsType rcType);
This function returns the number of contacts of some type that have been made recently. Pass one of RC_SENT_CALLS, RC_RECEIVED_CALLS, RC_MISSED_CALLS, RC_SENT_FAXES, RC_RECEIVED_FAXES, RC_SENT_SMS, or RC_RECEIVED_SMS.
Include: contlog.goh
word RecentContactsGetEntry(
RecentContactsType rcType,
int item,
LogEntry *buffer);
This function retrieves the entry log for a call. The call is identified by its call type and an index number. The call type is one of RC_SENT_CALLS, RC_RECEIVED_CALLS, RC_MISSED_CALLS, RC_SENT_FAXES, RC_RECEIVED_FAXES, RC_SENT_SMS, or RC_RECEIVED_SMS. The index number should be at least zero and less than the number returned by
RecentContactsGetCount()
. The function fills in the passed
LogEntry
buffer with the entry's information. If there was an error, the function returns non-zero; otherwise, it returns zero.
Include: contlog.goh
word RecentContactsResetMissedCallsTotalCount();
This function returns the number of calls missed since the last time
RecentContactsGetMissedCallsTotalCount()
was called.
Include: contlog.goh
word RecentContactsGetNewCount(
RecentContactsType rcType);
This function returns the number of contacts logged since the last time
RecentContactsResetNewCount()
was called.
Include: contlog.goh
voidRecentContactsResetMissedCallTotalsCount( );
This function resets the number of missed calls as used by the
RecentContactsGetMissedCallsTotalCount()
function.
Include: contlog.goh
voidRecentContactsResetNewCount(
RecentContactsType rcType);
This function resets the number of "new" contacts logged as used by the
RecentContactsGetNewCount()
function.
Include: contlog.goh
PDAHardwareInfo RespGetPDAHardwareInfo(void);
This routine gets information about the current PDA hardware, specifically the type of PDA and whether or not it has a backlight. Use the following bit masks to extract the desired information from the PDAHardwareInfo bitfield:
typedef ByteFlags PDAHardwareInfo; /* 5 bits unused */ #define PDAHI_BACKLIGHT_AVAILABLE (0x04) #define PDAHI_PDA_TYPE (0x02 | 0x01) /* PDAType */
The PDAType is enumerated as:
typedef ByteEnum PDAType; #define PDAT_PC_EMULATOR 0x0 #define PDAT_N9000 0x1 #define PDAT_N9000i 0x2
This routine is only available on builds 4 or newer of the Nokia 9000i Communicator (see Versions for more information).
Include: respondr.goh
StreamError SerialClose(
GeodeHandle driver,
SerialUnit unit,
Boolean linger);
Close the stream to a serial port.
StreamError SerialClose(
GeodeHandle driver,
SerialUnit unit,
Boolean linger);
Close the stream to a serial port, without actually resetting the port.
StreamError SerialFlush(
GeodeHandle driver,
SerialUnit unit,
StreamRoles roles);
Flush all data pending in a serial port's input or output buffer (depending on the value of
roles
).
StreamError SerialGetError (
Handle driver,
SerialUnit unit,
StreamRoles roles,
SerialError * errorCode);
This routine returns error information pertaining to the last call to a serial driver. The
SerialError
codes returned may contain serial-driver-specific error codes not defined in the
SerialError
enumerated type.
GEOS SDK TechDocs
|
|
qsort ...
|
SerialGetFormat() ...