remove trailing whitespace and misc clean-ups
authorBrian Paul <brian.paul@tungstengraphics.com>
Tue, 29 Jun 2004 00:00:06 +0000 (00:00 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Tue, 29 Jun 2004 00:00:06 +0000 (00:00 +0000)
src/mesa/shader/program.c

index 8dc6ecb..18bebd2 100644 (file)
@@ -740,54 +740,50 @@ _mesa_fetch_state(GLcontext *ctx, const enum state_index state[],
       }
       return;
    case STATE_DEPTH_RANGE:
-      value[0] = ctx->Viewport.Near;                     /* near       */              
-      value[1] = ctx->Viewport.Far;                      /* far        */              
-      value[2] = ctx->Viewport.Far - ctx->Viewport.Near; /* far - near */              
-      value[3] = 0;            
+      value[0] = ctx->Viewport.Near;                     /* near       */
+      value[1] = ctx->Viewport.Far;                      /* far        */
+      value[2] = ctx->Viewport.Far - ctx->Viewport.Near; /* far - near */
+      value[3] = 0;
       return;
    case STATE_FRAGMENT_PROGRAM:
       {
          /* state[1] = {STATE_ENV, STATE_LOCAL} */
          /* state[2] = parameter index          */
-         int idx = state[2];                             
-
+         const int idx = (int) state[2];
          switch (state[1]) {
             case STATE_ENV:
-               COPY_4V(value, ctx->FragmentProgram.Parameters[idx]);                                             
+               COPY_4V(value, ctx->FragmentProgram.Parameters[idx]);
                break;
-
             case STATE_LOCAL:
                COPY_4V(value, ctx->FragmentProgram.Current->Base.LocalParams[idx]);
-               break;                          
+               break;
             default:
                _mesa_problem(ctx, "Bad state switch in _mesa_fetch_state()");
                return;
-         }                               
-      }                        
+         }
+      }
       return;
                
    case STATE_VERTEX_PROGRAM:
-      {                
+      {
          /* state[1] = {STATE_ENV, STATE_LOCAL} */
          /* state[2] = parameter index          */
-         int idx = state[2];                             
-                       
+         const int idx = (int) state[2];
          switch (state[1]) {
             case STATE_ENV:
-               COPY_4V(value, ctx->VertexProgram.Parameters[idx]);                                               
+               COPY_4V(value, ctx->VertexProgram.Parameters[idx]);
                break;
-
             case STATE_LOCAL:
                COPY_4V(value, ctx->VertexProgram.Current->Base.LocalParams[idx]);
-               break;                          
+               break;
             default:
                _mesa_problem(ctx, "Bad state switch in _mesa_fetch_state()");
                return;
-         }                               
-      }                        
+         }
+      }
       return;
    default:
-      _mesa_problem(ctx, "Invalid state in fetch_state");
+      _mesa_problem(ctx, "Invalid state in _mesa_fetch_state");
       return;
    }
 }