home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / gutenprint / gutenprint-version.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-03-15  |  2.9 KB  |  91 lines

  1. /*        -*- Mode: C -*-
  2.  *  $Id: gutenprint-version.h.in,v 1.1 2004/09/17 18:38:01 rleigh Exp $
  3.  *
  4.  *   Version of Gimp-print
  5.  *
  6.  *   Copyright 2002 Robert Krawitz (rlk@alum.mit.edu)
  7.  *
  8.  *   This program is free software; you can redistribute it and/or modify it
  9.  *   under the terms of the GNU General Public License as published by the Free
  10.  *   Software Foundation; either version 2 of the License, or (at your option)
  11.  *   any later version.
  12.  *
  13.  *   This program is distributed in the hope that it will be useful, but
  14.  *   WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  15.  *   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  16.  *   for more details.
  17.  *
  18.  *   You should have received a copy of the GNU General Public License
  19.  *   along with this program; if not, write to the Free Software
  20.  *   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  21.  *
  22.  * Revision History:
  23.  *
  24.  *   See ChangeLog
  25.  */
  26.  
  27. /**
  28.  * @file gutenprint-version.h
  29.  * @brief Version functions.
  30.  */
  31.  
  32. #ifndef GUTENPRINT_VERSION_H
  33. #define GUTENPRINT_VERSION_H
  34.  
  35. /**
  36.  * Version information.  Version information may be used to check the
  37.  * library version at compile-time, using macros, or at run-time,
  38.  * using constants.
  39.  *
  40.  * @defgroup version version
  41.  * @{
  42.  */
  43.  
  44.  
  45. /*
  46.  * Autogen-time versioning.
  47.  */
  48. #define STP_MAJOR_VERSION       (5)
  49. #define STP_MINOR_VERSION       (0)
  50. #define STP_MICRO_VERSION       (2)
  51. #define STP_CURRENT_INTERFACE   (2)
  52. #define STP_BINARY_AGE          (0)
  53. #define STP_INTERFACE_AGE       (0)
  54.  
  55. #define STP_CHECK_VERSION(major,minor,micro)    \
  56.   (STP_MAJOR_VERSION >  (major) ||        \
  57.   (STP_MAJOR_VERSION == (major) &&        \
  58.    STP_MINOR_VERSION > (minor)) ||        \
  59.   (STP_MAJOR_VERSION == (major) &&        \
  60.    STP_MINOR_VERSION == (minor) &&        \
  61.    STP_MICRO_VERSION >= (micro)))
  62.  
  63. /** The library major version number. */
  64. extern const unsigned int stp_major_version;
  65. /** The library minor version number. */
  66. extern const unsigned int stp_minor_version;
  67. /** The library micro version number. */
  68. extern const unsigned int stp_micro_version;
  69. /** The library ABI revision number (number of incompatible revisions). */
  70. extern const unsigned int stp_current_interface;
  71. /** The library ABI binary age number (number of forward-compatible revisions). */
  72. extern const unsigned int stp_binary_age;
  73. /** The library ABI interface age number (number of revisions of this ABI). */
  74. extern const unsigned int stp_interface_age;
  75.  
  76. /**
  77.  * Check whether the library provides the requested version.
  78.  * @param required_major the minimum major revision.
  79.  * @param required_minor the minimum minor revision.
  80.  * @param required_micro the minimum micro revision.
  81.  * @returns NULL if the version matches, or else a description of the
  82.  * error if the library is too old or too new.
  83.  */
  84. extern const char *stp_check_version(unsigned int required_major,
  85.                      unsigned int required_minor,
  86.                      unsigned int required_micro);
  87.  
  88.   /** @} */
  89.  
  90. #endif /* GUTENPRINT_VERSION_H */
  91.