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

src/main/print-version.c

Go to the documentation of this file.
00001 /*
00002  * "$Id: print-version.c,v 1.6 2001/09/08 17:13:48 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, gimpprint, etc.
00027  */
00028 
00029 
00030 #ifdef HAVE_CONFIG_H
00031 #include <config.h>
00032 #endif
00033 #include <gimp-print/gimp-print.h>
00034 #include "gimp-print-internal.h"
00035 #include <gimp-print/gimp-print-intl-internal.h>
00036 
00037 const unsigned int gimpprint_major_version = GIMPPRINT_MAJOR_VERSION;
00038 const unsigned int gimpprint_minor_version = GIMPPRINT_MINOR_VERSION;
00039 const unsigned int gimpprint_micro_version = GIMPPRINT_MICRO_VERSION;
00040 const unsigned int gimpprint_current_interface = GIMPPRINT_CURRENT_INTERFACE;
00041 const unsigned int gimpprint_binary_age = GIMPPRINT_BINARY_AGE;
00042 const unsigned int gimpprint_interface_age = GIMPPRINT_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 > GIMPPRINT_MAJOR_VERSION)
00050     return "gimpprint version too old (major mismatch)";
00051   if (required_major < GIMPPRINT_MAJOR_VERSION)
00052     return "gimpprint version too new (major mismatch)";
00053   if (required_minor > GIMPPRINT_MINOR_VERSION)
00054     return "gimpprint version too old (minor mismatch)";
00055   if (required_minor < GIMPPRINT_MINOR_VERSION)
00056     return "gimpprint version too new (minor mismatch)";
00057   if (required_micro < GIMPPRINT_MICRO_VERSION - GIMPPRINT_BINARY_AGE)
00058     return "gimpprint version too new (micro mismatch)";
00059   if (required_micro > GIMPPRINT_MICRO_VERSION)
00060     return "gimpprint version too old (micro mismatch)";
00061   return NULL;
00062 }

Generated on Wed Aug 25 07:56:14 2004 for libgimpprint API Reference by doxygen 1.3.6