| /* vi:set ts=8 sts=4 sw=4 noet: |
| * |
| * VIM - Vi IMproved by Bram Moolenaar |
| * |
| * Fuchsia port by Adam Barth |
| * |
| * Do ":help uganda" in Vim to read copying and usage conditions. |
| * Do ":help credits" in Vim to see a list of people who contributed. |
| */ |
| |
| #include "vim.h" |
| |
| #include <sys/ioctl.h> |
| |
| /* |
| * Get the current window size in Rows and Columns. |
| */ |
| int |
| mch_get_shellsize(void) |
| { |
| if (!isatty(STDIN_FILENO)) { |
| return -1; |
| } |
| |
| struct winsize sz; |
| memset(&sz, 0, sizeof(sz)); |
| if (ioctl(STDIN_FILENO, TIOCGWINSZ, &sz) != 0) { |
| return -1; |
| } |
| Columns = sz.ws_col; |
| Rows = sz.ws_row; |
| return OK; |
| } |
| |
| void |
| mch_settmode(int tmode) |
| { |
| // TODO(abarth): Implement. |
| } |
| |
| void |
| get_stty(void) |
| { |
| // TODO(abarth): Implement. |
| } |