aboutsummaryrefslogtreecommitdiffstats
path: root/docs/parse_formats.pl
blob: b3adec6af248dc697aa279d9acedb30817872300 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env perl

use strict;
use warnings;


use C::Scan;
use Data::Dumper;
use Config;

my $home = $ENV{HOME};
my $src_loc = "$home/sources/irssi/src";
my $file = "perl/module-formats.c";


my $scan = C::Scan->new(filename => $src_loc . "/". $file);
$scan->set('includeDirs' => [$src_loc,
                             $src_loc . "/perl",
                             "/opt/local/include",
                             "/opt/local/include/glib-2.0",
                             $Config::Config{shrpdir}]);

print Dumper($scan->get('typedef_structs'));