int AG_ReadVersion (AG_DataSource *ds, const char *magic, const AG_Version *ver, AG_Version *rver)
void AG_WriteVersion (AG_DataSource *ds, const char *magic, const AG_Version *ver)
int AG_ReadObjectVersion (AG_DataSource *ds, AG_Object *obj)
void AG_WriteObjectVersion (AG_DataSource *ds, const AG_Object *obj)
|
The
AG_ReadVersion() function reads version information from
fd and returns 0 if the following data is binary compatible against the version
represented by
ver, or -1 if the data is not compatible.
If
rver is not NULL, it is initialized with the version information read from
fd.
The
AG_WriteVersion() function writes version information from the structure
ver to
ds.
The
AG_ReadObjectVersion() and
AG_WriteObjectVersion() variants use the version information contained in the
AG_ObjectClass structure of
AG_Object(3), using the name of the object class as a signature.
|