Menu names are saved untranslated.
[gliv.git] / tools / opengl_wrapper.awk
blobacc43903a6ba16e66670fc4ee0b251bac2e95430
1 function function_name(name)
3 match(name, /[^() ]+/, array);
4 return array[0];
7 BEGIN {
8 print "/* Autogenerated by opengl_wrapper.awk */";
9 print "";
12 /MESA|EXT|ARB|glBegin\(|glEnd\(/ {
13 next;
16 /glGetError/ {
17 /* Infinite recursion ... */
18 next;
21 /^GLAPI void GLAPIENTRY .+\( void \);/ {
22 f = function_name($4);
23 printf "#define %s() OPENGL_VOID_CALL_VOID(%s)\n", f, f;
24 next;
27 /^GLAPI void GLAPIENTRY / {
28 f = function_name($4);
29 printf "#define %s(...) OPENGL_VOID_CALL(%s, __VA_ARGS__)\n", f, f;
30 next;
33 /^GLAPI const [^ ]+ GLAPIENTRY / {
34 f = function_name($5);
35 printf "#define %s(...) OPENGL_CALL(const %s, %s, __VA_ARGS__)\n", f, $3, f;
36 next;
39 /^GLAPI [^ ]+ GLAPIENTRY / {
40 f = function_name($4);
41 printf "#define %s(...) OPENGL_CALL(%s, %s, __VA_ARGS__)\n", f, $2, f;
42 next;