Tidy headers fix.

This commit is contained in:
Steve 2018-03-17 17:33:00 +00:00
parent 09aa386c16
commit 65b37c5221
1 changed files with 4 additions and 34 deletions

View File

@ -119,20 +119,10 @@ function cleanHeader($headerFile)
}
echo "\t- $line";
}
if (!in_array($line, $lines))
else if (!in_array($line, $lines))
{
$functions[] = $line;
}
else
{
if (!$hasChanges)
{
echo "$headerFile\n";
$hasChanges = true;
}
echo "\t- $line";
}
}
preg_match($struct_pattern, $line, $matches);
@ -154,20 +144,10 @@ function cleanHeader($headerFile)
}
echo "\t- $line";
}
if (!in_array($line, $lines))
else if (!in_array($line, $lines))
{
$structs[] = $line;
}
else
{
if (!$hasChanges)
{
echo "$headerFile\n";
$hasChanges = true;
}
echo "\t- $line";
}
}
preg_match($define_pattern, $line, $matches);
@ -189,20 +169,10 @@ function cleanHeader($headerFile)
}
echo "\t- $line";
}
if (!in_array($line, $lines))
else if (!in_array($line, $lines))
{
$defines[] = $line;
}
else
{
if (!$hasChanges)
{
echo "$headerFile\n";
$hasChanges = true;
}
echo "\t- $line";
}
}
}
@ -230,7 +200,7 @@ function recurseDir($dir)
{
recurseDir("$dir/$file");
}
else if (strstr($file, ".h") !== FALSE && strstr($file, "main.h") === FALSE && && strstr($file, "savepng") === FALSE)
else if (strstr($file, ".h") !== FALSE && strstr($file, "main.h") === FALSE && strstr($file, "savepng") === FALSE)
{
cleanHeader("$dir/$file");
}