[Libreoffice-commits] .: src/globals.py
Kohei Yoshida
kohei at kemper.freedesktop.org
Mon Apr 11 19:36:51 PDT 2011
src/globals.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
New commits:
commit b0306e5c44afe80e01bfaffa7d5643c04e422deb
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Mon Apr 11 22:35:14 2011 -0400
A little clean up.
diff --git a/src/globals.py b/src/globals.py
index a8de6a5..1505a54 100644
--- a/src/globals.py
+++ b/src/globals.py
@@ -277,7 +277,7 @@ def dumpBytes (chars, subDivide=None):
return
labelWidth = int(math.ceil(math.log(charLen, 10)))
- lineBuf = ''
+ lineBuf = '' # bytes interpreted as chars at the end of each line
i = 0
for i in xrange(0, charLen):
if (i+1)%16 == 1:
@@ -298,7 +298,7 @@ def dumpBytes (chars, subDivide=None):
if (i+1)%16 == 0:
# end of line
- output (" " + lineBuf)
+ output (lineBuf)
output("\n")
if subDivideLine != None and (line+1)%subDivideLine == 0:
output("\n")
@@ -306,6 +306,7 @@ def dumpBytes (chars, subDivide=None):
line += 1
if len(lineBuf) > 0:
+ # pad with white space so that the line string gets aligned.
i += 1
while True:
output (" ")
@@ -314,11 +315,10 @@ def dumpBytes (chars, subDivide=None):
output(" ")
if (i+1) % 16 == 0:
# end of line
- output (" " + lineBuf)
- output("\n")
break
-
i += 1
+ output (lineBuf)
+ output("\n")
def getSectorPos (secID, secSize):
return 512 + secID*secSize
More information about the Libreoffice-commits
mailing list