Project

General

Profile

Misc #11373 ยป 0001-Add-command-line-option-to-query-valid-values-for-du.patch

mx4492 (Manav Rathi), 07/18/2015 02:27 PM

View differences:

man/ruby.1
413 413
.Pp
414 414
Prints the specified target.
415 415
.Ar target
416
can be one of;
416
can be one of:
417 417
.Bl -hang -offset indent
418
.It Sy targets
419
valid target values
420
.Pp
418 421
.It Sy insns
419 422
disassembled instructions
420 423
.Pp
ruby.c
78 78
    dump_parsetree,
79 79
    dump_parsetree_with_comment,
80 80
    dump_insns,
81
    dump_targets,
81 82
    dump_flag_count
82 83
};
83 84

  
85
static const char *valid_dump_targets = "version, copyright, usage, yydebug, syntax, parsetree, parsetree_with_comment, insns, targets";
86

  
84 87
struct cmdline_options {
85 88
    int sflag, xflag;
86 89
    int do_loop, do_print;
......
745 748
    SET_WHEN_DUMP(parsetree);
746 749
    SET_WHEN_DUMP(parsetree_with_comment);
747 750
    SET_WHEN_DUMP(insns);
751
    SET_WHEN_DUMP(targets);
748 752
    rb_warn("don't know how to dump `%.*s',", len, str);
749
    rb_warn("but only [version, copyright, usage, yydebug, syntax, parsetree, parsetree_with_comment, insns].");
753
    rb_warn("but only [%s].\n", valid_dump_targets);
750 754
}
751 755

  
752 756
static void
......
1347 1351
    if (opt->dump & DUMP_BIT(copyright)) {
1348 1352
	ruby_show_copyright();
1349 1353
    }
1354
    if (opt->dump & DUMP_BIT(targets)) {
1355
	printf("%s\n", valid_dump_targets);
1356
	return Qtrue;
1357
    }
1350 1358

  
1351 1359
    if (!opt->e_script) {
1352 1360
	if (argc == 0) {	/* no more args */
1353
-