256 lines
7.2 KiB
HTML
256 lines
7.2 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<meta name="Copyright" content="Copyright (c) 2006 by IBM Corporation">
|
|
<title>Qp0zSetTerminalMode()--Set Modes for a Generic Terminal</title>
|
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
|
<!-- US Government Users Restricted Rights -->
|
|
<!-- Use, duplication or disclosure restricted by -->
|
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
|
<!-- Begin Header Records -->
|
|
<!-- file cleaned -->
|
|
<!-- Created by Mike Mundy for V5R1-->
|
|
<!-- Edited for tagging 2/2/2001 -->
|
|
<!-- End Header Records -->
|
|
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
|
|
</head>
|
|
<body>
|
|
<a name="Top_Of_Page"></a>
|
|
|
|
<!--Java sync-link-->
|
|
<script language="Javascript" src="../rzahg/synch.js" type="text/javascript">
|
|
</script>
|
|
|
|
<h2>Qp0zSetTerminalMode()--Set Modes for a Generic Terminal</h2>
|
|
|
|
<div class="box" style="width: 65%;">
|
|
<br>
|
|
Syntax
|
|
|
|
<pre>
|
|
#include <qp0ztrml.h>
|
|
int Qp0zSetTerminalMode( unsigned char <em>mode</em>, unsigned char <em>type</em>,
|
|
unsigned char <em>*reserved</em> );;
|
|
</pre>
|
|
|
|
Service Program Name: QP0ZTRMLC<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
Default Public Authority: *USE<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
Threadsafe: Yes<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
</div>
|
|
|
|
<p>The <strong>Qp0zSetTerminalMode()</strong> function allows a program to
|
|
control the input mode and wrap mode of the terminal window to which it is
|
|
connected. See <a href="gentrml.htm">Generic Terminal Concepts</a> for details
|
|
about using a terminal.</p>
|
|
|
|
<p><strong>Qp0zSetTerminalMode()</strong> supports setting the following
|
|
modes:</p>
|
|
|
|
<dl>
|
|
<dt><strong>QP0Z_TERMINAL_INPUT_MODE</strong> (0x01)</dt>
|
|
|
|
<dd>Set the input mode for the terminal window. When <em>type</em> is
|
|
QP0Z_TERMINAL_HIDDEN (0xBD), any input entered by the user is not visible on
|
|
the terminal window and is not echoed to the output area. When <em>type</em> is
|
|
QP0Z_TERMINAL_NORMAL (0xBE), any input entered by the user is visible on the
|
|
terminal window and is echoed to the output area. When <em>type</em> is
|
|
QP0Z_TERMINAL_PREVIOUS (0x49), the input mode is set to its previous value.<br><br>
|
|
</dd>
|
|
|
|
<dt><strong>QP0Z_TERMINAL_WRAP_MODE</strong> (0x02)</dt>
|
|
|
|
<dd>Set the wrap mode for the terminal window. When <em>type</em> is
|
|
QP0Z_TERMINAL_TRUNCATE (0x3E), for lines longer than the width of the terminal
|
|
window, only the data that fits in the output area is displayed. When <em>
|
|
type</em> is QP0Z_TERMINAL_WRAP (0x3D), for lines longer than the width of the
|
|
terminal window, the data is wrapped to the next line in the output area. When
|
|
<em>type</em> is QP0Z_TERMINAL_PREVIOUS (0x49), the wrap mode is set to its
|
|
previous value.</dd>
|
|
</dl>
|
|
|
|
<br>
|
|
<h3>Parameters</h3>
|
|
|
|
<dl>
|
|
<dt><strong><em>mode</em></strong></dt>
|
|
|
|
<dd>(Input)<br>
|
|
<p>Mode to set for the terminal window. The valid values are
|
|
QP0Z_TERMINAL_INPUT_MODE and QP0Z_TERMINAL_WRAP_MODE.</p>
|
|
</dd>
|
|
|
|
<dt><strong><em>type</em></strong></dt>
|
|
|
|
<dd>(Input)<br>
|
|
<p>Type associated with the mode. The valid values for QP0Z_TERMINAL_INPUT_MODE
|
|
are QP0Z_TERMINAL_HIDDEN, QP0Z_TERMINAL_NORMAL, and QP0Z_TERMINAL_PREVIOUS. The
|
|
valid values for QP0Z_TERMINAL_WRAP_MODE are QP0Z_TERMINAL_TRUNCATE,
|
|
QP0Z_TERMINAL_WRAP, and QP0Z_TERMINAL_PREVIOUS.</p>
|
|
</dd>
|
|
|
|
<dt><strong><em>reserved</em></strong></dt>
|
|
|
|
<dd>(Output)<br>
|
|
<p>Reserved parameter that must be set to NULL.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
<br>
|
|
<h3>Authorities and Locks</h3>
|
|
|
|
<p>None.</p>
|
|
|
|
<br>
|
|
<h3>Return Value</h3>
|
|
|
|
<table width="100%">
|
|
<!-- cols="10 90" -->
|
|
<tr>
|
|
<td align="left" valign="top"><em>0</em></td>
|
|
<td align="left" valign="top"><strong>Qp0zSetTerminalMode()</strong> was successful.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top"><em>value</em></td>
|
|
<td align="left" valign="top"><strong>Qp0zSetTerminalMode()</strong> was not successful. The value
|
|
returned is an errno indicating the failure.</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br><br>
|
|
<h3>Error Conditions</h3>
|
|
|
|
<p>If <strong>Qp0zSetTerminalMode()</strong> is not successful, the return
|
|
value usually indicates one of the following errors. Under some conditions, the
|
|
return value could indicate an error other than those listed here.</p>
|
|
|
|
<dl>
|
|
<dt><em>[EBADF]</em></dt>
|
|
|
|
<dd><p>Descriptor not valid.</p>
|
|
<p>A file descriptor argument was out of range, referred to a file that was not
|
|
open, or a read or write request was made to a file that is not open for that
|
|
operation.</p>
|
|
</dd>
|
|
|
|
<dt><em>[EFAULT]</em></dt>
|
|
|
|
<dd><p>The address used for an argument was not correct.</p>
|
|
<p>In attempting to use an argument in a call, the system detected an address
|
|
that was not valid.</p>
|
|
|
|
<p>Correct the argument in error.</p>
|
|
</dd>
|
|
|
|
<dt><em>[EINVAL]</em></dt>
|
|
|
|
<dd><p>The value specified for the argument is not correct.</p>
|
|
<p>A function was passed incorrect argument values or an operation was
|
|
attempted on an object and the operation specified is not supported for that
|
|
type of object.</p>
|
|
|
|
<p>Correct the argument in error and try your request again.</p>
|
|
</dd>
|
|
|
|
<dt><em>[EIO]</em></dt>
|
|
|
|
<dd><p>Input/output error.</p>
|
|
<p>A physical I/O error occurred.</p>
|
|
|
|
<p>See the previous message in the job log. Correct any errors indicated there
|
|
and try your operation again.</p>
|
|
</dd>
|
|
|
|
<dt><em>[ENOTTY]</em></dt>
|
|
|
|
<dd><p>Inappropriate I/O control operation.</p>
|
|
</dd>
|
|
|
|
<dt><em>[EUNKNOWN]</em></dt>
|
|
|
|
<dd><p>Unknown system state.</p>
|
|
|
|
<p>The operation failed due to an unknown system state. See any messages in the
|
|
job log and correct any errors that may be indicated and then retry the
|
|
operation.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
<br>
|
|
<h3>Usage Notes</h3>
|
|
|
|
<ol>
|
|
<li>Before calling <strong>Qp0zSetTerminalMode()</strong>, a program should
|
|
check to see if descriptor 0 is connected to a terminal by calling <a href=
|
|
"isatrml.htm">Qp0zIsATerminal()</a>.<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li>There is no way for the Generic Terminal to prevent multiple programs
|
|
calling <strong>Qp0zSetTerminalMode()</strong> to control the terminal. A
|
|
program must provide appropriate synchronization between calls to <strong>
|
|
Qp0zSetTerminalMode()</strong> to avoid confusing the user of the
|
|
terminal.</li>
|
|
</ol>
|
|
|
|
<br>
|
|
<h3>Related Information</h3>
|
|
|
|
<ul>
|
|
<li>The <<strong>qp0ztrml.h</strong>> file (see <a href="unix13.htm">
|
|
Header Files for UNIX-Type Functions</a>)<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li><a href="cntltrml.htm">Qp0zControlTerminal()</a>--Control a Generic
|
|
Terminal<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li><a href="endtrml.htm">Qp0zEndTerminal()</a>--End a Generic Terminal<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li><a href="gettrmlp.htm">Qp0zGetTerminalPid()</a>--Get Process ID for a
|
|
Generic Terminal<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li><a href="isatrml.htm">Qp0zIsATerminal()</a>--Determine Whether Descriptor
|
|
Is Connected to a Generic Terminal<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li><a href="runtrml.htm">Qp0zRunTerminal()</a>--Run a Generic Terminal<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li><a href="startrml.htm">Qp0zStartTerminal()</a>--Start a Generic
|
|
Terminal</li>
|
|
</ul>
|
|
|
|
<hr>
|
|
API introduced: V5R1
|
|
|
|
<hr>
|
|
<center>
|
|
<table cellpadding="2" cellspacing="2">
|
|
<tr align="center">
|
|
<td valign="middle" align="center">
|
|
<a href="#Top_Of_Page">Top</a> |
|
|
<a href="unix.htm">UNIX-Type APIs</a> |
|
|
<a href="aplist.htm">APIs by category</a></td>
|
|
</tr>
|
|
</table>
|
|
</center>
|
|
</body>
|
|
</html>
|
|
|