Mike Frysinger
2012-Feb-21 19:18 UTC
[Fontconfig] Pull request fontconfig.git (cleanup branch)
The following changes since commit 2b010e46e629f118885f17ba860e9c4ddbba8779: Bug 44826 - <alias> must contain only a single <family> (2012-02-21 16:23:22 +0900) are available in the git repository at: git://wh0rd.org/fontconfig.git cleanup Mike Frysinger (9): FcStrPlus: optimize a little delete unused variables FcStat: change to FcChar8 for first arg fc-cat: fix pointer warning FcName{,Get}Constant: constify string input fc-{list,match}: constify format string fix build warnings when using --with-arch FcObjectValidType: tweak -1 checking makealias: handle missing funcs better fc-cat/fc-cat.c | 2 +- fc-list/fc-list.c | 20 ++++++++++---------- fc-match/fc-match.c | 22 +++++++++++----------- fontconfig/fontconfig.h | 4 ++-- src/fcarch.h | 5 ++--- src/fccache.c | 10 ++++------ src/fcdir.c | 17 ----------------- src/fcformat.c | 5 ++--- src/fcfreetype.c | 3 --- src/fcint.h | 2 +- src/fcname.c | 8 +++----- src/fcstr.c | 8 +++++--- src/makealias | 18 ++++++++++++++---- 13 files changed, 55 insertions(+), 69 deletions(-)
Mike Frysinger
2012-Feb-21 19:19 UTC
[Fontconfig] [PATCH 1/9] FcStrPlus: optimize a little
We''ve already calculated the lengths of these strings, so re-use those values to avoid having to rescan the strings multiple times. Signed-off-by: Mike Frysinger <vapier at gentoo.org> --- src/fcstr.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/fcstr.c b/src/fcstr.c index 8b94ecb..b712e5d 100644 --- a/src/fcstr.c +++ b/src/fcstr.c @@ -50,14 +50,16 @@ FcStrCopy (const FcChar8 *s) FcChar8 * FcStrPlus (const FcChar8 *s1, const FcChar8 *s2) { - int l = strlen ((char *)s1) + strlen ((char *) s2) + 1; + int s1l = strlen ((char *) s1); + int s2l = strlen ((char *) s2); + int l = s1l + s2l + 1; FcChar8 *s = malloc (l); if (!s) return 0; FcMemAlloc (FC_MEM_STRING, l); - strcpy ((char *) s, (char *) s1); - strcat ((char *) s, (char *) s2); + memcpy (s, s1, s1l); + memcpy (s + s1l, s2, s2l + 1); return s; } -- 1.7.8.4
Newer gcc is better at detecting set-but-unused variables. Signed-off-by: Mike Frysinger <vapier at gentoo.org> --- src/fccache.c | 6 ++---- src/fcdir.c | 17 ----------------- src/fcformat.c | 5 ++--- src/fcfreetype.c | 3 --- 4 files changed, 4 insertions(+), 27 deletions(-) diff --git a/src/fccache.c b/src/fccache.c index 2d4a437..2fd7454 100644 --- a/src/fccache.c +++ b/src/fccache.c @@ -727,8 +727,6 @@ FcDirCacheBuild (FcFontSet *set, const FcChar8 *dir, struct stat *dir_stat, FcSt FcSerialize *serialize = FcSerializeCreate (); FcCache *cache; int i; - intptr_t cache_offset; - intptr_t dirs_offset; FcChar8 *dir_serialize; intptr_t *dirs_serialize; FcFontSet *set_serialize; @@ -738,7 +736,7 @@ FcDirCacheBuild (FcFontSet *set, const FcChar8 *dir, struct stat *dir_stat, FcSt /* * Space for cache structure */ - cache_offset = FcSerializeReserve (serialize, sizeof (FcCache)); + FcSerializeReserve (serialize, sizeof (FcCache)); /* * Directory name */ @@ -747,7 +745,7 @@ FcDirCacheBuild (FcFontSet *set, const FcChar8 *dir, struct stat *dir_stat, FcSt /* * Subdirs */ - dirs_offset = FcSerializeAlloc (serialize, dirs, dirs->num * sizeof (FcChar8 *)); + FcSerializeAlloc (serialize, dirs, dirs->num * sizeof (FcChar8 *)); for (i = 0; i < dirs->num; i++) if (!FcStrSerializeAlloc (serialize, dirs->strs[i])) goto bail1; diff --git a/src/fcdir.c b/src/fcdir.c index 8a2b976..d8b094f 100644 --- a/src/fcdir.c +++ b/src/fcdir.c @@ -235,7 +235,6 @@ FcCache * FcDirCacheScan (const FcChar8 *dir, FcConfig *config) { FcStrSet *dirs; - FcBool ret = FcTrue; FcFontSet *set; FcCache *cache = NULL; struct stat dir_stat; @@ -244,44 +243,28 @@ FcDirCacheScan (const FcChar8 *dir, FcConfig *config) printf ("cache scan dir %s\n", dir); if (FcStat (dir, &dir_stat) < 0) - { - if (errno != ENOENT) - ret = FcFalse; goto bail; - } set = FcFontSetCreate(); if (!set) - { - ret = FcFalse; goto bail; - } dirs = FcStrSetCreate (); if (!dirs) - { - ret = FcFalse; goto bail1; - } /* * Scan the dir */ if (!FcDirScanConfig (set, dirs, NULL, dir, FcTrue, config)) - { - ret = FcFalse; goto bail2; - } /* * Build the cache object */ cache = FcDirCacheBuild (set, dir, &dir_stat, dirs); if (!cache) - { - ret = FcFalse; goto bail2; - } /* * Write out the cache file, ignoring any troubles diff --git a/src/fcformat.c b/src/fcformat.c index d8518f4..0e63d5d 100644 --- a/src/fcformat.c +++ b/src/fcformat.c @@ -353,13 +353,12 @@ skip_subexpr (FcFormatContext *c); static FcBool skip_percent (FcFormatContext *c) { - int width; - if (!expect_char (c, ''%'')) return FcFalse; /* skip an optional width specifier */ - width = strtol ((const char *) c->format, (char **) &c->format, 10); + if (strtol ((const char *) c->format, (char **) &c->format, 10)) + /* don''t care */; if (!expect_char (c, ''{'')) return FcFalse; diff --git a/src/fcfreetype.c b/src/fcfreetype.c index f2d0642..e322e8c 100644 --- a/src/fcfreetype.c +++ b/src/fcfreetype.c @@ -2609,14 +2609,11 @@ GetScriptTags(FT_Face face, FT_ULong tabletag, FT_ULong **stags) FT_Stream stream = face->stream; FT_Error error; FT_UShort n, p; - FT_Memory memory; int script_count; if (!stream) return 0; - memory = stream->memory; - if (( error = ftglue_face_goto_table( face, tabletag, stream ) )) return 0; -- 1.7.8.4
Mike Frysinger
2012-Feb-21 19:19 UTC
[Fontconfig] [PATCH 3/9] FcStat: change to FcChar8 for first arg
This shouldn''t affect the ABI, makes FcStat more like the rest of the fontconfig API, and fixes warnings where we pass FcChar8* pointers in to this func from other places. Signed-off-by: Mike Frysinger <vapier at gentoo.org> --- src/fccache.c | 4 ++-- src/fcint.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/fccache.c b/src/fccache.c index 2fd7454..c38a705 100644 --- a/src/fccache.c +++ b/src/fccache.c @@ -87,7 +87,7 @@ typedef __int64 INT64; */ int -FcStat (const char *file, struct stat *statb) +FcStat (const FcChar8 *file, struct stat *statb) { WIN32_FILE_ATTRIBUTE_DATA wfad; char full_path_name[MAX_PATH]; @@ -136,7 +136,7 @@ FcStat (const char *file, struct stat *statb) #else int -FcStat (const char *file, struct stat *statb) +FcStat (const FcChar8 *file, struct stat *statb) { return stat ((char *) file, statb); } diff --git a/src/fcint.h b/src/fcint.h index 83a7a43..8179195 100644 --- a/src/fcint.h +++ b/src/fcint.h @@ -545,7 +545,7 @@ FcPrivate void FcDirCacheReference (FcCache *cache, int nref); FcPrivate int -FcStat (const char *file, struct stat *statb); +FcStat (const FcChar8 *file, struct stat *statb); /* fccfg.c */ -- 1.7.8.4
Add a cast to avoid a gcc warning: fc-cat.c: In function ''cache_print_set'': fc-cat.c:230:2: warning: pointer targets in passing argument 2 of ''FcPatternFormat'' differ in signedness [-Wpointer-sign] ../fontconfig/fontconfig.h:860:1: note: expected ''const FcChar8 *'' but argument is of type ''char *'' Signed-off-by: Mike Frysinger <vapier at gentoo.org> --- fc-cat/fc-cat.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fc-cat/fc-cat.c b/fc-cat/fc-cat.c index 5ee947e..c3d6829 100644 --- a/fc-cat/fc-cat.c +++ b/fc-cat/fc-cat.c @@ -227,7 +227,7 @@ cache_print_set (FcFontSet *set, FcStrSet *dirs, const FcChar8 *base_name, FcBoo FcPattern *font = set->fonts[n]; FcChar8 *s; - s = FcPatternFormat (font, "%{=fccat}\n"); + s = FcPatternFormat (font, (const FcChar8 *) "%{=fccat}\n"); if (s) { printf ("%s", s); -- 1.7.8.4
Mike Frysinger
2012-Feb-21 19:19 UTC
[Fontconfig] [PATCH 5/9] FcName{, Get}Constant: constify string input
These funcs don''t modify the incoming string, so add const markings. This is the "right thing", shouldn''t change the ABI, and fixes some gcc warnings: fccfg.c: In function ''FcConfigEvaluate'': fccfg.c:916:2: warning: passing argument 1 of ''IA__FcNameConstant'' discards ''const'' qualifier from pointer target type [enabled by default] fcalias.h:253:34: note: expected ''FcChar8 *'' but argument is of type ''const FcChar8 *'' fcxml.c: In function ''FcTypecheckExpr'': fcxml.c:604:2: warning: passing argument 1 of ''IA__FcNameGetConstant'' discards ''const'' qualifier from pointer target type [enabled by default] fcalias.h:251:37: note: expected ''FcChar8 *'' but argument is of type ''const FcChar8 *'' Signed-off-by: Mike Frysinger <vapier at gentoo.org> --- fontconfig/fontconfig.h | 4 ++-- src/fcname.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fontconfig/fontconfig.h b/fontconfig/fontconfig.h index db26b97..23ea222 100644 --- a/fontconfig/fontconfig.h +++ b/fontconfig/fontconfig.h @@ -739,10 +739,10 @@ FcPublic FcBool FcNameUnregisterConstants (const FcConstant *consts, int nconsts); FcPublic const FcConstant * -FcNameGetConstant (FcChar8 *string); +FcNameGetConstant (const FcChar8 *string); FcPublic FcBool -FcNameConstant (FcChar8 *string, int *result); +FcNameConstant (const FcChar8 *string, int *result); FcPublic FcPattern * FcNameParse (const FcChar8 *name); diff --git a/src/fcname.c b/src/fcname.c index d77eff6..864ad40 100644 --- a/src/fcname.c +++ b/src/fcname.c @@ -511,7 +511,7 @@ FcNameUnregisterConstants (const FcConstant *consts, int nconsts) } const FcConstant * -FcNameGetConstant (FcChar8 *string) +FcNameGetConstant (const FcChar8 *string) { const FcConstantList *l; int i; @@ -526,7 +526,7 @@ FcNameGetConstant (FcChar8 *string) } FcBool -FcNameConstant (FcChar8 *string, int *result) +FcNameConstant (const FcChar8 *string, int *result) { const FcConstant *c; -- 1.7.8.4
Mike Frysinger
2012-Feb-21 19:19 UTC
[Fontconfig] [PATCH 6/9] fc-{list,match}: constify format string
We don''t free this string anywhere, so mark it const to avoid gcc warnings and possible bugs in the future (if people did try freeing it). fc-list.c: In function ''main'': fc-list.c:161:16: warning: pointer targets in assignment differ in signedness [-Wpointer-sign] fc-match.c: In function ''main'': fc-match.c:201:13: warning: pointer targets in assignment differ in signedness [-Wpointer-sign] fc-match.c:203:13: warning: pointer targets in assignment differ in signedness [-Wpointer-sign] Signed-off-by: Mike Frysinger <vapier at gentoo.org> --- fc-list/fc-list.c | 20 ++++++++++---------- fc-match/fc-match.c | 22 +++++++++++----------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/fc-list/fc-list.c b/fc-list/fc-list.c index ad38332..0149b0c 100644 --- a/fc-list/fc-list.c +++ b/fc-list/fc-list.c @@ -94,16 +94,16 @@ usage (char *program, int error) int main (int argc, char **argv) { - int verbose = 0; - int quiet = 0; - FcChar8 *format = NULL; - int nfont = 0; - int i; - FcObjectSet *os = 0; - FcFontSet *fs; - FcPattern *pat; + int verbose = 0; + int quiet = 0; + const FcChar8 *format = NULL; + int nfont = 0; + int i; + FcObjectSet *os = 0; + FcFontSet *fs; + FcPattern *pat; #if HAVE_GETOPT_LONG || HAVE_GETOPT - int c; + int c; #if HAVE_GETOPT_LONG while ((c = getopt_long (argc, argv, "vf:qVh", longopts, NULL)) != -1) @@ -158,7 +158,7 @@ main (int argc, char **argv) if (!verbose && !format && !os) os = FcObjectSetBuild (FC_FAMILY, FC_STYLE, FC_FILE, (char *) 0); if (!format) - format = "%{=fclist}\n"; + format = (const FcChar8 *) "%{=fclist}\n"; fs = FcFontList (0, pat, os); if (os) FcObjectSetDestroy (os); diff --git a/fc-match/fc-match.c b/fc-match/fc-match.c index 095dd4e..4642c8d 100644 --- a/fc-match/fc-match.c +++ b/fc-match/fc-match.c @@ -98,16 +98,16 @@ usage (char *program, int error) int main (int argc, char **argv) { - int verbose = 0; - int sort = 0, all = 0; - FcChar8 *format = NULL; - int i; - FcObjectSet *os = 0; - FcFontSet *fs; - FcPattern *pat; - FcResult result; + int verbose = 0; + int sort = 0, all = 0; + const FcChar8 *format = NULL; + int i; + FcObjectSet *os = 0; + FcFontSet *fs; + FcPattern *pat; + FcResult result; #if HAVE_GETOPT_LONG || HAVE_GETOPT - int c; + int c; #if HAVE_GETOPT_LONG while ((c = getopt_long (argc, argv, "asvf:Vh", longopts, NULL)) != -1) @@ -203,9 +203,9 @@ main (int argc, char **argv) if (!format) { if (os) - format = "%{=unparse}\n"; + format = (const FcChar8 *) "%{=unparse}\n"; else - format = "%{=fcmatch}\n"; + format = (const FcChar8 *) "%{=fcmatch}\n"; } if (fs) -- 1.7.8.4
Mike Frysinger
2012-Feb-21 19:19 UTC
[Fontconfig] [PATCH 7/9] fix build warnings when using --with-arch
Latest configure code will setup FC_ARCHITECTURE directly rather than going through ARCHITECTURE, so update fcarch.h accordingly. Signed-off-by: Mike Frysinger <vapier at gentoo.org> --- src/fcarch.h | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/fcarch.h b/src/fcarch.h index 0c8cd05..9cabf04 100644 --- a/src/fcarch.h +++ b/src/fcarch.h @@ -62,9 +62,8 @@ # define FC_ARCH_SIZE_ALIGN "64" #endif -#ifdef ARCHITECTURE -# define ARCHITECTURE FC_ARCHITECTURE -#else +/* config.h might override this */ +#ifndef FC_ARCHITECTURE # define FC_ARCHITECTURE FC_ARCH_ENDIAN FC_ARCH_SIZE_ALIGN #endif -- 1.7.8.4
Mike Frysinger
2012-Feb-21 19:19 UTC
[Fontconfig] [PATCH 8/9] FcObjectValidType: tweak -1 checking
Newer gcc doesn''t like when you switch on an enum and use a value that isn''t declared: fcname.c: In function ''FcObjectValidType'': fcname.c:299:2: warning: case value ''4294967295'' not in enumerated type ''FcType'' [-Wswitch] So tweak the logic to avoid this warning. Signed-off-by: Mike Frysinger <vapier at gentoo.org> --- src/fcname.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/src/fcname.c b/src/fcname.c index 864ad40..1b32b0f 100644 --- a/src/fcname.c +++ b/src/fcname.c @@ -296,8 +296,6 @@ FcObjectValidType (FcObject object, FcType type) if (t) { switch (t->type) { - case -1: - return FcTrue; case FcTypeDouble: case FcTypeInteger: if (type == FcTypeDouble || type == FcTypeInteger) @@ -308,7 +306,7 @@ FcObjectValidType (FcObject object, FcType type) return FcTrue; break; default: - if (type == t->type) + if (t->type == -1 || type == t->type) return FcTrue; break; } -- 1.7.8.4
Mike Frysinger
2012-Feb-21 19:19 UTC
[Fontconfig] [PATCH 9/9] makealias: handle missing funcs better
When adding new functions, if the actual definition doesn''t match the header (say due to a typo), the regeneration of the internal headers get confused and output bad cpp logic. This causes gcc to barf due to mismatched #ifdef/#endif. Which is a pain to figure out due to the sheer voulme of generated code. So tweak the makealias script to detect this case and error out. While we''re here, improve the cpp output a bit to indent, include comments, and merge similar ifdef blocks. Signed-off-by: Mike Frysinger <vapier at gentoo.org> --- src/makealias | 18 ++++++++++++++---- 1 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/makealias b/src/makealias index fd9c3fd..fca94d4 100755 --- a/src/makealias +++ b/src/makealias @@ -17,12 +17,22 @@ while read name; do hattr=''__attribute((visibility("hidden")))'' echo "extern __typeof ($name) $alias $hattr;" >> $HEAD echo "#define $name $alias" >> $HEAD - grep -l ''^''$name''[ (]'' "$SRCDIR"/*.c | sed -n 1p | sed -e ''s/^.*\/\([^.]*\)\.c/#ifdef __\1__/'' >> $TAIL - echo "#undef $name" >> $TAIL + ifdef=$(grep -l ''^''$name''[ (]'' "$SRCDIR"/*.c | sed -n 1p | sed -e ''s/^.*\/\([^.]*\)\.c/__\1__/'') + if [ -z "$ifdef" ] ; then + echo "error: could not locate $name in src/*.c" 1>&2 + exit 1 + fi + if [ "$ifdef" != "$last" ] ; then + [ -n "$last" ] && echo "#endif /* $last */" >> $TAIL + echo "#ifdef $ifdef" >> $TAIL + last=$ifdef + fi + echo "# undef $name" >> $TAIL cattr=''__attribute((alias("''$alias''"), visibility("default")))'' echo "extern __typeof ($name) $name $cattr;" >> $TAIL - echo "#endif" >> $TAIL ;; esac done -echo "#endif" >> $TAIL +[ $? -ne 0 ] && exit 1 +echo "#endif /* $ifdef */" >> $TAIL +echo "#endif /* HAVE_GNUC_ATTRIBUTE */" >> $TAIL -- 1.7.8.4
Behdad Esfahbod
2012-Feb-21 19:31 UTC
[Fontconfig] [PATCH 9/9] makealias: handle missing funcs better
I think we should just remove the alias stuff and use more modern ways to achieve the same. These days people mostly just do -Bsymbolic-functions, which is not exactly the same, but is good enough. So, I''d say just remove the alias stuff... On 02/21/2012 02:19 PM, Mike Frysinger wrote:> When adding new functions, if the actual definition doesn''t match the > header (say due to a typo), the regeneration of the internal headers > get confused and output bad cpp logic. This causes gcc to barf due > to mismatched #ifdef/#endif. Which is a pain to figure out due to > the sheer voulme of generated code. > > So tweak the makealias script to detect this case and error out. > While we''re here, improve the cpp output a bit to indent, include > comments, and merge similar ifdef blocks. > > Signed-off-by: Mike Frysinger <vapier at gentoo.org> > --- > src/makealias | 18 ++++++++++++++---- > 1 files changed, 14 insertions(+), 4 deletions(-) > > diff --git a/src/makealias b/src/makealias > index fd9c3fd..fca94d4 100755 > --- a/src/makealias > +++ b/src/makealias > @@ -17,12 +17,22 @@ while read name; do > hattr=''__attribute((visibility("hidden")))'' > echo "extern __typeof ($name) $alias $hattr;" >> $HEAD > echo "#define $name $alias" >> $HEAD > - grep -l ''^''$name''[ (]'' "$SRCDIR"/*.c | sed -n 1p | sed -e ''s/^.*\/\([^.]*\)\.c/#ifdef __\1__/'' >> $TAIL > - echo "#undef $name" >> $TAIL > + ifdef=$(grep -l ''^''$name''[ (]'' "$SRCDIR"/*.c | sed -n 1p | sed -e ''s/^.*\/\([^.]*\)\.c/__\1__/'') > + if [ -z "$ifdef" ] ; then > + echo "error: could not locate $name in src/*.c" 1>&2 > + exit 1 > + fi > + if [ "$ifdef" != "$last" ] ; then > + [ -n "$last" ] && echo "#endif /* $last */" >> $TAIL > + echo "#ifdef $ifdef" >> $TAIL > + last=$ifdef > + fi > + echo "# undef $name" >> $TAIL > cattr=''__attribute((alias("''$alias''"), visibility("default")))'' > echo "extern __typeof ($name) $name $cattr;" >> $TAIL > - echo "#endif" >> $TAIL > ;; > esac > done > -echo "#endif" >> $TAIL > +[ $? -ne 0 ] && exit 1 > +echo "#endif /* $ifdef */" >> $TAIL > +echo "#endif /* HAVE_GNUC_ATTRIBUTE */" >> $TAIL
Akira TAGOH
2012-Feb-22 04:57 UTC
[Fontconfig] [PATCH 9/9] makealias: handle missing funcs better
Sure. just filed a bug for that. I think it has to be done carefully to avoid a regression. so I''ll postpone that at this time. On Wed, Feb 22, 2012 at 4:31 AM, Behdad Esfahbod <behdad at behdad.org> wrote:> I think we should just remove the alias stuff and use more modern ways to > achieve the same. ?These days people mostly just do -Bsymbolic-functions, > which is not exactly the same, but is good enough. ?So, I''d say just remove > the alias stuff... > > On 02/21/2012 02:19 PM, Mike Frysinger wrote: >> When adding new functions, if the actual definition doesn''t match the >> header (say due to a typo), the regeneration of the internal headers >> get confused and output bad cpp logic. ?This causes gcc to barf due >> to mismatched #ifdef/#endif. ?Which is a pain to figure out due to >> the sheer voulme of generated code. >> >> So tweak the makealias script to detect this case and error out. >> While we''re here, improve the cpp output a bit to indent, include >> comments, and merge similar ifdef blocks. >> >> Signed-off-by: Mike Frysinger <vapier at gentoo.org> >> --- >> ?src/makealias | ? 18 ++++++++++++++---- >> ?1 files changed, 14 insertions(+), 4 deletions(-) >> >> diff --git a/src/makealias b/src/makealias >> index fd9c3fd..fca94d4 100755 >> --- a/src/makealias >> +++ b/src/makealias >> @@ -17,12 +17,22 @@ while read name; do >> ? ? ? ? ? ? ? hattr=''__attribute((visibility("hidden")))'' >> ? ? ? ? ? ? ? echo "extern __typeof ($name) $alias $hattr;" >> $HEAD >> ? ? ? ? ? ? ? echo "#define $name $alias" >> $HEAD >> - ? ? ? ? ? ? grep -l ''^''$name''[ (]'' "$SRCDIR"/*.c | sed -n 1p | sed -e ''s/^.*\/\([^.]*\)\.c/#ifdef __\1__/'' >> $TAIL >> - ? ? ? ? ? ? echo "#undef $name" >> $TAIL >> + ? ? ? ? ? ? ifdef=$(grep -l ''^''$name''[ (]'' "$SRCDIR"/*.c | sed -n 1p | sed -e ''s/^.*\/\([^.]*\)\.c/__\1__/'') >> + ? ? ? ? ? ? if [ -z "$ifdef" ] ; then >> + ? ? ? ? ? ? ? ? ? ? echo "error: could not locate $name in src/*.c" 1>&2 >> + ? ? ? ? ? ? ? ? ? ? exit 1 >> + ? ? ? ? ? ? fi >> + ? ? ? ? ? ? if [ "$ifdef" != "$last" ] ; then >> + ? ? ? ? ? ? ? ? ? ? [ -n "$last" ] && echo "#endif /* $last */" >> $TAIL >> + ? ? ? ? ? ? ? ? ? ? echo "#ifdef $ifdef" >> $TAIL >> + ? ? ? ? ? ? ? ? ? ? last=$ifdef >> + ? ? ? ? ? ? fi >> + ? ? ? ? ? ? echo "# undef $name" >> $TAIL >> ? ? ? ? ? ? ? cattr=''__attribute((alias("''$alias''"), visibility("default")))'' >> ? ? ? ? ? ? ? echo "extern __typeof ($name) $name $cattr;" >> $TAIL >> - ? ? ? ? ? ? echo "#endif" >> $TAIL >> ? ? ? ? ? ? ? ;; >> ? ? ? esac >> ?done >> -echo "#endif" >> $TAIL >> +[ $? -ne 0 ] && exit 1 >> +echo "#endif /* $ifdef */" >> $TAIL >> +echo "#endif /* HAVE_GNUC_ATTRIBUTE */" >> $TAIL > _______________________________________________ > Fontconfig mailing list > Fontconfig at lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/fontconfig-- Akira TAGOH
Akira TAGOH
2012-Feb-22 04:59 UTC
[Fontconfig] Pull request fontconfig.git (cleanup branch)
Thanks for the patches. that looks good to me. merged. On Wed, Feb 22, 2012 at 4:18 AM, Mike Frysinger <vapier at gentoo.org> wrote:> The following changes since commit 2b010e46e629f118885f17ba860e9c4ddbba8779: > > ?Bug 44826 - <alias> must contain only a single <family> (2012-02-21 16:23:22 +0900) > > are available in the git repository at: > ?git://wh0rd.org/fontconfig.git cleanup > > Mike Frysinger (9): > ? ? ?FcStrPlus: optimize a little > ? ? ?delete unused variables > ? ? ?FcStat: change to FcChar8 for first arg > ? ? ?fc-cat: fix pointer warning > ? ? ?FcName{,Get}Constant: constify string input > ? ? ?fc-{list,match}: constify format string > ? ? ?fix build warnings when using --with-arch > ? ? ?FcObjectValidType: tweak -1 checking > ? ? ?makealias: handle missing funcs better > > ?fc-cat/fc-cat.c ? ? ? ? | ? ?2 +- > ?fc-list/fc-list.c ? ? ? | ? 20 ++++++++++---------- > ?fc-match/fc-match.c ? ? | ? 22 +++++++++++----------- > ?fontconfig/fontconfig.h | ? ?4 ++-- > ?src/fcarch.h ? ? ? ? ? ?| ? ?5 ++--- > ?src/fccache.c ? ? ? ? ? | ? 10 ++++------ > ?src/fcdir.c ? ? ? ? ? ? | ? 17 ----------------- > ?src/fcformat.c ? ? ? ? ?| ? ?5 ++--- > ?src/fcfreetype.c ? ? ? ?| ? ?3 --- > ?src/fcint.h ? ? ? ? ? ? | ? ?2 +- > ?src/fcname.c ? ? ? ? ? ?| ? ?8 +++----- > ?src/fcstr.c ? ? ? ? ? ? | ? ?8 +++++--- > ?src/makealias ? ? ? ? ? | ? 18 ++++++++++++++---- > ?13 files changed, 55 insertions(+), 69 deletions(-) > _______________________________________________ > Fontconfig mailing list > Fontconfig at lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/fontconfig-- Akira TAGOH