--- ray/src/common/fixargv0.c 1992/10/09 10:27:41 2.1 +++ ray/src/common/fixargv0.c 2016/03/19 00:44:46 2.6 @@ -1,15 +1,18 @@ -/* Copyright (c) 1992 Regents of the University of California */ - #ifndef lint -static char SCCSid[] = "$SunId$ LBL"; +static const char RCSid[] = "$Id: fixargv0.c,v 2.6 2016/03/19 00:44:46 schorsch Exp $"; #endif - /* * Fix argv[0] for DOS environments + * + * External symbols declared in paths.h */ +#include "copyright.h" -char * +#include +#include + +extern char * fixargv0(av0) /* extract command name from full path */ char *av0; { @@ -22,7 +25,8 @@ char *av0; *cp = '\0'; continue; case '\\': /* remove directory */ - return(cp+1); + strcpy(av0, cp+1); + break; default: /* convert to lower case */ *cp = tolower(*cp); continue;