Main Page | Modules | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

print-version.c

Go to the documentation of this file.
00001 /*
00002  * "$Id: print-version.c,v 1.7 2004/09/17 18:38:26 rleigh Exp $"
00003  *
00004  *   Print plug-in driver utility functions for the GIMP.
00005  *
00006  *   Copyright 1997-2000 Michael Sweet (mike@easysw.com) and
00007  *      Robert Krawitz (rlk@alum.mit.edu)
00008  *
00009  *   This program is free software; you can redistribute it and/or modify it
00010  *   under the terms of the GNU General Public License as published by the Free
00011  *   Software Foundation; either version 2 of the License, or (at your option)
00012  *   any later version.
00013  *
00014  *   This program is distributed in the hope that it will be useful, but
00015  *   WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
00016  *   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00017  *   for more details.
00018  *
00019  *   You should have received a copy of the GNU General Public License
00020  *   along with this program; if not, write to the Free Software
00021  *   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00022  */
00023 
00024 /*
00025  * This file must include only standard C header files.  The core code must
00026  * compile on generic platforms that don't support glib, gimp, etc.
00027  */
00028 
00029 
00030 #ifdef HAVE_CONFIG_H
00031 #include <config.h>
00032 #endif
00033 #include <gutenprint/gutenprint.h>
00034 #include "gutenprint-internal.h"
00035 #include <gutenprint/gutenprint-intl-internal.h>
00036 
00037 const unsigned int stp_major_version = STP_MAJOR_VERSION;
00038 const unsigned int stp_minor_version = STP_MINOR_VERSION;
00039 const unsigned int stp_micro_version = STP_MICRO_VERSION;
00040 const unsigned int stp_current_interface = STP_CURRENT_INTERFACE;
00041 const unsigned int stp_binary_age = STP_BINARY_AGE;
00042 const unsigned int stp_interface_age = STP_INTERFACE_AGE;
00043 
00044 
00045 const char *
00046 stp_check_version (unsigned int required_major,
00047                    unsigned int required_minor, unsigned int required_micro)
00048 {
00049   if (required_major > STP_MAJOR_VERSION)
00050     return "Gutenprint version too old (major mismatch)";
00051   if (required_major < STP_MAJOR_VERSION)
00052     return "Gutenprint version too new (major mismatch)";
00053   if (required_minor > STP_MINOR_VERSION)
00054     return "Gutenprint version too old (minor mismatch)";
00055   if (required_minor < STP_MINOR_VERSION)
00056     return "Gutenprint version too new (minor mismatch)";
00057   if (required_micro < STP_MICRO_VERSION - STP_BINARY_AGE)
00058     return "Gutenprint version too new (micro mismatch)";
00059   if (required_micro > STP_MICRO_VERSION)
00060     return "Gutenprint version too old (micro mismatch)";
00061   return NULL;
00062 }

Generated on Thu Feb 10 19:29:31 2005 for libgutenprint API Reference by  doxygen 1.4.1