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.4 by greg, Tue Jul 22 21:55:31 2014 UTC vs.
Revision 2.5 by greg, Tue Jul 22 23:21:56 2014 UTC

# Line 53 | Line 53 | char           *kfullfn = "klems_full.cal";
53   char            *khalffn = "klems_half.cal";
54   char            *kquarterfn = "klems_quarter.cal";
55  
56 < #define PARAMSTART      "@rfluxmtx"     /* string indicating parameters */
56 >                                        /* string indicating parameters */
57 > const char      PARAMSTART[] = "@rfluxmtx";
58  
59                                  /* surface type IDs */
60   #define ST_NONE         0
# Line 1122 | Line 1123 | load_scene(const char *inspec, int (*ocb)(FILE *))
1123                          continue;
1124                  }
1125                  if (c == '#') {         /* parameters/comment */
1126 <                        if (fscanf(fp, "%s", inpbuf) == 1 &&
1126 >                        if ((c = getc(fp)) == EOF || ungetc(c,fp) == EOF)
1127 >                                break;
1128 >                        if (!isspace(c) && fscanf(fp, "%s", inpbuf) == 1 &&
1129                                          !strcmp(inpbuf, PARAMSTART)) {
1130                                  if (fgets(inpbuf, sizeof(inpbuf), fp) != NULL)
1131                                          parse_params(inpbuf);
# Line 1317 | Line 1320 | done_opts:
1320   userr:
1321          if (a < argc-2)
1322                  fprintf(stderr, "%s: unsupported option '%s'", progname, argv[a]);
1323 <        fprintf(stderr, "Usage: %s [rcontrib options] sender.rad receiver.rad [system.rad ..]\n",
1323 >        fprintf(stderr, "Usage: %s [-v][rcontrib options] sender.rad receiver.rad [system.rad ..]\n",
1324                                  progname);
1325          return(1);
1326   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines