mirror of
https://github.com/pragma-/pbot.git
synced 2025-02-16 21:40:46 +01:00
Allow expand_macros.pl to #include stuff to expand
This commit is contained in:
parent
b042e073db
commit
9c1a077d2e
@ -13,7 +13,7 @@ use warnings;
|
|||||||
# These are set automatically by the build/commit script
|
# These are set automatically by the build/commit script
|
||||||
use constant {
|
use constant {
|
||||||
BUILD_NAME => "PBot",
|
BUILD_NAME => "PBot",
|
||||||
BUILD_REVISION => 474,
|
BUILD_REVISION => 475,
|
||||||
BUILD_DATE => "2013-11-27",
|
BUILD_DATE => "2013-11-27",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -156,7 +156,7 @@ while($code =~ m/(.)/msg) {
|
|||||||
|
|
||||||
print "code after \\n additions: [$code]\n" if $debug;
|
print "code after \\n additions: [$code]\n" if $debug;
|
||||||
|
|
||||||
$code =~ s/#include [<"'].*?['">]//gm;
|
#$code =~ s/#include [<"'].*?['">]//gm;
|
||||||
|
|
||||||
print "code after include removal: [$code]\n" if $debug;
|
print "code after include removal: [$code]\n" if $debug;
|
||||||
|
|
||||||
@ -289,6 +289,7 @@ close $fh;
|
|||||||
|
|
||||||
my ($ret, $result) = execute(5, "gcc -E prog.c");
|
my ($ret, $result) = execute(5, "gcc -E prog.c");
|
||||||
|
|
||||||
|
$result =~ s/.*# \d+ "prog.c"(\s+\d+)*//ms;
|
||||||
$result =~ s/^#.*$//gm;
|
$result =~ s/^#.*$//gm;
|
||||||
$result =~ s/[\n\r]/ /gm;
|
$result =~ s/[\n\r]/ /gm;
|
||||||
$result =~ s/\s+/ /gm;
|
$result =~ s/\s+/ /gm;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user