Added fix from Rich to accept catpages with .0 syntax for backwards
authorJordan K. Hubbard <jkh@FreeBSD.org>
Sun, 18 Jul 1993 22:40:56 +0000 (22:40 +0000)
committerJordan K. Hubbard <jkh@FreeBSD.org>
Sun, 18 Jul 1993 22:40:56 +0000 (22:40 +0000)
compatability (XFree86 man pages will still be .0'd for awhile).

gnu/usr.bin/man/man/man.c

index 6f7a0fb..e8026f6 100644 (file)
@@ -586,6 +586,16 @@ glob_for_file (path, section, name, cat)
 
       gf = glob_filename (pathname);
     }
 
       gf = glob_filename (pathname);
     }
+  if ((gf == (char **) -1 || *gf == NULL) && isdigit (*section))
+    {
+      if (cat)
+       sprintf (pathname, "%s/cat%s/%s.0*", path, section, name);
+      else
+       sprintf (pathname, "%s/man%s/%s.0*", path, section, name);
+      if (debug)
+       fprintf (stderr, "globbing %s\n", pathname);
+      gf = glob_filename (pathname);
+    }
   return gf;
 }
 
   return gf;
 }