[hackers] [wmii] Print only one line for each font with missing fontsets.

From: Kris Maglione <jg_AT_suckless.org>
Date: Sat Mar 31 06:22:31 2007

changeset: 2051:c5aa6015b0f1
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Sat Mar 31 00:19:12 2007 -0400
summary: Print only one line for each font with missing fontsets.

diff -r a6f357c52d8e -r c5aa6015b0f1 cmd/wmii/draw.c
--- a/cmd/wmii/draw.c Fri Mar 30 22:56:09 2007 -0400
+++ b/cmd/wmii/draw.c Sat Mar 31 00:19:12 2007 -0400
@@ -27,15 +27,20 @@ loadfont(Blitz *blitz, BlitzFont *font)
 loadfont(Blitz *blitz, BlitzFont *font) {
         char *fontname = font->fontstr;
         char **missing = nil, *def = "?";
- int n;
+ int n, i;
 
         if(font->set)
                 XFreeFontSet(blitz->dpy, font->set);
         font->set = XCreateFontSet(blitz->dpy, fontname, &missing, &n, &def);
         if(missing) {
- while(n--)
- fprintf(stderr, "wmii: missing fontset for '%s': %s\n",
- fontname, missing[n]);
+ fprintf(stderr, "%s: missing fontset%s for '%s':", argv0,
+ n > 1 ? "s": "",
+ fontname);
+ for(i = 0; i < n; i++)
+ fprintf(stderr, "%s %s",
+ i ? ",": "",
+ missing[i]);
+ fprintf(stderr, "\n");
                 XFreeStringList(missing);
         }
         if(font->set) {
Received on Sat Mar 31 2007 - 06:22:31 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:56:31 UTC