babl r318 - in trunk: . babl



Author: jheller
Date: Tue Jun  3 12:12:36 2008
New Revision: 318
URL: http://svn.gnome.org/viewvc/babl?rev=318&view=rev

Log:
2008-06-03  Jan Heller  <jheller svn gnome org>

        Added babl_get_version () to the public API.

        * babl/Makefile.am: Added babl-version.h to library_include_HEADERS.
        * babl/babl-version.h.in: Added macros to expand to babl version
        information.
        * babl/babl.c (babl_get_version): Implemented.
        * babl/babl.h: Include babl-version.h, declare babl_get_version ().
        * configure.ac: Added babl-version.h to AC_CONFIG_FILES.


Modified:
   trunk/ChangeLog
   trunk/babl/Makefile.am
   trunk/babl/babl.c
   trunk/babl/babl.h
   trunk/configure.ac

Modified: trunk/babl/Makefile.am
==============================================================================
--- trunk/babl/Makefile.am	(original)
+++ trunk/babl/Makefile.am	Tue Jun  3 12:12:36 2008
@@ -54,7 +54,8 @@
 	babl-image.h			\
 	babl-model.h			\
 	babl-sampling.h 		\
-	babl-type.h
+	babl-type.h                     \
+	babl-version.h
 
 INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/babl/base
 

Modified: trunk/babl/babl.c
==============================================================================
--- trunk/babl/babl.c	(original)
+++ trunk/babl/babl.c	Tue Jun  3 12:12:36 2008
@@ -74,3 +74,18 @@
       babl_memory_sanity ();
     }
 }
+
+void     
+babl_get_version (int *major,   
+                  int *minor,   
+                  int *micro)   
+{       
+  if (major != NULL)    
+    *major = BABL_MAJOR_VERSION;        
+                 
+  if (minor != NULL)    
+    *minor = BABL_MINOR_VERSION;        
+                 
+  if (micro != NULL)    
+    *micro = BABL_MICRO_VERSION;        
+}

Modified: trunk/babl/babl.h
==============================================================================
--- trunk/babl/babl.h	(original)
+++ trunk/babl/babl.h	Tue Jun  3 12:12:36 2008
@@ -81,6 +81,11 @@
  */
 void   babl_destroy    (void);
 
+/** Get the version information on the babl library */
+void   babl_get_version (int *major,
+                         int *minor,
+                         int *micro);
+
 #if     __GNUC__ >= 4
 #define BABL_ARG_NULL_TERMINATED __attribute__((__sentinel__))
 #else
@@ -141,6 +146,7 @@
 
 void         babl_introspect (Babl       *babl); /* introspect a given BablObject     */
 
+#include "babl-version.h"
 #include "babl-type.h"
 #include "babl-sampling.h"
 #include "babl-component.h"

Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac	(original)
+++ trunk/configure.ac	Tue Jun  3 12:12:36 2008
@@ -386,6 +386,7 @@
 Makefile
 babl.pc
 babl/Makefile
+babl/babl-version.h
 babl/base/Makefile
 docs/Makefile
 docs/index-static.html



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]