From 49bdf28c320bf4e02048eb0cbd115d84b8467cd9 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Wed, 21 May 2008 10:32:39 +0000 Subject: - skip empty lines and archive members --- scripts/bloat-o-meter | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/bloat-o-meter b/scripts/bloat-o-meter index f6608af..49f5527 100755 --- a/scripts/bloat-o-meter +++ b/scripts/bloat-o-meter @@ -21,6 +21,12 @@ for f in sys.argv[1], sys.argv[2]: def getsizes(file): sym = {} for l in os.popen("nm --size-sort " + file).readlines(): + l = l.strip() + # Skip empty lines + if not len(l): continue + # Skip archive members + if len(l.split()) == 1 and l.endswith(':'): + continue size, type, name = l[:-1].split() if type in "tTdDbBrR": if "." in name: name = "static." + name.split(".")[0] -- cgit v1.1