summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAkira TAGOH <akira@tagoh.org>2015-02-27 14:17:26 +0900
committerAkira TAGOH <akira@tagoh.org>2015-02-27 14:18:32 +0900
commitd6a5cc665a1d7e91332944353e92c83ad114368c (patch)
tree206915cd8cffe0acccf4b363c9003e884594cb67 /src
parent97cf7ec4d740c9b3ac7c29388224f5e0c226a120 (diff)
Hardcode the blanks in the library
https://bugs.freedesktop.org/show_bug.cgi?id=79956
Diffstat (limited to 'src')
-rw-r--r--src/fcblanks.c7
-rw-r--r--src/fccfg.c3
2 files changed, 9 insertions, 1 deletions
diff --git a/src/fcblanks.c b/src/fcblanks.c
index 46698bcd..49f520be 100644
--- a/src/fcblanks.c
+++ b/src/fcblanks.c
@@ -41,6 +41,8 @@ FcBlanksCreate (void)
void
FcBlanksDestroy (FcBlanks *b)
{
+ if (b->sblank == -1)
+ return;
if (b->blanks)
free (b->blanks);
free (b);
@@ -56,6 +58,11 @@ FcBlanksAdd (FcBlanks *b, FcChar32 ucs4)
if (b->blanks[sblank] == ucs4)
return FcTrue;
+ if (b->sblank == -1)
+ {
+ fprintf (stderr, "Unable to update the static FcBlanks: 0x%04x\n", ucs4);
+ return FcTrue;
+ }
if (b->nblank == b->sblank)
{
sblank = b->sblank + 32;
diff --git a/src/fccfg.c b/src/fccfg.c
index b27ab0b4..e2f7ea8d 100644
--- a/src/fccfg.c
+++ b/src/fccfg.c
@@ -27,6 +27,7 @@
#include "fcint.h"
#include <dirent.h>
#include <sys/types.h>
+#include "../fc-blanks/fcblanks.h"
#if defined (_WIN32) && !defined (R_OK)
#define R_OK 4
@@ -109,7 +110,7 @@ FcConfigCreate (void)
if (!config->cacheDirs)
goto bail8;
- config->blanks = 0;
+ config->blanks = &fcBlanks;
config->substPattern = 0;
config->substFont = 0;