Functions | |
bool | isTAG (SatAddr src) |
is the object at src a TAG? | |
SatAddr | TAGencode (const char *tag, SatAddr obj, SatAddr dst) |
Make a tagged object. | |
int | TAGnumChars (SatAddr src) |
Return the number of tag characters in a TAG object. | |
bool | TAGdecode (SatAddr src, char *tag, SatAddr *obj) |
Decode a TAG object. | |
SatAddr | makeTAG (int nibbles) |
Create an empty tag object with "nibbles" space. | |
int | TAGnibbles (SatAddr src) |
Return the size in nibbles of the TAG at src. |
bool isTAG | ( | SatAddr | src | ) |
is the object at src a TAG?
src | Saturn address of an object |
SatAddr makeTAG | ( | int | nibbles | ) |
Create an empty tag object with "nibbles" space.
This isn't very useful since you need to populate the tag object with something. Use TAGencode() instead. This function is included for consistency with other objects.
nibbles | The number of nibbles in the TAG object |
Decode a TAG object.
src | The Saturn address of a TAG object | |
tag | If non-null, then the tag will be stored here as a null-terminated string. In this case tag must point to sufficient space to store it. 256 characters is enough, or you can create a buf with TAGnumChars(src)+1 bytes. | |
obj | If non-null, then the address of the object within the TAG will be written here. |
Make a tagged object.
tag | A null-terminated string that is the tag. | |
obj | The Saturn address of the object to be tagged | |
dst | The Saturn address where the TAG should be stored. If dst is zero (the expected case) then space is allocated for the TAG. Otherwise dst must point to sufficient space for the TAG. |
int TAGnibbles | ( | SatAddr | src | ) |
Return the size in nibbles of the TAG at src.
src | the Saturn address of a TAG object |
int TAGnumChars | ( | SatAddr | src | ) |
Return the number of tag characters in a TAG object.
src | the Saturn address of a TAG object |