summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2012-03-21 12:33:19 -0700
committerJeremy Huddleston <jeremyhu@apple.com>2012-03-27 11:50:38 -0700
commitd9a9788bb163731f681951e9f0ac0e37fd095e6b (patch)
treea3d1c229c7c8b7ce72d1c7e5b23c9228dc0ebe1c
parent3590d0bb77b787e07030e43f60fa2d0a4a020057 (diff)
Handle blank betweeen type and name in sdksyms.sh
indent sometimes adds a blank line between the type and the name in a function declaration that includes _X_EXPORT, so handle that before the files are re-indented. Signed-off-by: Keith Packard <keithp@keithp.com> (cherry picked from commit 75199129c603fc8567185ac31866c9518193cb78)
-rwxr-xr-xhw/xfree86/sdksyms.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/hw/xfree86/sdksyms.sh b/hw/xfree86/sdksyms.sh
index 9034f3829..40ea7c8da 100755
--- a/hw/xfree86/sdksyms.sh
+++ b/hw/xfree86/sdksyms.sh
@@ -364,7 +364,7 @@ BEGIN {
# skip attribute, if any
while ($n ~ /^(__attribute__|__global)/ ||
# skip modifiers, if any
- $n ~ /^\*?(unsigned|const|volatile|struct)$/ ||
+ $n ~ /^\*?(unsigned|const|volatile|struct|_X_EXPORT)$/ ||
# skip pointer
$n ~ /^[a-zA-Z0-9_]*\*$/)
n++;
@@ -395,6 +395,9 @@ BEGIN {
if ($n == "" || $n ~ /^\*+$/) {
getline;
n = 1;
+ # indent may have inserted a blank link
+ if ($0 == "")
+ getline;
}
# dont modify $0 or $n