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

Comparing ray/src/util/rfluxmtx.c (file contents):
Revision 2.12 by greg, Mon Jul 28 16:30:18 2014 UTC vs.
Revision 2.13 by greg, Wed Aug 6 00:59:53 2014 UTC

# Line 145 | Line 145 | surf_type(const char *otype)
145   static char *
146   oconv_command(int ac, char *av[])
147   {
148 <        static char     oconvbuf[2048] = "!oconv -f";
149 <        char            *cp = oconvbuf + 9;
150 <
148 >        static char     oconvbuf[2048] = "!oconv -f ";
149 >        char            *cp = oconvbuf + 10;
150 >        char            *recv = *av++;
151 >        
152 >        if (ac-- <= 0)
153 >                return(NULL);
154          while (ac-- > 0) {
155 +                strcpy(cp, *av++);
156 +                while (*cp) cp++;
157 +                *cp++ = ' ';
158                  if (cp >= oconvbuf+(sizeof(oconvbuf)-32)) {
159                          fputs(progname, stderr);
160                          fputs(": too many file arguments!\n", stderr);
161                          exit(1);
162                  }
157                *cp++ = ' ';
158                strcpy(cp, *av++);
159                while (*cp) cp++;
163          }
164 <        *cp = '\0';
164 >        strcpy(cp, recv);       /* receiver goes last */
165          return(oconvbuf);
166   }
167  
# Line 1353 | Line 1356 | done_opts:
1356   userr:
1357          if (a < argc-2)
1358                  fprintf(stderr, "%s: unsupported option '%s'", progname, argv[a]);
1359 <        fprintf(stderr, "Usage: %s [-v][rcontrib options] sender.rad receiver.rad [system.rad ..]\n",
1359 >        fprintf(stderr, "Usage: %s [-v][rcontrib options] sender.rad receiver.rad [-i system.oct] [system.rad ..]\n",
1360                                  progname);
1361          return(1);
1362   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines