readline: capitalize structs

pull/2186/head
Alexander Medvednikov 2019-10-01 06:28:06 +03:00
parent 841d824216
commit 243626c7c1
1 changed files with 5 additions and 5 deletions

View File

@ -14,7 +14,7 @@ import term
#include <sys/ioctl.h> #include <sys/ioctl.h>
// Used to change the terminal options // Used to change the terminal options
struct termios { struct Termios {
mut: mut:
c_iflag int c_iflag int
c_oflag int c_oflag int
@ -24,7 +24,7 @@ mut:
} }
// Used to collect the screen information // Used to collect the screen information
struct winsize { struct Winsize {
ws_row u16 ws_row u16
ws_col u16 ws_col u16
ws_xpixel u16 ws_xpixel u16
@ -34,7 +34,7 @@ struct winsize {
struct Readline { struct Readline {
mut: mut:
is_raw bool is_raw bool
orig_termios termios orig_termios Termios
current ustring // Line being edited current ustring // Line being edited
cursor int // Cursor position cursor int // Cursor position
overwrite bool overwrite bool
@ -232,7 +232,7 @@ fn (r mut Readline) execute(a Action, c int) bool {
} }
fn get_screen_columns() int { fn get_screen_columns() int {
ws := winsize{} ws := Winsize{}
cols := if C.ioctl(1, C.TIOCGWINSZ, &ws) == -1 { 80 } else { int(ws.ws_col) } cols := if C.ioctl(1, C.TIOCGWINSZ, &ws) == -1 { 80 } else { int(ws.ws_col) }
return cols return cols
} }