Lines Matching refs:cs

201 static void free_screen(struct captured_screen* cs) {  in free_screen()  argument
202 free(cs->text); in free_screen()
203 cs->text = NULL; in free_screen()
204 free(cs->attributes); in free_screen()
205 cs->attributes = NULL; in free_screen()
208 static void capture_screen(uv_tty_t* tty_out, struct captured_screen* cs) { in capture_screen() argument
211 get_screen_info(tty_out, &(cs->si)); in capture_screen()
213 origin.Y = cs->si.csbi.srWindow.Top; in capture_screen()
214 cs->text = malloc(cs->si.length * sizeof(*cs->text)); in capture_screen()
215 ASSERT_NOT_NULL(cs->text); in capture_screen()
216 cs->attributes = (WORD*) malloc(cs->si.length * sizeof(*cs->attributes)); in capture_screen()
217 ASSERT_NOT_NULL(cs->attributes); in capture_screen()
219 tty_out->handle, cs->text, cs->si.length, origin, &length)); in capture_screen()
220 ASSERT_EQ((unsigned int) cs->si.length, length); in capture_screen()
222 tty_out->handle, cs->attributes, cs->si.length, origin, &length)); in capture_screen()
223 ASSERT_EQ((unsigned int) cs->si.length, length); in capture_screen()
226 static void make_expect_screen_erase(struct captured_screen* cs, in make_expect_screen_erase() argument
233 start = cs->text + cs->si.width * (cursor_position.Y - 1); in make_expect_screen_erase()
237 end = cs->text + cs->si.length; in make_expect_screen_erase()
240 end = start + cs->si.width; in make_expect_screen_erase()
249 start = cs->text; in make_expect_screen_erase()
254 start = cs->text; in make_expect_screen_erase()
256 end = cs->text + cs->si.length; in make_expect_screen_erase()
259 end = start + cs->si.width; in make_expect_screen_erase()
265 ASSERT_LE(end - cs->text, cs->si.length); in make_expect_screen_erase()
271 static void make_expect_screen_write(struct captured_screen* cs, in make_expect_screen_write() argument
276 start = cs->text + cs->si.width * (cursor_position.Y - 1) + in make_expect_screen_write()
279 size_t remain_length = cs->si.length - (cs->text - start); in make_expect_screen_write()
284 static void make_expect_screen_set_attr(struct captured_screen* cs, in make_expect_screen_set_attr() argument
289 start = cs->attributes + cs->si.width * (cursor_position.Y - 1) + in make_expect_screen_set_attr()
291 size_t remain_length = cs->si.length - (cs->attributes - start); in make_expect_screen_set_attr()