Index: avrpart.c
===================================================================
--- avrpart.c	(revision 1018)
+++ avrpart.c	(working copy)
@@ -470,8 +470,26 @@
   }
 }
 
+/*
+ * Compare function to sort the list of programmers
+ */
+static int sort_avrparts_compare(AVRPART * p1,AVRPART * p2)
+{
+  if(p1 == NULL || p2 == NULL) {
+    return 0;
+  }
+  return strncasecmp(p1->desc,p2->desc,AVR_IDLEN);
+}
 
+/*
+ * Sort the list of programmers given as "programmers"
+ */
+void sort_avrparts(LISTID avrparts)
+{
+  lsort(avrparts,(int (*)(void*, void*)) sort_avrparts_compare);
+}
 
+
 static char * reset_disp_str(int r)
 {
   switch (r) {
Index: avrpart.h
===================================================================
--- avrpart.h	(revision 1018)
+++ avrpart.h	(working copy)
@@ -221,8 +221,8 @@
 typedef void (*walk_avrparts_cb)(const char *name, const char *desc,
                                  const char *cfgname, int cfglineno,
                                  void *cookie);
-void walk_avrparts(LISTID programmers, walk_avrparts_cb cb, void *cookie);
-
+void walk_avrparts(LISTID avrparts, walk_avrparts_cb cb, void *cookie);
+void sort_avrparts(LISTID avrparts);
 #ifdef __cplusplus
 }
 #endif
Index: lists.c
===================================================================
--- lists.c	(revision 1018)
+++ lists.c	(working copy)
@@ -1280,7 +1280,44 @@
   return NULL;
 }
 
+/*----------------------------------------------------------------------
+|  lsort
+|
+|  sort list - sorts list inplace (using bubble sort)
+|
+ ----------------------------------------------------------------------*/
+void
+lsort ( LISTID lid, int (* compare)(void * p1, void * p2) )
+{
+  LIST * l;
+  LISTNODE * lt; /* this */
+  LISTNODE * ln; /* next */
+  int unsorted = 1;
 
+  l = (LIST *)lid;
+
+  CKLMAGIC(l);
+
+  while(unsorted){
+    lt = l->top;
+    unsorted = 0;
+    while (lt!=NULL) {
+      CKMAGIC(lt);
+      ln = lt->next;
+      if (ln!= NULL && compare(lt->data,ln->data) > 0) {
+        void * p = ln->data;
+        ln->data = lt->data;
+        lt->data = p;
+        unsorted = 1;
+      }
+      lt = ln;
+    }
+  }
+
+  CKLMAGIC(l);
+}
+
+
 int lprint ( FILE * f, LISTID lid )
 {
   LIST * l;
Index: lists.h
===================================================================
--- lists.h	(revision 1018)
+++ lists.h	(working copy)
@@ -104,6 +104,8 @@
 
 LISTID     lcat    ( LISTID lid1, LISTID lid2 );
 
+void       lsort   ( LISTID lid, int (*compare)(void * p1, void * p2));
+
 void     * lsrch   ( LISTID lid, void * p, int (*compare)(void *p1,void *p2));
 
 int        lprint  ( FILE * f, LISTID lid );
Index: main.c
===================================================================
--- main.c	(revision 1018)
+++ main.c	(working copy)
@@ -198,9 +198,13 @@
                                       void *cookie)
 {
     struct list_walk_cookie *c = (struct list_walk_cookie *)cookie;
-
-    fprintf(c->f, "%s%-8s = %-30s [%s:%d]\n",
-            c->prefix, name, desc, cfgname, cfglineno);
+    if (verbose){
+        fprintf(c->f, "%s%-16s = %-30s [%s:%d]\n",
+                c->prefix, name, desc, cfgname, cfglineno);
+    } else {
+        fprintf(c->f, "%s%-16s = %-s\n",
+                c->prefix, name, desc);
+    }
 }
 
 static void list_programmers(FILE * f, const char *prefix, LISTID programmers)
@@ -210,6 +214,8 @@
     c.f = f;
     c.prefix = prefix;
 
+    sort_programmers(programmers);
+
     walk_programmers(programmers, list_programmers_callback, &c);
 }
 
@@ -219,8 +225,13 @@
 {
     struct list_walk_cookie *c = (struct list_walk_cookie *)cookie;
 
-    fprintf(c->f, "%s%-4s = %-15s [%s:%d]\n",
-            c->prefix, name, desc, cfgname, cfglineno);
+    if (verbose){
+        fprintf(c->f, "%s%-8s = %-18s [%s:%d]\n",
+                c->prefix, name, desc, cfgname, cfglineno);
+    } else {
+        fprintf(c->f, "%s%-8s = %s\n",
+                c->prefix, name, desc);
+    }
 }
 
 static void list_parts(FILE * f, const char *prefix, LISTID avrparts)
@@ -230,6 +241,8 @@
     c.f = f;
     c.prefix = prefix;
 
+    sort_avrparts(avrparts);
+
     walk_avrparts(avrparts, list_avrparts_callback, &c);
 }
 
Index: pgm.c
===================================================================
--- pgm.c	(revision 1018)
+++ pgm.c	(working copy)
@@ -218,11 +218,37 @@
 void walk_programmers(LISTID programmers, walk_programmers_cb cb, void *cookie)
 {
   LNODEID ln1;
+  LNODEID ln2;
   PROGRAMMER * p;
 
   for (ln1 = lfirst(programmers); ln1; ln1 = lnext(ln1)) {
     p = ldata(ln1);
-    cb((char *)ldata(lfirst(p->id)), p->desc, p->config_file, p->lineno, cookie);
+    for (ln2=lfirst(p->id); ln2; ln2=lnext(ln2)) {
+      cb(ldata(ln2), p->desc, p->config_file, p->lineno, cookie);
+    }
   }
 }
 
+/*
+ * Compare function to sort the list of programmers
+ */
+static int sort_programmer_compare(PROGRAMMER * p1,PROGRAMMER * p2)
+{
+  char* id1;
+  char* id2;
+  if(p1 == NULL || p2 == NULL) {
+    return 0;
+  }
+  id1 = ldata(lfirst(p1->id));
+  id2 = ldata(lfirst(p2->id));
+  return strncasecmp(id1,id2,AVR_IDLEN);
+}
+
+/*
+ * Sort the list of programmers given as "programmers"
+ */
+void sort_programmers(LISTID programmers)
+{
+  lsort(programmers,(int (*)(void*, void*)) sort_programmer_compare);
+}
+
Index: pgm.h
===================================================================
--- pgm.h	(revision 1018)
+++ pgm.h	(working copy)
@@ -140,6 +140,8 @@
                                     void *cookie);
 void walk_programmers(LISTID programmers, walk_programmers_cb cb, void *cookie);
 
+void sort_programmers(LISTID programmers);
+
 #ifdef __cplusplus
 }
 #endif
