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

Comparing ray/src/rt/rpict.c (file contents):
Revision 1.18 by greg, Wed Feb 21 12:39:37 1990 UTC vs.
Revision 2.22 by greg, Thu Jan 21 10:08:59 1993 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1986 Regents of the University of California */
1 > /* Copyright (c) 1992 Regents of the University of California */
2  
3   #ifndef lint
4   static char SCCSid[] = "$SunId$ LBL";
# Line 15 | Line 15 | static char SCCSid[] = "$SunId$ LBL";
15   #ifdef BSD
16   #include  <sys/time.h>
17   #include  <sys/resource.h>
18 #else
19 #include  <signal.h>
18   #endif
21 #include  <fcntl.h>
19  
20 + #include  <signal.h>
21 +
22   #include  "view.h"
23  
24 + #include  "resolu.h"
25 +
26   #include  "random.h"
27  
28 + #include  "paths.h"
29 +
30 + #define  RFTEMPLATE     "rfXXXXXX"
31 +
32 + #ifndef SIGCONT
33 + #define SIGCONT         SIGIO
34 + #endif
35 +
36 + int  dimlist[MAXDIM];                   /* sampling dimensions */
37 + int  ndims = 0;                         /* number of sampling dimensions */
38 + int  samplendx;                         /* sample index number */
39 +
40   VIEW  ourview = STDVIEW;                /* view parameters */
41   int  hresolu = 512;                     /* horizontal resolution */
42   int  vresolu = 512;                     /* vertical resolution */
43 < double  pixaspect = 1.0;                /* pixel aspect ratio */
43 > double  pixaspect = 1.0;                /* pixel aspect ratio */
44  
45   int  psample = 4;                       /* pixel sample size */
46 < double  maxdiff = .05;                  /* max. difference for interpolation */
47 < double  dstrpix = 0.67;                 /* square pixel distribution */
46 > double  maxdiff = .05;                  /* max. difference for interpolation */
47 > double  dstrpix = 0.67;                 /* square pixel distribution */
48  
49 < double  dstrsrc = 0.0;                  /* square source distribution */
50 < double  shadthresh = .05;               /* shadow threshold */
51 < double  shadcert = .5;                  /* shadow certainty */
49 > double  dstrsrc = 0.0;                  /* square source distribution */
50 > double  shadthresh = .05;               /* shadow threshold */
51 > double  shadcert = .5;                  /* shadow certainty */
52 > int  directrelay = 1;                   /* number of source relays */
53 > int  vspretest = 512;                   /* virtual source pretest density */
54 > int  directvis = 1;                     /* sources visible? */
55 > double  srcsizerat = .25;               /* maximum ratio source size/dist. */
56  
57 + double  specthresh = .15;               /* specular sampling threshold */
58 + double  specjitter = 1.;                /* specular sampling jitter */
59 +
60   int  maxdepth = 6;                      /* maximum recursion depth */
61 < double  minweight = 5e-3;               /* minimum ray weight */
61 > double  minweight = 5e-3;               /* minimum ray weight */
62  
63   COLOR  ambval = BLKCOLOR;               /* ambient value */
64 < double  ambacc = 0.2;                   /* ambient accuracy */
64 > double  ambacc = 0.2;                   /* ambient accuracy */
65   int  ambres = 32;                       /* ambient resolution */
66   int  ambdiv = 128;                      /* ambient divisions */
67   int  ambssamp = 0;                      /* ambient super-samples */
# Line 49 | Line 69 | int  ambounce = 0;                     /* ambient bounces */
69   char  *amblist[128];                    /* ambient include/exclude list */
70   int  ambincl = -1;                      /* include == 1, exclude == 0 */
71  
72 + #ifdef MSDOS
73 + int  ralrm = 60;                        /* seconds between reports */
74 + #else
75   int  ralrm = 0;                         /* seconds between reports */
76 + #endif
77  
78 < double  pctdone = 0.0;                  /* percentage done */
78 > double  pctdone = 0.0;                  /* percentage done */
79  
80 + long  tlastrept = 0L;                   /* time at last report */
81 +
82 + extern long  time();
83 + extern long  tstart;                    /* starting time */
84 +
85   extern long  nrays;                     /* number of rays traced */
86  
87 < #define  MAXDIV         32              /* maximum sample size */
87 > #define  MAXDIV         16              /* maximum sample size */
88  
89 < #define  pixjitter()    (.5+dstrpix*(.5-frandom()))
89 > #define  pixjitter()    (.5+dstrpix*(.5-frandom()))
90  
91 < double  pixvalue();
91 > static int  hres, vres;                 /* resolution for this frame */
92  
93 + extern char  *mktemp();
94  
95 + double  pixvalue();
96 +
97 +
98   quit(code)                      /* quit program */
99   int  code;
100   {
101 <        if (code || ralrm > 0)          /* report status */
101 >        if (code)                       /* report status */
102                  report();
103 <
103 >        headclean();                    /* delete header file */
104 >        pfclean();                      /* clean up persist files */
105          exit(code);
106   }
107  
108  
109 + #ifdef BSD
110   report()                /* report progress */
111   {
77 #ifdef BSD
112          struct rusage  rubuf;
113 <        double  t;
113 >        double  t;
114  
115          getrusage(RUSAGE_SELF, &rubuf);
116          t = (rubuf.ru_utime.tv_usec + rubuf.ru_stime.tv_usec) / 1e6;
# Line 87 | Line 121 | report()               /* report progress */
121  
122          sprintf(errmsg, "%ld rays, %4.2f%% done after %5.4f CPU hours\n",
123                          nrays, pctdone, t/3600.0);
124 +        eputs(errmsg);
125 +        tlastrept = time((long *)0);
126 + }
127   #else
128 <        signal(SIGALRM, report);
129 <        sprintf(errmsg, "%ld rays, %4.2f%% done\n", nrays, pctdone);
130 < #endif
128 > report()                /* report progress */
129 > {
130 >        tlastrept = time((long *)0);
131 >        sprintf(errmsg, "%ld rays, %4.2f%% done after %5.4f hours\n",
132 >                        nrays, pctdone, (tlastrept-tstart)/3600.0);
133          eputs(errmsg);
134 +        signal(SIGCONT, report);
135 + }
136 + #endif
137  
138 <        if (ralrm > 0)
139 <                alarm(ralrm);
138 >
139 > rpict(seq, pout, zout, prvr)                    /* generate image(s) */
140 > int  seq;
141 > char  *pout, *zout, *prvr;
142 > /*
143 > * If seq is greater than zero, then we will render a sequence of
144 > * images based on view parameter strings read from the standard input.
145 > * If pout is NULL, then all images will be sent to the standard ouput.
146 > * If seq is greater than zero and prvr is an integer, then it is the
147 > * frame number at which rendering should begin.  Preceeding view parameter
148 > * strings will be skipped in the input.
149 > * If pout and prvr are the same, prvr is renamed to avoid overwriting.
150 > * Note that pout and zout should contain %d format specifications for
151 > * sequenced file naming.
152 > */
153 > {
154 >        extern char  *rindex(), *strncpy(), *strcat(), *strcpy();
155 >        char  fbuf[128], fbuf2[128];
156 >        register char  *cp;
157 >        RESOLU  rs;
158 >        double  pa;
159 >                                        /* check sampling */
160 >        if (psample < 1)
161 >                psample = 1;
162 >        else if (psample > MAXDIV) {
163 >                sprintf(errmsg, "pixel sampling reduced from %d to %d",
164 >                                psample, MAXDIV);
165 >                error(WARNING, errmsg);
166 >                psample = MAXDIV;
167 >        }
168 >                                        /* get starting frame */
169 >        if (seq <= 0)
170 >                seq = 0;
171 >        else if (prvr != NULL && isint(prvr)) {
172 >                register int  rn;               /* skip to specified view */
173 >                if ((rn = atoi(prvr)) < seq)
174 >                        error(USER, "recover frame less than start frame");
175 >                if (pout == NULL)
176 >                        error(USER, "missing output file specification");
177 >                for ( ; seq < rn; seq++)
178 >                        if (nextview(stdin) == EOF)
179 >                                error(USER, "unexpected EOF on view input");
180 >                prvr = fbuf;                    /* mark for renaming */
181 >        }
182 >        if (pout != NULL & prvr != NULL) {
183 >                sprintf(fbuf, pout, seq);
184 >                if (!strcmp(prvr, fbuf)) {      /* rename */
185 >                        strcpy(fbuf2, fbuf);
186 >                        for (cp = fbuf2; *cp; cp++)
187 >                                ;
188 >                        while (cp > fbuf2 && !ISDIRSEP(cp[-1]))
189 >                                cp--;
190 >                        strcpy(cp, RFTEMPLATE);
191 >                        prvr = mktemp(fbuf2);
192 >                        if (rename(fbuf, prvr) < 0 && errno != ENOENT) {
193 >                                sprintf(errmsg,
194 >                                        "cannot rename \"%s\" to \"%s\"",
195 >                                                fbuf, prvr);
196 >                                error(SYSTEM, errmsg);
197 >                        }
198 >                }
199 >        }
200 >                                        /* render sequence */
201 >        do {
202 >                if (seq && nextview(stdin) == EOF)
203 >                        break;
204 >                if (pout != NULL) {
205 >                        sprintf(fbuf, pout, seq);
206 >                        if (freopen(fbuf, "w", stdout) == NULL) {
207 >                                sprintf(errmsg,
208 >                                        "cannot open output file \"%s\"", fbuf);
209 >                                error(SYSTEM, errmsg);
210 >                        }
211 > #ifdef MSDOS
212 >                        setmode(fileno(stdout), O_BINARY);
213 > #endif
214 >                        dupheader();
215 >                }
216 >                hres = hresolu; vres = vresolu; pa = pixaspect;
217 >                if (prvr != NULL)
218 >                        if (viewfile(prvr, &ourview, &rs) <= 0
219 >                                        || rs.or != PIXSTANDARD) {
220 >                                sprintf(errmsg,
221 >                        "cannot recover view parameters from \"%s\"", prvr);
222 >                                error(WARNING, errmsg);
223 >                        } else {
224 >                                pa = 0.0;
225 >                                hres = scanlen(&rs);
226 >                                vres = numscans(&rs);
227 >                        }
228 >                if ((cp = setview(&ourview)) != NULL)
229 >                        error(USER, cp);
230 >                normaspect(viewaspect(&ourview), &pa, &hres, &vres);
231 >                if (seq) {
232 >                        if (ralrm > 0) {
233 >                                fprintf(stderr, "FRAME %d:", seq);
234 >                                fprintview(&ourview, stderr);
235 >                                putc('\n', stderr);
236 >                                fflush(stderr);
237 >                        }
238 >                        printf("FRAME=%d\n", seq);
239 >                }
240 >                fputs(VIEWSTR, stdout);
241 >                fprintview(&ourview, stdout);
242 >                putchar('\n');
243 >                if (pa < .99 || pa > 1.01)
244 >                        fputaspect(pa, stdout);
245 >                fputformat(COLRFMT, stdout);
246 >                putchar('\n');
247 >                if (zout != NULL)
248 >                        sprintf(cp=fbuf, zout, seq);
249 >                else
250 >                        cp = NULL;
251 >                render(cp, prvr);
252 >                prvr = NULL;
253 >        } while (seq++);
254   }
255  
256  
257 + nextview(fp)                            /* get next view from fp */
258 + FILE  *fp;
259 + {
260 +        char  linebuf[256];
261 +
262 +        while (fgets(linebuf, sizeof(linebuf), fp) != NULL)
263 +                if (isview(linebuf) && sscanview(&ourview, linebuf) > 0)
264 +                        return(0);
265 +        return(EOF);
266 + }      
267 +
268 +
269   render(zfile, oldfile)                          /* render the scene */
270   char  *zfile, *oldfile;
271   {
272          extern long  lseek();
273          COLOR  *scanbar[MAXDIV+1];      /* scanline arrays of pixel values */
274          float  *zbar[MAXDIV+1];         /* z values */
275 +        char  *sampdens;                /* previous sample density */
276          int  ypos;                      /* current scanline */
277          int  ystep;                     /* current y step size */
278 +        int  hstep;                     /* h step size */
279          int  zfd;
280          COLOR  *colptr;
281          float  *zptr;
282          register int  i;
113                                        /* check sampling */
114        if (psample < 1)
115                psample = 1;
116        else if (psample > MAXDIV)
117                psample = MAXDIV;
283                                          /* allocate scanlines */
284          for (i = 0; i <= psample; i++) {
285 <                scanbar[i] = (COLOR *)malloc(hresolu*sizeof(COLOR));
285 >                scanbar[i] = (COLOR *)malloc(hres*sizeof(COLOR));
286                  if (scanbar[i] == NULL)
287                          goto memerr;
288          }
289 +        hstep = (psample*140+49)/99;            /* quincunx sampling */
290 +        ystep = (psample*99+70)/140;
291 +        if (hstep > 2) {
292 +                i = hres/hstep + 2;
293 +                if ((sampdens = malloc(i)) == NULL)
294 +                        goto memerr;
295 +                while (i--)
296 +                        sampdens[i] = hstep;
297 +        } else
298 +                sampdens = NULL;
299                                          /* open z file */
300          if (zfile != NULL) {
301                  if ((zfd = open(zfile, O_WRONLY|O_CREAT, 0666)) == -1) {
302                          sprintf(errmsg, "cannot open z file \"%s\"", zfile);
303                          error(SYSTEM, errmsg);
304                  }
305 + #ifdef MSDOS
306 +                setmode(zfd, O_BINARY);
307 + #endif
308                  for (i = 0; i <= psample; i++) {
309 <                        zbar[i] = (float *)malloc(hresolu*sizeof(float));
309 >                        zbar[i] = (float *)malloc(hres*sizeof(float));
310                          if (zbar[i] == NULL)
311                                  goto memerr;
312                  }
# Line 138 | Line 316 | char  *zfile, *oldfile;
316                          zbar[i] = NULL;
317          }
318                                          /* write out boundaries */
319 <        fputresolu(YMAJOR|YDECR, hresolu, vresolu, stdout);
319 >        fprtresolu(hres, vres, stdout);
320                                          /* recover file and compute first */
321          i = salvage(oldfile);
322 <        if (zfd != -1 && lseek(zfd, (long)i*hresolu*sizeof(float), 0) == -1)
322 >        if (zfd != -1 && i > 0 &&
323 >                        lseek(zfd, (long)i*hres*sizeof(float), 0) == -1)
324                  error(SYSTEM, "z file seek error in render");
325 <        ypos = vresolu-1 - i;
326 <        fillscanline(scanbar[0], zbar[0], hresolu, ypos, psample);
327 <        ystep = psample;
325 >        pctdone = 100.0*i/vres;
326 >        if (ralrm > 0)                  /* report init stats */
327 >                report();
328 > #ifndef  BSD
329 >        else
330 > #endif
331 >        signal(SIGCONT, report);
332 >        ypos = vres-1 - i;
333 >        fillscanline(scanbar[0], zbar[0], sampdens, hres, ypos, hstep);
334                                                  /* compute scanlines */
335          for (ypos -= ystep; ypos > -ystep; ypos -= ystep) {
151                                                        /* record progress */
152                pctdone = 100.0*(vresolu-ypos-ystep)/vresolu;
336                                                          /* bottom adjust? */
337                  if (ypos < 0) {
338                          ystep += ypos;
# Line 162 | Line 345 | char  *zfile, *oldfile;
345                  zbar[ystep] = zbar[0];
346                  zbar[0] = zptr;
347                                                          /* fill base line */
348 <                fillscanline(scanbar[0], zbar[0], hresolu, ypos, psample);
348 >                fillscanline(scanbar[0], zbar[0], sampdens,
349 >                                hres, ypos, hstep);
350                                                          /* fill bar */
351 <                fillscanbar(scanbar, zbar, hresolu, ypos, ystep);
351 >                fillscanbar(scanbar, zbar, hres, ypos, ystep);
352                                                          /* write it out */
353 + #ifndef  BSD
354 +                signal(SIGCONT, SIG_IGN);       /* don't interrupt writes */
355 + #endif
356                  for (i = ystep; i > 0; i--) {
357                          if (zfd != -1 && write(zfd, (char *)zbar[i],
358 <                                        hresolu*sizeof(float))
359 <                                        < hresolu*sizeof(float))
358 >                                        hres*sizeof(float))
359 >                                        < hres*sizeof(float))
360                                  goto writerr;
361 <                        if (fwritescan(scanbar[i], hresolu, stdout) < 0)
361 >                        if (fwritescan(scanbar[i], hres, stdout) < 0)
362                                  goto writerr;
363                  }
364                  if (fflush(stdout) == EOF)
365                          goto writerr;
366 +                                                        /* record progress */
367 +                pctdone = 100.0*(vres-1-ypos)/vres;
368 +                if (ralrm > 0 && time((long *)0) >= tlastrept+ralrm)
369 +                        report();
370 + #ifndef  BSD
371 +                else
372 +                        signal(SIGCONT, report);
373 + #endif
374          }
375                                                  /* clean up */
376 +        signal(SIGCONT, SIG_IGN);
377          if (zfd != -1) {
378 <                if (write(zfd, (char *)zbar[0], hresolu*sizeof(float))
379 <                                < hresolu*sizeof(float))
378 >                if (write(zfd, (char *)zbar[0], hres*sizeof(float))
379 >                                < hres*sizeof(float))
380                          goto writerr;
381 <                close(zfd);
381 >                if (close(zfd) == -1)
382 >                        goto writerr;
383                  for (i = 0; i <= psample; i++)
384                          free((char *)zbar[i]);
385          }
386 <        fwritescan(scanbar[0], hresolu, stdout);
386 >        fwritescan(scanbar[0], hres, stdout);
387          if (fflush(stdout) == EOF)
388                  goto writerr;
389          for (i = 0; i <= psample; i++)
390                  free((char *)scanbar[i]);
391 +        if (sampdens != NULL)
392 +                free(sampdens);
393          pctdone = 100.0;
394 +        if (ralrm > 0)
395 +                report();
396          return;
397   writerr:
398          error(SYSTEM, "write error in render");
# Line 200 | Line 401 | memerr:
401   }
402  
403  
404 < fillscanline(scanline, zline, xres, y, xstep)   /* fill scan line at y */
405 < register COLOR  *scanline;
406 < register float  *zline;
404 > fillscanline(scanline, zline, sd, xres, y, xstep)       /* fill scan at y */
405 > register COLOR  *scanline;
406 > register float  *zline;
407 > register char  *sd;
408   int  xres, y, xstep;
409   {
410 <        int  b = xstep;
411 <        double  z;
410 >        static int  nc = 0;             /* number of calls */
411 >        int  bl = xstep, b = xstep;
412 >        double  z;
413          register int  i;
414          
415          z = pixvalue(scanline[0], 0, y);
416          if (zline) zline[0] = z;
417 <
418 <        for (i = xstep; i < xres-1+xstep; i += xstep) {
417 >                                /* zig-zag start for quincunx pattern */
418 >        for (i = ++nc & 1 ? xstep : xstep/2; i < xres-1+xstep; i += xstep) {
419                  if (i >= xres) {
420                          xstep += xres-1-i;
421                          i = xres-1;
422                  }
423                  z = pixvalue(scanline[i], i, y);
424                  if (zline) zline[i] = z;
425 <                
426 <                b = fillsample(scanline+i-xstep, zline ? zline+i-xstep : NULL,
427 <                                i-xstep, y, xstep, 0, b/2);
425 >                if (sd) b = sd[0] > sd[1] ? sd[0] : sd[1];
426 >                if (i <= xstep)
427 >                        b = fillsample(scanline, zline, 0, y, i, 0, b/2);
428 >                else
429 >                        b = fillsample(scanline+i-xstep,
430 >                                        zline ? zline+i-xstep : NULL,
431 >                                        i-xstep, y, xstep, 0, b/2);
432 >                if (sd) *sd++ = nc & 1 ? bl : b;
433 >                bl = b;
434          }
435 +        if (sd && nc & 1) *sd = bl;
436   }
437  
438  
439   fillscanbar(scanbar, zbar, xres, y, ysize)      /* fill interior */
440 < register COLOR  *scanbar[];
441 < register float  *zbar[];
440 > register COLOR  *scanbar[];
441 > register float  *zbar[];
442   int  xres, y, ysize;
443   {
444          COLOR  vline[MAXDIV+1];
445          float  zline[MAXDIV+1];
446          int  b = ysize;
237        double  z;
447          register int  i, j;
448          
449          for (i = 0; i < xres; i++) {
# Line 259 | Line 468 | int  xres, y, ysize;
468  
469  
470   int
471 < fillsample(colline, zline, x, y, xlen, ylen, b) /* fill interior points */
472 < register COLOR  *colline;
473 < register float  *zline;
471 > fillsample(colline, zline, x, y, xlen, ylen, b) /* fill interior points */
472 > register COLOR  *colline;
473 > register float  *zline;
474   int  x, y;
475   int  xlen, ylen;
476   int  b;
477   {
478 <        extern double  fabs();
479 <        double  ratio;
271 <        double  z;
478 >        double  ratio;
479 >        double  z;
480          COLOR  ctmp;
481          int  ncut;
482          register int  len;
# Line 318 | Line 526 | pixvalue(col, x, y)            /* compute pixel value */
526   COLOR  col;                     /* returned color */
527   int  x, y;                      /* pixel position */
528   {
529 <        static RAY  thisray;    /* our ray for this pixel */
529 >        static RAY  thisray;
530  
531 <        viewray(thisray.rorg, thisray.rdir, &ourview,
532 <                        (x+pixjitter())/hresolu, (y+pixjitter())/vresolu);
531 >        if (viewray(thisray.rorg, thisray.rdir, &ourview,
532 >                        (x+pixjitter())/hres, (y+pixjitter())/vres) < 0) {
533 >                setcolor(col, 0.0, 0.0, 0.0);
534 >                return(0.0);
535 >        }
536  
537          rayorigin(&thisray, NULL, PRIMARY, 1.0);
538 <        
538 >
539 >        samplendx = pixnumber(x,y,hres,vres);   /* set pixel index */
540 >
541          rayvalue(&thisray);                     /* trace ray */
542  
543          copycolor(col, thisray.rcol);           /* return color */
544          
545 <        return(thisray.rot);                    /* return distance */
545 >        return(thisray.rt);                     /* return distance */
546   }
547  
548  
# Line 349 | Line 562 | char  *oldfile;
562                  error(WARNING, errmsg);
563                  return(0);
564          }
565 + #ifdef MSDOS
566 +        setmode(fileno(fp), O_BINARY);
567 + #endif
568                                  /* discard header */
569 <        getheader(fp, NULL);
569 >        getheader(fp, NULL, NULL);
570                                  /* get picture size */
571 <        if (fgetresolu(&x, &y, fp) != (YMAJOR|YDECR)) {
571 >        if (!fscnresolu(&x, &y, fp)) {
572                  sprintf(errmsg, "bad recover file \"%s\"", oldfile);
573                  error(WARNING, errmsg);
574                  fclose(fp);
575                  return(0);
576          }
577  
578 <        if (x != hresolu || y != vresolu) {
578 >        if (x != hres || y != vres) {
579                  sprintf(errmsg, "resolution mismatch in recover file \"%s\"",
580                                  oldfile);
581                  error(USER, errmsg);
582          }
583  
584 <        scanline = (COLR *)malloc(hresolu*sizeof(COLR));
584 >        scanline = (COLR *)malloc(hres*sizeof(COLR));
585          if (scanline == NULL)
586                  error(SYSTEM, "out of memory in salvage");
587 <        for (y = 0; y < vresolu; y++) {
588 <                if (freadcolrs(scanline, hresolu, fp) < 0)
587 >        for (y = 0; y < vres; y++) {
588 >                if (freadcolrs(scanline, hres, fp) < 0)
589                          break;
590 <                if (fwritecolrs(scanline, hresolu, stdout) < 0)
590 >                if (fwritecolrs(scanline, hres, stdout) < 0)
591                          goto writerr;
592          }
593          if (fflush(stdout) == EOF)
# Line 381 | Line 597 | char  *oldfile;
597          unlink(oldfile);
598          return(y);
599   writerr:
600 <        error(SYSTEM, "write error in salvage");
600 >        sprintf(errmsg, "write error during recovery of \"%s\"", oldfile);
601 >        error(SYSTEM, errmsg);
602 > }
603 >
604 >
605 > int
606 > pixnumber(x, y, xres, yres)             /* compute pixel index (brushed) */
607 > register int  x, y;
608 > int  xres, yres;
609 > {
610 >        x -= y;
611 >        while (x < 0)
612 >                x += xres;
613 >        return((((x>>2)*yres + y) << 2) + (x & 3));
614   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines