Ignore:
Timestamp:
Oct 28, 2022, 3:12:16 PM (3 years ago)
Author:
JiadaL <j82liang@…>
Branches:
ADT, ast-experimental, master, stuck-waitfor-destruct
Children:
fa2e183
Parents:
e874605 (diff), 22a0e87 (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
  • tests/configs/parsenums.cfa

    re874605 r93d2219  
    1515//
    1616
     17#include <fstream.hfa>
     18
     19#include "../meta/fork+exec.hfa"
     20
     21// last as workaround to parser bug
    1722#include <parseargs.hfa>
    18 #include <fstream.hfa>
    19 
    20 #include "../meta/fork+exec.hfa"
    2123
    2224#if __SIZEOF_LONG__ == 4
     
    4244
    4345
    44         cfa_option options[] = {
    45                 { 'i', "int",              "test int",                i   },
    46                 { 'u', "unsigned",         "test unsigned",           u   },
    47                 { 'l', "unsignedlong",     "test unsigned long",      ul  },
    48                 { 'L', "unsignedlonglong", "test unsigned long long", ull },
    49                 { 'd', "double",           "test double",             d   },
    50         };
    51         int options_cnt = sizeof(options) / sizeof(cfa_option);
     46        array( cfa_option, 5 ) options;
     47        options[0] = (cfa_option){ 'i', "int",              "test int",                i   };
     48        options[1] = (cfa_option){ 'u', "unsigned",         "test unsigned",           u   };
     49        options[2] = (cfa_option){ 'l', "unsignedlong",     "test unsigned long",      ul  };
     50        options[3] = (cfa_option){ 'L', "unsignedlonglong", "test unsigned long long", ull };
     51        options[4] = (cfa_option){ 'd', "double",           "test double",             d   };
    5252
    5353        char **left;
    54         parse_args( options, options_cnt, "[OPTIONS]...\ntesting bool parameters", left);
     54        parse_args( options, "[OPTIONS]...\ntesting bool parameters", left);
    5555
    5656        sout | "int                :" | i;
Note: See TracChangeset for help on using the changeset viewer.