ftp://ftp.jp.xemacs.org/pub/NetBSD/packages/distfiles/xscreensaver-4.15.tar.gz
[xscreensaver] / hacks / glx / circuit.c
index 039d2fed64d64162983a1aea0fdc4a3fbfc39f51..e7ee382b80daae3fb04d1771578bf2c1e03b1c82 100644 (file)
@@ -102,13 +102,13 @@ static XrmOptionDescRec opts[] = {
 };
 
 static argtype vars[] = {
-  {(caddr_t *) &maxparts, "parts", "Parts", DEF_PARTS, t_Int},
-  {(caddr_t *) &font, "font", "Font", "fixed", t_String},
-  {(caddr_t *) &rotatespeed, "rotatespeed", "Rotatespeed", "1", t_Int},
-  {(caddr_t *) &spin, "spin", "Spin", DEF_SPIN, t_Bool},
-  {(caddr_t *) &rotate, "rotate", "Rotate", "False", t_Bool},
-  {(caddr_t *) &uselight, "light", "Light", "True", t_Bool},
-  {(caddr_t *) &seven, "seven", "Seven", DEF_SEVEN, t_Bool},
+  {&maxparts, "parts", "Parts", DEF_PARTS, t_Int},
+  {&font, "font", "Font", "fixed", t_String},
+  {&rotatespeed, "rotatespeed", "Rotatespeed", "1", t_Int},
+  {&spin, "spin", "Spin", DEF_SPIN, t_Bool},
+  {&rotate, "rotate", "Rotate", "False", t_Bool},
+  {&uselight, "light", "Light", "True", t_Bool},
+  {&seven, "seven", "Seven", DEF_SEVEN, t_Bool},
 };
 
 ModeSpecOpt circuit_opts = {countof(opts), opts, countof(vars), vars, NULL};
@@ -241,7 +241,7 @@ static const char * smctypes[] = {
 typedef struct {
   int type; /* package type. 0 = to-92, 1 = to-220 */
   GLfloat tw, th; /* texture dimensions */
-  int tnum; /* texture binding */
+  GLuint tnum; /* texture binding */
 } Transistor;
 
 typedef struct {
@@ -392,7 +392,7 @@ void DrawRCA(RCA *);
 void DrawThreeFive(ThreeFive *);
 void DrawSwitch(Switch *);
 
-void freetexture(int);
+void freetexture(GLuint);
 void reorder(Component *[]);
 void circle(float, int,int);
 void bandedCylinder(float, float , GLfloat, GLfloat , GLfloat,  Band **, int);
@@ -2002,7 +2002,7 @@ void display(void)
   glFlush();
 }
 
-void freetexture (int texture) {
+void freetexture (GLuint texture) {
   s_refs[texture]--;
   if (s_refs[texture] < 1) {
     glDeleteTextures(1, &texture);
@@ -2064,7 +2064,7 @@ TexNum * fonttexturealloc (const char *str, float *fg, float *bg)
                              GL_RGBA, GL_UNSIGNED_BYTE, ximage->data);
   if (status)
     {
-      const char *s = gluErrorString (status);
+      const char *s = (char *) gluErrorString (status);
       fprintf (stderr, "%s: error mipmapping %dx%d texture: %s\n",
                progname, ximage->width, ximage->height,
                (s ? s : "(unknown)"));