diff options
author | obrien <obrien@FreeBSD.org> | 2002-02-01 01:32:19 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2002-02-01 01:32:19 +0000 |
commit | b45ff0fb569a631733b0fe8174ef6bd2e76d6523 (patch) | |
tree | 00d3cf581cd6698c5f1022d99c44cb5d6fa3bd12 /lib/libc/gen/getttyent.c | |
parent | 821a3b87a652fabbbe0c63b418858e7bc7a1537b (diff) | |
download | FreeBSD-src-b45ff0fb569a631733b0fe8174ef6bd2e76d6523.zip FreeBSD-src-b45ff0fb569a631733b0fe8174ef6bd2e76d6523.tar.gz |
* Remove __P and convert to ANSI prototypes.
* Remove 'register'. (some functions had 7+ register functions...)
* Fix SCM ID's.
Diffstat (limited to 'lib/libc/gen/getttyent.c')
-rw-r--r-- | lib/libc/gen/getttyent.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/libc/gen/getttyent.c b/lib/libc/gen/getttyent.c index bfbe833..e4eadc4 100644 --- a/lib/libc/gen/getttyent.c +++ b/lib/libc/gen/getttyent.c @@ -29,13 +29,13 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $FreeBSD$ */ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)getttyent.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ +#include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); #include <ttyent.h> #include <stdio.h> @@ -50,14 +50,14 @@ static char *line; #define MALLOCCHUNK 100 -static char *skip __P((char *)); -static char *value __P((char *)); +static char *skip(char *); +static char *value(char *); struct ttyent * getttynam(tty) const char *tty; { - register struct ttyent *t; + struct ttyent *t; if (strncmp(tty, "/dev/", 5) == 0) tty += 5; @@ -73,8 +73,8 @@ struct ttyent * getttyent() { static struct ttyent tty; - register char *p; - register int c; + char *p; + int c; size_t i; if (!tf && !setttyent()) @@ -165,10 +165,10 @@ getttyent() */ static char * skip(p) - register char *p; + char *p; { - register char *t; - register int c, q; + char *t; + int c, q; for (q = 0, t = p; (c = *p) != '\0'; p++) { if (c == '"') { @@ -199,7 +199,7 @@ skip(p) static char * value(p) - register char *p; + char *p; { return ((p = index(p, '=')) ? ++p : NULL); @@ -244,7 +244,7 @@ isttystat(tty, flag) const char *tty; int flag; { - register struct ttyent *t; + struct ttyent *t; return ((t = getttynam(tty)) == NULL) ? 0 : !!(t->ty_status & flag); } |