make_html.pl 1.36 KB
Newer Older
ikits's avatar
ikits committed
1
#!/usr/bin/perl
ikits's avatar
ikits committed
2
##
ikits's avatar
ikits committed
3
4
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
ikits's avatar
ikits committed
5
6
7
8
##
## This program is distributed under the terms and conditions of the GNU
## General Public License Version 2 as published by the Free Software
## Foundation or, at your option, any later version.
ikits's avatar
ikits committed
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

use strict;
use warnings;

do 'bin/make.pl';

#---------------------------------------------------------------------------------------

my @extlist = ();
my %extensions = ();
my $group = "";
my $cur_group = "";

if (@ARGV)
{
    @extlist = @ARGV;
ikits's avatar
ikits committed
25
26
	my $n = 1;
	print "<table border=\"0\" width=\"100%\" cellpadding=\"1\" cellspacing=\"0\" align=\"center\">\n";
ikits's avatar
ikits committed
27
28
	foreach my $ext (sort @extlist)
	{
29
		my ($extname, $exturl, $extstring, $types, $tokens, $functions, $exacts) = parse_ext($ext);
ikits's avatar
ikits committed
30
31
32
33
34
		$cur_group = $extname;
		$cur_group =~ s/^(?:W?)GL(?:X?)_([A-Z0-9]+?)_.*$/$1/;
		$extname =~ s/^(?:W?)GL(?:X?)_(.*)$/$1/;
		if ($cur_group ne $group)
		{
35
36
			if ($group ne "")
			{
ikits's avatar
ikits committed
37
				print "<tr><td><br></td><td></td><td></td></tr>\n";
38
			}
ikits's avatar
ikits committed
39
40
			$group = $cur_group;
		}
ikits's avatar
ikits committed
41

ikits's avatar
ikits committed
42
		{
ikits's avatar
ikits committed
43
44
45
46
47
48
49
50
51
			if ($exturl)
			{
				print "<tr><td class=\"num\">$n</td><td>&nbsp;</td><td><a href=\"$exturl\">$extname</a></td></tr>\n";
			}
			else
			{
				print "<tr><td class=\"num\">$n</td><td>&nbsp;</td><td>$extname</td></tr>\n";
			}
			$n++;
ikits's avatar
ikits committed
52
53
		}
	}
ikits's avatar
ikits committed
54
	print "</table>\n"
ikits's avatar
ikits committed
55
}