ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/fixargv0.c
(Generate patch)

Comparing ray/src/common/fixargv0.c (file contents):
Revision 2.1 by greg, Fri Oct 9 10:27:41 1992 UTC vs.
Revision 2.6 by schorsch, Sat Mar 19 00:44:46 2016 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1992 Regents of the University of California */
2
1   #ifndef lint
2 < static char SCCSid[] = "$SunId$ LBL";
2 > static const char       RCSid[] = "$Id$";
3   #endif
6
4   /*
5   * Fix argv[0] for DOS environments
6 + *
7 + *  External symbols declared in paths.h
8   */
9  
10 + #include "copyright.h"
11  
12 < char *
12 > #include <ctype.h>
13 > #include <string.h>
14 >
15 > extern char *
16   fixargv0(av0)                   /* extract command name from full path */
17   char  *av0;
18   {
# Line 22 | Line 25 | char  *av0;
25                          *cp = '\0';
26                          continue;
27                  case '\\':                      /* remove directory */
28 <                        return(cp+1);
28 >                        strcpy(av0, cp+1);
29 >                        break;
30                  default:                        /* convert to lower case */
31                          *cp = tolower(*cp);
32                          continue;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines