void tsm_screen_newline(struct tsm_screen *con) { if (!con) return; tsm_screen_move_down(con, 1, true); tsm_screen_move_line_home(con); }
SHL_EXPORT void tsm_screen_newline(struct tsm_screen *con) { if (!con) return; screen_inc_age(con); tsm_screen_move_down(con, 1, true); tsm_screen_move_line_home(con); }
END_TEST START_TEST(test_screen_null) { int r; unsigned int n; r = tsm_screen_new(NULL, NULL, NULL); ck_assert_int_eq(r, -EINVAL); tsm_screen_ref(NULL); tsm_screen_unref(NULL); tsm_screen_set_opts(NULL, 0u); tsm_screen_reset_opts(NULL, 0u); n = tsm_screen_get_opts(NULL); ck_assert_int_eq(n, 0); n = tsm_screen_get_width(NULL); ck_assert_int_eq(n, 0); n = tsm_screen_get_height(NULL); ck_assert_int_eq(n, 0); r = tsm_screen_resize(NULL, 0, 0); ck_assert_int_eq(r, -EINVAL); r = tsm_screen_set_margins(NULL, 0u, 0u); ck_assert_int_eq(r, -EINVAL); tsm_screen_set_max_sb(NULL, 0u); tsm_screen_clear_sb(NULL); tsm_screen_sb_up(NULL, 0u); tsm_screen_sb_down(NULL, 0u); tsm_screen_sb_page_up(NULL, 0u); tsm_screen_sb_page_down(NULL, 0u); tsm_screen_sb_reset(NULL); tsm_screen_set_def_attr(NULL, NULL); tsm_screen_reset(NULL); tsm_screen_set_flags(NULL, 0u); tsm_screen_reset_flags(NULL, 0u); n = tsm_screen_get_flags(NULL); ck_assert_int_eq(n, 0); n = tsm_screen_get_cursor_x(NULL); ck_assert_int_eq(n, 0); n = tsm_screen_get_cursor_y(NULL); ck_assert_int_eq(n, 0); tsm_screen_set_tabstop(NULL); tsm_screen_reset_tabstop(NULL); tsm_screen_reset_all_tabstops(NULL); tsm_screen_write(NULL, 0u, NULL); tsm_screen_newline(NULL); tsm_screen_scroll_up(NULL, 0u); tsm_screen_scroll_down(NULL, 0u); tsm_screen_move_to(NULL, 0u, 0u); tsm_screen_move_up(NULL, 0u, false); tsm_screen_move_down(NULL, 0u, false); tsm_screen_move_right(NULL, 0u); tsm_screen_move_left(NULL, 0u); tsm_screen_move_line_end(NULL); tsm_screen_move_line_home(NULL); tsm_screen_tab_right(NULL, 0u); tsm_screen_tab_left(NULL, 0u); tsm_screen_insert_lines(NULL, 0u); tsm_screen_delete_lines(NULL, 0u); tsm_screen_insert_chars(NULL, 0u); tsm_screen_delete_chars(NULL, 0u); tsm_screen_erase_cursor(NULL); tsm_screen_erase_chars(NULL, 0u); tsm_screen_erase_cursor_to_end(NULL, false); tsm_screen_erase_home_to_cursor(NULL, false); tsm_screen_erase_current_line(NULL, false); tsm_screen_erase_screen_to_cursor(NULL, false); tsm_screen_erase_cursor_to_screen(NULL, false); tsm_screen_erase_screen(NULL, false); }