summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@sun.com>2007-03-20 10:39:36 -0700
committerAlan Coopersmith <alan.coopersmith@sun.com>2007-03-20 10:39:36 -0700
commit2fe59be76e3a341b601838c3729d0045d49946d3 (patch)
tree2635381e3c2e1744c8397ef3adb13acd5d8be8a9
parent91f465babd46f1b39c6f5665e38e4aab58fc921b (diff)
Fix line wrapping of extensions list in usage message
-rw-r--r--xdpyinfo.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/xdpyinfo.c b/xdpyinfo.c
index c37d7e8..093b7c1 100644
--- a/xdpyinfo.c
+++ b/xdpyinfo.c
@@ -1425,12 +1425,15 @@ print_known_extensions(FILE *f)
int i, col;
for (i = 0, col = 6; i < num_known_extensions; i++)
{
- if ((col += strlen(known_extensions[i].extname)+1) > 79)
+ int extlen = strlen(known_extensions[i].extname) + 1;
+
+ if ((col + extlen) > 79)
{
col = 6;
fprintf(f, "\n ");
}
fprintf(f, "%s ", known_extensions[i].extname);
+ col += extlen;
}
}