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

Comparing ray/src/cal/rcalc.c (file contents):
Revision 1.16 by greg, Fri Dec 10 05:52:14 2004 UTC vs.
Revision 1.19 by greg, Tue Jun 14 01:25:02 2005 UTC

# Line 189 | Line 189 | char  *argv[]
189                                  break;
190                          case 'd':
191                                  bocols = 1;
192 +                                SET_FILE_BINARY(stdout);
193                                  break;
194                          case 'f':
195                                  bocols = -1;
196 +                                SET_FILE_BINARY(stdout);
197                                  break;
198 +                        default:
199 +                                goto userr;
200                          }
201                          break;
202                  case 'w':
# Line 208 | Line 212 | char  *argv[]
212   eputs(" [-b][-l][-n][-p][-w][-u][-tS][-s svar=sval][-e expr][-f source][-i infmt][-o outfmt] [file]\n");
213                          quit(1);
214                  }
215 <
215 >        if (bocols)
216 >                SET_FILE_BINARY(stdout);
217          if (noinput) {          /* produce a single output record */
218 +                if (i < argc) {
219 +                        eputs(argv[0]);
220 +                        eputs(": file argument(s) incompatible with -n\n");
221 +                        quit(1);
222 +                }
223                  eclock++;
224                  putout();
225                  quit(0);
226          }
227 +        if (nbicols)
228 +                SET_FILE_BINARY(stdin);
229  
230          if (blnkeq)             /* for efficiency */
231                  nbsynch();
# Line 634 | Line 646 | getrec(void)                           /* get next record from file */
646          register struct field  *f;
647  
648          while (ipb.chr != EOF) {
649 <                if (blnkeq)             /* beware of nbsynch() */
649 >                if (blnkeq) {           /* beware of nbsynch() */
650                          while (isblnk(ipb.chr))
651                                  resetinp();
652 +                        if (ipb.chr == EOF)
653 +                                return(0);
654 +                }
655                  eatline = (!igneol && ipb.chr != '\n');
656                  clearrec();             /* start with fresh record */
657                  for (f = inpfmt; f != NULL; f = f->next)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines