ansi_port.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /**
  2. * @file ansi_port.h
  3. * @author Ji Youzhou
  4. * @version V0.1
  5. * @date 28 Oct 2019
  6. * @brief [brief]
  7. * *****************************************************************************
  8. * @attention
  9. *
  10. * MIT License
  11. *
  12. * Copyright (C) 2019 Ji Youzhou. or its affiliates. All Rights Reserved.
  13. *
  14. * Permission is hereby granted, free of charge, to any person obtaining a copy
  15. * of this software and associated documentation files (the "Software"), to deal
  16. * in the Software without restriction, including without limitation the rights
  17. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  18. * copies of the Software, and to permit persons to whom the Software is
  19. * furnished to do so, subject to the following conditions:
  20. *
  21. * The above copyright notice and this permission notice shall be included in all
  22. * copies or substantial portions of the Software.
  23. *
  24. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  25. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  26. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  27. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  28. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  29. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  30. * SOFTWARE.
  31. */
  32. /* Define to prevent recursive inclusion -------------------------------------*/
  33. #ifndef __ansi_port_h
  34. #define __ansi_port_h
  35. #ifdef __cplusplus
  36. extern "C"
  37. {
  38. #endif
  39. /* Includes ------------------------------------------------------------------*/
  40. #include "ansi_def.h"
  41. void nr_ansi_ctrl_common_slover(ansi_st *ansi);
  42. void nr_ansi_in_newline(ansi_st *ansi);
  43. void nr_ansi_in_backspace(ansi_st *ansi);
  44. void nr_ansi_in_up(ansi_st *ansi);
  45. void nr_ansi_in_down(ansi_st *ansi);
  46. void nr_ansi_in_left(ansi_st *ansi);
  47. void nr_ansi_in_right(ansi_st *ansi);
  48. void nr_ansi_in_tab(ansi_st *ansi);
  49. void nr_ansi_in_enter(ansi_st *ansi);
  50. void nr_ansi_in__(ansi_st *ansi);
  51. void nr_ansi_common_char_slover(ansi_st *ansi, char x);
  52. /** special characters functions \b,\n,\r,\t*/
  53. #define nr_ansi_in_bsb_function nr_ansi_in_backspace
  54. #define nr_ansi_in_bsn_function nr_ansi_in_newline
  55. #define nr_ansi_in_bsr_function nr_ansi_in_enter
  56. #define nr_ansi_in_bst_function nr_ansi_in_tab
  57. /** control characters functions */
  58. #define nr_ansi_in_m_function nr_ansi_ctrl_common_slover
  59. #define nr_ansi_in_I_function nr_ansi_ctrl_common_slover
  60. #define nr_ansi_in_A_function nr_ansi_in_up
  61. #define nr_ansi_in_B_function nr_ansi_in_down
  62. #define nr_ansi_in_C_function nr_ansi_in_right
  63. #define nr_ansi_in_D_function nr_ansi_in_left
  64. #define nr_ansi_in_X_function nr_ansi_ctrl_common_slover
  65. #define nr_ansi_in_K_function nr_ansi_ctrl_common_slover
  66. #define nr_ansi_in_M_function nr_ansi_ctrl_common_slover
  67. #define nr_ansi_in_P_function nr_ansi_ctrl_common_slover
  68. #define nr_ansi_in_J_function nr_ansi_ctrl_common_slover
  69. #define nr_ansi_in_at_function nr_ansi_ctrl_common_slover
  70. #define nr_ansi_in_L_function nr_ansi_ctrl_common_slover
  71. #define nr_ansi_in_l_function nr_ansi_ctrl_common_slover
  72. #define nr_ansi_in_h_function nr_ansi_ctrl_common_slover
  73. #define nr_ansi_in_n_function nr_ansi_ctrl_common_slover
  74. #define nr_ansi_in_H_function nr_ansi_ctrl_common_slover
  75. #define nr_ansi_in_s_function nr_ansi_ctrl_common_slover
  76. #define nr_ansi_in_u_function nr_ansi_ctrl_common_slover
  77. #define nr_ansi_in___function nr_ansi_in__
  78. #ifdef __cplusplus
  79. }
  80. #endif
  81. #endif
  82. /******************* (C) COPYRIGHT 2019 Ji Youzhou *****END OF FILE*****************/