kopia lustrzana https://gitlab.com/sane-project/website
				
				
				
			
		
			
				
	
	
		
			78 wiersze
		
	
	
		
			3.6 KiB
		
	
	
	
		
			HTML
		
	
	
			
		
		
	
	
			78 wiersze
		
	
	
		
			3.6 KiB
		
	
	
	
		
			HTML
		
	
	
| <html><body>
 | |
| <a href="doc011.html"><img src=../icons/next.gif alt="Next"></a>
 | |
| <a href="doc000.html"><img src=../icons/up.gif alt="Up"></a>
 | |
| <a href="doc009.html"><img src=../icons/previous.gif alt="Previous"></a>
 | |
| <a href="doc000.html"><img src=../icons/contents.gif alt="Contents"></a>
 | |
| <a href="doc019.html"><img src=../icons/index.gif alt="Index"></a>
 | |
| <hr>
 | |
| 
 | |
| <title>Version Control</title>
 | |
| <h2><a name="s4.1">4.1 Version Control</a></h2>
 | |
| 
 | |
| <p>The SANE standard is expected to evolve over time.  Whenever a change
 | |
| to the SANE standard is made that may render an existing frontend or
 | |
| backend incompatible with the new standard, the major version number
 | |
| must be increased.  Thus, any frontend/backend pair is compatible
 | |
| provided the major version number of the SANE standard they implement
 | |
| is the same.  A frontend may implement backwards compatiblity by
 | |
| allowing major numbers that are smaller than the expected major number
 | |
| (provided the frontend really can cope with the older version).  In
 | |
| contrast, a backend always provides support for one and only one
 | |
| version of the standard.  If a specific application does require that
 | |
| two different versions of the same backend are accessible at the same
 | |
| time, it is possible to do so by installing the two versions under
 | |
| different names.
 | |
| 
 | |
| <p>SANE version control also includes a minor version number and a build
 | |
| revision.  While control of these numbers remains with the implementor
 | |
| of a backend, the recommended use is as follows.  The minor version is
 | |
| incremented with each official release of a backend.  The build
 | |
| revision is increased with each build of a backend.
 | |
| 
 | |
| <p>The SANE API provides the following five macros to manage version
 | |
| numbers.
 | |
| <blockquote>
 | |
|   <dl>
 | |
|   <dt><tt>SANE_CURRENT_MAJOR<a name="i6"></tt>:<dd> The value of this macro is the
 | |
|     number of the SANE standard that the interface implements.
 | |
| 
 | |
| <p>  <dt><tt>SANE_VERSION_CODE<a name="i7">(<i>maj</i>,<i>min</i>,<i>bld</i>)</tt>:<dd>
 | |
|     
 | |
|     This macro can be used to build a monotonically increasing version
 | |
|     code.  A SANE version code consists of the SANE standard major
 | |
|     version number (<i>maj</i>), the minor version number <i>min</i>,
 | |
|     and the build revision of a backend (<i>bld</i>).  The major and
 | |
|     minor version numbers must be in the range 0...255 and the
 | |
|     build revision must be in the range 0...65535.
 | |
| 
 | |
| <p>    Version codes are monotonic in the sense that it is possible to
 | |
|     apply relational operators (e.g., equality or less-than test)
 | |
|     directly on the version code rather than individually on the three
 | |
|     components of the version code.
 | |
| 
 | |
| <p>    Note that the major version number alone determines whether a
 | |
|     frontend/backend pair is compatible.  The minor version and the
 | |
|     build revision are used for informational and bug-fixing purposes
 | |
|     only.
 | |
|   
 | |
|   <dt><tt>SANE_VERSION_MAJOR<a name="i8">(<i>vc</i>)</tt>:<dd> This macro returns the
 | |
|     major version number component of the version code passed in
 | |
|     argument <i>vc</i>.
 | |
|   <dt><tt>SANE_VERSION_MINOR(<i>vc</i>)</tt>:<dd> This macro returns the
 | |
|     minor version number component of the version code passed in
 | |
|     argument <i>vc</i>.
 | |
|   <dt><tt>SANE_VERSION_BUILD(<i>vc</i>)</tt>:<dd> This macro returns the
 | |
|     build revision component of the version code passed in argument
 | |
|     <i>vc</i>.
 | |
|   </dl>
 | |
| </blockquote>
 | |
| 
 | |
| <p><p><hr>
 | |
| <a href="doc011.html"><img src=../icons/next.gif alt="Next"></a>
 | |
| <a href="doc000.html"><img src=../icons/up.gif alt="Up"></a>
 | |
| <a href="doc009.html"><img src=../icons/previous.gif alt="Previous"></a>
 | |
| <a href="doc000.html"><img src=../icons/contents.gif alt="Contents"></a>
 | |
| <a href="doc019.html"><img src=../icons/index.gif alt="Index"></a>
 | |
| <hr>
 | |
| </body></html>
 |