| 137 | } |
| 138 | |
| 139 | const char * |
| 140 | rdline_get_buffer(struct rdline *rdl) |
| 141 | { |
| 142 | if (!rdl) |
| 143 | return NULL; |
| 144 | unsigned int len_l, len_r; |
| 145 | cirbuf_align_left(&rdl->left); |
| 146 | cirbuf_align_left(&rdl->right); |
| 147 | |
| 148 | len_l = CIRBUF_GET_LEN(&rdl->left); |
| 149 | len_r = CIRBUF_GET_LEN(&rdl->right); |
| 150 | memcpy(rdl->left_buf+len_l, rdl->right_buf, len_r); |
| 151 | |
| 152 | rdl->left_buf[len_l + len_r] = '\n'; |
| 153 | rdl->left_buf[len_l + len_r + 1] = '\0'; |
| 154 | return rdl->left_buf; |
| 155 | } |
| 156 | |
| 157 | static void |
| 158 | display_right_buffer(struct rdline *rdl, int force) |