2003-11-19 Mike Kestner <mkestner@ximian.com>
* parser/gapi_pp.pl : handle files and dirs in ARGV. * parser/gapi2xml.pl : deal with struct keyword in param decls * parser/gapi-parser : handle <file> elements. svn path=/trunk/gtk-sharp/; revision=20238
This commit is contained in:
parent
77a2ac2405
commit
cf901a483b
4 changed files with 41 additions and 10 deletions
|
@ -1,3 +1,9 @@
|
|||
2003-11-19 Mike Kestner <mkestner@ximian.com>
|
||||
|
||||
* parser/gapi_pp.pl : handle files and dirs in ARGV.
|
||||
* parser/gapi2xml.pl : deal with struct keyword in param decls
|
||||
* parser/gapi-parser : handle <file> elements.
|
||||
|
||||
2003-11-18 Mike Kestner <mkestner@ximian.com>
|
||||
|
||||
* configure.in : tagged for 0.14 and bumping VERSION.
|
||||
|
|
|
@ -48,13 +48,26 @@ for ($apinode = $root->firstChild; $apinode; $apinode = $apinode->nextSibling ()
|
|||
}
|
||||
}
|
||||
|
||||
my @files = ();
|
||||
for ($srcnode = $nsnode->firstChild; $srcnode; $srcnode = $srcnode->nextSibling ()) {
|
||||
next if ($srcnode->nodeName ne "dir");
|
||||
my ($dir);
|
||||
$dir = $srcnode->firstChild->nodeValue;
|
||||
print "$dir\n";
|
||||
`ls $dir`;
|
||||
system ("gapi_pp.pl $dir | gapi2xml.pl $ns $outfile.pre $lib");
|
||||
next if ($srcnode->nodeName ne "dir" && $srcnode->nodeName ne "file");
|
||||
|
||||
if ($srcnode->nodeName eq "dir") {
|
||||
my ($dir);
|
||||
$dir = $srcnode->firstChild->nodeValue;
|
||||
print "$dir\n";
|
||||
system ("gapi_pp.pl $dir | gapi2xml.pl $ns $outfile.pre $lib");
|
||||
} elsif ($srcnode->nodeName eq "file") {
|
||||
@files = (@files, $srcnode->firstChild->nodeValue);
|
||||
} else {
|
||||
die "Unexpected source $srcnode->nodeName \n";
|
||||
}
|
||||
|
||||
}
|
||||
if ($#files >= 0) {
|
||||
$pp_args = join (" ", @files);
|
||||
print "$pp_args\n";
|
||||
system ("gapi_pp.pl $pp_args | gapi2xml.pl $ns $outfile.pre $lib");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -674,7 +674,10 @@ sub addParamsElem
|
|||
$parm_elem = $doc->createElement('parameter');
|
||||
$parms_elem->appendChild($parm_elem);
|
||||
my $name = "";
|
||||
if ($parm =~ /(\S+)\s+(\S+)/) {
|
||||
if ($parm =~ /struct\s+(\S+)\s+(\S+)/) {
|
||||
$parm_elem->setAttribute('type', $1);
|
||||
$name = $2;
|
||||
}elsif ($parm =~ /(\S+)\s+(\S+)/) {
|
||||
$parm_elem->setAttribute('type', $1);
|
||||
$name = $2;
|
||||
} elsif ($parm =~ /(\S+)/) {
|
||||
|
|
|
@ -8,12 +8,21 @@
|
|||
#
|
||||
# <c> 2001 Mike Kestner
|
||||
# <c> 2003 Martin Willemoes Hansen
|
||||
# <c> 2003 Novell, Inc.
|
||||
|
||||
$eatit_regex = "^#if.*(__cplusplus|DEBUG|DISABLE_(DEPRECATED|COMPAT)|ENABLE_BROKEN|COMPILATION)";
|
||||
$ignoreit_regex = '^\s+\*|#\s*include|#\s*else|#\s*endif|#\s*undef|G_(BEGIN|END)_DECLS|extern|GDKVAR|GTKVAR|GTKMAIN_C_VAR|GTKTYPEUTILS_VAR|VARIABLE|GTKTYPEBUILTIN';
|
||||
|
||||
foreach $dir (@ARGV) {
|
||||
@hdrs = (@hdrs, `ls $dir/*.h`);
|
||||
foreach $arg (@ARGV) {
|
||||
if (-d $arg && -e $arg) {
|
||||
@hdrs = (@hdrs, `ls $arg/*.h`);
|
||||
@srcs = (@srcs, `ls $arg/*.c`);
|
||||
} elsif (-f $arg && -e $arg) {
|
||||
@hdrs = (@hdrs, $arg) if ($arg =~ /\.h$/);
|
||||
@srcs = (@srcs, $arg) if ($arg =~ /\.c$/);
|
||||
} else {
|
||||
die "unable to process arg: $arg";
|
||||
}
|
||||
}
|
||||
|
||||
foreach $fname (@hdrs) {
|
||||
|
@ -110,7 +119,7 @@ foreach $fname (@hdrs) {
|
|||
}
|
||||
}
|
||||
|
||||
foreach $fname (`ls $ARGV[0]/*.c`, @privhdrs) {
|
||||
foreach $fname (@srcs, @privhdrs) {
|
||||
|
||||
open(INFILE, $fname) || die "Could open $fname\n";
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue