Mesa (master): trivial: Fix indentation in tri

Jakob Bornecrantz wallbraker at kemper.freedesktop.org
Tue Feb 24 18:05:44 UTC 2009


Module: Mesa
Branch: master
Commit: b3bd315e572f55224393386dd2d171dc15600694
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b3bd315e572f55224393386dd2d171dc15600694

Author: Jakob Bornecrantz <jakob at vmware.com>
Date:   Sat Feb 21 11:57:50 2009 +0100

trivial: Fix indentation in tri

---

 progs/trivial/tri.c |   86 +++++++++++++++++++++++++-------------------------
 1 files changed, 43 insertions(+), 43 deletions(-)

diff --git a/progs/trivial/tri.c b/progs/trivial/tri.c
index 033d6ce..d99d587 100644
--- a/progs/trivial/tri.c
+++ b/progs/trivial/tri.c
@@ -41,28 +41,28 @@ static void Init(void)
    fprintf(stderr, "GL_VERSION    = %s\n", (char *) glGetString(GL_VERSION));
    fprintf(stderr, "GL_VENDOR     = %s\n", (char *) glGetString(GL_VENDOR));
 
-    glClearColor(0.3, 0.1, 0.3, 0.0);
+   glClearColor(0.3, 0.1, 0.3, 0.0);
 }
 
 static void Reshape(int width, int height)
 {
 
-    glViewport(0, 0, (GLint)width, (GLint)height);
+   glViewport(0, 0, (GLint)width, (GLint)height);
 
-    glMatrixMode(GL_PROJECTION);
-    glLoadIdentity();
-    glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
-    glMatrixMode(GL_MODELVIEW);
+   glMatrixMode(GL_PROJECTION);
+   glLoadIdentity();
+   glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
+   glMatrixMode(GL_MODELVIEW);
 }
 
 static void Key(unsigned char key, int x, int y)
 {
    switch (key) {
-   case 27:
-      exit(0);
-   default:
-      glutPostRedisplay();
-      return;
+      case 27:
+         exit(0);
+      default:
+         glutPostRedisplay();
+         return;
    }
 }
 
@@ -88,47 +88,47 @@ static void Draw(void)
 
 static GLenum Args(int argc, char **argv)
 {
-    GLint i;
-
-    for (i = 1; i < argc; i++) {
-        if (strcmp(argv[i], "-sb") == 0) {
-	    doubleBuffer = GL_FALSE;
-	} else if (strcmp(argv[i], "-db") == 0) {
-	    doubleBuffer = GL_TRUE;
-	} else {
-	    fprintf(stderr, "%s (Bad option).\n", argv[i]);
-	    return GL_FALSE;
-	}
-    }
-    return GL_TRUE;
+   GLint i;
+
+   for (i = 1; i < argc; i++) {
+      if (strcmp(argv[i], "-sb") == 0) {
+         doubleBuffer = GL_FALSE;
+      } else if (strcmp(argv[i], "-db") == 0) {
+         doubleBuffer = GL_TRUE;
+      } else {
+         fprintf(stderr, "%s (Bad option).\n", argv[i]);
+         return GL_FALSE;
+      }
+   }
+   return GL_TRUE;
 }
 
 int main(int argc, char **argv)
 {
-    GLenum type;
+   GLenum type;
 
-    glutInit(&argc, argv);
+   glutInit(&argc, argv);
 
-    if (Args(argc, argv) == GL_FALSE) {
-	exit(1);
-    }
+   if (Args(argc, argv) == GL_FALSE) {
+      exit(1);
+   }
 
-    glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
+   glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
 
-    type = GLUT_RGB | GLUT_ALPHA;
-    type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
-    glutInitDisplayMode(type);
+   type = GLUT_RGB | GLUT_ALPHA;
+   type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
+   glutInitDisplayMode(type);
 
-    win = glutCreateWindow(*argv);
-    if (!win) {
-	exit(1);
-    }
+   win = glutCreateWindow(*argv);
+   if (!win) {
+      exit(1);
+   }
 
-    Init();
+   Init();
 
-    glutReshapeFunc(Reshape);
-    glutKeyboardFunc(Key);
-    glutDisplayFunc(Draw);
-    glutMainLoop();
-    return 0;
+   glutReshapeFunc(Reshape);
+   glutKeyboardFunc(Key);
+   glutDisplayFunc(Draw);
+   glutMainLoop();
+   return 0;
 }




More information about the mesa-commit mailing list