From bc4c2098a66bbcf4f3d265dd8e0a154062e4337d Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Fri, 25 Apr 2014 11:02:06 +0300 Subject: [PATCH] Improve command line handling, don't read stdin Reading stdin is confusing as it means running the script without any arguments and with no input redirection just seems to do nothing. (OTOH, who would use this script except seasoned hackers who know how command-line tools typically work... oh well.) Change-Id: I00b4f70b07b6515b52a22b4ec4e048cc84c1dc83 --- bin/ios-mapfile-statistics | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/bin/ios-mapfile-statistics b/bin/ios-mapfile-statistics index 98d33429b900..07f3f0aa68b4 100755 --- a/bin/ios-mapfile-statistics +++ b/bin/ios-mapfile-statistics @@ -17,7 +17,7 @@ sub HELP_MESSAGE { print <) { +open(INPUT, '<', $ARGV[0]) || die "Could not open $ARGV[0]: $!\n"; + +while () { if ($state == 0 && m!^# Object files:!) { $state = 1; } elsif ($state == 1 && m!^\[ *([0-9]+)\] .*/([-_a-z0-9]+\.a)\(.*!i) {