summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2009-12-05 18:53:04 +0000
committered <ed@FreeBSD.org>2009-12-05 18:53:04 +0000
commitad8df7188303ece150047f991982d50ffe9659a4 (patch)
tree71b6b9f19d092cb6cf20e5fdc72d31734b56df40 /lib
parent8b25a2a3d0bfd8d257a705d527d9a83fb4ef95bf (diff)
downloadFreeBSD-src-ad8df7188303ece150047f991982d50ffe9659a4.zip
FreeBSD-src-ad8df7188303ece150047f991982d50ffe9659a4.tar.gz
Use ANSI C prototypes inside termios.
While there, add a missing __unused to hide a warning in tcsetbreak().
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/gen/termios.c44
1 files changed, 13 insertions, 31 deletions
diff --git a/lib/libc/gen/termios.c b/lib/libc/gen/termios.c
index 85ca4e3..fc21757 100644
--- a/lib/libc/gen/termios.c
+++ b/lib/libc/gen/termios.c
@@ -45,18 +45,14 @@ __FBSDID("$FreeBSD$");
#include "un-namespace.h"
int
-tcgetattr(fd, t)
- int fd;
- struct termios *t;
+tcgetattr(int fd, struct termios *t)
{
return (_ioctl(fd, TIOCGETA, t));
}
int
-tcsetattr(fd, opt, t)
- int fd, opt;
- const struct termios *t;
+tcsetattr(int fd, int opt, const struct termios *t)
{
struct termios localterm;
@@ -88,8 +84,7 @@ tcsetpgrp(int fd, pid_t pgrp)
}
pid_t
-tcgetpgrp(fd)
- int fd;
+tcgetpgrp(int fd)
{
int s;
@@ -123,25 +118,21 @@ tcsetsid(int fd, pid_t pid)
}
speed_t
-cfgetospeed(t)
- const struct termios *t;
+cfgetospeed(const struct termios *t)
{
return (t->c_ospeed);
}
speed_t
-cfgetispeed(t)
- const struct termios *t;
+cfgetispeed(const struct termios *t)
{
return (t->c_ispeed);
}
int
-cfsetospeed(t, speed)
- struct termios *t;
- speed_t speed;
+cfsetospeed(struct termios *t, speed_t speed)
{
t->c_ospeed = speed;
@@ -149,9 +140,7 @@ cfsetospeed(t, speed)
}
int
-cfsetispeed(t, speed)
- struct termios *t;
- speed_t speed;
+cfsetispeed(struct termios *t, speed_t speed)
{
t->c_ispeed = speed;
@@ -159,9 +148,7 @@ cfsetispeed(t, speed)
}
int
-cfsetspeed(t, speed)
- struct termios *t;
- speed_t speed;
+cfsetspeed(struct termios *t, speed_t speed)
{
t->c_ispeed = t->c_ospeed = speed;
@@ -173,8 +160,7 @@ cfsetspeed(t, speed)
* mode with no characters interpreted, 8-bit data path.
*/
void
-cfmakeraw(t)
- struct termios *t;
+cfmakeraw(struct termios *t)
{
t->c_iflag &= ~(IMAXBEL|IXOFF|INPCK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON|IGNPAR);
@@ -188,8 +174,7 @@ cfmakeraw(t)
}
int
-tcsendbreak(fd, len)
- int fd, len;
+tcsendbreak(int fd, int len __unused)
{
struct timeval sleepytime;
@@ -204,8 +189,7 @@ tcsendbreak(fd, len)
}
int
-__tcdrain(fd)
- int fd;
+__tcdrain(int fd)
{
return (_ioctl(fd, TIOCDRAIN, 0));
}
@@ -214,8 +198,7 @@ __weak_reference(__tcdrain, tcdrain);
__weak_reference(__tcdrain, _tcdrain);
int
-tcflush(fd, which)
- int fd, which;
+tcflush(int fd, int which)
{
int com;
@@ -237,8 +220,7 @@ tcflush(fd, which)
}
int
-tcflow(fd, action)
- int fd, action;
+tcflow(int fd, int action)
{
struct termios term;
u_char c;
OpenPOWER on IntegriCloud