From 392fa276dcae8d4c66607bbbd8dd30354a331afc Mon Sep 17 00:00:00 2001 From: Patrick Lam Date: Thu, 6 Apr 2006 04:52:21 +0000 Subject: [PATCH] Reduce amount of dirty rss by const'ing some data structures. Don't fail if we can't create or remove $(pkgcachedir) i.e. /var/cache/fontconfig. (reported by Quanah Gibson-Mount). reviewed by: plam --- ChangeLog | 15 +++++++++++++++ fc-cache/Makefile.am | 4 ++-- src/fcdefault.c | 2 +- src/fcpat.c | 2 +- src/fcxml.c | 2 +- 5 files changed, 20 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6f5e427..ff6b2d9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2006-04-06 Diego Pettenò + reviewed by: plam + * src/fcdefault.c: + * src/fcpat.c: + * src/fcxml.c: + + Reduce amount of dirty rss by const'ing some data structures. + +2006-04-06 Patrick Lam + * fc-cache/Makefile.am: + + Don't fail if we can't create or remove + $(pkgcachedir) i.e. /var/cache/fontconfig. + (reported by Quanah Gibson-Mount). + 2006-04-06 Kjartan Maraas reviewed by: plam * fc-case/fc-case.c: diff --git a/fc-cache/Makefile.am b/fc-cache/Makefile.am index 285f286..ef6c968 100644 --- a/fc-cache/Makefile.am +++ b/fc-cache/Makefile.am @@ -30,10 +30,10 @@ SGML = ${FC_CACHE_SRC}/fc-cache.sgml AM_CPPFLAGS = -DPKGCACHEDIR='"${pkgcachedir}"' install-data-local: - $(mkinstalldirs) "$(DESTDIR)$(pkgcachedir)" + -$(mkinstalldirs) "$(DESTDIR)$(pkgcachedir)" uninstall-local: - $(RM) -rf "$(DESTDIR)$(pkgcachedir)" + -$(RM) -rf "$(DESTDIR)$(pkgcachedir)" INCLUDES=-I${top_srcdir} $(FREETYPE_CFLAGS) diff --git a/src/fcdefault.c b/src/fcdefault.c index c309ef6..4fd3ed8 100644 --- a/src/fcdefault.c +++ b/src/fcdefault.c @@ -25,7 +25,7 @@ #include "fcint.h" #include -static struct { +static const struct { const char *field; FcBool value; } FcBoolDefaults[] = { diff --git a/src/fcpat.c b/src/fcpat.c index a2eb640..4162872 100644 --- a/src/fcpat.c +++ b/src/fcpat.c @@ -350,7 +350,7 @@ typedef union _FcValueListAlign { static int FcValueListFrozenCount[FcTypeLangSet + 1]; static int FcValueListFrozenBytes[FcTypeLangSet + 1]; -static char FcValueListFrozenName[][8] = { +static const char FcValueListFrozenName[][8] = { "Void", "Integer", "Double", diff --git a/src/fcxml.c b/src/fcxml.c index fac706c..1afa4e7 100644 --- a/src/fcxml.c +++ b/src/fcxml.c @@ -339,7 +339,7 @@ typedef enum _FcElement { FcElementUnknown } FcElement; -static struct { +static const struct { const char name[16]; FcElement element; } fcElementMap[] = {