printf("Main options are:\n"); for(i=0;i<2;i++) { first = 1; for(po = options; po->name != NULL; po++) { char buf[64]; expert = (po->flags & OPT_EXPERT) != 0; if (expert == i) { if (expert && first) { printf("\nAdvanced options are:\n"); first = 0; } strcpy(buf, po->name); if (po->flags & HAS_ARG) { strcat(buf, " "); strcat(buf, po->argname); } printf("-%-17s  %s\n", buf, po->help);
first = 1; for(po = options; po->name != NULL; po++) { char buf[64]; if ((po->flags & mask) == value) { if (first) { printf("%s", msg); first = 0;
void show_help_options(const OptionDef *options){    const OptionDef *po;    int i, expert, first;    printf("Main options are:\n");    for(i=0;i<2;i++) {        first = 1;        for(po = options; po->name != NULL; po++) {            char buf[64];            expert = (po->flags & OPT_EXPERT) != 0;            if (expert == i) {                if (expert && first) {                    printf("\nAdvanced options are:\n");                    first = 0;                }                strcpy(buf, po->name);                if (po->flags & HAS_ARG) {                    strcat(buf, " ");                    strcat(buf, po->argname);                }                printf("-%-17s  %s\n", buf, po->help);            }        }    }}