Changeset View
Changeset View
Standalone View
Standalone View
lib/libc/gen/termios.c
Show First 20 Lines • Show All 45 Lines • ▼ Show 20 Lines | |||||
#include <unistd.h> | #include <unistd.h> | ||||
#include "un-namespace.h" | #include "un-namespace.h" | ||||
#include "libc_private.h" | #include "libc_private.h" | ||||
int | int | ||||
tcgetattr(int fd, struct termios *t) | tcgetattr(int fd, struct termios *t) | ||||
{ | { | ||||
yuripv: Gratuitous change; empty line is there per style(9), for functions without local variables. | |||||
Done Inline ActionsI was unaware of style(9). I will also add empty lines in tcgetwinsize() and tcsetwinsize() in that case. 0.gangzta_gmail.com: I was unaware of style(9). I will also add empty lines in tcgetwinsize() and tcsetwinsize() in… | |||||
return (_ioctl(fd, TIOCGETA, t)); | return (_ioctl(fd, TIOCGETA, t)); | ||||
} | } | ||||
int | int | ||||
tcsetattr(int fd, int opt, const struct termios *t) | tcsetattr(int fd, int opt, const struct termios *t) | ||||
{ | { | ||||
struct termios localterm; | struct termios localterm; | ||||
▲ Show 20 Lines • Show All 207 Lines • ▼ Show 20 Lines | if (c != _POSIX_VDISABLE && _write(fd, &c, sizeof(c)) == -1) | ||||
return (-1); | return (-1); | ||||
return (0); | return (0); | ||||
default: | default: | ||||
errno = EINVAL; | errno = EINVAL; | ||||
return (-1); | return (-1); | ||||
} | } | ||||
/* NOTREACHED */ | /* NOTREACHED */ | ||||
} | } | ||||
int | |||||
tcgetwinsize(int fd, struct winsize *w) | |||||
{ | |||||
return (_ioctl(fd, TIOCGWINSZ, w)); | |||||
} | |||||
int | |||||
tcsetwinsize(int fd, const struct winsize *w) | |||||
{ | |||||
return (_ioctl(fd, TIOCSWINSZ, w)); | |||||
} |
Gratuitous change; empty line is there per style(9), for functions without local variables.