summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2015-01-20 18:53:56 +0000
committerMatt Caswell <matt@openssl.org>2015-01-22 09:37:54 +0000
commitfbfad23f0c7c06e60525421e7b409ab580dd8626 (patch)
tree892d92cee5563005d125dd60ea05e4608dd083e0
parent68085a73af5348e145ee8025f93351677b035dbc (diff)
downloadopenssl-new-fbfad23f0c7c06e60525421e7b409ab580dd8626.tar.gz
Add -d debug option to save preprocessed files.
Reviewed-by: Tim Hudson <tjh@openssl.org>
-rwxr-xr-xutil/openssl-format-source5
1 files changed, 4 insertions, 1 deletions
diff --git a/util/openssl-format-source b/util/openssl-format-source
index 30d50f8b58..4e90147434 100755
--- a/util/openssl-format-source
+++ b/util/openssl-format-source
@@ -30,6 +30,7 @@ VERBOSE=false
DONT=false
STOPARGS=false
COMMENTS=false
+DEBUG=""
# for this exercise, we want to force the openssl style, so we roll
# our own indent profile, which is at a well known location
@@ -56,6 +57,8 @@ do
continue;;
-nc) COMMENTS="true";
continue;;
+ -d) DEBUG='eval tee "$j.pre" |'
+ continue;;
esac
fi
@@ -120,7 +123,7 @@ do
-e '/ASN1_(ITEM_ref|ITEM_ptr|ITEM_rptr|PCTX)/ || s/^((ASN1|ADB)_[^\*]*[){=,]+[ \t]*)$/\/**INDENT-OFF**\/\n$1/;' \
-e 's/^(} (ASN1|ADB)_[^\*]*[\){=,;]+)$/$1\n\/**INDENT-ON**\//;' \
| \
- indent $INDENT_ARGS | \
+ $DEBUG indent $INDENT_ARGS | \
perl -np \
-e 's/^([ \t]*)\/\*-(.*)\*\/[ \t]*$/$1\/*$2*\//;' \
-e 's/^\/\*-((Copyright|=|----).*)$/\/* $1/;' \