From a4bd5b7c7a06fe39d1461f9be098af37d364dcc2 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 13 Sep 2017 03:27:03 -0400 Subject: [varfonts] Change id argument in FcFreeTypeQuery* to unsigned int Going to use the top bit to query varfonts. --- fc-query/fc-query.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'fc-query') 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; } } -- cgit v1.2.3