fontconfig: Branch 'master'

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

 



 configure.in            |    6 +++---
 fontconfig/fontconfig.h |   13 +++++++++++++
 src/Makefile.am         |    5 +++--
 src/fccfg.c             |   16 ++++++++++++++++
 src/fcdeprecate.h       |   36 ++++++++++++++++++++++++++++++++++++
 src/fcint.h             |    1 +
 6 files changed, 72 insertions(+), 5 deletions(-)

New commits:
commit de1faa42d1425f80366707a730ea919c57e57b2f
Author: Keith Packard <keithp@xxxxxxxxxxxxxxx>
Date:   Sun Nov 4 12:20:45 2007 -0800

    Export FcConfig{G,S}etRescanInverval from .so, mark as deprecated.
    
    These two names are typos of the correct names. Instead of simply changing
    them, the correct thing to do is leave them in the library, add the correct
    functions and mark them as deprecated so any source packages will be updated.
    
    This requires bumping the minor version of the library (for adding APIs)
    instead of bumping the major version of the library (for removing APIs).

diff --git a/configure.in b/configure.in
index ff4057b..c431dcc 100644
--- a/configure.in
+++ b/configure.in
@@ -33,7 +33,7 @@ dnl This is the package version number, not the shared library
 dnl version.  This same version number must appear in fontconfig/fontconfig.h
 dnl Yes, it is a pain to synchronize version numbers.  Unfortunately, it's
 dnl not possible to extract the version number here from fontconfig.h
-AM_INIT_AUTOMAKE(fontconfig, 2.4.91)
+AM_INIT_AUTOMAKE(fontconfig, 2.4.92)
 AM_MAINTAINER_MODE
 
 dnl libtool versioning
@@ -41,11 +41,11 @@ dnl libtool versioning
 dnl bump revision when fixing bugs
 dnl bump current and age, reset revision to zero when adding APIs
 dnl bump current, leave age, reset revision to zero when changing/removing APIS
-LT_CURRENT=3
+LT_CURRENT=4
 LT_REVISION=0
 AC_SUBST(LT_CURRENT)
 AC_SUBST(LT_REVISION)
-LT_AGE=2
+LT_AGE=3
 
 LT_VERSION_INFO="$LT_CURRENT:$LT_REVISION:$LT_AGE"
 AC_SUBST(LT_VERSION_INFO)
diff --git a/fontconfig/fontconfig.h b/fontconfig/fontconfig.h
index f98599f..2340640 100644
--- a/fontconfig/fontconfig.h
+++ b/fontconfig/fontconfig.h
@@ -919,4 +919,17 @@ _FCFUNCPROTOEND
 
 #undef FC_ATTRIBUTE_SENTINEL
 
+
+#ifndef _FCINT_H_
+
+/*
+ * Deprecated functions are placed here to help users fix their code without
+ * digging through documentation
+ */
+ 
+#define FcConfigGetRescanInverval   FcConfigGetRescanInverval_REPLACE_BY_FcConfigGetRescanInterval
+#define FcConfigSetRescanInverval   FcConfigSetRescanInverval_REPLACE_BY_FcConfigSetRescanInterval
+
+#endif
+
 #endif /* _FONTCONFIG_H_ */
diff --git a/src/Makefile.am b/src/Makefile.am
index 2ff1f3c..a4bbc45 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -79,7 +79,7 @@ INCLUDES = 						\
 
 EXTRA_DIST = makealias
 
-noinst_HEADERS=fcint.h
+noinst_HEADERS=fcint.h fcdeprecate.h
 
 ALIAS_FILES = fcalias.h fcaliastail.h
 
@@ -124,7 +124,8 @@ uninstall-local: uninstall-ms-import-lib uninstall-libtool-import-lib
 
 PUBLIC_FILES = \
 	$(top_srcdir)/fontconfig/fontconfig.h \
-	$(top_srcdir)/fontconfig/fcfreetype.h
+	$(top_srcdir)/fontconfig/fcfreetype.h \
+	$(top_srcdir)/src/fcdeprecate.h
 	
 fcaliastail.h: fcalias.h
 
diff --git a/src/fccfg.c b/src/fccfg.c
index 7b2fad5..c73dc2a 100644
--- a/src/fccfg.c
+++ b/src/fccfg.c
@@ -535,6 +535,22 @@ FcConfigSetRescanInterval (FcConfig *config, int rescanInterval)
     return FcTrue;
 }
 
+/*
+ * A couple of typos escaped into the library
+ */
+int
+FcConfigGetRescanInverval (FcConfig *config)
+{
+    return FcConfigGetRescanInterval (config);
+}
+
+FcBool
+FcConfigSetRescanInverval (FcConfig *config, int rescanInterval)
+{
+    return FcConfigSetRescanInterval (config, rescanInterval);
+}
+
+    
 FcBool
 FcConfigAddEdit (FcConfig	*config,
 		 FcTest		*test,
diff --git a/src/fcdeprecate.h b/src/fcdeprecate.h
new file mode 100644
index 0000000..214b684
--- /dev/null
+++ b/src/fcdeprecate.h
@@ -0,0 +1,36 @@
+/*
+ * Copyright © 2007 Keith Packard
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting documentation, and
+ * that the name of the copyright holders not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission.  The copyright holders make no representations
+ * about the suitability of this software for any purpose.  It is provided "as
+ * is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ */
+
+/*
+ * These APIs are deprecated; still exported by the library, but not
+ * declared in the public header file
+ */
+#ifndef _FCDEPRECATE_H_
+#define _FCDEPRECATE_H_
+
+FcPublic int
+FcConfigGetRescanInverval (FcConfig *config);
+
+FcPublic FcBool
+FcConfigSetRescanInverval (FcConfig *config, int rescanInterval);
+
+#endif /* _FCDEPRECATE_H_ */
diff --git a/src/fcint.h b/src/fcint.h
index 25fb00f..329092d 100644
--- a/src/fcint.h
+++ b/src/fcint.h
@@ -47,6 +47,7 @@
 #include <time.h>
 #include <fontconfig/fontconfig.h>
 #include <fontconfig/fcfreetype.h>
+#include "fcdeprecate.h"
 
 #ifndef FC_CONFIG_PATH
 #define FC_CONFIG_PATH "fonts.conf"
_______________________________________________
Fontconfig mailing list
Fontconfig@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/fontconfig

[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux