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

Comparing ray/src/common/calexpr.c (file contents):
Revision 2.22 by schorsch, Sat Jun 7 12:50:20 2003 UTC vs.
Revision 2.23 by schorsch, Thu Jul 3 22:41:44 2003 UTC

# Line 473 | Line 473 | EPNODE *ekid;
473   char *
474   getname()                       /* scan an identifier */
475   {
476 <    static char  str[MAXWORD+1];
476 >    static char  str[RMAXWORD+1];
477      register int  i, lnext;
478  
479      lnext = nextc;
480 <    for (i = 0; i < MAXWORD && isid(lnext); i++, lnext = scan())
480 >    for (i = 0; i < RMAXWORD && isid(lnext); i++, lnext = scan())
481          str[i] = lnext;
482      str[i] = '\0';
483      while (isid(lnext))         /* skip rest of name */
# Line 506 | Line 506 | double
506   getnum()                        /* scan a positive float */
507   {
508      register int  i, lnext;
509 <    char  str[MAXWORD+1];
509 >    char  str[RMAXWORD+1];
510  
511      i = 0;
512      lnext = nextc;
513 <    while (isdigit(lnext) && i < MAXWORD) {
513 >    while (isdigit(lnext) && i < RMAXWORD) {
514          str[i++] = lnext;
515          lnext = scan();
516      }
517 <    if (lnext == '.' && i < MAXWORD) {
517 >    if (lnext == '.' && i < RMAXWORD) {
518          str[i++] = lnext;
519          lnext = scan();
520          if (i == 1 && !isdigit(lnext))
521              syntax("badly formed number");
522 <        while (isdigit(lnext) && i < MAXWORD) {
522 >        while (isdigit(lnext) && i < RMAXWORD) {
523              str[i++] = lnext;
524              lnext = scan();
525          }
526      }
527 <    if ((lnext == 'e' | lnext == 'E') && i < MAXWORD) {
527 >    if ((lnext == 'e' | lnext == 'E') && i < RMAXWORD) {
528          str[i++] = lnext;
529          lnext = scan();
530 <        if ((lnext == '-' | lnext == '+') && i < MAXWORD) {
530 >        if ((lnext == '-' | lnext == '+') && i < RMAXWORD) {
531              str[i++] = lnext;
532              lnext = scan();
533          }
534          if (!isdigit(lnext))
535              syntax("missing exponent");
536 <        while (isdigit(lnext) && i < MAXWORD) {
536 >        while (isdigit(lnext) && i < RMAXWORD) {
537              str[i++] = lnext;
538              lnext = scan();
539          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines