/*
* $RCSId: xc/lib/fontconfig/fc-list/fc-list.c,v 1.5 2002/06/30 23:45:40 keithp Exp $
*
- * Copyright © 2002 Keith Packard
+ * 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
static void usage (char *program)
{
+#if HAVE_GETOPT_LONG
fprintf (stderr, "usage: %s [-vV?] [--verbose] [--version] [--help] [pattern] {element ...} \n",
program);
+#else
+ fprintf (stderr, "usage: %s [-vV?] [pattern] {element ...} \n",
+ program);
+#endif
fprintf (stderr, "List fonts matching [pattern]\n");
fprintf (stderr, "\n");
+#if HAVE_GETOPT_LONG
fprintf (stderr, " -v, --verbose display status information while busy\n");
fprintf (stderr, " -V, --version display font config version and exit\n");
fprintf (stderr, " -?, --help display this help and exit\n");
+#else
+ fprintf (stderr, " -v (verbose) display status information while busy\n");
+ fprintf (stderr, " -V (version) display font config version and exit\n");
+ fprintf (stderr, " -? (help) display this help and exit\n");
+#endif
exit (1);
}
int
main (int argc, char **argv)
{
- int verbose = 0;
+ /*int verbose = 0;*/
int i;
FcObjectSet *os = 0;
FcFontSet *fs;
FC_MAJOR, FC_MINOR, FC_REVISION);
exit (0);
case 'v':
- verbose = 1;
+ /* verbose = 1; */
break;
default:
usage (argv[0]);
pat = FcPatternCreate ();
if (!os)
- os = FcObjectSetBuild (FC_FAMILY, FC_STYLE, 0);
+ os = FcObjectSetBuild (FC_FAMILY, FC_STYLE, (char *) 0);
fs = FcFontList (0, pat, os);
+ FcObjectSetDestroy (os);
if (pat)
FcPatternDestroy (pat);
}
FcFontSetDestroy (fs);
}
+
+ FcFini ();
+
return 0;
}