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

Comparing ray/src/util/vwrays.c (file contents):
Revision 3.23 by greg, Sat Dec 4 16:29:29 2021 UTC vs.
Revision 3.24 by greg, Sat Apr 9 17:18:08 2022 UTC

# Line 79 | Line 79 | main(
79                                          fprintf(stderr,
80                                                  "%s: no view in file\n",
81                                                          argv[i]);
82 <                                        exit(1);
82 >                                        return(1);
83                                  }
84                                  break;
85                          }
# Line 96 | Line 96 | main(
96                          if (rs.xr <= 0) {
97                                  fprintf(stderr, "%s: bad x resolution\n",
98                                                  progname);
99 <                                exit(1);
99 >                                return(1);
100                          }
101                          break;
102                  case 'y':                       /* y resolution */
# Line 104 | Line 104 | main(
104                          if (rs.yr <= 0) {
105                                  fprintf(stderr, "%s: bad y resolution\n",
106                                                  progname);
107 <                                exit(1);
107 >                                return(1);
108                          }
109                          break;
110                  case 'c':                       /* repeat count */
# Line 135 | Line 135 | main(
135                  rval = viewfile(argv[i], &vw, &rs);
136                  if (rval <= 0) {
137                          fprintf(stderr, "%s: no view in picture\n", argv[i]);
138 <                        exit(1);
138 >                        return(1);
139                  }
140                  if (!getdim & (i+1 < argc)) {
141                          zfd = open_float_depth(argv[i+1], (long)rs.xr*rs.yr);
142                          if (zfd < 0)
143 <                                exit(1);
143 >                                return(1);
144                  }
145          }
146          if ((err = setview(&vw)) != NULL) {
147                  fprintf(stderr, "%s: %s\n", progname, err);
148 <                exit(1);
148 >                return(1);
149          }
150          if (i == argc)
151                  normaspect(viewaspect(&vw), &pa, &rs.xr, &rs.yr);
152          if (getdim) {
153 <                printf("-x %d -y %d -ld%c\n", rs.xr, rs.yr,
154 <                                (i+1 == argc) & (vw.vaft > FTINY) ? '+' : '-');
155 <                exit(0);
153 >                printf("-x %d -y %d%s\n", rs.xr, rs.yr,
154 >                                (vw.vaft > FTINY) ? " -ld+" : "");
155 >                return(0);
156          }
157          if (fromstdin)
158                  pix2rays(stdin);
159          else
160                  putrays();
161 <        exit(0);
161 >        return(0);
162   userr:
163          fprintf(stderr,
164          "Usage: %s [ -i -u -f{a|f|d} -c rept | -d ] { view opts .. | picture [zbuf] }\n",
165                          progname);
166 <        exit(1);
166 >        return(1);
167   }
168  
169  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines