summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRocco Caputo <troc@netrus.net>1998-05-10 15:36:24 +1200
committerTim Bunce <Tim.Bunce@ig.co.uk>1998-05-12 08:58:58 +1200
commit1eeb7509cc646c0e61b6b7efff5e431178e3f9be (patch)
treea4301c1312a651445a9415b0acea50752b548562
parent6b7383e970f4e07cdea3a62f1d12d79f871c65bb (diff)
downloadperl-1eeb7509cc646c0e61b6b7efff5e431178e3f9be.tar.gz
Clarify Termios usage in POSIX.pod
The included patch removes some ambiguity from the POSIX::Termios documentation. p5p-msgid: 199805101952.PAA12738@ns.netrus.net
-rw-r--r--ext/POSIX/POSIX.pod12
1 files changed, 7 insertions, 5 deletions
diff --git a/ext/POSIX/POSIX.pod b/ext/POSIX/POSIX.pod
index c781765a14..4726487b47 100644
--- a/ext/POSIX/POSIX.pod
+++ b/ext/POSIX/POSIX.pod
@@ -1392,7 +1392,9 @@ Tests the SigSet object to see if it contains a specific signal.
=item new
Create a new Termios object. This object will be destroyed automatically
-when it is no longer needed.
+when it is no longer needed. A Termios object corresponds to the termios
+C struct. new() mallocs a new one, getattr() fills it from a file descriptor,
+and setattr() sets a file descriptor's parameters to match Termios' contents.
$termios = POSIX::Termios->new;
@@ -1474,13 +1476,13 @@ array so an index must be specified.
Set the c_cflag field of a termios object.
- $termios->setcflag( &POSIX::CLOCAL );
+ $termios->setcflag( $c_cflag | &POSIX::CLOCAL );
=item setiflag
Set the c_iflag field of a termios object.
- $termios->setiflag( &POSIX::BRKINT );
+ $termios->setiflag( $c_iflag | &POSIX::BRKINT );
=item setispeed
@@ -1494,13 +1496,13 @@ Returns C<undef> on failure.
Set the c_lflag field of a termios object.
- $termios->setlflag( &POSIX::ECHO );
+ $termios->setlflag( $c_lflag | &POSIX::ECHO );
=item setoflag
Set the c_oflag field of a termios object.
- $termios->setoflag( &POSIX::OPOST );
+ $termios->setoflag( $c_oflag | &POSIX::OPOST );
=item setospeed