comparison libvo/gl_common.c @ 19194:5949a654e2d4

marks some read-only char* inside structs as const, patch by Stefan Huehner, stefan At huehner-org
author reynaldo
date Thu, 27 Jul 2006 17:35:06 +0000
parents 4daef6e86041
children 62ff089c24f7
comparison
equal deleted inserted replaced
19193:28d25943b7cf 19194:5949a654e2d4
87 glPixelStorei (GL_UNPACK_ALIGNMENT, gl_alignment); 87 glPixelStorei (GL_UNPACK_ALIGNMENT, gl_alignment);
88 } 88 }
89 89
90 struct gl_name_map_struct { 90 struct gl_name_map_struct {
91 GLint value; 91 GLint value;
92 char *name; 92 const char *name;
93 }; 93 };
94 94
95 #undef MAP 95 #undef MAP
96 #define MAP(a) {a, #a} 96 #define MAP(a) {a, #a}
97 //! mapping table for the glValName function 97 //! mapping table for the glValName function
251 return NULL; 251 return NULL;
252 } 252 }
253 253
254 typedef struct { 254 typedef struct {
255 void **funcptr; 255 void **funcptr;
256 char *extstr; 256 const char *extstr;
257 char *funcnames[7]; 257 const char *funcnames[7];
258 } extfunc_desc_t; 258 } extfunc_desc_t;
259 259
260 static const extfunc_desc_t extfuncs[] = { 260 static const extfunc_desc_t extfuncs[] = {
261 {(void **)&GenBuffers, NULL, {"glGenBuffers", "glGenBuffersARB", NULL}}, 261 {(void **)&GenBuffers, NULL, {"glGenBuffers", "glGenBuffersARB", NULL}},
262 {(void **)&DeleteBuffers, NULL, {"glDeleteBuffers", "glDeleteBuffersARB", NULL}}, 262 {(void **)&DeleteBuffers, NULL, {"glDeleteBuffers", "glDeleteBuffersARB", NULL}},
912 *remain -= strlen(*prog_pos); 912 *remain -= strlen(*prog_pos);
913 *prog_pos += strlen(*prog_pos); 913 *prog_pos += strlen(*prog_pos);
914 } 914 }
915 915
916 static const struct { 916 static const struct {
917 char *name; 917 const char *name;
918 GLenum cur; 918 GLenum cur;
919 GLenum max; 919 GLenum max;
920 } progstats[] = { 920 } progstats[] = {
921 {"instructions", 0x88A0, 0x88A1}, 921 {"instructions", 0x88A0, 0x88A1},
922 {"native instructions", 0x88A2, 0x88A3}, 922 {"native instructions", 0x88A2, 0x88A3},