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

Comparing ray/src/util/glarendx.c (file contents):
Revision 2.15 by greg, Mon Feb 17 19:35:24 2020 UTC vs.
Revision 2.16 by greg, Fri Jul 24 16:58:16 2020 UTC

# Line 22 | Line 22 | static const char      RCSid[] = "$Id$";
22   #include <string.h>
23  
24   #include "standard.h"
25 + #include "paths.h"
26   #include "view.h"
27  
28  
# Line 91 | Line 92 | main(
92   )
93   {
94          struct named_func       *funp;
94        char    *progtail;
95          int     i;
96                                          /* get program name */
97 <        progname = argv[0];
98 <        progtail = strrchr(progname, '/');      /* final component */
99 <        if (progtail == NULL)
100 <                progtail = progname;
101 <        else
102 <                progtail++;
97 >        progname = fixargv0(argv[0]);
98                                          /* get options */
99          for (i = 1; i < argc && argv[i][0] == '-'; i++)
100                  switch (argv[i][1]) {
101                  case 't':
102 <                        progtail = argv[++i];
102 >                        progname = argv[++i];
103                          break;
104                  case 'h':
105                          print_header = 0;
# Line 121 | Line 116 | main(
116                  }
117                                          /* find and run calculation */
118          for (funp = all_funcs; funp->name != NULL; funp++)
119 <                if (!strcmp(funp->name, progtail)) {
119 >                if (!strcmp(funp->name, progname)) {
120                          init();
121                          read_input();
122                          if (print_header) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines