<<< Date Index >>>     <<< Thread Index >>>

[PATCH] $sort_browser does'n t take "subject" order. Documentation is wrong.



manual.sgml says that the default value of the $sort_browser
variable is "subject", but that's wrong. It should be "alpha."
It is in fact SORT_SUBJECT, but translated to "alpha" internally.

I wrote a patch to hack makedoc.c. This is not smart at all.
But the problem itself is a design flaw IMHO. Gave up.

-- 
tamo
--- makedoc.c.B4HACK    Mon Jul 12 15:26:43 2004
+++ makedoc.c   Mon Jul 12 15:57:31 2004
@@ -390,6 +390,7 @@
   char buff[BUFFSIZE];
   char tmp[BUFFSIZE];
   int type;
+  int sort_browser_hack=0; /* ugly hack */
   
   char val[BUFFSIZE];
 
@@ -429,7 +430,11 @@
   /* option name or UL &address */
   if (!(s = get_token (buff, sizeof (buff), s))) return;
   if (!strcmp (buff, "UL"))
+  {
     if (!(s = get_token (buff, sizeof (buff), s))) return;
+    /* else */
+    if (!strcmp (buff, "&BrowserSort")) sort_browser_hack=1; /* ugly hack */
+  }
 
   /* comma */
   if (!(s = get_token (buff, sizeof (buff), s))) return;
@@ -438,6 +443,7 @@
   
   /* <default value> or UL <default value> */
   if (!(s = get_token (buff, sizeof (buff), s))) return;
+  if (strcmp (buff, "SORT_SUBJECT")) sort_browser_hack=0; else /* ugly hack */
   if (!strcmp (buff, "UL"))
   {
     if (Debug) fprintf (stderr, "%s: Skipping UL.\n", Progname);
@@ -456,6 +462,7 @@
   while ((s = get_token (buff, sizeof (buff), s)));
 
   pretty_default (val, sizeof (val), tmp, type);
+  if (sort_browser_hack==1) strcpy (val, "alpha"); /* __STRCPY_CHECKED__ */
   print_confline (varname, type, val, out);
 }