Lines Matching refs:tb
107 static void init_text_buf(TEXT_BUF * tb) in init_text_buf() argument
109 tb->num_y = &y_size; in init_text_buf()
110 tb->num_x = &x_size; in init_text_buf()
111 tb->start = tb->cur = alloc_line_buf(); in init_text_buf()
172 TEXT_BUF *tb = &(tc->text_buf); in m_putchar() local
179 if (tb->cur->next == NULL) in m_putchar()
181 tmp = tb->cur; /* Recalculate the display start buffer */ in m_putchar()
182 for (i = 0; i < *(tb->num_y) - 1 && i < LINE_BUF_Y_SIZE; i++) in m_putchar()
188 tb->start = tmp; in m_putchar()
197 …link_line_buf(tb->cur, tmp); /* Link the obtained buffer as the next buffer to the current … in m_putchar()
199 tb->cur = tmp; /* Update the current buffer */ in m_putchar()
200 tb->cur->cur_count = 0; in m_putchar()
201 tb->cur->last_count = 0; in m_putchar()
205 tb->cur = tb->cur->next; in m_putchar()
206 tb->cur->cur_count = 0; in m_putchar()
207 tb->cur->last_count = 0; in m_putchar()
211 tb->cur->cur_count = 0; in m_putchar()
214 tb->cur->cur_count += TAB_SIZE; in m_putchar()
215 if (tb->cur->cur_count > LINE_BUF_X_SIZE) in m_putchar()
216 tb->cur->cur_count = LINE_BUF_X_SIZE; in m_putchar()
217 if (tb->cur->cur_count > tb->cur->last_count) in m_putchar()
218 tb->cur->last_count = tb->cur->cur_count; in m_putchar()
221 tb->cur = tb->start; in m_putchar()
222 tb->cur->cur_count = 0; in m_putchar()
223 tb->cur->last_count = 0; in m_putchar()
228 if (tb->cur->cur_count > 0) in m_putchar()
229 tb->cur->cur_count--; in m_putchar()
234 tb->cur->buf[tb->cur->cur_count] = c; in m_putchar()
235 tb->cur->col[tb->cur->cur_count] = tc->palette; in m_putchar()
236 tb->cur->cur_count++; in m_putchar()
237 if (tb->cur->cur_count > LINE_BUF_X_SIZE) in m_putchar()
239 tb->cur->cur_count = LINE_BUF_X_SIZE; in m_putchar()
242 if (tb->cur->cur_count > tb->cur->last_count) in m_putchar()
244 tb->cur->last_count = tb->cur->cur_count; in m_putchar()
297 TEXT_BUF *tb = &(tc->text_buf); in text_buf_to_vram() local
300 lb = tb->start; in text_buf_to_vram()
303 for (line_no = 0; line_no < (*tb->num_y + 1); line_no++) in text_buf_to_vram()
310 if (x_line >= (*tb->num_x + 1)) in text_buf_to_vram()
324 if (x_line <= *tb->num_x) in text_buf_to_vram()
332 for (; line_no <= *tb->num_y; line_no++) in text_buf_to_vram()