Ignore:
Timestamp:
Jan 7, 2021, 5:06:22 PM (5 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
5ad381b
Parents:
42f6e07 (diff), 58fe85a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/parseargs.cfa

    r42f6e07 r2b4daf2  
    105105                                        if(opt == options[i].short_name) {
    106106                                                const char * arg = optarg ? optarg : "";
     107                                                if( arg[0] == '=' ) { arg++; }
    107108                                                bool success = options[i].parse( arg, options[i].variable );
    108109                                                if(success) continue NEXT_ARG;
     
    185186}
    186187
     188bool parse_truefalse(const char * arg, bool & value) {
     189        if(strcmp(arg, "true") == 0) {
     190                value = true;
     191                return true;
     192        }
     193
     194        if(strcmp(arg, "false") == 0) {
     195                value = false;
     196                return true;
     197        }
     198
     199        return false;
     200}
     201
    187202bool parse_settrue (const char *, bool & value ) {
    188203        value = true;
Note: See TracChangeset for help on using the changeset viewer.