to track some unparsed option settings in case #saveoptions needs them */
| 755 | |
| 756 | /* to track some unparsed option settings in case #saveoptions needs them */ |
| 757 | staticfn void |
| 758 | saveoptstr(int optidx, const char *optstr) |
| 759 | { |
| 760 | int phase = go.opt_phase, roleoptindx = opt2roleopt(optidx); |
| 761 | const char *p = strchr(optstr, ':'), *q = strchr(optstr, '='); |
| 762 | |
| 763 | /* strip away "optname:" from optname:optstr */ |
| 764 | if (!p || (q && q < p)) |
| 765 | p = q; |
| 766 | if (p) |
| 767 | optstr = p + 1; |
| 768 | |
| 769 | if (roleoptvals[roleoptindx][phase]) |
| 770 | free((genericptr_t) roleoptvals[roleoptindx][phase]); |
| 771 | roleoptvals[roleoptindx][phase] = dupstr(optstr); |
| 772 | } |
| 773 | |
| 774 | /* discard specific saved option string */ |
| 775 | staticfn void |
no test coverage detected