コード例 #1
0
ファイル: text_editor.c プロジェクト: RomanGrekov/I7
void acept_btn(uint8_t btn, uint8_t duration, uint8_t press_cnt){
	uint8_t symbol;
	symbol = get_symbol(btn, duration, press_counter);

	if(is_service_symbol(symbol)){
		make_service(symbol);
        clean_flags();
		return;
	}

	if(is_max_response()){
		if(EdConf.do_exit_on_max_resp){
			response_push(symbol);
            turn_off_cursor();
            exit_status=ExitMaxResp;
		}
        response_rm_char();
        response_push(symbol);
        clean_flags();
	}
	else{
        response_push(symbol);
        cursor_shift(RIGHT);
        clean_flags();
	}
}
コード例 #2
0
ファイル: clean_env.c プロジェクト: Selk/Dev
void		clean_env(t_env *env)
{
	clean_flags(env);
	clean_width(env);
	clean_precision(env);
	clean_length(env);
	env->flag = 0;
	env->minus = 0;
	env->plus = 0;
	env->sharp = 0;
	env->space = 0;
	env->zero = 0;
	env->specifier = 0;
}