Ignore:
Timestamp:
Jan 16, 2021, 5:34:18 PM (9 months ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast-unique-expr
Children:
d611995
Parents:
0197418
Message:

fix usage printing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/parseargs.cfa

    r0197418 r6f94958  
    148148        if(hwidth <= 0) hwidth = max;
    149149
    150         fprintf(out, "  -%c, --%-*s   %.*s\n", sn, width, ln, hwidth, help);
     150        char sname[4] = { ' ', ' ', ' ', '\0' };
     151        if(sn != '\0') {
     152                sname[0] = '-';
     153                sname[1] = sn;
     154                sname[2] = ',';
     155        }
     156
     157        fprintf(out, "  %s --%-*s   %.*s\n", sname, width, ln, hwidth, help);
    151158        for() {
    152159                help += min(strlen(help), hwidth);
Note: See TracChangeset for help on using the changeset viewer.