diff -u gl2ps-1.3.7-source/gl2ps.c gl2ps-1.3.7-source-mod/gl2ps.c
--- gl2ps-1.3.7-source/gl2ps.c	2012-09-02 04:07:33.000000000 -0500
+++ gl2ps-1.3.7-source-mod/gl2ps.c	2012-09-02 18:28:13.967752021 -0500
@@ -570,17 +570,17 @@
   return list->n;
 }
 
-static void *gl2psListPointer(GL2PSlist *list, GLint index)
+static void *gl2psListPointer(GL2PSlist *list, GLint idx)
 {
   if(!list){
     gl2psMsg(GL2PS_ERROR, "Cannot point into unallocated list");
     return NULL;
   }
-  if((index < 0) || (index >= list->n)){
+  if((idx < 0) || (idx >= list->n)){
     gl2psMsg(GL2PS_ERROR, "Wrong list index in gl2psListPointer");
     return NULL;
   }
-  return &list->array[index * list->size];
+  return &list->array[idx * list->size];
 }
 
 static void gl2psListSort(GL2PSlist *list,
@@ -1406,7 +1406,7 @@
 
 static GLint gl2psFindRoot(GL2PSlist *primitives, GL2PSprimitive **root)
 {
-  GLint i, j, count, best = 1000000, index = 0;
+  GLint i, j, count, best = 1000000, idx = 0;
   GL2PSprimitive *prim1, *prim2;
   GL2PSplane plane;
   GLint maxp;
@@ -1436,13 +1436,13 @@
       }
       if(count < best){
         best = count;
-        index = i;
+        idx = i;
         *root = prim1;
-        if(!count) return index;
+        if(!count) return idx;
       }
     }
     /* if(index) gl2psMsg(GL2PS_INFO, "GL2PS_BEST_ROOT was worth it: %d", index); */
-    return index;
+    return idx;
   }
   else{
     return 0;
@@ -1522,12 +1522,12 @@
 {
   GL2PSprimitive *prim, *frontprim = NULL, *backprim = NULL;
   GL2PSlist *frontlist, *backlist;
-  GLint i, index;
+  GLint i, idx;
 
   tree->front = NULL;
   tree->back = NULL;
   tree->primitives = gl2psListCreate(1, 2, sizeof(GL2PSprimitive*));
-  index = gl2psFindRoot(primitives, &prim);
+  idx = gl2psFindRoot(primitives, &prim);
   gl2psGetPlane(prim, tree->plane);
   gl2psAddPrimitiveInList(prim, tree->primitives);
 
@@ -1535,7 +1535,7 @@
   backlist = gl2psListCreate(1, 2, sizeof(GL2PSprimitive*));
 
   for(i = 0; i < gl2psListNbr(primitives); i++){
-    if(i != index){
+    if(i != idx){
       prim = *(GL2PSprimitive**)gl2psListPointer(primitives,i);
       switch(gl2psSplitPrimitive(prim, tree->plane, &frontprim, &backprim)){
       case GL2PS_COINCIDENT:
@@ -3114,7 +3114,7 @@
 
 static void gl2psPrintPostScriptBeginViewport(GLint viewport[4])
 {
-  GLint index;
+  GLint idx;
   GLfloat rgba[4];
   int x = viewport[0], y = viewport[1], w = viewport[2], h = viewport[3];
 
@@ -3133,10 +3133,10 @@
       glGetFloatv(GL_COLOR_CLEAR_VALUE, rgba);
     }
     else{
-      glGetIntegerv(GL_INDEX_CLEAR_VALUE, &index);
-      rgba[0] = gl2ps->colormap[index][0];
-      rgba[1] = gl2ps->colormap[index][1];
-      rgba[2] = gl2ps->colormap[index][2];
+      glGetIntegerv(GL_INDEX_CLEAR_VALUE, &idx);
+      rgba[0] = gl2ps->colormap[idx][0];
+      rgba[1] = gl2ps->colormap[idx][1];
+      rgba[2] = gl2ps->colormap[idx][2];
       rgba[3] = 1.0F;
     }
     gl2psPrintf("%g %g %g C\n"
@@ -4758,7 +4758,7 @@
 static void gl2psPrintPDFBeginViewport(GLint viewport[4])
 {
   int offs = 0;
-  GLint index;
+  GLint idx;
   GLfloat rgba[4];
   int x = viewport[0], y = viewport[1], w = viewport[2], h = viewport[3];
 
@@ -4776,10 +4776,10 @@
       glGetFloatv(GL_COLOR_CLEAR_VALUE, rgba);
     }
     else{
-      glGetIntegerv(GL_INDEX_CLEAR_VALUE, &index);
-      rgba[0] = gl2ps->colormap[index][0];
-      rgba[1] = gl2ps->colormap[index][1];
-      rgba[2] = gl2ps->colormap[index][2];
+      glGetIntegerv(GL_INDEX_CLEAR_VALUE, &idx);
+      rgba[0] = gl2ps->colormap[idx][0];
+      rgba[1] = gl2ps->colormap[idx][1];
+      rgba[2] = gl2ps->colormap[idx][2];
       rgba[3] = 1.0F;
     }
     offs += gl2psPrintPDFFillColor(rgba);
@@ -5193,7 +5193,7 @@
 
 static void gl2psPrintSVGBeginViewport(GLint viewport[4])
 {
-  GLint index;
+  GLint idx;
   char col[32];
   GLfloat rgba[4];
   int x = viewport[0], y = viewport[1], w = viewport[2], h = viewport[3];
@@ -5210,10 +5210,10 @@
       glGetFloatv(GL_COLOR_CLEAR_VALUE, rgba);
     }
     else{
-      glGetIntegerv(GL_INDEX_CLEAR_VALUE, &index);
-      rgba[0] = gl2ps->colormap[index][0];
-      rgba[1] = gl2ps->colormap[index][1];
-      rgba[2] = gl2ps->colormap[index][2];
+      glGetIntegerv(GL_INDEX_CLEAR_VALUE, &idx);
+      rgba[0] = gl2ps->colormap[idx][0];
+      rgba[1] = gl2ps->colormap[idx][1];
+      rgba[2] = gl2ps->colormap[idx][2];
       rgba[3] = 1.0F;
     }
     gl2psSVGGetColorString(rgba, col);
@@ -5423,7 +5423,7 @@
 
 static void gl2psPrintPGFBeginViewport(GLint viewport[4])
 {
-  GLint index;
+  GLint idx;
   GLfloat rgba[4];
   int x = viewport[0], y = viewport[1], w = viewport[2], h = viewport[3];
 
@@ -5440,10 +5440,10 @@
       glGetFloatv(GL_COLOR_CLEAR_VALUE, rgba);
     }
     else{
-      glGetIntegerv(GL_INDEX_CLEAR_VALUE, &index);
-      rgba[0] = gl2ps->colormap[index][0];
-      rgba[1] = gl2ps->colormap[index][1];
-      rgba[2] = gl2ps->colormap[index][2];
+      glGetIntegerv(GL_INDEX_CLEAR_VALUE, &idx);
+      rgba[0] = gl2ps->colormap[idx][0];
+      rgba[1] = gl2ps->colormap[idx][1];
+      rgba[2] = gl2ps->colormap[idx][2];
       rgba[3] = 1.0F;
     }
     gl2psPrintPGFColor(rgba);
@@ -5610,7 +5610,7 @@
                                   GLint nr, GLint ng, GLint nb, GLint buffersize,
                                   FILE *stream, const char *filename)
 {
-  GLint index;
+  GLint idx;
   int i;
 
   if(gl2ps){
@@ -5721,10 +5721,10 @@
     gl2ps->colorsize = colorsize;
     gl2ps->colormap = (GL2PSrgba*)gl2psMalloc(gl2ps->colorsize * sizeof(GL2PSrgba));
     memcpy(gl2ps->colormap, colormap, gl2ps->colorsize * sizeof(GL2PSrgba));
-    glGetIntegerv(GL_INDEX_CLEAR_VALUE, &index);
-    gl2ps->bgcolor[0] = gl2ps->colormap[index][0];
-    gl2ps->bgcolor[1] = gl2ps->colormap[index][1];
-    gl2ps->bgcolor[2] = gl2ps->colormap[index][2];
+    glGetIntegerv(GL_INDEX_CLEAR_VALUE, &idx);
+    gl2ps->bgcolor[0] = gl2ps->colormap[idx][0];
+    gl2ps->bgcolor[1] = gl2ps->colormap[idx][1];
+    gl2ps->bgcolor[2] = gl2ps->colormap[idx][2];
     gl2ps->bgcolor[3] = 1.0F;
   }
   else{
