1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

config: Let mirroring be implicit unless values are rewritten.

(cherry picked from commit 6d55be2043)
This commit is contained in:
Kalle Olavi Niemitalo 2008-02-03 12:49:49 +02:00 committed by Kalle Olavi Niemitalo
parent bfa41cef38
commit 2e71908995

View File

@ -226,13 +226,6 @@ parse_set(struct option *opt_tree, struct conf_parsing_state *state,
optname_copy = memacpy(optname_orig, optname_len);
if (!optname_copy) return show_parse_error(state, ERROR_NOMEM);
/* Mirror what we already have */
if (mirror) {
add_bytes_to_string(mirror, state->mirrored,
state->pos.look - state->mirrored);
state->mirrored = state->pos.look;
}
/* Option value */
{
struct option *opt;
@ -286,6 +279,9 @@ parse_set(struct option *opt_tree, struct conf_parsing_state *state,
else
opt->flags |= OPT_WATERMARK;
if (option_types[opt->type].write) {
add_bytes_to_string(mirror, state->mirrored,
pos_before_value.look
- state->mirrored);
option_types[opt->type].write(opt, mirror);
state->mirrored = state->pos.look;
}
@ -323,13 +319,6 @@ parse_unset(struct option *opt_tree, struct conf_parsing_state *state,
optname_copy = memacpy(optname_orig, optname_len);
if (!optname_copy) return show_parse_error(state, ERROR_NOMEM);
/* Mirror what we have */
if (mirror) {
add_bytes_to_string(mirror, state->mirrored,
state->pos.look - state->mirrored);
state->mirrored = state->pos.look;
}
{
struct option *opt;