diff options
Diffstat (limited to 'manual')
-rw-r--r-- | manual/string.texi | 2 | ||||
-rw-r--r-- | manual/terminal.texi | 62 |
2 files changed, 61 insertions, 3 deletions
diff --git a/manual/string.texi b/manual/string.texi index ebf3713378..c91fe350da 100644 --- a/manual/string.texi +++ b/manual/string.texi @@ -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, diff --git a/manual/terminal.texi b/manual/terminal.texi index 866b0feb77..e762be1655 100644 --- a/manual/terminal.texi +++ b/manual/terminal.texi @@ -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 |