+ return (NULL);
+ }
+ memcpy(bname, startp, len);
+ bname[len] = '\0';
+ return (bname);
+}
+
+#if __DARWIN_UNIX03
+#define const /**/
+#endif
+
+char *
+basename(const char *path)
+{
+ static char *bname = NULL;
+
+ if (bname == NULL) {
+ bname = (char *)malloc(MAXPATHLEN);
+ if (bname == NULL)
+ return (NULL);