* Copyright (c) 1987 Regents of the University of California.
* Redistribution and use in source and binary forms are permitted
* provided that this notice is preserved and that due credit is given
* to the University of California at Berkeley. The name of the University
* may not be used to endorse or promote products derived from this
* software without specific prior written permission. This software
* is provided ``as is'' without express or implied warranty.
"@(#) Copyright (c) 1987 Regents of the University of California.\n\
static char sccsid
[] = "@(#)basename.c 4.4 (Berkeley) %G%";
if (argc
<= 1) { /* backward compatible */
for (p
= base
= *++argv
; *p
;)
if (argc
> 2) { /* original version allows any # of args */
for (t
= *++argv
; *t
; ++t
);
} while (p
>= base
&& *--t
== *--p
);