~ubuntu-branches/ubuntu/trusty/glew/trusty

« back to all changes in this revision

Viewing changes to auto/bin/make_info_list.pl

  • Committer: Bazaar Package Importer
  • Author(s): Marcelo E. Magallon
  • Date: 2005-02-10 21:21:42 UTC
  • Revision ID: james.westby@ubuntu.com-20050210212142-2b1p2th5s3d0wjdz
Tags: upstream-1.3.1
ImportĀ upstreamĀ versionĀ 1.3.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/perl
 
2
##
 
3
## Copyright (C) 2003-2005, Marcelo E. Magallon <mmagallo[]debian org>
 
4
## Copyright (C) 2003-2005, Milan Ikits <milan ikits[]ieee org>
 
5
##
 
6
## This program is distributed under the terms and conditions of the GNU
 
7
## General Public License Version 2 as published by the Free Software
 
8
## Foundation or, at your option, any later version.
 
9
 
 
10
use strict;
 
11
use warnings;
 
12
 
 
13
do 'bin/make.pl';
 
14
 
 
15
#---------------------------------------------------------------------------------------
 
16
 
 
17
# function pointer definition
 
18
sub make_pfn_def($%)
 
19
{
 
20
    return "PFN" . (uc $_[0]) . "PROC " . prefixname($_[0]) . " = NULL;";
 
21
}
 
22
 
 
23
# function pointer definition
 
24
sub make_init_call($%)
 
25
{
 
26
    my $name = prefixname($_[0]);
 
27
    return "  r = r || (" . $name . " = (PFN" . (uc $_[0]) . "PROC)glewGetProcAddress((const GLubyte*)\"" . $name . "\")) == NULL;";
 
28
}
 
29
 
 
30
#---------------------------------------------------------------------------------------
 
31
 
 
32
my @extlist = ();
 
33
my %extensions = ();
 
34
 
 
35
if (@ARGV)
 
36
{
 
37
    @extlist = @ARGV;
 
38
 
 
39
        foreach my $ext (sort @extlist)
 
40
        {
 
41
                my ($extname, $exturl, $types, $tokens, $functions, $exacts) = parse_ext($ext);
 
42
 
 
43
                print "#ifdef $extname\n";
 
44
                print "  _glewInfo_$extname();\n";
 
45
                print "#endif /* $extname */\n";
 
46
        }
 
47
}