a0NewMapFormat()

Creates a new map format.


Syntax

a0tError a0NewMapFormat(
a0tFormat *newform,
unsigned long extent,
int count,
a0tMapField *fields );

Arguments

Namerd/wrDescription
newform write Format descriptor to set up.
extent read Extent in memory of data structure.
count read Number of fields of the new format.
fields read Array of fields of the new format.

Description

This function composes a new format descriptor. It builds a format of type A0Map to describe a certain data structure, which has count fields in it. The array fields contains all the fields of the data structure being represented. extent is the size in memory of an allocated structure. It is used to compute the memory displacement when accessing consecutive structures in memory.

On return of this function, the variable pointed by newform contains a format descriptor to the new format created.


Return Values

If an error condition occurs, it returns the error code, otherwise it returns A0ErrOk. Possible values are as follows:
Error CodeDescription
A0ErrNoMem There is no memory to allocate new format.
A0ErrInvFormat The base format has an invalid type.
A0ErrNotImplem The new format has an unimplemented type.
A0ErrOkSuccessful completion.

See Also

a0UseFormats() a0NewFunctionFormat() a0DisposeFormat() a0FPack() a0FUnpack() a0FSend() a0FReceive() a0FPut() a0FGet() a0IFSend() a0IFReceive() a0IFPut() a0IFGet()