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

Comparing ray/src/cv/rad2mgf.c (file contents):
Revision 2.14 by gwlarson, Fri Sep 4 09:09:58 1998 UTC vs.
Revision 2.16 by greg, Sat Feb 22 02:07:23 2003 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1995 Regents of the University of California */
2
1   #ifndef lint
2 < static char SCCSid[] = "$SunId$ LBL";
2 > static const char       RCSid[] = "$Id$";
3   #endif
6
4   /*
5   * Convert Radiance scene description to MGF
6   */
# Line 22 | Line 19 | int    o_instance(), o_illum();
19   int     o_plastic(), o_metal(), o_glass(), o_dielectric(),
20          o_mirror(), o_trans(), o_light();
21  
25 extern int      free();
26
22   LUTAB   rmats = LU_SINIT(free,NULL);            /* defined material table */
23  
24   LUTAB   rdispatch = LU_SINIT(NULL,NULL);        /* function dispatch table */
# Line 426 | Line 421 | o_face(mod, typ, id, fa)               /* print out a polygon */
421   char    *mod, *typ, *id;
422   FUNARGS *fa;
423   {
424 <        char    entbuf[2048];
424 >        char    entbuf[2048], *linestart;
425          register char   *cp;
426          register int    i;
427  
# Line 434 | Line 429 | FUNARGS        *fa;
429                  return(-1);
430          setmat(mod);
431          setobj(id);
432 <        cp = entbuf;
432 >        cp = linestart = entbuf;
433          *cp++ = 'f';
434          for (i = 0; i < fa->nfargs; i += 3) {
435                  *cp++ = ' ';
436 +                if (cp - linestart > 72) {
437 +                        *cp++ = '\\'; *cp++ = '\n';
438 +                        linestart = cp;
439 +                        *cp++ = ' '; *cp++ = ' ';
440 +                }
441                  getvertid(cp, fa->farg + i);
442                  while (*cp)
443                          cp++;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines