| 802 | } // Params::evalExtract |
| 803 | |
| 804 | int Params::evalInsert(const std::string& optArg) { |
| 805 | switch (action_) { |
| 806 | case Action::none: |
| 807 | case Action::modify: |
| 808 | action_ = Action::insert; |
| 809 | target_ = static_cast<CommonTarget>(0); |
| 810 | [[fallthrough]]; |
| 811 | case Action::insert: { |
| 812 | const auto rc = parseCommonTargets(optArg, "insert"); |
| 813 | if (rc > 0) { |
| 814 | target_ |= static_cast<CommonTarget>(rc); |
| 815 | return 0; |
| 816 | } |
| 817 | return 1; |
| 818 | } |
| 819 | default: |
| 820 | std::cerr << progname() << ": " << _("Option -i is not compatible with a previous option\n"); |
| 821 | return 1; |
| 822 | } |
| 823 | } // Params::evalInsert |
| 824 | |
| 825 | int Params::evalModify(int opt, const std::string& optArg) { |
| 826 | switch (action_) { |
nothing calls this directly
no test coverage detected