Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main.cc

    r49d3128 rb4f8808  
    407407
    408408
    409 static const char optstring[] = ":c:ghlLmNnpP:S:twW:D:";
     409static const char optstring[] = ":hlLmNnpP:S:twW:D:";
    410410
    411411enum { PreludeDir = 128 };
    412412static struct option long_opts[] = {
    413         { "colors", required_argument, nullptr, 'c' },
    414         { "gdb", no_argument, nullptr, 'g' },
    415413        { "help", no_argument, nullptr, 'h' },
    416414        { "libcfa", no_argument, nullptr, 'l' },
     
    424422        { "statistics", required_argument, nullptr, 'S' },
    425423        { "tree", no_argument, nullptr, 't' },
     424        { "gdb", no_argument, nullptr, 'g' },
    426425        { "", no_argument, nullptr, 0 },                                        // -w
    427426        { "", no_argument, nullptr, 0 },                                        // -W
     
    431430
    432431static const char * description[] = {
    433         "diagnostic color: never, always, or auto.",          // -c
    434         "wait for gdb to attach",                             // -g
    435         "print help message",                                 // -h
    436         "generate libcfa.c",                                  // -l
    437         "generate line marks",                                // -L
    438         "do not replace main",                                // -m
    439         "do not generate line marks",                         // -N
    440         "do not read prelude",                                // -n
     432        "print help message",                                                           // -h
     433        "generate libcfa.c",                                                            // -l
     434        "generate line marks",                                                          // -L
     435        "do not replace main",                                                          // -m
     436        "do not generate line marks",                                           // -N
     437        "do not read prelude",                                                          // -n
    441438        "generate prototypes for prelude functions",            // -p
    442         "print",                                              // -P
     439        "print",                                                                                        // -P
    443440        "<directory> prelude directory for debug/nodebug",      // no flag
    444441        "<option-list> enable profiling information:\n          counters,heap,time,all,none", // -S
    445         "building cfa standard lib",                          // -t
    446         "",                                                   // -w
    447         "",                                                   // -W
    448         "",                                                   // -D
     442        "building cfa standard lib",                                                                    // -t
     443        "wait for gdb to attach",                                                                       // -g
     444        "",                                                                                                     // -w
     445        "",                                                                                                     // -W
     446        "",                                                                                                     // -D
    449447}; // description
    450448
     
    514512        while ( (c = getopt_long( argc, argv, optstring, long_opts, nullptr )) != -1 ) {
    515513                switch ( c ) {
    516                   case 'c':                                                                             // diagnostic colors
    517                         if ( strcmp( optarg, "always" ) == 0 ) {
    518                                 ErrorHelpers::colors = ErrorHelpers::Colors::Always;
    519                         } else if ( strcmp( optarg, "never" ) == 0 ) {
    520                                 ErrorHelpers::colors = ErrorHelpers::Colors::Never;
    521                         } else if ( strcmp( optarg, "auto" ) == 0 ) {
    522                                 ErrorHelpers::colors = ErrorHelpers::Colors::Auto;
    523                         } // if
    524                         break;
    525514                  case 'h':                                                                             // help message
    526515                        usage( argv );                                                          // no return
Note: See TracChangeset for help on using the changeset viewer.