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.10 by greg, Tue Jun 3 21:31:51 2025 UTC vs.
Revision 2.11 by greg, Sat Jun 7 05:09:45 2025 UTC

# Line 7 | Line 7 | static const char      RCSid[] = "$Id$";
7   *  External symbols declared in paths.h
8   */
9  
10 + #include "rtio.h"
11   #include "paths.h"
12   #include <ctype.h>
13  
# Line 34 | Line 35 | fixargv0(char *av0)            /* extract command name from full
35   #endif
36                  }
37          return(progname = av0);
38 + }
39 +
40 +
41 + void
42 + printargs(              /* print command arguments to a file */
43 +        int  ac,
44 +        char  **av,
45 +        FILE  *fp
46 + )
47 + {
48 +        if (ac <= 0) return;
49 +
50 +        if (progname == NULL)
51 +                fixargv0(av[0]);
52 +
53 +        if (progname >= av[0] && progname - av[0] < strlen(av[0]))
54 +                fputword(progname, fp);
55 +        else
56 +                fputword(av[0], fp);
57 +        while (--ac > 0) {
58 +                fputc(' ', fp);
59 +                fputword(*++av, fp);
60 +        }
61 +        fputc('\n', fp);
62   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines