mirror of
http://mpg123.de/trunk/.git
synced 2025-07-31 13:24:22 +03:00
Add new preprocessor flags to disable error / warning messages.
That can save around 9K on libmpg123. git-svn-id: svn://scm.orgis.org/mpg123/trunk@1800 35dc7657-300d-0410-a2e5-dc2837fedb53
This commit is contained in:
@ -38,10 +38,14 @@ print "#else\n";
|
||||
printdefs(0);
|
||||
print "#endif\n";
|
||||
|
||||
for('warning', 'error', 'ereturn')
|
||||
foreach my $t ('warning', 'error', 'ereturn')
|
||||
{
|
||||
print "\n/* $_ macros also here... */\n";
|
||||
printdefs(1, $_);
|
||||
print "\n/* $t macros also here... */\n";
|
||||
print "#ifndef NO_".uc($t)."\n";
|
||||
printdefs(1, $t);
|
||||
print "#else\n";
|
||||
printdefs(0, $t);
|
||||
print "#endif\n";
|
||||
}
|
||||
|
||||
sub printdefs
|
||||
@ -51,11 +55,13 @@ sub printdefs
|
||||
$type = 'debug' unless defined $type;
|
||||
my $i;
|
||||
my $pre = ''; my $post = ''; my $rv = '';
|
||||
my $notreal = '';
|
||||
if($type eq 'ereturn')
|
||||
{
|
||||
$pre = 'do{ ';
|
||||
$post = '; return rv; }while(0)';
|
||||
$rv = 'rv, ';
|
||||
$notreal = 'return rv';
|
||||
}
|
||||
while(++$i <= $num+1)
|
||||
{
|
||||
@ -66,7 +72,7 @@ sub printdefs
|
||||
print join(', ', @args).') ';
|
||||
if($forreal){ print $pre.'fprintf(stderr, "[" __FILE__ ":%i] '.$type.': " s "\n", __LINE__'.join(', ', @args).")$post\n"; }
|
||||
#else{ print "do {} while(0)\n"; }
|
||||
else{ print "\n"; }
|
||||
else{ print "$notreal\n"; }
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user