]> git.wh0rd.org - fontconfig.git/blobdiff - fc-query/fc-query.c
Add Nauru (na) orthography (bug #20418)
[fontconfig.git] / fc-query / fc-query.c
index 8fec7d47236b362d8596e1831eacef84f23048e9..4d707bc1a5fc1af4d6cb4970a90623063ef1e1f8 100644 (file)
@@ -86,7 +86,6 @@ usage (char *program, int error)
 #else
     fprintf (file, "  -i INDEX   (index)   display the INDEX face of each font file only\n");
     fprintf (file, "  -f FORMAT  (format)  use the given output format\n");
-    fprintf (file, "  -a         (all)     display unpruned sorted list of matches\n");
     fprintf (file, "  -V         (version) display font config version and exit\n");
     fprintf (file, "  -h         (help)    display this help and exit\n");
 #endif
@@ -106,9 +105,9 @@ main (int argc, char **argv)
     int                c;
 
 #if HAVE_GETOPT_LONG
-    while ((c = getopt_long (argc, argv, "i:sVvh", longopts, NULL)) != -1)
+    while ((c = getopt_long (argc, argv, "i:f:Vh", longopts, NULL)) != -1)
 #else
-    while ((c = getopt (argc, argv, "i:asVvh")) != -1)
+    while ((c = getopt (argc, argv, "i:f:Vh")) != -1)
 #endif
     {
        switch (c) {
@@ -163,8 +162,11 @@ main (int argc, char **argv)
                    FcChar8 *s;
 
                    s = FcPatternFormat (pat, format);
-                   printf ("%s", s);
-                   free (s);
+                   if (s)
+                   {
+                       printf ("%s", s);
+                       free (s);
+                   }
                }
                else
                {