diff --git a/include/ttyent.h b/include/ttyent.h index e8948386bff3..d8424f4e929d 100644 --- a/include/ttyent.h +++ b/include/ttyent.h @@ -1,4 +1,4 @@ -/* $NetBSD: ttyent.h,v 1.10 1998/07/27 11:14:37 mycroft Exp $ */ +/* $NetBSD: ttyent.h,v 1.11 1999/01/15 18:47:48 tsarna Exp $ */ /* * Copyright (c) 1989, 1993 @@ -46,9 +46,10 @@ #define _TTYS_ON "on" #define _TTYS_SECURE "secure" #define _TTYS_WINDOW "window" +#define _TTYS_CLASS "class" #define _TTYS_LOCAL "local" #define _TTYS_RTSCTS "rtscts" -#define _TTYS_DTRCTS "dtrcts" +#define _TTYS_DTRCTS "dtrcts" #define _TTYS_SOFTCAR "softcar" #define _TTYS_MDMBUF "mdmbuf" @@ -66,6 +67,7 @@ struct ttyent { int ty_status; /* status flags */ __aconst char *ty_window;/* command to start up window manager */ __aconst char *ty_comment;/* comment field */ + __aconst char *ty_class;/* category of tty usage */ }; __BEGIN_DECLS diff --git a/lib/libc/gen/getttyent.3 b/lib/libc/gen/getttyent.3 index e4842b6838e5..324e81eb8393 100644 --- a/lib/libc/gen/getttyent.3 +++ b/lib/libc/gen/getttyent.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: getttyent.3,v 1.9 1998/02/05 18:46:56 perry Exp $ +.\" $NetBSD: getttyent.3,v 1.10 1999/01/15 18:47:49 tsarna Exp $ .\" .\" Copyright (c) 1989, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -78,6 +78,7 @@ struct ttyent { int ty_status; /* flag values */ char *ty_window; /* command for window manager */ char *ty_comment; /* comment field */ + char *ty_class; /* category of tty usage */ }; .Ed .Pp @@ -123,6 +124,11 @@ The command to execute for a window system associated with the line. .It Fa ty_comment Any trailing comment field, with any leading hash marks (``#'') or whitespace removed. +.It Fa ty_class +A key indexing into a termcap-style database (/etc/ttyclasses) +of attributes for this class of tty. No attributes are currently +defined or used, so there are currently no functions to retrieve +them. .El .Pp If any of the fields pointing to character strings are unspecified, diff --git a/lib/libc/gen/getttyent.c b/lib/libc/gen/getttyent.c index 01c2a1527ef8..cda7f9c0d1fd 100644 --- a/lib/libc/gen/getttyent.c +++ b/lib/libc/gen/getttyent.c @@ -1,4 +1,4 @@ -/* $NetBSD: getttyent.c,v 1.13 1998/02/03 18:23:46 perry Exp $ */ +/* $NetBSD: getttyent.c,v 1.14 1999/01/15 18:47:49 tsarna Exp $ */ /* * Copyright (c) 1989, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)getttyent.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: getttyent.c,v 1.13 1998/02/03 18:23:46 perry Exp $"); +__RCSID("$NetBSD: getttyent.c,v 1.14 1999/01/15 18:47:49 tsarna Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -136,6 +136,8 @@ getttyent() tty.ty_status |= TTY_MDMBUF; else if (vcmp(_TTYS_WINDOW)) tty.ty_window = value(p); + else if (vcmp(_TTYS_CLASS)) + tty.ty_class = value(p); else break; } diff --git a/libexec/getty/ttys.5 b/libexec/getty/ttys.5 index 5b161c117222..64b82ced53d7 100644 --- a/libexec/getty/ttys.5 +++ b/libexec/getty/ttys.5 @@ -1,4 +1,4 @@ -.\" $NetBSD: ttys.5,v 1.11 1998/11/14 22:22:49 scottr Exp $ +.\" $NetBSD: ttys.5,v 1.12 1999/01/15 18:47:49 tsarna Exp $ .\" .\" Copyright (c) 1985, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -90,7 +90,8 @@ entry (see .Xr getttyent 3 ) or specify a window system process that .Xr init 8 -will maintain for the terminal line. +will maintain for the terminal line +or a key into a database of tty attributes (currently unused). .Pp As flag values, the strings ``on'' and ``off'' specify that .Xr init 8 @@ -119,6 +120,12 @@ will execute .Em before starting the command specified by the second field. .Pp +The string ``class='' may be followed by a quoted string used +as a key into a database of attributes for that category of tty. +See +.Xr getttynam 3 +for more information on this feature. +.Pp After changing the .Nm file a