diff options
author | Alan Coopersmith <alan.coopersmith@sun.com> | 2007-03-20 10:39:36 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@sun.com> | 2007-03-20 10:39:36 -0700 |
commit | 2fe59be76e3a341b601838c3729d0045d49946d3 (patch) | |
tree | 2635381e3c2e1744c8397ef3adb13acd5d8be8a9 | |
parent | 91f465babd46f1b39c6f5665e38e4aab58fc921b (diff) |
Fix line wrapping of extensions list in usage message
-rw-r--r-- | xdpyinfo.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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; } } |