| 781 | } // Params::evalDelete |
| 782 | |
| 783 | int Params::evalExtract(const std::string& optArg) { |
| 784 | switch (action_) { |
| 785 | case Action::none: |
| 786 | case Action::modify: |
| 787 | action_ = Action::extract; |
| 788 | target_ = static_cast<CommonTarget>(0); |
| 789 | [[fallthrough]]; |
| 790 | case Action::extract: { |
| 791 | const auto rc = parseCommonTargets(optArg, "extract"); |
| 792 | if (rc > 0) { |
| 793 | target_ |= static_cast<CommonTarget>(rc); |
| 794 | return 0; |
| 795 | } |
| 796 | return 1; |
| 797 | } |
| 798 | default: |
| 799 | std::cerr << progname() << ": " << _("Option -e is not compatible with a previous option\n"); |
| 800 | return 1; |
| 801 | } |
| 802 | } // Params::evalExtract |
| 803 | |
| 804 | int Params::evalInsert(const std::string& optArg) { |
| 805 | switch (action_) { |
nothing calls this directly
no test coverage detected