2005-09-23 07:59:19 +02:00
|
|
|
/*
|
2008-08-12 22:34:24 +02:00
|
|
|
* fontconfig/fc-cat/fc-cat.c
|
2005-09-23 07:59:19 +02:00
|
|
|
*
|
|
|
|
* Copyright © 2002 Keith Packard
|
|
|
|
*
|
|
|
|
* Permission to use, copy, modify, distribute, and sell this software and its
|
|
|
|
* documentation for any purpose is hereby granted without fee, provided that
|
|
|
|
* the above copyright notice appear in all copies and that both that
|
|
|
|
* copyright notice and this permission notice appear in supporting
|
2010-11-10 22:45:42 +01:00
|
|
|
* documentation, and that the name of the author(s) not be used in
|
2005-09-23 07:59:19 +02:00
|
|
|
* advertising or publicity pertaining to distribution of the software without
|
2010-11-10 22:45:42 +01:00
|
|
|
* specific, written prior permission. The authors make no
|
2005-09-23 07:59:19 +02:00
|
|
|
* representations about the suitability of this software for any purpose. It
|
|
|
|
* is provided "as is" without express or implied warranty.
|
|
|
|
*
|
2009-03-12 21:00:08 +01:00
|
|
|
* THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
2005-09-23 07:59:19 +02:00
|
|
|
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
2009-03-12 21:00:08 +01:00
|
|
|
* EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
2005-09-23 07:59:19 +02:00
|
|
|
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
|
|
|
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
|
|
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
|
|
* PERFORMANCE OF THIS SOFTWARE.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include <config.h>
|
|
|
|
#else
|
|
|
|
#ifdef linux
|
|
|
|
#define HAVE_GETOPT_LONG 1
|
|
|
|
#endif
|
|
|
|
#define HAVE_GETOPT 1
|
|
|
|
#endif
|
|
|
|
|
2006-09-04 09:47:07 +02:00
|
|
|
#include <fontconfig/fontconfig.h>
|
2010-12-28 07:59:19 +01:00
|
|
|
#include "../src/fcarch.h"
|
2006-04-25 07:57:41 +02:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
2006-09-04 09:47:07 +02:00
|
|
|
#include <string.h>
|
2020-07-07 05:48:34 +02:00
|
|
|
#ifdef HAVE_UNISTD_H
|
2006-04-25 07:57:41 +02:00
|
|
|
#include <unistd.h>
|
2020-07-07 05:48:34 +02:00
|
|
|
#endif
|
2006-04-25 07:57:41 +02:00
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/stat.h>
|
|
|
|
#include <errno.h>
|
2018-03-15 04:54:02 +01:00
|
|
|
#include <locale.h>
|
2006-04-25 07:57:41 +02:00
|
|
|
|
2014-03-27 07:10:44 +01:00
|
|
|
#ifdef ENABLE_NLS
|
|
|
|
#include <libintl.h>
|
|
|
|
#define _(x) (dgettext(GETTEXT_PACKAGE, x))
|
|
|
|
#else
|
|
|
|
#define dgettext(d, s) (s)
|
|
|
|
#define _(x) (x)
|
|
|
|
#endif
|
|
|
|
|
2005-09-23 07:59:19 +02:00
|
|
|
#ifndef HAVE_GETOPT
|
|
|
|
#define HAVE_GETOPT 0
|
|
|
|
#endif
|
|
|
|
#ifndef HAVE_GETOPT_LONG
|
|
|
|
#define HAVE_GETOPT_LONG 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if HAVE_GETOPT_LONG
|
|
|
|
#undef _GNU_SOURCE
|
|
|
|
#define _GNU_SOURCE
|
|
|
|
#include <getopt.h>
|
|
|
|
const struct option longopts[] = {
|
|
|
|
{"version", 0, 0, 'V'},
|
2006-08-30 22:51:03 +02:00
|
|
|
{"verbose", 0, 0, 'v'},
|
2006-08-31 20:56:43 +02:00
|
|
|
{"recurse", 0, 0, 'r'},
|
2008-08-22 22:51:33 +02:00
|
|
|
{"help", 0, 0, 'h'},
|
2005-09-23 07:59:19 +02:00
|
|
|
{NULL,0,0,0},
|
|
|
|
};
|
|
|
|
#else
|
|
|
|
#if HAVE_GETOPT
|
|
|
|
extern char *optarg;
|
|
|
|
extern int optind, opterr, optopt;
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/*
|
2013-01-01 00:20:12 +01:00
|
|
|
* POSIX has broken stdio so that putc must do thread-safe locking,
|
2005-09-23 07:59:19 +02:00
|
|
|
* this is a serious performance problem for applications doing large
|
2013-01-01 00:20:12 +01:00
|
|
|
* amounts of IO with putc (as is done here). If available, use
|
|
|
|
* the putc_unlocked varient instead.
|
2005-09-23 07:59:19 +02:00
|
|
|
*/
|
|
|
|
|
2013-01-01 00:20:12 +01:00
|
|
|
#if defined(putc_unlocked) || defined(_IO_putc_unlocked)
|
2005-09-23 07:59:19 +02:00
|
|
|
#define PUTC(c,f) putc_unlocked(c,f)
|
|
|
|
#else
|
|
|
|
#define PUTC(c,f) putc(c,f)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
static FcBool
|
2006-09-01 10:15:14 +02:00
|
|
|
write_chars (FILE *f, const FcChar8 *chars)
|
2005-09-23 07:59:19 +02:00
|
|
|
{
|
|
|
|
FcChar8 c;
|
|
|
|
while ((c = *chars++))
|
|
|
|
{
|
|
|
|
switch (c) {
|
|
|
|
case '"':
|
|
|
|
case '\\':
|
|
|
|
if (PUTC ('\\', f) == EOF)
|
|
|
|
return FcFalse;
|
|
|
|
/* fall through */
|
|
|
|
default:
|
|
|
|
if (PUTC (c, f) == EOF)
|
|
|
|
return FcFalse;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return FcTrue;
|
|
|
|
}
|
|
|
|
|
|
|
|
static FcBool
|
2006-09-01 10:15:14 +02:00
|
|
|
write_ulong (FILE *f, unsigned long t)
|
2005-09-23 07:59:19 +02:00
|
|
|
{
|
|
|
|
int pow;
|
|
|
|
unsigned long temp, digit;
|
|
|
|
|
|
|
|
temp = t;
|
|
|
|
pow = 1;
|
|
|
|
while (temp >= 10)
|
|
|
|
{
|
|
|
|
temp /= 10;
|
|
|
|
pow *= 10;
|
|
|
|
}
|
|
|
|
temp = t;
|
|
|
|
while (pow)
|
|
|
|
{
|
|
|
|
digit = temp / pow;
|
|
|
|
if (PUTC ((char) digit + '0', f) == EOF)
|
|
|
|
return FcFalse;
|
|
|
|
temp = temp - pow * digit;
|
|
|
|
pow = pow / 10;
|
|
|
|
}
|
|
|
|
return FcTrue;
|
|
|
|
}
|
|
|
|
|
|
|
|
static FcBool
|
2006-09-01 10:15:14 +02:00
|
|
|
write_int (FILE *f, int i)
|
2005-09-23 07:59:19 +02:00
|
|
|
{
|
2006-09-01 10:15:14 +02:00
|
|
|
return write_ulong (f, (unsigned long) i);
|
2005-09-23 07:59:19 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static FcBool
|
2006-09-01 10:15:14 +02:00
|
|
|
write_string (FILE *f, const FcChar8 *string)
|
2005-09-23 07:59:19 +02:00
|
|
|
{
|
|
|
|
|
|
|
|
if (PUTC ('"', f) == EOF)
|
|
|
|
return FcFalse;
|
2006-09-01 10:15:14 +02:00
|
|
|
if (!write_chars (f, string))
|
2005-09-23 07:59:19 +02:00
|
|
|
return FcFalse;
|
|
|
|
if (PUTC ('"', f) == EOF)
|
|
|
|
return FcFalse;
|
|
|
|
return FcTrue;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2008-08-22 22:51:33 +02:00
|
|
|
usage (char *program, int error)
|
2005-09-23 07:59:19 +02:00
|
|
|
{
|
2008-08-22 22:51:33 +02:00
|
|
|
FILE *file = error ? stderr : stdout;
|
2005-09-23 07:59:19 +02:00
|
|
|
#if HAVE_GETOPT_LONG
|
2014-03-27 07:10:44 +01:00
|
|
|
fprintf (file, _("usage: %s [-rv] [--recurse] [--verbose] [*-%s" FC_CACHE_SUFFIX "|directory]...\n"),
|
2006-08-31 20:56:43 +02:00
|
|
|
program, FC_ARCHITECTURE);
|
2008-08-22 22:51:33 +02:00
|
|
|
fprintf (file, " %s [-Vh] [--version] [--help]\n", program);
|
2005-09-23 07:59:19 +02:00
|
|
|
#else
|
2014-03-27 07:10:44 +01:00
|
|
|
fprintf (file, _("usage: %s [-rvVh] [*-%s" FC_CACHE_SUFFIX "|directory]...\n"),
|
2006-08-31 20:56:43 +02:00
|
|
|
program, FC_ARCHITECTURE);
|
2005-09-23 07:59:19 +02:00
|
|
|
#endif
|
2014-03-27 07:10:44 +01:00
|
|
|
fprintf (file, _("Reads font information cache from:\n"));
|
|
|
|
fprintf (file, _(" 1) specified fontconfig cache file\n"));
|
|
|
|
fprintf (file, _(" 2) related to a particular font directory\n"));
|
2008-08-22 22:51:33 +02:00
|
|
|
fprintf (file, "\n");
|
2005-09-23 07:59:19 +02:00
|
|
|
#if HAVE_GETOPT_LONG
|
2014-03-27 07:10:44 +01:00
|
|
|
fprintf (file, _(" -r, --recurse recurse into subdirectories\n"));
|
|
|
|
fprintf (file, _(" -v, --verbose be verbose\n"));
|
|
|
|
fprintf (file, _(" -V, --version display font config version and exit\n"));
|
|
|
|
fprintf (file, _(" -h, --help display this help and exit\n"));
|
2005-09-23 07:59:19 +02:00
|
|
|
#else
|
2014-03-27 07:10:44 +01:00
|
|
|
fprintf (file, _(" -r (recurse) recurse into subdirectories\n"));
|
|
|
|
fprintf (file, _(" -v (verbose) be verbose\n"));
|
|
|
|
fprintf (file, _(" -V (version) display font config version and exit\n"));
|
|
|
|
fprintf (file, _(" -h (help) display this help and exit\n"));
|
2005-09-23 07:59:19 +02:00
|
|
|
#endif
|
2008-08-22 22:51:33 +02:00
|
|
|
exit (error);
|
2005-09-23 07:59:19 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* return the path from the directory containing 'cache' to 'file'
|
|
|
|
*/
|
|
|
|
|
|
|
|
static const FcChar8 *
|
2006-09-04 09:47:07 +02:00
|
|
|
file_base_name (const FcChar8 *cache, const FcChar8 *file)
|
2005-09-23 07:59:19 +02:00
|
|
|
{
|
2006-09-04 09:47:07 +02:00
|
|
|
int cache_len = strlen ((char *) cache);
|
2005-09-23 07:59:19 +02:00
|
|
|
|
2006-09-04 09:47:07 +02:00
|
|
|
if (!strncmp ((char *) cache, (char *) file, cache_len) && file[cache_len] == '/')
|
2006-08-30 22:51:03 +02:00
|
|
|
return file + cache_len + 1;
|
2005-09-23 07:59:19 +02:00
|
|
|
return file;
|
|
|
|
}
|
|
|
|
|
2006-09-04 09:47:07 +02:00
|
|
|
#define FC_FONT_FILE_DIR ((FcChar8 *) ".dir")
|
|
|
|
|
2006-09-01 10:15:14 +02:00
|
|
|
static FcBool
|
2006-09-04 09:47:07 +02:00
|
|
|
cache_print_set (FcFontSet *set, FcStrSet *dirs, const FcChar8 *base_name, FcBool verbose)
|
2005-09-23 07:59:19 +02:00
|
|
|
{
|
2011-06-20 17:55:25 +02:00
|
|
|
FcChar8 *dir;
|
|
|
|
const FcChar8 *base;
|
2005-09-23 07:59:19 +02:00
|
|
|
int n;
|
2006-08-31 20:56:43 +02:00
|
|
|
int ndir = 0;
|
2005-09-23 07:59:19 +02:00
|
|
|
FcStrList *list;
|
|
|
|
|
|
|
|
list = FcStrListCreate (dirs);
|
|
|
|
if (!list)
|
|
|
|
goto bail2;
|
|
|
|
|
|
|
|
while ((dir = FcStrListNext (list)))
|
|
|
|
{
|
2006-09-01 10:15:14 +02:00
|
|
|
base = file_base_name (base_name, dir);
|
|
|
|
if (!write_string (stdout, base))
|
2005-09-23 07:59:19 +02:00
|
|
|
goto bail3;
|
|
|
|
if (PUTC (' ', stdout) == EOF)
|
|
|
|
goto bail3;
|
2006-09-01 10:15:14 +02:00
|
|
|
if (!write_int (stdout, 0))
|
2005-09-23 07:59:19 +02:00
|
|
|
goto bail3;
|
|
|
|
if (PUTC (' ', stdout) == EOF)
|
|
|
|
goto bail3;
|
2006-09-01 10:15:14 +02:00
|
|
|
if (!write_string (stdout, FC_FONT_FILE_DIR))
|
2005-09-23 07:59:19 +02:00
|
|
|
goto bail3;
|
|
|
|
if (PUTC ('\n', stdout) == EOF)
|
|
|
|
goto bail3;
|
2006-08-31 20:56:43 +02:00
|
|
|
ndir++;
|
2005-09-23 07:59:19 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
for (n = 0; n < set->nfont; n++)
|
|
|
|
{
|
2006-09-04 09:47:07 +02:00
|
|
|
FcPattern *font = set->fonts[n];
|
2011-06-20 17:55:25 +02:00
|
|
|
FcChar8 *s;
|
2006-08-30 22:51:03 +02:00
|
|
|
|
2011-11-07 21:24:53 +01:00
|
|
|
s = FcPatternFormat (font, (const FcChar8 *) "%{=fccat}\n");
|
2011-06-20 17:55:25 +02:00
|
|
|
if (s)
|
|
|
|
{
|
|
|
|
printf ("%s", s);
|
2012-06-01 12:06:17 +02:00
|
|
|
FcStrFree (s);
|
2011-06-20 17:55:25 +02:00
|
|
|
}
|
2005-09-23 07:59:19 +02:00
|
|
|
}
|
2006-08-31 20:56:43 +02:00
|
|
|
if (verbose && !set->nfont && !ndir)
|
|
|
|
printf ("<empty>\n");
|
2011-06-20 17:55:25 +02:00
|
|
|
|
2005-09-23 07:59:19 +02:00
|
|
|
FcStrListDone (list);
|
|
|
|
|
|
|
|
return FcTrue;
|
2011-06-20 17:55:25 +02:00
|
|
|
|
2005-09-23 07:59:19 +02:00
|
|
|
bail3:
|
|
|
|
FcStrListDone (list);
|
|
|
|
bail2:
|
|
|
|
return FcFalse;
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
main (int argc, char **argv)
|
|
|
|
{
|
|
|
|
int i;
|
2006-08-30 22:51:03 +02:00
|
|
|
int ret = 0;
|
|
|
|
FcFontSet *fs;
|
|
|
|
FcStrSet *dirs;
|
2006-08-31 20:56:43 +02:00
|
|
|
FcStrSet *args = NULL;
|
|
|
|
FcStrList *arglist;
|
2006-08-30 22:51:03 +02:00
|
|
|
FcCache *cache;
|
|
|
|
FcConfig *config;
|
2006-08-31 20:56:43 +02:00
|
|
|
FcChar8 *arg;
|
2006-08-30 22:51:03 +02:00
|
|
|
int verbose = 0;
|
2006-08-31 20:56:43 +02:00
|
|
|
int recurse = 0;
|
|
|
|
FcBool first = FcTrue;
|
2005-09-23 07:59:19 +02:00
|
|
|
#if HAVE_GETOPT_LONG || HAVE_GETOPT
|
|
|
|
int c;
|
|
|
|
|
2018-03-15 04:54:02 +01:00
|
|
|
setlocale (LC_ALL, "");
|
2005-09-23 07:59:19 +02:00
|
|
|
#if HAVE_GETOPT_LONG
|
2008-08-22 22:51:33 +02:00
|
|
|
while ((c = getopt_long (argc, argv, "Vvrh", longopts, NULL)) != -1)
|
2005-09-23 07:59:19 +02:00
|
|
|
#else
|
2008-08-22 22:51:33 +02:00
|
|
|
while ((c = getopt (argc, argv, "Vvrh")) != -1)
|
2005-09-23 07:59:19 +02:00
|
|
|
#endif
|
|
|
|
{
|
|
|
|
switch (c) {
|
|
|
|
case 'V':
|
|
|
|
fprintf (stderr, "fontconfig version %d.%d.%d\n",
|
|
|
|
FC_MAJOR, FC_MINOR, FC_REVISION);
|
|
|
|
exit (0);
|
2006-08-30 22:51:03 +02:00
|
|
|
case 'v':
|
|
|
|
verbose++;
|
|
|
|
break;
|
2006-08-31 20:56:43 +02:00
|
|
|
case 'r':
|
|
|
|
recurse++;
|
|
|
|
break;
|
2008-08-22 22:51:33 +02:00
|
|
|
case 'h':
|
|
|
|
usage (argv[0], 0);
|
2005-09-23 07:59:19 +02:00
|
|
|
default:
|
2008-08-22 22:51:33 +02:00
|
|
|
usage (argv[0], 1);
|
2005-09-23 07:59:19 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
i = optind;
|
|
|
|
#else
|
|
|
|
i = 1;
|
|
|
|
#endif
|
|
|
|
|
2006-02-21 15:12:41 +01:00
|
|
|
config = FcInitLoadConfig ();
|
|
|
|
if (!config)
|
|
|
|
{
|
2014-03-27 07:10:44 +01:00
|
|
|
fprintf (stderr, _("%s: Can't initialize font config library\n"), argv[0]);
|
2006-02-21 15:12:41 +01:00
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
FcConfigSetCurrent (config);
|
2014-08-12 11:48:00 +02:00
|
|
|
FcConfigDestroy (config);
|
2006-02-21 15:12:41 +01:00
|
|
|
|
2006-08-31 20:56:43 +02:00
|
|
|
args = FcStrSetCreate ();
|
|
|
|
if (!args)
|
|
|
|
{
|
2014-03-27 07:10:44 +01:00
|
|
|
fprintf (stderr, _("%s: malloc failure\n"), argv[0]);
|
2006-08-31 20:56:43 +02:00
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
if (i < argc)
|
|
|
|
{
|
|
|
|
for (; i < argc; i++)
|
|
|
|
{
|
2006-09-04 09:47:07 +02:00
|
|
|
if (!FcStrSetAddFilename (args, (const FcChar8 *) argv[i]))
|
2006-08-31 20:56:43 +02:00
|
|
|
{
|
2014-03-27 07:10:44 +01:00
|
|
|
fprintf (stderr, _("%s: malloc failure\n"), argv[0]);
|
2006-08-31 20:56:43 +02:00
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
recurse++;
|
|
|
|
arglist = FcConfigGetFontDirs (config);
|
|
|
|
while ((arg = FcStrListNext (arglist)))
|
|
|
|
if (!FcStrSetAdd (args, arg))
|
|
|
|
{
|
2014-03-27 07:10:44 +01:00
|
|
|
fprintf (stderr, _("%s: malloc failure\n"), argv[0]);
|
2006-08-31 20:56:43 +02:00
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
FcStrListDone (arglist);
|
|
|
|
}
|
|
|
|
arglist = FcStrListCreate (args);
|
|
|
|
if (!arglist)
|
|
|
|
{
|
2014-03-27 07:10:44 +01:00
|
|
|
fprintf (stderr, _("%s: malloc failure\n"), argv[0]);
|
2006-08-31 20:56:43 +02:00
|
|
|
return 1;
|
|
|
|
}
|
2014-08-12 11:53:04 +02:00
|
|
|
FcStrSetDestroy (args);
|
2005-11-18 21:32:30 +01:00
|
|
|
|
2006-08-31 20:56:43 +02:00
|
|
|
while ((arg = FcStrListNext (arglist)))
|
2005-12-01 08:12:45 +01:00
|
|
|
{
|
2006-08-31 20:56:43 +02:00
|
|
|
int j;
|
|
|
|
FcChar8 *cache_file = NULL;
|
2006-09-01 10:15:14 +02:00
|
|
|
struct stat file_stat;
|
2016-09-07 04:39:11 +02:00
|
|
|
|
|
|
|
/* reset errno */
|
|
|
|
errno = 0;
|
2006-08-31 20:56:43 +02:00
|
|
|
if (FcFileIsDir (arg))
|
2006-09-01 10:15:14 +02:00
|
|
|
cache = FcDirCacheLoad (arg, config, &cache_file);
|
2006-08-30 22:51:03 +02:00
|
|
|
else
|
2006-09-01 10:15:14 +02:00
|
|
|
cache = FcDirCacheLoadFile (arg, &file_stat);
|
2006-08-31 07:23:25 +02:00
|
|
|
if (!cache)
|
2006-08-30 22:51:03 +02:00
|
|
|
{
|
2016-09-07 04:39:11 +02:00
|
|
|
if (errno != 0)
|
|
|
|
perror ((char *) arg);
|
|
|
|
else
|
|
|
|
fprintf (stderr, "%s: Unable to load the cache: %s\n", argv[0], arg);
|
2006-08-30 22:51:03 +02:00
|
|
|
ret++;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
dirs = FcStrSetCreate ();
|
2006-09-04 09:47:07 +02:00
|
|
|
fs = FcCacheCopySet (cache);
|
|
|
|
for (j = 0; j < FcCacheNumSubdir (cache); j++)
|
2006-08-31 20:56:43 +02:00
|
|
|
{
|
2006-09-04 09:47:07 +02:00
|
|
|
FcStrSetAdd (dirs, FcCacheSubdir (cache, j));
|
2006-08-31 20:56:43 +02:00
|
|
|
if (recurse)
|
2006-09-04 09:47:07 +02:00
|
|
|
FcStrSetAdd (args, FcCacheSubdir (cache, j));
|
2006-08-31 20:56:43 +02:00
|
|
|
}
|
2006-08-30 22:51:03 +02:00
|
|
|
|
|
|
|
if (verbose)
|
2006-08-31 20:56:43 +02:00
|
|
|
{
|
|
|
|
if (!first)
|
|
|
|
printf ("\n");
|
2014-03-27 07:10:44 +01:00
|
|
|
printf (_("Directory: %s\nCache: %s\n--------\n"),
|
2006-08-31 20:56:43 +02:00
|
|
|
FcCacheDir(cache), cache_file ? cache_file : arg);
|
|
|
|
first = FcFalse;
|
|
|
|
}
|
2006-09-01 10:15:14 +02:00
|
|
|
cache_print_set (fs, dirs, FcCacheDir (cache), verbose);
|
2005-09-23 07:59:19 +02:00
|
|
|
|
2006-08-30 22:51:03 +02:00
|
|
|
FcStrSetDestroy (dirs);
|
|
|
|
|
2006-09-04 09:47:07 +02:00
|
|
|
FcFontSetDestroy (fs);
|
2006-09-01 10:15:14 +02:00
|
|
|
FcDirCacheUnload (cache);
|
2006-08-31 20:56:43 +02:00
|
|
|
if (cache_file)
|
|
|
|
FcStrFree (cache_file);
|
2006-08-30 22:51:03 +02:00
|
|
|
}
|
2014-08-12 11:53:04 +02:00
|
|
|
FcStrListDone (arglist);
|
2005-09-23 07:59:19 +02:00
|
|
|
|
2010-09-03 14:11:00 +02:00
|
|
|
FcFini ();
|
2005-09-23 07:59:19 +02:00
|
|
|
return 0;
|
|
|
|
}
|