From: Brendan Kehoe Date: Fri, 15 Jan 1993 00:19:10 +0000 (-0500) Subject: cccp.c (main): Trim down to the basename of what's to go in PROGNAME. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3dac0de51f62b67c842e8dc1092043ee63c49c7b;p=gcc.git cccp.c (main): Trim down to the basename of what's to go in PROGNAME. * cccp.c (main): Trim down to the basename of what's to go in PROGNAME. From-SVN: r3248 --- diff --git a/gcc/cccp.c b/gcc/cccp.c index dd2dca521a1..6a7eb59f647 100644 --- a/gcc/cccp.c +++ b/gcc/cccp.c @@ -989,7 +989,10 @@ main (argc, argv) signal (SIGPIPE, pipe_closed); - progname = argv[0]; + p = argv[0] + strlen (argv[0]); + while (p != argv[0] && p[-1] != '/') --p; + progname = p; + #ifdef VMS { /* Remove directories from PROGNAME. */