@@ 683-697 (lines=15) @@ | ||
680 | print(' ' + o['name']) |
|
681 | ||
682 | ||
683 | def get_options(compiler): |
|
684 | r = wandbox_get_compilerlist() |
|
685 | opt = [] |
|
686 | for d in r: |
|
687 | if d['name'] == compiler: |
|
688 | if 'switches' in d: |
|
689 | switches = d['switches'] |
|
690 | for s in switches: |
|
691 | if 'name' in s: |
|
692 | opt.append(s['name']) |
|
693 | elif 'options' in s: |
|
694 | opt.append(s['default']) |
|
695 | for o in s['options']: |
|
696 | opt.append(o['name']) |
|
697 | return opt |
|
698 | ||
699 | ||
700 | # get default options |
|
@@ 701-714 (lines=14) @@ | ||
698 | ||
699 | ||
700 | # get default options |
|
701 | def get_default_options(compiler): |
|
702 | r = wandbox_get_compilerlist() |
|
703 | opt = [] |
|
704 | for d in r: |
|
705 | if d['name'] == compiler: |
|
706 | if 'switches' in d: |
|
707 | switches = d['switches'] |
|
708 | for s in switches: |
|
709 | if 'name' in s: |
|
710 | if s['default']: |
|
711 | opt.append(s['name']) |
|
712 | elif 'options' in s: |
|
713 | opt.append(s['default']) |
|
714 | return opt |
|
715 | ||
716 | ||
717 | # get permlink |