Port Xft1 to fontconfig
This commit is contained in:
parent
80c053b725
commit
9c8e07f195
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* $XFree86: xc/lib/fontconfig/fontconfig/fontconfig.h,v 1.3 2002/02/19 07:50:43 keithp Exp $
|
||||
* $XFree86: xc/lib/fontconfig/fontconfig/fontconfig.h,v 1.4 2002/02/28 16:51:48 keithp Exp $
|
||||
*
|
||||
* Copyright © 2001 Keith Packard, member of The XFree86 Project, Inc.
|
||||
*
|
||||
|
@ -333,9 +333,15 @@ FcChar32
|
|||
FcCharSetCoverage (const FcCharSet *a, FcChar32 page, FcChar32 *result);
|
||||
|
||||
/* fcdbg.c */
|
||||
void
|
||||
FcValuePrint (FcValue v);
|
||||
|
||||
void
|
||||
FcPatternPrint (FcPattern *p);
|
||||
|
||||
void
|
||||
FcFontSetPrint (FcFontSet *s);
|
||||
|
||||
/* fcdefault.c */
|
||||
void
|
||||
FcDefaultSubstitute (FcPattern *pattern);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* $XFree86: xc/lib/fontconfig/src/fccache.c,v 1.2 2002/02/15 06:01:27 keithp Exp $
|
||||
* $XFree86: xc/lib/fontconfig/src/fccache.c,v 1.3 2002/02/19 07:50:43 keithp Exp $
|
||||
*
|
||||
* Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
|
||||
*
|
||||
|
@ -54,7 +54,7 @@ FcFileCacheFind (FcFileCache *cache,
|
|||
maxid = -1;
|
||||
for (c = cache->ents[hash % FC_FILE_CACHE_HASH_SIZE]; c; c = c->next)
|
||||
{
|
||||
if (c->hash == hash && !strcmp (match, c->file))
|
||||
if (c->hash == hash && !strcmp ((const char *) match, (const char *) c->file))
|
||||
{
|
||||
if (c->id > maxid)
|
||||
maxid = c->id;
|
||||
|
@ -222,7 +222,8 @@ FcFileCacheAdd (FcFileCache *cache,
|
|||
(old = *prev);
|
||||
prev = &(*prev)->next)
|
||||
{
|
||||
if (old->hash == hash && old->id == id && !strcmp (old->file, file))
|
||||
if (old->hash == hash && old->id == id && !strcmp ((const char *) old->file,
|
||||
(const char *) file))
|
||||
break;
|
||||
}
|
||||
if (*prev)
|
||||
|
@ -249,10 +250,10 @@ FcFileCacheAdd (FcFileCache *cache,
|
|||
c->file = (FcChar8 *) (c + 1);
|
||||
c->id = id;
|
||||
c->name = c->file + strlen ((char *) file) + 1;
|
||||
strcpy (c->file, file);
|
||||
strcpy ((char *) c->file, (const char *) file);
|
||||
c->time = time;
|
||||
c->referenced = replace;
|
||||
strcpy (c->name, name);
|
||||
strcpy ((char *) c->name, (const char *) name);
|
||||
cache->entries++;
|
||||
return FcTrue;
|
||||
}
|
||||
|
@ -533,7 +534,7 @@ FcFileCacheReadDir (FcFontSet *set, const FcChar8 *cache_file)
|
|||
font = FcNameParse (name);
|
||||
if (font)
|
||||
{
|
||||
strcpy (base, file);
|
||||
strcpy ((char *) base, (const char *) file);
|
||||
if (FcDebug () & FC_DBG_CACHEV)
|
||||
{
|
||||
printf (" dir cache file \"%s\"\n", file);
|
||||
|
|
10
src/fccfg.c
10
src/fccfg.c
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* $XFree86: xc/lib/fontconfig/src/fccfg.c,v 1.3 2002/02/19 08:33:23 keithp Exp $
|
||||
* $XFree86: xc/lib/fontconfig/src/fccfg.c,v 1.4 2002/02/24 01:23:35 keithp Exp $
|
||||
*
|
||||
* Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
|
||||
*
|
||||
|
@ -224,7 +224,7 @@ FcConfigAddDir (FcConfig *config,
|
|||
dir = (FcChar8 *) malloc (strlen ((char *) d) + 1);
|
||||
if (!dir)
|
||||
return FcFalse;
|
||||
strcpy (dir, d);
|
||||
strcpy ((char *) dir, (const char *) d);
|
||||
}
|
||||
if (!FcConfigAddString (&config->dirs, dir))
|
||||
{
|
||||
|
@ -1192,7 +1192,7 @@ FcConfigFileExists (const FcChar8 *dir, const FcChar8 *file)
|
|||
if (!path)
|
||||
return 0;
|
||||
|
||||
strcpy (path, dir);
|
||||
strcpy ((char *) path, (const char *) dir);
|
||||
/* make sure there's a single separating / */
|
||||
if ((!path[0] || path[strlen((char *) path)-1] != '/') && file[0] != '/')
|
||||
strcat ((char *) path, "/");
|
||||
|
@ -1240,7 +1240,7 @@ FcConfigGetPath (void)
|
|||
path[i] = malloc (colon - e + 1);
|
||||
if (!path[i])
|
||||
goto bail1;
|
||||
strncpy (path[i], e, colon - e);
|
||||
strncpy ((char *) path[i], (const char *) e, colon - e);
|
||||
path[i][colon - e] = '\0';
|
||||
if (*colon)
|
||||
e = colon + 1;
|
||||
|
@ -1254,7 +1254,7 @@ FcConfigGetPath (void)
|
|||
path[i] = malloc (strlen ((char *) dir) + 1);
|
||||
if (!path[i])
|
||||
goto bail1;
|
||||
strcpy (path[i], dir);
|
||||
strcpy ((char *) path[i], (const char *) dir);
|
||||
return path;
|
||||
|
||||
bail1:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* $XFree86: $
|
||||
* $XFree86: xc/lib/fontconfig/src/fcdir.c,v 1.2 2002/02/15 06:01:28 keithp Exp $
|
||||
*
|
||||
* Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
|
||||
*
|
||||
|
@ -53,7 +53,7 @@ FcFileScan (FcFontSet *set,
|
|||
if (name)
|
||||
{
|
||||
/* "." means the file doesn't contain a font */
|
||||
if (strcmp (name, FC_INVALID_FONT_FILE) != 0)
|
||||
if (strcmp ((const char *) name, FC_INVALID_FONT_FILE) != 0)
|
||||
{
|
||||
font = FcNameParse (name);
|
||||
if (font)
|
||||
|
|
Loading…
Reference in New Issue