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

Comparing ray/src/cal/calc.c (file contents):
Revision 1.5 by schorsch, Fri Nov 14 17:31:24 2003 UTC vs.
Revision 1.6 by greg, Tue Dec 9 15:55:46 2003 UTC

# Line 30 | Line 30 | main(argc, argv)
30   int  argc;
31   char  *argv[];
32   {
33 <        char  expr[512];
33 >        char  expr[2048];
34 >        char  *epos;
35          FILE  *fp;
36          int  i;
37          register char  *cp;
# Line 49 | Line 50 | char  *argv[];
50          recover = 1;
51          eclock++;
52  
53 <        while (fgets(expr, sizeof(expr), stdin) != NULL) {
54 <                for (cp = expr; *cp && *cp != '\n'; cp++)
55 <                        ;
56 <                *cp = '\0';
53 >        epos = expr;
54 >        while (fgets(epos, sizeof(expr)-(epos-expr), stdin) != NULL) {
55 >                while (*epos && *epos != '\n')
56 >                        epos++;
57 >                if (*epos && epos > expr && epos[-1] == '\\') {
58 >                        epos[-1] = ' ';
59 >                        continue;               /* escaped newline */
60 >                }
61 >                *epos = '\0';
62 >                epos = expr;
63                  switch (expr[0]) {
64                  case '\0':
65                          continue;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines