summaryrefslogtreecommitdiff
path: root/fc-query
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2017-09-13 03:27:03 -0400
committerBehdad Esfahbod <behdad@behdad.org>2017-09-20 13:13:35 -0700
commita4bd5b7c7a06fe39d1461f9be098af37d364dcc2 (patch)
treeb26e8809c2df9d80806942781b2492ab922785db /fc-query
parent819d3a5541b3903bda5d1299d48a6760379cac72 (diff)
[varfonts] Change id argument in FcFreeTypeQuery* to unsigned int
Going to use the top bit to query varfonts.
Diffstat (limited to 'fc-query')
-rw-r--r--fc-query/fc-query.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fc-query/fc-query.c b/fc-query/fc-query.c
index a5b2cda7..2d2825a6 100644
--- a/fc-query/fc-query.c
+++ b/fc-query/fc-query.c
@@ -98,7 +98,7 @@ usage (char *program, int error)
int
main (int argc, char **argv)
{
- int id = -1;
+ unsigned int id = (unsigned int) -1;
int ignore_blanks = 0;
FcFontSet *fs;
FcChar8 *format = NULL;
@@ -119,7 +119,7 @@ main (int argc, char **argv)
ignore_blanks = 1;
break;
case 'i':
- id = atoi (optarg);
+ id = (unsigned int) strtol (optarg, NULL, 0); /* strtol() To handle -1. */
break;
case 'f':
format = (FcChar8 *) strdup (optarg);
@@ -150,7 +150,7 @@ main (int argc, char **argv)
{
if (!FcFreeTypeQueryAll ((FcChar8*) argv[i], id, blanks, NULL, fs))
{
- fprintf (stderr, "Can't query face %d of font file %s\n", id, argv[i]);
+ fprintf (stderr, "Can't query face %u of font file %s\n", id, argv[i]);
err = 1;
}
}