]> git.wh0rd.org - fontconfig.git/commitdiff
Export FcConfig{G,S}etRescanInverval from .so, mark as deprecated.
authorKeith Packard <keithp@koto.keithp.com>
Sun, 4 Nov 2007 20:20:45 +0000 (12:20 -0800)
committerKeith Packard <keithp@koto.keithp.com>
Sun, 4 Nov 2007 20:20:45 +0000 (12:20 -0800)
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).

configure.in
fontconfig/fontconfig.h
src/Makefile.am
src/fccfg.c
src/fcdeprecate.h [new file with mode: 0644]
src/fcint.h

index ff4057b2e6a12f685776848eb539e14a0f1aafd4..c431dccf2e78d6b3b1a77b7a29f2d46193bfed14 100644 (file)
@@ -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)
index f98599fbb07a616ea60fc371f9f718c44ba8585d..234064082cdb9df3b35632ff65db3c3df74f55a0 100644 (file)
@@ -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_ */
index 2ff1f3c013e988b0345dbc8e8a0da2ad3013fc63..a4bbc4542c881d23dc1351836a9565af88ba7c27 100644 (file)
@@ -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
 
index 7b2fad5b110f96c65f2029727cb32b4721ed8155..c73dc2aa8b6dfd0056bb4ab8949493addbcc104b 100644 (file)
@@ -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 (file)
index 0000000..214b684
--- /dev/null
@@ -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_ */
index 25fb00ffd3561799c702ed9353a716bf6db54401..329092dff0ca1a3c56b920d6c04a83db5783e718 100644 (file)
@@ -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"