summaryrefslogtreecommitdiff
path: root/macro.py
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2009-06-05 00:00:17 +0200
committerPeter Simons <simons@cryp.to>2009-06-05 00:00:17 +0200
commite18befbb5e968029e6f9c8d053597abaaf1ad26c (patch)
tree1a8e42a426e19a869ba13bc2274dc87732a1e9b3 /macro.py
parentbffc6b9a5414b899879e45b9ca44220f8ebe5338 (diff)
downloadautoconf-archive-e18befbb5e968029e6f9c8d053597abaaf1ad26c.tar.gz
macro.py: fixed computation of padding for the URL line in the m4 file
Diffstat (limited to 'macro.py')
-rwxr-xr-xmacro.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/macro.py b/macro.py
index 69f838c..ca87057 100755
--- a/macro.py
+++ b/macro.py
@@ -75,7 +75,8 @@ class Macro:
url = "http://www.nongnu.org/autoconf-archive/%s" % (self.name + ".html")
lineLen = max(75,len(url) + 2)
separator = '=' * lineLen
- self.m4header = "# %s\n"*3 % (separator, url.center(lineLen), separator)
+ padding = ' ' * ((lineLen - len(url)) / 2)
+ self.m4header = "# %s\n"*3 % (separator, padding + url, separator)
# parse each section in the remaining list
for (key, body) in splitSections(header):
# drop empty lines at beginning and end of body