Update.
authorUlrich Drepper <drepper@redhat.com>
Sun, 30 Apr 2000 17:56:00 +0000 (17:56 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sun, 30 Apr 2000 17:56:00 +0000 (17:56 +0000)
2000-04-30  Ulrich Drepper  <drepper@redhat.com>

* manual/string.texi: Fix typo.
* manual/terminal.texi: Document gtty and stty.
Patch by Bryan Henderson <bryanh@giraffe-data.com>.

ChangeLog
manual/string.texi
manual/terminal.texi

index d8a6001..ab100a2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2000-04-30  Ulrich Drepper  <drepper@redhat.com>
+
+       * manual/string.texi: Fix typo.
+       * manual/terminal.texi: Document gtty and stty.
+       Patch by Bryan Henderson <bryanh@giraffe-data.com>.
+
 2000-04-30  Andreas Jaeger  <aj@suse.de>
 
        * posix/bits/posix1_lim.h (_POSIX_PATH_MAX): Increase to 256 in
index ebf3713..c91fe35 100644 (file)
@@ -1436,7 +1436,7 @@ The prototype for this function is in @file{string.h}.
 
 @comment string.h
 @comment GNU
-@deftypefun char *strfry(char *@var{string}) 
+@deftypefun {char *} strfry (char *@var{string}) 
 
 @code{strfry} creates a pseudorandom anagram of a string, replacing the
 input with the anagram in place.  For each position in the string,
index 866b0fe..e762be1 100644 (file)
@@ -19,7 +19,8 @@ descriptor is and how to open a file descriptor for a terminal device.
 * Canonical or Not::            Two basic styles of input processing.
 * Terminal Modes::              How to examine and modify flags controlling
                                 details of terminal I/O: echoing,
-                                 signals, editing.
+                                 signals, editing.  Posix.
+* BSD Terminal Modes::          BSD compatible terminal mode setting
 * Line Control::                Sending break sequences, clearing
                                  terminal buffers @dots{}
 * Noncanon Example::            How to read single characters without echo.
@@ -170,7 +171,11 @@ The choice of canonical or noncanonical input is controlled by the
 This section describes the various terminal attributes that control how
 input and output are done.  The functions, data structures, and symbolic
 constants are all declared in the header file @file{termios.h}.
-@c !!! should mention terminal attributes are distinct from file attributes
+
+Don't confuse terminal attributes with file attributes.  A device special
+file which is associated with a terminal has file attributes as described
+in @ref{File Attributes}.  These are unrelated to the attributes of the
+terminal device itself, which are discussed in this section.
 
 @menu
 * Mode Data Types::             The data type @code{struct termios} and
@@ -1629,6 +1634,59 @@ It does exactly this:
 @end smallexample
 @end deftypefun
 
+
+@node BSD Terminal Modes
+@section BSD Terminal Modes
+@cindex terminal modes, BSD
+
+The usual way to get and set terminal modes is with the functions described
+in @ref{Terminal Modes}.  However, on some systems you can use the 
+BSD-derived functions in this section to do some of the same thing.  On
+many systems, these functions do not exist.  Even with the GNU C library,
+the functions simply fail with @code{errno} = @code{ENOSYS} with many
+kernels, including Linux.
+
+The symbols used in this section are declared in @file{sgtty.h}.
+
+@comment termios.h
+@comment BSD
+@deftp {Data Type} {struct sgttyb}
+This structure is an input or output parameter list for @code{gtty} and
+@code{stty}.
+
+@table @code
+@item char sg_ispeed
+Line speed for input
+@item char sg_ospeed
+Line speed for output
+@item char sg_erase
+Erase character
+@item char sg_kill
+Kill character
+@item int sg_flags
+Various flags
+@end table
+@end deftp
+
+@comment sgtty.h
+@comment BSD
+@deftypefun int gtty (int @var{filedes}, struct sgttyb *@var{attributes})
+This function gets the attributes of a terminal.
+
+@code{gtty} sets *@var{attributes} to describe the terminal attributes
+of the terminal which is open with file descriptor @var{filedes}.
+@end deftypefun
+
+@comment sgtty.h
+@comment BSD
+@deftypefun int stty (int @var{filedes}, struct sgttyb * attributes)
+
+This function sets the attributes of a terminal.
+
+@code{stty} sets the terminal attributes of the terminal which is open with
+file descriptor @var{filedes} to those described by *@var{filedes}.
+@end deftypefun
+
 @node Line Control
 @section Line Control Functions
 @cindex terminal line control functions