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

Comparing ray/src/px/pinterp.c (file contents):
Revision 2.43 by greg, Wed Feb 8 13:43:21 2012 UTC vs.
Revision 2.44 by greg, Sun Mar 24 19:00:33 2013 UTC

# Line 394 | Line 394 | nextview(                              /* get and set next view */
394   {
395          char    linebuf[256];
396          char    *err;
397 <        register int    i;
397 >        int     i;
398  
399          if (fp != NULL) {
400                  do                      /* get new view */
# Line 431 | Line 431 | nextview(                              /* get and set next view */
431   static void
432   compavgview(void)                               /* compute average view */
433   {
434 <        register int    i;
434 >        int     i;
435          double  f;
436  
437          if (nvavg < 2)
# Line 499 | Line 499 | addpicture(            /* add picture to output */
499                  syserror(progname);
500          if ((zfd = open(zspec, O_RDONLY)) == -1) {
501                  double  zvalue;
502 <                register int    x;
502 >                int     x;
503                  if (!isflt(zspec) || (zvalue = atof(zspec)) <= 0.0)
504                          syserror(zspec);
505                  for (x = scanlen(&tresolu); x-- > 0; )
# Line 558 | Line 558 | addpicture(            /* add picture to output */
558  
559   static int
560   pixform(                /* compute view1 to view2 matrix */
561 <        register MAT4   xfmat,
562 <        register VIEW   *vw1,
563 <        register VIEW   *vw2
561 >        MAT4    xfmat,
562 >        VIEW    *vw1,
563 >        VIEW    *vw2
564   )
565   {
566 <        double  m4t[4][4];
566 >        MAT4    m4t;
567  
568          if ((vw1->type != VT_PER) & (vw1->type != VT_PAR))
569                  return(0);
# Line 612 | Line 612 | addscanline(   /* add scanline to output */
612          FVECT   pos;
613          struct position lastx, newpos;
614          double  wt;
615 <        register int    x;
615 >        int     x;
616  
617          lastx.z = 0;
618          for (x = xl->max; x >= xl->min; x--) {
# Line 650 | Line 650 | addpixel(              /* fill in pixel parallelogram */
650          int     l1, l2, c1, c2;                 /* side lengths and counters */
651          int     p1isy;                          /* p0p1 along y? */
652          int     x1, y1;                         /* p1 position */
653 <        register int    x, y;                   /* final position */
653 >        int     x, y;                   /* final position */
654  
655                                          /* compute vector p0p1 */
656          if (fillo&F_FORE && ABS(p1->z-p0->z) <= zt) {
# Line 717 | Line 717 | addpixel(              /* fill in pixel parallelogram */
717  
718   static double
719   movepixel(                              /* reposition image point */
720 <        register FVECT  pos
720 >        FVECT   pos
721   )
722   {
723          FVECT   pt, tdir, odir;
# Line 783 | Line 783 | movepixel(                             /* reposition image point */
783  
784   static int
785   getperim(               /* compute overlapping image area */
786 <        register struct bound   *xl,
786 >        struct bound    *xl,
787          struct bound    *yl,
788          float   *zline,
789          int     zfd
# Line 791 | Line 791 | getperim(              /* compute overlapping image area */
791   {
792          int     step;
793          FVECT   pos;
794 <        register int    x, y;
794 >        int     x, y;
795                                                  /* set up step size */
796          if (scanlen(&tresolu) < numscans(&tresolu))
797                  step = scanlen(&tresolu)/NSTEPS;
# Line 875 | Line 875 | backpicture(                   /* background fill algorithm */
875   {
876          int     *yback, xback;
877          int     y;
878 <        register int    x, i;
878 >        int     x, i;
879                                                          /* get back buffer */
880          yback = (int *)malloc(hresolu*sizeof(int));
881          if (yback == NULL)
# Line 982 | Line 982 | fillpicture(           /* paint in empty pixels using fill */
982          fillfunc_t *fill
983   )
984   {
985 <        register int    x, y;
985 >        int     x, y;
986  
987          for (y = 0; y < vresolu; y++)
988                  for (x = 0; x < hresolu; x++)
# Line 996 | Line 996 | fillpicture(           /* paint in empty pixels using fill */
996   static int
997   clipaft(void)                   /* perform aft clipping as indicated */
998   {
999 <        register int    x, y;
999 >        int     x, y;
1000          int     adjtest = (ourview.type == VT_PER) & zisnorm;
1001          double  tstdist;
1002          double  yzn2, vx;
# Line 1035 | Line 1035 | addblur(void)                          /* add to blurred picture */
1035   {
1036          COLOR   cval;
1037          double  d;
1038 <        register int    i;
1038 >        int     i;
1039  
1040          if (!blurring)
1041                  return(0);
# Line 1075 | Line 1075 | static void
1075   writepicture(void)                              /* write out picture (alters buffer) */
1076   {
1077          int     y;
1078 <        register int    x;
1078 >        int     x;
1079          double  d;
1080  
1081          fprtresolu(hresolu, vresolu, stdout);
# Line 1118 | Line 1118 | writedistance(                 /* write out z file (alters buffer) *
1118          for (y = vresolu-1; y >= 0; y--) {
1119                  if (donorm) {
1120                          double  vx, yzn2, d;
1121 <                        register int    x;
1121 >                        int     x;
1122                          yzn2 = (y+.5)/vresolu + ourview.voff - .5;
1123                          yzn2 = 1. + yzn2*yzn2*ourview.vn2;
1124                          for (x = 0; x < hresolu; x++) {
# Line 1162 | Line 1162 | calstart(                    /* start fill calculation
1162          char    combuf[512];
1163          char    *argv[64];
1164          int     rval;
1165 <        register char   **wp, *cp;
1165 >        char    **wp, *cp;
1166  
1167          if (PDesc.running) {
1168                  fprintf(stderr, "%s: too many calculations\n", progname);
# Line 1226 | Line 1226 | clearqueue(void)                               /* process queue */
1226   {
1227          FVECT   orig, dir;
1228          float   fbuf[6*(PACKSIZ+1)];
1229 <        register float  *fbp;
1230 <        register int    i;
1229 >        float   *fbp;
1230 >        int     i;
1231          double  vx, vy;
1232  
1233          if (queuesiz == 0)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines