diff options
Diffstat (limited to 'opengl/libs/tools/glentrygen')
-rwxr-xr-x | opengl/libs/tools/glentrygen | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/opengl/libs/tools/glentrygen b/opengl/libs/tools/glentrygen index 5e0f7b6..170f041 100755 --- a/opengl/libs/tools/glentrygen +++ b/opengl/libs/tools/glentrygen @@ -16,16 +16,23 @@ use strict; +sub rtrim($) +{ + my $string = shift; + $string =~ s/\s+$//; + return $string; +} + while (my $line = <>) { next if $line =~ /^\//; next if $line =~ /^#/; next if $line =~ /^\s*$/; - if ($line !~ /^GL_API\s+(.+)\s+GL_APIENTRY\s+([\w]+)\s*\(([^\)]+)\);/) { + if ($line !~ /^GL_API(CALL)?\s+(.+)\s+GL_APIENTRY\s+([\w]+)\s*\(([^\)]+)\);/) { next; } - my $type = $1; - my $name = $2; - my $args = $3; + my $type = rtrim($2); + my $name = $3; + my $args = $4; printf("GL_ENTRY(%s, %s, %s)\n", $type, $name, $args); } |