Re: FVWM: basename compilation error

From: Gregory Margo <gmargo_at_newton.vip.best.com>
Date: Thu, 16 Nov 1995 15:17:35 -0800 (PST)

Michael Kirby said:
> Not sure where the basename library call is supposed
> to be. Is that part of the standard C library?


basename() is not part of ANSI C, but is present in some libc's.
Here is a substitute:


#include <string.h>
char *
basename(char *path)
{
        char *c = strrchr(path, '/');

        if (c) return(c+1);
        return(path);
}

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Gregory H. Margo No free speech restrictions on the Internet!
gmargo_at_newton.vip.best.com
--
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_hpc.uh.edu.
To report problems, send mail to fvwm-owner_at_hpc.uh.edu.
Received on Thu Nov 16 1995 - 17:17:41 GMT

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:57 BST