FreeBSD Manual Pages
AG_VERSION(3) BSD Library Functions Manual AG_VERSION(3) NAME AG_Version -- agar data file versioning SYNOPSIS #include <agar/core.h> DESCRIPTION The agar AG_Version interface encodes or decodes versioning information. This includes a magic string and two 32-bit version numbers: typedef struct ag_version { Uint32 major, minor; } AG_Version; The major is incremented whenever a change introduces binary incompati- bility with previous versions of the data files. The minor member is incremented whenever a change is made in the data file, but binary compatibility is preserved. Major changes that would otherwise break binary compatibility can be dealt with by increasing only the minor version number and adding compat- ibility code in the loader routine. VERSIONING 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 re- turns 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 struc- ture 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. SEE ALSO AG_DataSource(3), AG_Intro(3) HISTORY The AG_Version interface first appeared in Agar 1.0 BSD August 23, 2002 BSD
NAME | SYNOPSIS | DESCRIPTION | VERSIONING | SEE ALSO | HISTORY
Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=AG_Version&sektion=3&manpath=FreeBSD+13.0-RELEASE+and+Ports>