diff options
Diffstat (limited to 'fslsfonts.c')
-rw-r--r-- | fslsfonts.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/fslsfonts.c b/fslsfonts.c index 5afc07b..3138a81 100644 --- a/fslsfonts.c +++ b/fslsfonts.c @@ -494,7 +494,6 @@ static void show_font_props(FontList *list) { unsigned int i; - char buf[1000]; FSPropInfo *pi = list->pi; FSPropOffset *po = list->po; unsigned char *pd = list->pd; @@ -502,14 +501,12 @@ show_font_props(FontList *list) num_props = pi->num_offsets; for (i = 0; i < num_props; i++, po++) { - strncpy(buf, (char *) (pd + po->name.position), po->name.length); - buf[po->name.length] = '\0'; - printf("%s\t", buf); + fwrite(pd + po->name.position, 1, po->name.length, stdout); + putc('\t', stdout); switch (po->type) { case PropTypeString: - strncpy(buf, (char *)pd + po->value.position, po->value.length); - buf[po->value.length] = '\0'; - printf("%s\n", buf); + fwrite(pd + po->value.position, 1, po->value.length, stdout); + putc('\n', stdout); break; case PropTypeUnsigned: printf("%lu\n", (unsigned long) po->value.position); |