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

Comparing ray/src/cv/ies2rad.c (file contents):
Revision 2.20 by greg, Mon Jun 30 18:18:22 2003 UTC vs.
Revision 2.21 by schorsch, Thu Jul 3 22:41:44 2003 UTC

# Line 79 | Line 79 | int    filerev = FIRSTREV;
79   #define U_METERS        2
80                                          /* string lengths */
81   #define MAXLINE         132
82 < #define MAXWORD         76
82 > #define RMAXWORD        76
83                                          /* file types */
84   #define T_RAD           ".rad"
85   #define T_DST           ".dat"
# Line 140 | Line 140 | char   *argv[];
140   {
141          char    *outfile = NULL;
142          int     status;
143 <        char    outname[MAXWORD];
143 >        char    outname[RMAXWORD];
144          double  d1;
145          int     i;
146          
# Line 457 | Line 457 | ies2rad(inpname, outname)              /* convert IES file */
457   char    *inpname, *outname;
458   {
459          SRCINFO srcinfo;
460 <        char    buf[MAXLINE], tltid[MAXWORD];
460 >        char    buf[MAXLINE], tltid[RMAXWORD];
461          char    geomfile[128];
462          FILE    *inpfp, *outfp;
463          int     lineno = 0;
# Line 516 | Line 516 | char   *inpname, *outname;
516                  fprintf(stderr, "%s: not in IES format\n", inpname);
517                  goto readerr;
518          }
519 <        atos(tltid, MAXWORD, buf+TLTSTRLEN);
519 >        atos(tltid, RMAXWORD, buf+TLTSTRLEN);
520          if (inpfp == stdin)
521                  buf[0] = '\0';
522          else
# Line 550 | Line 550 | char   *dir, *tltspec, *dfltname, *tltid;
550   {
551          int     nangles, tlt_type;
552          double  minmax[2];
553 <        char    buf[PATH_MAX], tltname[MAXWORD];
553 >        char    buf[PATH_MAX], tltname[RMAXWORD];
554          FILE    *datin, *datout;
555  
556          if (!strcmp(tltspec, TLTNONE)) {
# Line 622 | Line 622 | SRCINFO        *sinf;
622   FILE    *in, *out;
623   char    *mod, *name;
624   {
625 <        char    buf[PATH_MAX], id[MAXWORD];
625 >        char    buf[PATH_MAX], id[RMAXWORD];
626          FILE    *datout;
627          double  mult, bfactor, pfactor, width, length, height, wattage;
628          double  bounds[2][2];
# Line 729 | Line 729 | FILE   *fp;
729   char    *mod, *name;
730   int     dolower, doupper;
731   {
732 <        char    lname[MAXWORD];
732 >        char    lname[RMAXWORD];
733          
734          strcat(strcpy(lname, name), "_light");
735          fprintf(fp, "\n%s %s %s\n", mod,
# Line 974 | Line 974 | char *
974   getword(fp)                     /* scan a word from fp */
975   register FILE   *fp;
976   {
977 <        static char     wrd[MAXWORD];
977 >        static char     wrd[RMAXWORD];
978          register char   *cp;
979          register int    c;
980  
981          while (isspace(c=getc(fp)))
982                  ;
983 <        for (cp = wrd; c != EOF && cp < wrd+MAXWORD-1;
983 >        for (cp = wrd; c != EOF && cp < wrd+RMAXWORD-1;
984                          *cp++ = c, c = getc(fp))
985                  if (isspace(c) || c == ',') {
986                          while (isspace(c))

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines