if (mode_change & F_file_mode_t_block_special_d) {
if (change & F_file_mode_t_mask_bit_set_owner_d & F_file_mode_t_mask_how_subtract_d) {
- if (*mode & F_file_mode_special_set_user_d) {
- *mode -= F_file_mode_special_set_user_d;
- }
+ *mode &= ~F_file_mode_special_set_user_d;
}
else if (change & F_file_mode_t_mask_bit_set_owner_d & F_file_mode_t_mask_how_add_d) {
- if (!(*mode & F_file_mode_special_set_user_d)) {
- *mode |= F_file_mode_special_set_user_d;
- }
+ *mode |= F_file_mode_special_set_user_d;
}
if (change & F_file_mode_t_mask_bit_set_group_d & F_file_mode_t_mask_how_subtract_d) {
- if (*mode & F_file_mode_special_set_group_d) {
- *mode -= F_file_mode_special_set_group_d;
- }
+ *mode &= ~F_file_mode_special_set_group_d;
}
else if (change & F_file_mode_t_mask_bit_set_group_d & F_file_mode_t_mask_how_add_d) {
- if (!(*mode & F_file_mode_special_set_group_d)) {
- *mode |= F_file_mode_special_set_group_d;
- }
+ *mode |= F_file_mode_special_set_group_d;
}
if (change & F_file_mode_t_mask_bit_sticky_d & F_file_mode_t_mask_how_subtract_d) {
- if (*mode & F_file_mode_special_sticky_d) {
- *mode -= F_file_mode_special_sticky_d;
- }
+ *mode &= ~F_file_mode_special_sticky_d;
}
else if (change & F_file_mode_t_mask_bit_sticky_d & F_file_mode_t_mask_how_add_d) {
- if (!(*mode & F_file_mode_special_sticky_d)) {
- *mode |= F_file_mode_special_sticky_d;
- }
+ *mode |= F_file_mode_special_sticky_d;
}
}
}
if (mode_change & F_file_mode_t_block_owner_d) {
if (change & F_file_mode_t_mask_bit_read_d & F_file_mode_t_mask_how_subtract_d) {
- if (*mode & F_file_mode_owner_r_d) {
- *mode -= F_file_mode_owner_r_d;
- }
+ *mode &= ~F_file_mode_owner_r_d;
}
else if (change & F_file_mode_t_mask_bit_read_d & F_file_mode_t_mask_how_add_d) {
- if (!(*mode & F_file_mode_owner_r_d)) {
- *mode |= F_file_mode_owner_r_d;
- }
+ *mode |= F_file_mode_owner_r_d;
}
if (change & F_file_mode_t_mask_bit_write_d & F_file_mode_t_mask_how_subtract_d) {
- if (*mode & F_file_mode_owner_w_d) {
- *mode -= F_file_mode_owner_w_d;
- }
+ *mode &= ~F_file_mode_owner_w_d;
}
else if (change & F_file_mode_t_mask_bit_write_d & F_file_mode_t_mask_how_add_d) {
- if (!(*mode & F_file_mode_owner_w_d)) {
- *mode |= F_file_mode_owner_w_d;
- }
+ *mode |= F_file_mode_owner_w_d;
}
if (change & F_file_mode_t_mask_bit_execute_d) {
- change &= F_file_mode_t_mask_bit_execute_d;
-
if (change & F_file_mode_t_mask_how_subtract_d) {
- if (*mode & F_file_mode_owner_x_d) {
- *mode -= F_file_mode_owner_x_d;
- }
+ *mode &= ~F_file_mode_owner_x_d;
}
else if (change & F_file_mode_t_mask_how_add_d) {
- if (!(*mode & F_file_mode_owner_x_d)) {
- *mode |= F_file_mode_owner_x_d;
- }
+ *mode |= F_file_mode_owner_x_d;
}
}
else if (change & F_file_mode_t_mask_bit_execute_only_d) {
- change &= F_file_mode_t_mask_bit_execute_only_d;
-
if (directory_is || (mode_file & F_file_mode_owner_x_d)) {
if (change & F_file_mode_t_mask_how_subtract_d) {
- if (*mode & F_file_mode_owner_x_d) {
- *mode -= F_file_mode_owner_x_d;
- }
+ *mode &= ~F_file_mode_owner_x_d;
}
else if (change & F_file_mode_t_mask_how_add_d) {
- if (!(*mode & F_file_mode_owner_x_d)) {
- *mode |= F_file_mode_owner_x_d;
- }
+ *mode |= F_file_mode_owner_x_d;
}
}
}
if (mode_change & F_file_mode_t_block_group_d) {
if (change & F_file_mode_t_mask_bit_read_d & F_file_mode_t_mask_how_subtract_d) {
- if (*mode & F_file_mode_group_r_d) {
- *mode -= F_file_mode_group_r_d;
- }
+ *mode &= ~F_file_mode_group_r_d;
}
else if (change & F_file_mode_t_mask_bit_read_d & F_file_mode_t_mask_how_add_d) {
- if (!(*mode & F_file_mode_group_r_d)) {
- *mode |= F_file_mode_group_r_d;
- }
+ *mode |= F_file_mode_group_r_d;
}
if (change & F_file_mode_t_mask_bit_write_d & F_file_mode_t_mask_how_subtract_d) {
- if (*mode & F_file_mode_group_w_d) {
- *mode -= F_file_mode_group_w_d;
- }
+ *mode &= ~F_file_mode_group_w_d;
}
else if (change & F_file_mode_t_mask_bit_write_d & F_file_mode_t_mask_how_add_d) {
- if (!(*mode & F_file_mode_group_w_d)) {
- *mode |= F_file_mode_group_w_d;
- }
+ *mode |= F_file_mode_group_w_d;
}
if (change & F_file_mode_t_mask_bit_execute_d) {
- change &= F_file_mode_t_mask_bit_execute_d;
-
if (change & F_file_mode_t_mask_how_subtract_d) {
- if (*mode & F_file_mode_group_x_d) {
- *mode -= F_file_mode_group_x_d;
- }
+ *mode &= ~F_file_mode_group_x_d;
}
else if (change & F_file_mode_t_mask_how_add_d) {
- if (!(*mode & F_file_mode_group_x_d)) {
- *mode |= F_file_mode_group_x_d;
- }
+ *mode |= F_file_mode_group_x_d;
}
}
else if (change & F_file_mode_t_mask_bit_execute_only_d) {
- change &= F_file_mode_t_mask_bit_execute_only_d;
-
if (directory_is || (mode_file & F_file_mode_group_x_d)) {
if (change & F_file_mode_t_mask_how_subtract_d) {
- if (*mode & F_file_mode_group_x_d) {
- *mode -= F_file_mode_group_x_d;
- }
+ *mode &= ~F_file_mode_group_x_d;
}
else if (change & F_file_mode_t_mask_how_add_d) {
- if (!(*mode & F_file_mode_group_x_d)) {
- *mode |= F_file_mode_group_x_d;
- }
+ *mode |= F_file_mode_group_x_d;
}
}
}
if (mode_change & F_file_mode_t_block_world_d) {
if (change & F_file_mode_t_mask_bit_read_d & F_file_mode_t_mask_how_subtract_d) {
- if (*mode & F_file_mode_world_r_d) {
- *mode -= F_file_mode_world_r_d;
- }
+ *mode &= ~F_file_mode_world_r_d;
}
else if (change & F_file_mode_t_mask_bit_read_d & F_file_mode_t_mask_how_add_d) {
- if (!(*mode & F_file_mode_world_r_d)) {
- *mode |= F_file_mode_world_r_d;
- }
+ *mode |= F_file_mode_world_r_d;
}
if (change & F_file_mode_t_mask_bit_write_d & F_file_mode_t_mask_how_subtract_d) {
- if (*mode & F_file_mode_world_w_d) {
- *mode -= F_file_mode_world_w_d;
- }
+ *mode &= ~F_file_mode_world_w_d;
}
else if (change & F_file_mode_t_mask_bit_write_d & F_file_mode_t_mask_how_add_d) {
if (!(*mode & F_file_mode_world_w_d)) {
}
if (change & F_file_mode_t_mask_bit_execute_d) {
- change &= F_file_mode_t_mask_bit_execute_d;
-
if (change & F_file_mode_t_mask_how_subtract_d) {
- if (*mode & F_file_mode_world_x_d) {
- *mode -= F_file_mode_world_x_d;
- }
+ *mode &= ~F_file_mode_world_x_d;
}
else if (change & F_file_mode_t_mask_how_add_d) {
- if (!(*mode & F_file_mode_world_x_d)) {
- *mode |= F_file_mode_world_x_d;
- }
+ *mode |= F_file_mode_world_x_d;
}
}
else if (change & F_file_mode_t_mask_bit_execute_only_d) {
- change &= F_file_mode_t_mask_bit_execute_only_d;
-
if (directory_is || (mode_file & F_file_mode_world_x_d)) {
if (change & F_file_mode_t_mask_how_subtract_d) {
- if (*mode & F_file_mode_world_x_d) {
- *mode -= F_file_mode_world_x_d;
- }
+ *mode &= ~F_file_mode_world_x_d;
}
else if (change & F_file_mode_t_mask_how_add_d) {
- if (!(*mode & F_file_mode_world_x_d)) {
- *mode |= F_file_mode_world_x_d;
- }
+ *mode |= F_file_mode_world_x_d;
}
}
}
// Clear by mask to prepare for replacement, which includes clearing the special block.
mode_mask |= F_file_mode_t_block_special_d;
- mode_result -= mode_result & mode_mask;
+ mode_result &= ~mode_mask;
replace_result |= F_file_mode_t_replace_special_d;
incomplete = F_false;
if (how > 3) {
- mode_result -= mode_result & mode_umask;
+ mode_result &= ~mode_umask;
}
on = 0;
// Clear by mask to prepare for replacement, which includes clearing the special block.
mode_mask |= F_file_mode_t_block_special_d;
- mode_result -= mode_result & mode_mask;
+ mode_result &= ~mode_mask;
replace_result |= F_file_mode_t_replace_special_d;
if (how == 1 || how == 2 || how == 4 || how == 5) {
incomplete = F_false;
mode_result |= what & mode_mask & F_file_mode_t_mask_how_add_d;
-
- if (mode_result & what & mode_mask & F_file_mode_t_mask_how_subtract_d) {
- mode_result -= mode_result & what & mode_mask & F_file_mode_t_mask_how_subtract_d;
- }
+ mode_result &= ~F_file_mode_t_mask_how_subtract_d;
}
else if (how == 3 || how == 6) {
incomplete = F_false;
mode_result |= what & mode_mask & F_file_mode_t_mask_how_subtract_d;
-
- if (mode_result & what & mode_mask & F_file_mode_t_mask_how_add_d) {
- mode_result -= mode_result & what & mode_mask & F_file_mode_t_mask_how_add_d;
- }
+ mode_result &= ~F_file_mode_t_mask_how_add_d;
}
}
} // for
if (how > 3) {
incomplete = F_false;
- mode_result -= mode_result & mode_umask;
+ mode_result &= ~mode_umask;
}
if (!code.string[i]) break;
if (action->status == F_none) {
if (action->parameters.used == 2) {
- if (action->flag & controller_entry_action_flag_undefined_e) {
- action->flag -= controller_entry_action_flag_undefined_e;
- }
+ action->flag &= ~controller_entry_action_flag_undefined_e;
status = fl_conversion_dynamic_to_unsigned_detect(fl_conversion_data_base_10_c, action->parameters.array[1], &action->number);
for (k = 0; k < entry->items.used; ++k) {
if (fl_string_dynamic_compare(action->parameters.array[0], entry->items.array[k].name) == F_equal_to) {
- if (missing & 0x1) {
- missing -= 0x1;
- }
+ missing &= ~0x1;
break;
}
}
}
else {
- if (global.setting->control.flag & controller_control_flag_readonly_e) {
- global.setting->control.flag -= controller_control_flag_readonly_e;
- }
+ global.setting->control.flag &= ~controller_control_flag_readonly_e;
}
cache->action.generic.used = 0;
continue;
}
- if (entry->flag & controller_entry_flag_timeout_exit_no_e) {
- entry->flag -= controller_entry_flag_timeout_exit_no_e;
- }
+ entry->flag &= ~controller_entry_flag_timeout_exit_no_e;
time = &entry->timeout_exit;
}
continue;
}
- if (entry->flag & controller_entry_flag_timeout_kill_no_e) {
- entry->flag -= controller_entry_flag_timeout_kill_no_e;
- }
-
+ entry->flag &= ~controller_entry_flag_timeout_kill_no_e;
time = &entry->timeout_kill;
}
else if (fl_string_dynamic_partial_compare_string(controller_start_s.string, cache->buffer_file, controller_start_s.used, cache->content_actions.array[i].array[0]) == F_equal_to) {
continue;
}
- if (entry->flag & controller_entry_flag_timeout_start_no_e) {
- entry->flag -= controller_entry_flag_timeout_start_no_e;
- }
-
+ entry->flag &= ~controller_entry_flag_timeout_start_no_e;
time = &entry->timeout_start;
}
else if (fl_string_dynamic_partial_compare_string(controller_stop_s.string, cache->buffer_file, controller_stop_s.used, cache->content_actions.array[i].array[0]) == F_equal_to) {
continue;
}
- if (entry->flag & controller_entry_flag_timeout_stop_no_e) {
- entry->flag -= controller_entry_flag_timeout_stop_no_e;
- }
-
+ entry->flag &= ~controller_entry_flag_timeout_stop_no_e;
time = &entry->timeout_stop;
}
else {
}
if (choice == utf8_parameter_from_bytesequence_e) {
- if (data.mode & utf8_mode_from_codepoint_d) {
- data.mode -= utf8_mode_from_codepoint_d;
- }
-
+ data.mode &= ~utf8_mode_from_codepoint_d;
data.mode |= utf8_mode_from_bytesequence_d;
}
else if (choice == utf8_parameter_from_codepoint_e) {
- if (data.mode & utf8_mode_from_bytesequence_d) {
- data.mode -= utf8_mode_from_bytesequence_d;
- }
-
+ data.mode &= ~utf8_mode_from_bytesequence_d;
data.mode |= utf8_mode_from_codepoint_d;
}
}
}
if (choice == utf8_parameter_to_bytesequence_e) {
- if (data.mode & utf8_mode_to_codepoint_d) {
- data.mode -= utf8_mode_to_codepoint_d;
- }
-
- if (data.mode & utf8_mode_to_combining_d) {
- data.mode -= utf8_mode_to_combining_d;
- }
-
- if (data.mode & utf8_mode_to_width_d) {
- data.mode -= utf8_mode_to_width_d;
- }
-
+ data.mode &= ~(utf8_mode_to_codepoint_d | utf8_mode_to_combining_d | utf8_mode_to_width_d);
data.mode |= utf8_mode_to_bytesequence_d;
}
else if (choice == utf8_parameter_to_codepoint_e) {
- if (data.mode & utf8_mode_to_bytesequence_d) {
- data.mode -= utf8_mode_to_bytesequence_d;
- }
-
- if (data.mode & utf8_mode_to_combining_d) {
- data.mode -= utf8_mode_to_combining_d;
- }
-
- if (data.mode & utf8_mode_to_width_d) {
- data.mode -= utf8_mode_to_width_d;
- }
-
+ data.mode &= ~(utf8_mode_to_bytesequence_d | utf8_mode_to_combining_d | utf8_mode_to_width_d);
data.mode |= utf8_mode_to_codepoint_d;
}
else if (choice == utf8_parameter_to_combining_e) {
- if (data.mode & utf8_mode_to_bytesequence_d) {
- data.mode -= utf8_mode_to_bytesequence_d;
- }
-
- if (data.mode & utf8_mode_to_codepoint_d) {
- data.mode -= utf8_mode_to_codepoint_d;
- }
+ data.mode &= ~(utf8_mode_to_bytesequence_d | utf8_mode_to_codepoint_d);
// --to_width may be specified with --to_combining.
if (main->parameters.array[utf8_parameter_to_width_e].result == f_console_result_found_e) {
data.mode |= utf8_mode_to_combining_d;
}
else if (choice == utf8_parameter_to_width_e) {
- if (data.mode & utf8_mode_to_bytesequence_d) {
- data.mode -= utf8_mode_to_bytesequence_d;
- }
-
- if (data.mode & utf8_mode_to_codepoint_d) {
- data.mode -= utf8_mode_to_codepoint_d;
- }
+ data.mode &= ~(utf8_mode_to_bytesequence_d | utf8_mode_to_codepoint_d);
// --to_width may be specified with --to_combining.
if (main->parameters.array[utf8_parameter_to_combining_e].result == f_console_result_found_e) {