From owner-svn-src-head@FreeBSD.ORG Sat Dec 5 18:53:05 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 147A81065672; Sat, 5 Dec 2009 18:53:05 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DE7AA8FC0A; Sat, 5 Dec 2009 18:53:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB5Ir4pE095803; Sat, 5 Dec 2009 18:53:04 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB5Ir4eO095801; Sat, 5 Dec 2009 18:53:04 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200912051853.nB5Ir4eO095801@svn.freebsd.org> From: Ed Schouten Date: Sat, 5 Dec 2009 18:53:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r200134 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2009 18:53:05 -0000 Author: ed Date: Sat Dec 5 18:53:04 2009 New Revision: 200134 URL: http://svn.freebsd.org/changeset/base/200134 Log: Use ANSI C prototypes inside termios. While there, add a missing __unused to hide a warning in tcsetbreak(). Modified: head/lib/libc/gen/termios.c Modified: head/lib/libc/gen/termios.c ============================================================================== --- head/lib/libc/gen/termios.c Sat Dec 5 18:51:44 2009 (r200133) +++ head/lib/libc/gen/termios.c Sat Dec 5 18:53:04 2009 (r200134) @@ -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;