/*
- * $XFree86: $
+ * $XFree86: xc/lib/fontconfig/fc-list/fc-list.c,v 1.2 2002/02/15 06:01:26 keithp Exp $
*
* Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
*
#include <fontconfig/fontconfig.h>
#include <stdio.h>
#include <unistd.h>
+#include <stdlib.h>
#ifdef HAVE_CONFIG_H
#include <config.h>
#else
+#ifdef linux
+#define HAVE_GETOPT_LONG 1
+#endif
#define HAVE_GETOPT 1
#endif
+#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[] = {
#endif
#endif
-void usage (char *program)
+static void usage (char *program)
{
fprintf (stderr, "usage: %s [-vV?] [--verbose] [--version] [--help] [dirs]\n",
program);
int
main (int argc, char **argv)
{
- int ret = 0;
- FcFontSet *set;
int verbose = 0;
int i;
FcObjectSet *os = FcObjectSetBuild (FC_FAMILY, FC_LANG, 0);
return 1;
}
if (argv[i])
- pat = FcNameParse (argv[i]);
+ pat = FcNameParse ((FcChar8 *) argv[i]);
else
pat = FcPatternCreate ();