--- renderdemo.c.antoine	2006-02-08 02:51:05.000000000 -0500
+++ renderdemo.c	2006-02-08 02:59:09.000000000 -0500
@@ -402,9 +402,9 @@
 
 static gboolean
 parse_wrap (const char *name,
-	       const char *arg,
-	       gpointer    data,
-	       GError    **error)
+	    const char *arg,
+	    gpointer    data,
+	    GError    **error)
 {
   static GEnumClass *class = NULL;
   gboolean ret = TRUE;
@@ -428,8 +428,8 @@
   return ret;
 }
 
-static gchar*
-backends_to_string()
+static gchar *
+backends_to_string (void)
 {
   GString *backends = g_string_new (NULL);
   const PangoViewer **viewer;
@@ -446,35 +446,31 @@
 }
 
 static int
-backends_number()
+backends_get_count (void)
 {
   const PangoViewer **viewer;
   int i = 0;
 
   for (viewer = viewers; *viewer; viewer++)
     if ((*viewer)->id)
-      {
-	i++;
-      }
+      i++;
   
   return i;
 }
 
 
-static gchar*
-backend_description()
+static gchar *
+backend_description (void)
 {
  GString *description  = g_string_new("Pango backend to use for rendering ");
- int backends_count = backends_number();
+ int backends_count = backends_get_count ();
   
  if (backends_count > 1)
-   {
-     g_string_append_printf(description,"(default: %s)", (*viewers)->id);
-   }
+   g_string_append_printf(description,"(default: %s)", (*viewers)->id);
+ else if (backends_count == 1)
+   g_string_append_printf(description,"(only available: %s)", (*viewers)->id);
  else
-   {
-     g_string_append_printf(description,"(only possible value: %s)", (*viewers)->id);
-   }
+   g_string_append_printf(description,"(no backends found!)");
 
  return g_string_free(description,FALSE);
  
@@ -498,7 +494,7 @@
     opt_viewer = *viewer;
   else
     {
-      gchar *backends = backends_to_string();
+      gchar *backends = backends_to_string ();
 
       fail ("available --backend options are: %s", backends);
       g_free(backends);
@@ -513,15 +509,14 @@
 parse_options (int argc, char *argv[])
 {
   gchar *backend_options = backends_to_string();
-  int backend_options_size = backends_number();
-  GOptionFlags backend_flag = (backend_options_size > 1) ? 0 : G_OPTION_FLAG_HIDDEN;
-  gchar *desc = backend_description();
+  GOptionFlags backend_flag = backends_get_count () > 1 ? 0 : G_OPTION_FLAG_HIDDEN;
+  gchar *backend_desc = backend_description ();
   GOptionEntry entries[] =
   {
     {"no-auto-dir",	0, G_OPTION_FLAG_REVERSE, G_OPTION_ARG_NONE,	&opt_auto_dir,
      "No layout direction according to contents",			NULL},
-    {"backend",		0, backend_flag, G_OPTION_ARG_CALLBACK,			&parse_backend,
-     desc,                                                   backend_options},
+    {"backend",		0, backend_flag, G_OPTION_ARG_CALLBACK,		&parse_backend,
+     backend_desc,					     backend_options},
     {"no-display",	'q', G_OPTION_FLAG_REVERSE, G_OPTION_ARG_NONE,	&opt_display,
      "Do not display (just write to file or whatever)",			NULL},
     {"dpi",		0, 0, G_OPTION_ARG_INT,				&opt_dpi,
@@ -557,7 +552,7 @@
     {"width",		'w', 0, G_OPTION_ARG_INT,			&opt_width,
      "Width in points to which to wrap output",			    "points"},
     {"wrap",		0, 0, G_OPTION_ARG_CALLBACK,			&parse_wrap,
-     "Text wrapping mode (needs a width to be set)", "word/char/word-char"},
+     "Text wrapping mode (needs a width to be set)",   "word/char/word-char"},
     {NULL}
   };
   GError *error = NULL;
@@ -583,7 +578,7 @@
   }
   g_option_context_free(context);
   g_free(backend_options);
-  g_free(desc);
+  g_free(backend_desc);
 
   if ((opt_text && argc != 1) || (!opt_text && argc != 2))
     {

