fontconfig: Branch 'master' - 2 commits

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

 



 doc/edit-sgml.c         |    3 ++-
 doc/fclangset.fncs      |   16 ++++++++++++++++
 fontconfig/fontconfig.h |    6 ++++++
 src/fcint.h             |    3 ---
 src/fclang.c            |   20 ++++++++++++++++++--
 5 files changed, 42 insertions(+), 6 deletions(-)

New commits:
commit cf223cc7bcae94e839d7ac1e980f289cca5199b0
Author: Behdad Esfahbod <behdad@xxxxxxxxxx>
Date:   Mon Nov 5 15:29:44 2007 -0500

    Add FcGetLangs() and FcLangGetCharSet().

diff --git a/doc/fclangset.fncs b/doc/fclangset.fncs
index 8ae5f5c..3f69f0d 100644
--- a/doc/fclangset.fncs
+++ b/doc/fclangset.fncs
@@ -122,3 +122,19 @@ a matching language but differs in which territory that language is for, this
 function returns FcLangDiffentTerritory. If <parameter>ls</parameter> 
 has no matching language, this function returns FcLangDifferentLang.
 @@
+
+@RET@		FcStrSet *
+@FUNC@		FcGetLangs
+@TYPE1@		void
+@PURPOSE@	Get list of languages
+@DESC@
+Returns a string set of all known languages.
+@@
+
+@RET@		const FcCharSet *
+@FUNC@		FcLangGetCharSet
+@TYPE1@		const FcChar8 *			@ARG1@		lang
+@PURPOSE@	Get character map for a language
+@DESC@
+Returns the FcCharMap for a language.
+@@
diff --git a/fontconfig/fontconfig.h b/fontconfig/fontconfig.h
index 2340640..77276e6 100644
--- a/fontconfig/fontconfig.h
+++ b/fontconfig/fontconfig.h
@@ -551,6 +551,12 @@ FcPublic FcBool
 FcInitBringUptoDate (void);
 
 /* fclang.c */
+FcStrSet *
+FcGetLangs (void);
+
+FcPublic const FcCharSet *
+FcLangGetCharSet (const FcChar8 *lang);
+
 FcPublic FcLangSet*
 FcLangSetCreate (void);
 
diff --git a/src/fcint.h b/src/fcint.h
index 329092d..62a04b8 100644
--- a/src/fcint.h
+++ b/src/fcint.h
@@ -890,9 +890,6 @@ FcFreeTypeLangSet (const FcCharSet  *charset,
 FcPrivate FcLangResult
 FcLangCompare (const FcChar8 *s1, const FcChar8 *s2);
     
-FcPrivate const FcCharSet *
-FcCharSetForLang (const FcChar8 *lang);
-
 FcPrivate FcLangSet *
 FcLangSetPromote (const FcChar8 *lang);
 
diff --git a/src/fclang.c b/src/fclang.c
index 361803a..7aa5f3c 100644
--- a/src/fclang.c
+++ b/src/fclang.c
@@ -54,7 +54,7 @@ FcFreeTypeLangSet (const FcCharSet  *charset,
     FcLangSet	    *ls;
 
     if (exclusiveLang)
-	exclusiveCharset = FcCharSetForLang (exclusiveLang);
+	exclusiveCharset = FcLangGetCharSet (exclusiveLang);
     ls = FcLangSetCreate ();
     if (!ls)
 	return 0;
@@ -196,7 +196,7 @@ FcLangContains (const FcChar8 *super, const FcChar8 *sub)
 }
 
 const FcCharSet *
-FcCharSetForLang (const FcChar8 *lang)
+FcLangGetCharSet (const FcChar8 *lang)
 {
     int		i;
     int		country = -1;
@@ -218,6 +218,22 @@ FcCharSetForLang (const FcChar8 *lang)
     return &fcLangCharSets[country].charset;
 }
 
+FcStrSet *
+FcGetLangs (void)
+{
+    FcStrSet *langs;
+    int	i;
+
+    langs = FcStrSetCreate();
+    if (!langs)
+	return 0;
+
+    for (i = 0; i < NUM_LANG_CHAR_SET; i++)
+	FcStrSetAdd (langs, fcLangCharSets[i].lang);
+
+    return langs;
+}
+
 FcLangSet *
 FcLangSetCreate (void)
 {
commit 811995b79db16be39046dbbffcc5a7d66f88b731
Author: Behdad Esfahbod <behdad@xxxxxxxxxx>
Date:   Mon Nov 5 15:29:03 2007 -0500

    Fix trivial bugs in edit-sgml.c

diff --git a/doc/edit-sgml.c b/doc/edit-sgml.c
index 067626c..02f4a46 100644
--- a/doc/edit-sgml.c
+++ b/doc/edit-sgml.c
@@ -263,6 +263,7 @@ Getc (FILE *f, int *linep)
     int	c = getc (f);
     if (c == '\n')
 	++(*linep);
+    return c;
 }
 
 static void
@@ -524,7 +525,7 @@ main (int argc, char **argv)
     int		iline, oline;
 
     if (!argv[1])
-	Bail ("usage: %s <template.sgml>", 0, argv[0]);
+	Bail ("usage: %*s <template.sgml>", 0, argv[0]);
     f = fopen (argv[1], "r");
     if (!f)
     {
_______________________________________________
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