Blame view
include/linux/tty_flip.h
1.14 KB
1da177e4c
|
1 2 |
#ifndef _LINUX_TTY_FLIP_H #define _LINUX_TTY_FLIP_H |
33f0f88f1
|
3 |
extern int tty_buffer_request_room(struct tty_struct *tty, size_t size); |
1aef821a6
|
4 |
extern int tty_insert_flip_string_flags(struct tty_struct *tty, const unsigned char *chars, const char *flags, size_t size); |
2832fc11f
|
5 |
extern int tty_insert_flip_string_fixed_flag(struct tty_struct *tty, const unsigned char *chars, char flag, size_t size); |
33f0f88f1
|
6 7 |
extern int tty_prepare_flip_string(struct tty_struct *tty, unsigned char **chars, size_t size); extern int tty_prepare_flip_string_flags(struct tty_struct *tty, unsigned char **chars, char **flags, size_t size); |
e1a250902
|
8 |
void tty_schedule_flip(struct tty_struct *tty); |
33f0f88f1
|
9 |
|
41c28ff16
|
10 |
static inline int tty_insert_flip_char(struct tty_struct *tty, |
e1a250902
|
11 |
unsigned char ch, char flag) |
1da177e4c
|
12 |
{ |
33f0f88f1
|
13 |
struct tty_buffer *tb = tty->buf.tail; |
33b37a33c
|
14 |
if (tb && tb->used < tb->size) { |
33f0f88f1
|
15 16 17 |
tb->flag_buf_ptr[tb->used] = flag; tb->char_buf_ptr[tb->used++] = ch; return 1; |
1da177e4c
|
18 |
} |
33f0f88f1
|
19 |
return tty_insert_flip_string_flags(tty, &ch, &flag, 1); |
1da177e4c
|
20 |
} |
2832fc11f
|
21 22 23 24 |
static inline int tty_insert_flip_string(struct tty_struct *tty, const unsigned char *chars, size_t size) { return tty_insert_flip_string_fixed_flag(tty, chars, TTY_NORMAL, size); } |
1da177e4c
|
25 |
#endif /* _LINUX_TTY_FLIP_H */ |